From 5b0c8a1266016c6418555399da83fbc7210c6734 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Fri, 15 Jan 2010 20:03:45 +1100 Subject: Removing internal delivery agents --- actionmailer/lib/action_mailer/delivery_method.rb | 56 ---------------------- .../lib/action_mailer/delivery_method/file.rb | 21 -------- .../lib/action_mailer/delivery_method/sendmail.rb | 22 --------- .../lib/action_mailer/delivery_method/smtp.rb | 30 ------------ .../lib/action_mailer/delivery_method/test.rb | 12 ----- 5 files changed, 141 deletions(-) delete mode 100644 actionmailer/lib/action_mailer/delivery_method.rb delete mode 100644 actionmailer/lib/action_mailer/delivery_method/file.rb delete mode 100644 actionmailer/lib/action_mailer/delivery_method/sendmail.rb delete mode 100644 actionmailer/lib/action_mailer/delivery_method/smtp.rb delete mode 100644 actionmailer/lib/action_mailer/delivery_method/test.rb diff --git a/actionmailer/lib/action_mailer/delivery_method.rb b/actionmailer/lib/action_mailer/delivery_method.rb deleted file mode 100644 index 4f7d3afc3c..0000000000 --- a/actionmailer/lib/action_mailer/delivery_method.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'active_support/core_ext/class' - -module ActionMailer - module DeliveryMethod - autoload :File, 'action_mailer/delivery_method/file' - autoload :Sendmail, 'action_mailer/delivery_method/sendmail' - autoload :Smtp, 'action_mailer/delivery_method/smtp' - autoload :Test, 'action_mailer/delivery_method/test' - - # Creates a new DeliveryMethod object according to the given options. - # - # If no arguments are passed to this method, then a new - # ActionMailer::DeliveryMethod::Stmp object will be returned. - # - # If you pass a Symbol as the first argument, then a corresponding - # delivery method class under the ActionMailer::DeliveryMethod namespace - # will be created. - # For example: - # - # ActionMailer::DeliveryMethod.lookup_method(:sendmail) - # # => returns a new ActionMailer::DeliveryMethod::Sendmail object - # - # If the first argument is not a Symbol, then it will simply be returned: - # - # ActionMailer::DeliveryMethod.lookup_method(MyOwnDeliveryMethod.new) - # # => returns MyOwnDeliveryMethod.new - def self.lookup_method(delivery_method) - case delivery_method - when Symbol - method_name = delivery_method.to_s.camelize - method_class = ActionMailer::DeliveryMethod.const_get(method_name) - method_class.new - when nil # default - Smtp.new - else - delivery_method - end - end - - # An abstract delivery method class. There are multiple delivery method classes. - # See the classes under the ActionMailer::DeliveryMethod, e.g. - # ActionMailer::DeliveryMethod::Smtp. - # Smtp is the default delivery method for production - # while Test is used in testing. - # - # each delivery method exposes just one method - # - # delivery_method = ActionMailer::DeliveryMethod::Smtp.new - # delivery_method.perform_delivery(mail) # send the mail via smtp - # - class Method - superclass_delegating_accessor :settings - self.settings = {} - end - end -end diff --git a/actionmailer/lib/action_mailer/delivery_method/file.rb b/actionmailer/lib/action_mailer/delivery_method/file.rb deleted file mode 100644 index 571e32df49..0000000000 --- a/actionmailer/lib/action_mailer/delivery_method/file.rb +++ /dev/null @@ -1,21 +0,0 @@ -require 'tmpdir' - -module ActionMailer - module DeliveryMethod - - # A delivery method implementation which writes all mails to a file. - class File < Method - self.settings = { - :location => defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails" - } - - def perform_delivery(mail) - FileUtils.mkdir_p settings[:location] - - mail.destinations.uniq.each do |to| - ::File.open(::File.join(settings[:location], to), 'a') { |f| f.write(mail) } - end - end - end - end -end diff --git a/actionmailer/lib/action_mailer/delivery_method/sendmail.rb b/actionmailer/lib/action_mailer/delivery_method/sendmail.rb deleted file mode 100644 index db55af79f1..0000000000 --- a/actionmailer/lib/action_mailer/delivery_method/sendmail.rb +++ /dev/null @@ -1,22 +0,0 @@ -module ActionMailer - module DeliveryMethod - - # A delivery method implementation which sends via sendmail. - class Sendmail < Method - self.settings = { - :location => '/usr/sbin/sendmail', - :arguments => '-i -t' - } - - def perform_delivery(mail) - sendmail_args = settings[:arguments] - sendmail_args += " -f \"#{mail['return-path']}\"" if mail['return-path'] - IO.popen("#{settings[:location]} #{sendmail_args}","w+") do |sm| - sm.print(mail.encoded.gsub(/\r/, '')) - sm.flush - end - end - end - - end -end diff --git a/actionmailer/lib/action_mailer/delivery_method/smtp.rb b/actionmailer/lib/action_mailer/delivery_method/smtp.rb deleted file mode 100644 index af30c498b5..0000000000 --- a/actionmailer/lib/action_mailer/delivery_method/smtp.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'net/smtp' - -module ActionMailer - module DeliveryMethod - # A delivery method implementation which sends via smtp. - class Smtp < Method - self.settings = { - :address => "localhost", - :port => 25, - :domain => 'localhost.localdomain', - :user_name => nil, - :password => nil, - :authentication => nil, - :enable_starttls_auto => true, - } - - def perform_delivery(mail) - destinations = mail.destinations - sender = (mail['return-path'] && mail['return-path'].address) || mail['from'] - - smtp = Net::SMTP.new(settings[:address], settings[:port]) - smtp.enable_starttls_auto if settings[:enable_starttls_auto] && smtp.respond_to?(:enable_starttls_auto) - smtp.start(settings[:domain], settings[:user_name], settings[:password], - settings[:authentication]) do |smtp| - smtp.sendmail(mail.encoded, sender, destinations) - end - end - end - end -end diff --git a/actionmailer/lib/action_mailer/delivery_method/test.rb b/actionmailer/lib/action_mailer/delivery_method/test.rb deleted file mode 100644 index 6e3239d52a..0000000000 --- a/actionmailer/lib/action_mailer/delivery_method/test.rb +++ /dev/null @@ -1,12 +0,0 @@ -module ActionMailer - module DeliveryMethod - - # A delivery method implementation designed for testing, which just appends each record to the :deliveries array - class Test < Method - def perform_delivery(mail) - ActionMailer::Base.deliveries << mail - end - end - - end -end -- cgit v1.2.3 From 0750304c0117c85f06cf1ea608747b8fda0a0ecd Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Sat, 16 Jan 2010 22:10:11 +1100 Subject: Migrated over to Mail doing delivery. --- actionmailer/lib/action_mailer/base.rb | 87 +++++++++++++++++++++++-------- actionmailer/test/abstract_unit.rb | 6 ++- actionmailer/test/delivery_method_test.rb | 63 +++++++++++++++++----- actionmailer/test/mail_service_test.rb | 12 ++--- actionmailer/test/test_helper_test.rb | 2 +- 5 files changed, 125 insertions(+), 45 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index b9a01356ba..89bd45a994 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -355,20 +355,42 @@ module ActionMailer #:nodoc: alias :controller_path :mailer_name class << self - attr_writer :mailer_name - - delegate :settings, :settings=, :to => ActionMailer::DeliveryMethod::File, :prefix => :file - delegate :settings, :settings=, :to => ActionMailer::DeliveryMethod::Sendmail, :prefix => :sendmail - delegate :settings, :settings=, :to => ActionMailer::DeliveryMethod::Smtp, :prefix => :smtp def mailer_name @mailer_name ||= name.underscore end - alias :controller_path :mailer_name + attr_writer :mailer_name + + def file_settings + @file_settings ||= {:location => defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails"} + end + attr_writer :file_settings - def delivery_method=(method_name) - @delivery_method = ActionMailer::DeliveryMethod.lookup_method(method_name) + def sendmail_settings + @sendmail_settings ||= { :location => '/usr/sbin/sendmail', + :arguments => '-i -t' } end + attr_writer :sendmail_settings + + def smtp_settings + @smtp_settings ||= { :address => "localhost", + :port => 25, + :domain => 'localhost.localdomain', + :user_name => nil, + :password => nil, + :authentication => nil, + :enable_starttls_auto => true } + end + attr_writer :smtp_settings + + def custom_settings + @custom_settings ||= {} + end + attr_writer :custom_settings + + attr_writer :delivery_method + + alias :controller_path :mailer_name def respond_to?(method_symbol, include_private = false) #:nodoc: matches_dynamic_method?(method_symbol) || super @@ -413,7 +435,35 @@ module ActionMailer #:nodoc: # email.set_some_obscure_header "frobnicate" # MyMailer.deliver(email) def deliver(mail) - new.deliver!(mail) + raise "no mail object available for delivery!" unless mail + + begin + ActiveSupport::Notifications.instrument("action_mailer.deliver", + :mailer => self.name) do |payload| + set_payload_for_mail(payload, mail) + mail.delivery_method delivery_method, delivery_settings + if @@perform_deliveries + mail.deliver! + self.deliveries << mail + end + end + rescue Exception => e # Net::SMTP errors or sendmail pipe errors + raise e if raise_delivery_errors + end + + mail + end + + # Get the delivery settings set. This is set using the :smtp_settings, + # :sendmail_settings, :file_settings or :custom_setings + # options hashes. You can set :custom_settings if you are providing + # your own Custom Delivery Method and want to pass options to it. + def delivery_settings + if [:smtp, :sendmail, :file].include?(delivery_method) + instance_variable_get("@#{delivery_method}_settings") + else + @custom_settings + end end def template_root @@ -506,19 +556,7 @@ module ActionMailer #:nodoc: # object (from the create! method). If no cached mail object exists, and # no alternate has been given as the parameter, this will fail. def deliver!(mail = @mail) - raise "no mail object available for delivery!" unless mail - - begin - ActiveSupport::Notifications.instrument("action_mailer.deliver", - :template => template, :mailer => self.class.name) do |payload| - self.class.set_payload_for_mail(payload, mail) - self.delivery_method.perform_delivery(mail) if perform_deliveries - end - rescue Exception => e # Net::SMTP errors or sendmail pipe errors - raise e if raise_delivery_errors - end - - mail + self.class.deliver(mail) end private @@ -533,6 +571,11 @@ module ActionMailer #:nodoc: @mime_version ||= @@default_mime_version.dup if @@default_mime_version @mailer_name ||= self.class.mailer_name.dup + @delivery_method = self.class.delivery_method + @smtp_settings = self.class.smtp_settings.dup + @sendmail_settings = self.class.sendmail_settings.dup + @file_settings = self.class.file_settings.dup + @custom_settings = self.class.custom_settings.dup @template ||= method_name @parts ||= [] diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index 50b8a53006..1fc5ab85e0 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -26,6 +26,7 @@ FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures') ActionMailer::Base.template_root = FIXTURE_LOAD_PATH class MockSMTP + def self.deliveries @@deliveries end @@ -41,6 +42,7 @@ class MockSMTP def start(*args) yield self end + end class Net::SMTP @@ -57,9 +59,9 @@ rescue LoadError $stderr.puts "Skipping #{test_name} tests. `gem install #{gem_name}` and try again." end -def set_delivery_method(delivery_method) +def set_delivery_method(method) @old_delivery_method = ActionMailer::Base.delivery_method - ActionMailer::Base.delivery_method = delivery_method + ActionMailer::Base.delivery_method = method end def restore_delivery_method diff --git a/actionmailer/test/delivery_method_test.rb b/actionmailer/test/delivery_method_test.rb index 8f8c6b0275..fb43086423 100644 --- a/actionmailer/test/delivery_method_test.rb +++ b/actionmailer/test/delivery_method_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'mail' class DefaultDeliveryMethodMailer < ActionMailer::Base end @@ -12,18 +13,22 @@ class FileDeliveryMethodMailer < ActionMailer::Base end class CustomDeliveryMethod - attr_accessor :custom_deliveries - def initialize() - @customer_deliveries = [] + + def initialize(values) + @custom_deliveries = [] end - def self.perform_delivery(mail) + attr_accessor :custom_deliveries + + attr_accessor :settings + + def deliver!(mail) self.custom_deliveries << mail end end class CustomerDeliveryMailer < ActionMailer::Base - self.delivery_method = CustomDeliveryMethod.new + self.delivery_method = CustomDeliveryMethod end class ActionMailerBase_delivery_method_Test < Test::Unit::TestCase @@ -36,7 +41,18 @@ class ActionMailerBase_delivery_method_Test < Test::Unit::TestCase end def test_should_be_the_default_smtp - assert_instance_of ActionMailer::DeliveryMethod::Smtp, ActionMailer::Base.delivery_method + assert_equal :smtp, ActionMailer::Base.delivery_method + end + + def test_should_have_default_smtp_delivery_method_settings + settings = { :address => "localhost", + :port => 25, + :domain => 'localhost.localdomain', + :user_name => nil, + :password => nil, + :authentication => nil, + :enable_starttls_auto => true } + assert_equal settings, ActionMailer::Base.smtp_settings end end @@ -50,7 +66,18 @@ class DefaultDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase end def test_should_be_the_default_smtp - assert_instance_of ActionMailer::DeliveryMethod::Smtp, DefaultDeliveryMethodMailer.delivery_method + assert_equal :smtp, DefaultDeliveryMethodMailer.delivery_method + end + + def test_should_have_default_smtp_delivery_method_settings + settings = { :address => "localhost", + :port => 25, + :domain => 'localhost.localdomain', + :user_name => nil, + :password => nil, + :authentication => nil, + :enable_starttls_auto => true } + assert_equal settings, DefaultDeliveryMethodMailer.smtp_settings end end @@ -64,7 +91,13 @@ class NonDefaultDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase end def test_should_be_the_set_delivery_method - assert_instance_of ActionMailer::DeliveryMethod::Sendmail, NonDefaultDeliveryMethodMailer.delivery_method + assert_equal :sendmail, NonDefaultDeliveryMethodMailer.delivery_method + end + + def test_should_have_default_sendmail_delivery_method_settings + settings = {:location => '/usr/sbin/sendmail', + :arguments => '-i -t'} + assert_equal settings, NonDefaultDeliveryMethodMailer.sendmail_settings end end @@ -78,11 +111,12 @@ class FileDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase end def test_should_be_the_set_delivery_method - assert_instance_of ActionMailer::DeliveryMethod::File, FileDeliveryMethodMailer.delivery_method + assert_equal :file, FileDeliveryMethodMailer.delivery_method end - def test_should_default_location_to_the_tmpdir - assert_equal "#{Dir.tmpdir}/mails", ActionMailer::Base.file_settings[:location] + def test_should_have_default_file_delivery_method_settings + settings = {:location => "#{Dir.tmpdir}/mails"} + assert_equal settings, FileDeliveryMethodMailer.file_settings end end @@ -96,6 +130,11 @@ class CustomDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase end def test_should_be_the_set_delivery_method - assert_instance_of CustomDeliveryMethod, CustomerDeliveryMailer.delivery_method + assert_equal CustomDeliveryMethod, CustomerDeliveryMailer.delivery_method + end + + def test_should_have_default_custom_delivery_method_settings + settings = {} + assert_equal settings, CustomerDeliveryMailer.custom_settings end end diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index cd41739f1a..c14dd644cd 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -546,7 +546,7 @@ class ActionMailerTest < Test::Unit::TestCase assert_not_nil mail mail, from, to = mail - assert_equal 'system@loudthinking.com', from.addresses.first + assert_equal 'system@loudthinking.com', from end def test_reply_to @@ -675,16 +675,13 @@ class ActionMailerTest < Test::Unit::TestCase def test_doesnt_raise_errors_when_raise_delivery_errors_is_false ActionMailer::Base.raise_delivery_errors = false - TestMailer.delivery_method.expects(:perform_delivery).raises(Exception) + Mail::Message.any_instance.expects(:deliver!).raises(Exception) assert_nothing_raised { TestMailer.deliver_signed_up(@recipient) } end def test_performs_delivery_via_sendmail - sm = mock() - sm.expects(:print).with(anything) - sm.expects(:flush) - IO.expects(:popen).once.with('/usr/sbin/sendmail -i -t', 'w+').yields(sm) - ActionMailer::Base.delivery_method = :sendmail + IO.expects(:popen).once.with('/usr/sbin/sendmail -i -t test@localhost', 'w+') + TestMailer.delivery_method = :sendmail TestMailer.deliver_signed_up(@recipient) end @@ -1113,7 +1110,6 @@ EOF def test_starttls_is_not_enabled ActionMailer::Base.smtp_settings[:enable_starttls_auto] = false MockSMTP.any_instance.expects(:respond_to?).never - MockSMTP.any_instance.expects(:enable_starttls_auto).never ActionMailer::Base.delivery_method = :smtp TestMailer.deliver_signed_up(@recipient) ensure diff --git a/actionmailer/test/test_helper_test.rb b/actionmailer/test/test_helper_test.rb index 1fed26f78f..48e4433e98 100644 --- a/actionmailer/test/test_helper_test.rb +++ b/actionmailer/test/test_helper_test.rb @@ -12,7 +12,7 @@ end class TestHelperMailerTest < ActionMailer::TestCase def test_setup_sets_right_action_mailer_options - assert_instance_of ActionMailer::DeliveryMethod::Test, ActionMailer::Base.delivery_method + assert_equal :test, ActionMailer::Base.delivery_method assert ActionMailer::Base.perform_deliveries assert_equal [], ActionMailer::Base.deliveries end -- cgit v1.2.3 From 03c1457eb5f05519dfc76750d72307258c7771e1 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Sat, 16 Jan 2010 22:43:13 +1100 Subject: Removed autoload of DeliveryMethods --- actionmailer/lib/action_mailer.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index 55ddbb24f4..66b07c39f4 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -32,7 +32,6 @@ module ActionMailer autoload :AdvAttrAccessor autoload :Base - autoload :DeliveryMethod autoload :DeprecatedBody autoload :MailHelper autoload :Quoting -- cgit v1.2.3 From 9a3a0d15fcf527894bec03b9e226c02bdc800f3e Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Sun, 17 Jan 2010 21:02:38 +1100 Subject: Updating mail require to 2.0.0 --- actionmailer/actionmailer.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionmailer/actionmailer.gemspec b/actionmailer/actionmailer.gemspec index 96549bf29c..b860f3455a 100644 --- a/actionmailer/actionmailer.gemspec +++ b/actionmailer/actionmailer.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |s| s.homepage = "http://www.rubyonrails.org" s.add_dependency('actionpack', '= 3.0.pre') - s.add_dependency('mail', '~> 1.6.0') + s.add_dependency('mail', '~> 2.0.0') s.files = Dir['CHANGELOG', 'README', 'MIT-LICENSE', 'lib/**/*'] s.has_rdoc = true -- cgit v1.2.3 From ccb7d9def3c20037c9ed5989d8cae1ed68763f4f Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Sun, 17 Jan 2010 23:27:59 +1100 Subject: Fixing up base to refactor settings --- actionmailer/lib/action_mailer/base.rb | 70 +++++++++++++--------------------- actionmailer/test/mail_service_test.rb | 8 ++-- 2 files changed, 31 insertions(+), 47 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 89bd45a994..c1cce73303 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -361,39 +361,26 @@ module ActionMailer #:nodoc: end attr_writer :mailer_name - def file_settings - @file_settings ||= {:location => defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails"} - end - attr_writer :file_settings - - def sendmail_settings - @sendmail_settings ||= { :location => '/usr/sbin/sendmail', - :arguments => '-i -t' } - end - attr_writer :sendmail_settings - - def smtp_settings - @smtp_settings ||= { :address => "localhost", - :port => 25, - :domain => 'localhost.localdomain', - :user_name => nil, - :password => nil, - :authentication => nil, - :enable_starttls_auto => true } - end - attr_writer :smtp_settings - - def custom_settings - @custom_settings ||= {} + def delivery_settings + @delivery_settings ||= { :file => { :location => defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails" }, + :smtp => { :address => "localhost", + :port => 25, + :domain => 'localhost.localdomain', + :user_name => nil, + :password => nil, + :authentication => nil, + :enable_starttls_auto => true }, + :sendmail => { :location => '/usr/sbin/sendmail', + :arguments => '-i -t' } + } end - attr_writer :custom_settings attr_writer :delivery_method alias :controller_path :mailer_name def respond_to?(method_symbol, include_private = false) #:nodoc: - matches_dynamic_method?(method_symbol) || super + matches_dynamic_method?(method_symbol) || matches_settings_method?(method_symbol) || super end def method_missing(method_symbol, *parameters) #:nodoc: @@ -404,6 +391,8 @@ module ActionMailer #:nodoc: when 'new' then nil else super end + elsif match = matches_settings_method?(method_symbol) + delivery_settings[match[1].to_sym] = parameters[0] else super end @@ -441,7 +430,8 @@ module ActionMailer #:nodoc: ActiveSupport::Notifications.instrument("action_mailer.deliver", :mailer => self.name) do |payload| set_payload_for_mail(payload, mail) - mail.delivery_method delivery_method, delivery_settings + + mail.delivery_method delivery_method, get_delivery_settings(delivery_method) if @@perform_deliveries mail.deliver! self.deliveries << mail @@ -454,18 +444,6 @@ module ActionMailer #:nodoc: mail end - # Get the delivery settings set. This is set using the :smtp_settings, - # :sendmail_settings, :file_settings or :custom_setings - # options hashes. You can set :custom_settings if you are providing - # your own Custom Delivery Method and want to pass options to it. - def delivery_settings - if [:smtp, :sendmail, :file].include?(delivery_method) - instance_variable_get("@#{delivery_method}_settings") - else - @custom_settings - end - end - def template_root self.view_paths && self.view_paths.first end @@ -487,6 +465,16 @@ module ActionMailer #:nodoc: end private + + def get_delivery_settings(method) #:nodoc: + method.is_a?(Symbol) ? delivery_settings[method] : delivery_settings[:custom] + end + + def matches_settings_method?(method_name) #:nodoc: + method_name = method_name.to_s + delivery_method.is_a?(Symbol) ? method = delivery_method : method = :custom + /(file|sendmail|smtp)_settings$/.match(method_name) + end def matches_dynamic_method?(method_name) #:nodoc: method_name = method_name.to_s @@ -572,10 +560,6 @@ module ActionMailer #:nodoc: @mailer_name ||= self.class.mailer_name.dup @delivery_method = self.class.delivery_method - @smtp_settings = self.class.smtp_settings.dup - @sendmail_settings = self.class.sendmail_settings.dup - @file_settings = self.class.file_settings.dup - @custom_settings = self.class.custom_settings.dup @template ||= method_name @parts ||= [] diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index c14dd644cd..e53d8a38ef 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -1092,7 +1092,7 @@ EOF end def test_starttls_is_enabled_if_supported - ActionMailer::Base.smtp_settings[:enable_starttls_auto] = true + ActionMailer::Base.delivery_settings[:smtp].merge!(:enable_starttls_auto => true) MockSMTP.any_instance.expects(:respond_to?).with(:enable_starttls_auto).returns(true) MockSMTP.any_instance.expects(:enable_starttls_auto) ActionMailer::Base.delivery_method = :smtp @@ -1100,7 +1100,7 @@ EOF end def test_starttls_is_disabled_if_not_supported - ActionMailer::Base.smtp_settings[:enable_starttls_auto] = true + ActionMailer::Base.delivery_settings[:smtp].merge!(:enable_starttls_auto => true) MockSMTP.any_instance.expects(:respond_to?).with(:enable_starttls_auto).returns(false) MockSMTP.any_instance.expects(:enable_starttls_auto).never ActionMailer::Base.delivery_method = :smtp @@ -1108,12 +1108,12 @@ EOF end def test_starttls_is_not_enabled - ActionMailer::Base.smtp_settings[:enable_starttls_auto] = false + ActionMailer::Base.delivery_settings[:smtp].merge!(:enable_starttls_auto => false) MockSMTP.any_instance.expects(:respond_to?).never ActionMailer::Base.delivery_method = :smtp TestMailer.deliver_signed_up(@recipient) ensure - ActionMailer::Base.smtp_settings[:enable_starttls_auto] = true + ActionMailer::Base.delivery_settings[:smtp].merge!(:enable_starttls_auto => true) end end -- cgit v1.2.3 From d201d39437c754fa38b14dd4168fab601399918e Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Tue, 19 Jan 2010 23:09:46 +1100 Subject: latest updates --- actionmailer/lib/action_mailer/base.rb | 22 ++++++++++------------ actionmailer/test/mail_layout_test.rb | 1 + 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index e0a99fa00c..fd251ff223 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -354,6 +354,8 @@ module ActionMailer #:nodoc: # Alias controller_path to mailer_name so render :partial in views work. alias :controller_path :mailer_name + class_inheritable_accessor :delivery_method + class << self def mailer_name @@ -361,21 +363,17 @@ module ActionMailer #:nodoc: end attr_writer :mailer_name + # Mail uses the same defaults as Rails, except for the file delivery method + # save location so we just add this here. def delivery_settings - @delivery_settings ||= { :file => { :location => defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails" }, - :smtp => { :address => "localhost", - :port => 25, - :domain => 'localhost.localdomain', - :user_name => nil, - :password => nil, - :authentication => nil, - :enable_starttls_auto => true }, - :sendmail => { :location => '/usr/sbin/sendmail', - :arguments => '-i -t' } - } + @delivery_settings ||= {:file => {:location => defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails"}} end - attr_writer :delivery_method + # Setup the default settings for Mail delivery + Mail.defaults do + method = ActionMailer::Base.delivery_method ||= :smtp + delivery_method method + end alias :controller_path :mailer_name diff --git a/actionmailer/test/mail_layout_test.rb b/actionmailer/test/mail_layout_test.rb index 0877e7b2cb..b9ff075461 100644 --- a/actionmailer/test/mail_layout_test.rb +++ b/actionmailer/test/mail_layout_test.rb @@ -1,6 +1,7 @@ require 'abstract_unit' class AutoLayoutMailer < ActionMailer::Base + def hello(recipient) recipients recipient subject "You have a mail" -- cgit v1.2.3 From c8e2998701653df9035232778d60f18c4a07abb4 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Tue, 19 Jan 2010 23:36:49 +1100 Subject: First pass on fixing delivery method --- actionmailer/lib/action_mailer/base.rb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index fd251ff223..082560e695 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -354,7 +354,8 @@ module ActionMailer #:nodoc: # Alias controller_path to mailer_name so render :partial in views work. alias :controller_path :mailer_name - class_inheritable_accessor :delivery_method + superclass_delegating_accessor :delivery_method + self.delivery_method = :smtp class << self @@ -369,12 +370,6 @@ module ActionMailer #:nodoc: @delivery_settings ||= {:file => {:location => defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails"}} end - # Setup the default settings for Mail delivery - Mail.defaults do - method = ActionMailer::Base.delivery_method ||= :smtp - delivery_method method - end - alias :controller_path :mailer_name def respond_to?(method_symbol, include_private = false) #:nodoc: @@ -390,6 +385,7 @@ module ActionMailer #:nodoc: else super end elsif match = matches_settings_method?(method_symbol) + # TODO Deprecation warning delivery_settings[match[1].to_sym] = parameters[0] else super @@ -463,7 +459,7 @@ module ActionMailer #:nodoc: end private - + def get_delivery_settings(method) #:nodoc: method.is_a?(Symbol) ? delivery_settings[method] : delivery_settings[:custom] end -- cgit v1.2.3 From c1848f9736d9a4a45181642106acecb6a83a45a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 19 Jan 2010 14:28:04 +0100 Subject: Get all tests passing. --- actionmailer/lib/action_mailer/base.rb | 36 ++++++++++++++++++++++++++++------ actionmailer/test/mail_service_test.rb | 9 ++------- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 082560e695..5ece35e69b 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -367,7 +367,29 @@ module ActionMailer #:nodoc: # Mail uses the same defaults as Rails, except for the file delivery method # save location so we just add this here. def delivery_settings - @delivery_settings ||= {:file => {:location => defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails"}} + @@delivery_settings ||= begin + hash = Hash.new { |h,k| h[k] = {} } + hash[:file] = { + :location => defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails" + } + + hash[:smtp] = { + :address => "localhost", + :port => 25, + :domain => 'localhost.localdomain', + :user_name => nil, + :password => nil, + :authentication => nil, + :enable_starttls_auto => true + } + + hash[:sendmail] = { + :location => '/usr/sbin/sendmail', + :arguments => '-i -t' + } + + hash + end end alias :controller_path :mailer_name @@ -386,7 +408,11 @@ module ActionMailer #:nodoc: end elsif match = matches_settings_method?(method_symbol) # TODO Deprecation warning - delivery_settings[match[1].to_sym] = parameters[0] + if match[2] + delivery_settings[match[1].to_sym] = parameters[0] + else + delivery_settings[match[1].to_sym] + end else super end @@ -461,13 +487,11 @@ module ActionMailer #:nodoc: private def get_delivery_settings(method) #:nodoc: - method.is_a?(Symbol) ? delivery_settings[method] : delivery_settings[:custom] + delivery_settings[method] end def matches_settings_method?(method_name) #:nodoc: - method_name = method_name.to_s - delivery_method.is_a?(Symbol) ? method = delivery_method : method = :custom - /(file|sendmail|smtp)_settings$/.match(method_name) + /(\w+)_settings(=)?$/.match(method_name.to_s) end def matches_dynamic_method?(method_name) #:nodoc: diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index 17e7992e29..7b5f8b1ffc 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -680,7 +680,7 @@ class ActionMailerTest < Test::Unit::TestCase def test_performs_delivery_via_sendmail IO.expects(:popen).once.with('/usr/sbin/sendmail -i -t test@localhost', 'w+') - TestMailer.delivery_method = :sendmail + ActionMailer::Base.delivery_method = :sendmail TestMailer.deliver_signed_up(@recipient) end @@ -1069,12 +1069,7 @@ EOF def test_return_path_with_create mail = TestMailer.create_return_path - assert_equal "another@somewhere.test", mail['return-path'].to_s - end - - def test_return_path_with_create - mail = TestMailer.create_return_path - assert_equal ["another@somewhere.test"], mail.return_path + assert_equal "another@somewhere.test", mail.return_path end def test_return_path_with_deliver -- cgit v1.2.3 From e10f51b6b7b6260824cc86085be49cae216cf06c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 19 Jan 2010 15:34:58 +0100 Subject: Refactor delivery methods. --- actionmailer/lib/action_mailer.rb | 1 + actionmailer/lib/action_mailer/base.rb | 81 ++------------- actionmailer/lib/action_mailer/delivery_methods.rb | 71 +++++++++++++ actionmailer/lib/action_mailer/deprecated_body.rb | 10 +- actionmailer/test/delivery_method_test.rb | 115 +++++---------------- 5 files changed, 113 insertions(+), 165 deletions(-) create mode 100644 actionmailer/lib/action_mailer/delivery_methods.rb diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index 66b07c39f4..f1c94e9e69 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -32,6 +32,7 @@ module ActionMailer autoload :AdvAttrAccessor autoload :Base + autoload :DeliveryMethods autoload :DeprecatedBody autoload :MailHelper autoload :Quoting diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 5ece35e69b..be6d93316f 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -264,6 +264,8 @@ module ActionMailer #:nodoc: helper ActionMailer::MailHelper include ActionMailer::DeprecatedBody + include ActionMailer::DeliveryMethods + private_class_method :new #:nodoc: @@raise_delivery_errors = true @@ -354,9 +356,6 @@ module ActionMailer #:nodoc: # Alias controller_path to mailer_name so render :partial in views work. alias :controller_path :mailer_name - superclass_delegating_accessor :delivery_method - self.delivery_method = :smtp - class << self def mailer_name @@ -364,38 +363,10 @@ module ActionMailer #:nodoc: end attr_writer :mailer_name - # Mail uses the same defaults as Rails, except for the file delivery method - # save location so we just add this here. - def delivery_settings - @@delivery_settings ||= begin - hash = Hash.new { |h,k| h[k] = {} } - hash[:file] = { - :location => defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails" - } - - hash[:smtp] = { - :address => "localhost", - :port => 25, - :domain => 'localhost.localdomain', - :user_name => nil, - :password => nil, - :authentication => nil, - :enable_starttls_auto => true - } - - hash[:sendmail] = { - :location => '/usr/sbin/sendmail', - :arguments => '-i -t' - } - - hash - end - end - alias :controller_path :mailer_name def respond_to?(method_symbol, include_private = false) #:nodoc: - matches_dynamic_method?(method_symbol) || matches_settings_method?(method_symbol) || super + matches_dynamic_method?(method_symbol) || super end def method_missing(method_symbol, *parameters) #:nodoc: @@ -406,13 +377,6 @@ module ActionMailer #:nodoc: when 'new' then nil else super end - elsif match = matches_settings_method?(method_symbol) - # TODO Deprecation warning - if match[2] - delivery_settings[match[1].to_sym] = parameters[0] - else - delivery_settings[match[1].to_sym] - end else super end @@ -447,11 +411,13 @@ module ActionMailer #:nodoc: raise "no mail object available for delivery!" unless mail begin - ActiveSupport::Notifications.instrument("action_mailer.deliver", - :mailer => self.name) do |payload| + ActiveSupport::Notifications.instrument("action_mailer.deliver", :mailer => self.name) do |payload| set_payload_for_mail(payload, mail) - - mail.delivery_method delivery_method, get_delivery_settings(delivery_method) + + # TODO Move me to the instance + mail.delivery_method delivery_methods[delivery_method], + delivery_settings[delivery_method] + if @@perform_deliveries mail.deliver! self.deliveries << mail @@ -486,25 +452,12 @@ module ActionMailer #:nodoc: private - def get_delivery_settings(method) #:nodoc: - delivery_settings[method] - end - - def matches_settings_method?(method_name) #:nodoc: - /(\w+)_settings(=)?$/.match(method_name.to_s) - end - def matches_dynamic_method?(method_name) #:nodoc: method_name = method_name.to_s /^(create|deliver)_([_a-z]\w*)/.match(method_name) || /^(new)$/.match(method_name) end end - # Configure delivery method. Check ActionMailer::DeliveryMethod for more - # instructions. - superclass_delegating_reader :delivery_method - self.delivery_method = :smtp - # Add a part to a multipart message, with the given content-type. The # part itself is yielded to the block so that other properties (charset, # body, headers, etc.) can be set on it. @@ -534,20 +487,6 @@ module ActionMailer #:nodoc: part(params, &block) end - # Allow you to set assigns for your template: - # - # body :greetings => "Hi" - # - # Will make @greetings available in the template to be rendered. - def body(object=nil) - returning(super) do # Run deprecation hooks - if object.is_a?(Hash) - @assigns_set = true - object.each { |k, v| instance_variable_set(:"@#{k}", v) } - end - end - end - # Instantiate a new mailer object. If +method_name+ is not +nil+, the mailer # will be initialized according to the named method. If not, the mailer will # remain uninitialized (useful when you only need to invoke the "receive" @@ -591,6 +530,8 @@ module ActionMailer #:nodoc: # render_message "special_message" # render_message :template => "special_message" # render_message :inline => "<%= 'Hi!' %>" + # + # TODO Deprecate me def render_message(object) case object when String diff --git a/actionmailer/lib/action_mailer/delivery_methods.rb b/actionmailer/lib/action_mailer/delivery_methods.rb new file mode 100644 index 0000000000..c8c4148353 --- /dev/null +++ b/actionmailer/lib/action_mailer/delivery_methods.rb @@ -0,0 +1,71 @@ +module ActionMailer + # This modules makes a DSL for adding delivery methods to ActionMailer + module DeliveryMethods + extend ActiveSupport::Concern + + included do + add_delivery_method :smtp, Mail::SMTP, + :address => "localhost", + :port => 25, + :domain => 'localhost.localdomain', + :user_name => nil, + :password => nil, + :authentication => nil, + :enable_starttls_auto => true + + add_delivery_method :file, Mail::FileDelivery, + :location => defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails" + + add_delivery_method :sendmail, Mail::Sendmail, + :location => '/usr/sbin/sendmail', + :arguments => '-i -t' + + add_delivery_method :test, Mail::TestMailer + + superclass_delegating_reader :delivery_method + self.delivery_method = :smtp + end + + module ClassMethods + def delivery_settings + @@delivery_settings ||= Hash.new { |h,k| h[k] = {} } + end + + def delivery_methods + @@delivery_methods ||= {} + end + + def delivery_method=(method) + raise ArgumentError, "Unknown delivery method #{method.inspect}" unless delivery_methods[method] + @delivery_method = method + end + + def add_delivery_method(symbol, klass, default_options={}) + self.delivery_methods[symbol] = klass + self.delivery_settings[symbol] = default_options + end + + def respond_to?(method_symbol, include_private = false) #:nodoc: + matches_settings_method?(method_symbol) || super + end + + protected + + def method_missing(method_symbol, *parameters) #:nodoc: + if match = matches_settings_method?(method_symbol) + if match[2] + delivery_settings[match[1].to_sym] = parameters[0] + else + delivery_settings[match[1].to_sym] + end + else + super + end + end + + def matches_settings_method?(method_name) #:nodoc: + /(#{delivery_methods.keys.join('|')})_settings(=)?$/.match(method_name.to_s) + end + end + end +end \ No newline at end of file diff --git a/actionmailer/lib/action_mailer/deprecated_body.rb b/actionmailer/lib/action_mailer/deprecated_body.rb index 5379b33a54..c82610014f 100644 --- a/actionmailer/lib/action_mailer/deprecated_body.rb +++ b/actionmailer/lib/action_mailer/deprecated_body.rb @@ -1,6 +1,6 @@ module ActionMailer # TODO Remove this module all together in a next release. Ensure that super - # hooks and @assigns_set in ActionMailer::Base are removed as well. + # hooks in ActionMailer::Base are removed as well. module DeprecatedBody extend ActionMailer::AdvAttrAccessor @@ -22,12 +22,14 @@ module ActionMailer end def create_parts - if String === @body && !defined?(@assigns_set) + if String === @body ActiveSupport::Deprecation.warn('body(String) is deprecated. To set the body with a text ' << 'call render(:text => "body")', caller[0,10]) self.response_body = @body - elsif self.response_body - @body = self.response_body + elsif @body.is_a?(Hash) && !@body.empty? + ActiveSupport::Deprecation.warn('body(Hash) is deprecated. Use instance variables to define ' << + 'assigns in your view', caller[0,10]) + @body.each { |k, v| instance_variable_set(:"@#{k}", v) } end end diff --git a/actionmailer/test/delivery_method_test.rb b/actionmailer/test/delivery_method_test.rb index fb43086423..1e7408d6d6 100644 --- a/actionmailer/test/delivery_method_test.rb +++ b/actionmailer/test/delivery_method_test.rb @@ -1,41 +1,14 @@ require 'abstract_unit' require 'mail' -class DefaultDeliveryMethodMailer < ActionMailer::Base +class MyCustomDelivery end -class NonDefaultDeliveryMethodMailer < ActionMailer::Base - self.delivery_method = :sendmail -end - -class FileDeliveryMethodMailer < ActionMailer::Base - self.delivery_method = :file -end - -class CustomDeliveryMethod - - def initialize(values) - @custom_deliveries = [] - end - - attr_accessor :custom_deliveries - - attr_accessor :settings - - def deliver!(mail) - self.custom_deliveries << mail - end -end - -class CustomerDeliveryMailer < ActionMailer::Base - self.delivery_method = CustomDeliveryMethod -end - -class ActionMailerBase_delivery_method_Test < Test::Unit::TestCase +class DefaultsDeliveryMethodsTest < ActionMailer::TestCase def setup set_delivery_method :smtp end - + def teardown restore_delivery_method end @@ -54,87 +27,47 @@ class ActionMailerBase_delivery_method_Test < Test::Unit::TestCase :enable_starttls_auto => true } assert_equal settings, ActionMailer::Base.smtp_settings end -end - -class DefaultDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase - def setup - set_delivery_method :smtp - end - - def teardown - restore_delivery_method - end - - def test_should_be_the_default_smtp - assert_equal :smtp, DefaultDeliveryMethodMailer.delivery_method - end - - def test_should_have_default_smtp_delivery_method_settings - settings = { :address => "localhost", - :port => 25, - :domain => 'localhost.localdomain', - :user_name => nil, - :password => nil, - :authentication => nil, - :enable_starttls_auto => true } - assert_equal settings, DefaultDeliveryMethodMailer.smtp_settings - end -end - -class NonDefaultDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase - def setup - set_delivery_method :smtp - end - - def teardown - restore_delivery_method - end - def test_should_be_the_set_delivery_method - assert_equal :sendmail, NonDefaultDeliveryMethodMailer.delivery_method + def test_should_have_default_file_delivery_method_settings + settings = {:location => "#{Dir.tmpdir}/mails"} + assert_equal settings, ActionMailer::Base.file_settings end def test_should_have_default_sendmail_delivery_method_settings settings = {:location => '/usr/sbin/sendmail', :arguments => '-i -t'} - assert_equal settings, NonDefaultDeliveryMethodMailer.sendmail_settings + assert_equal settings, ActionMailer::Base.sendmail_settings end end -class FileDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase +class CustomDeliveryMethodsTest < ActionMailer::TestCase def setup - set_delivery_method :smtp + ActionMailer::Base.add_delivery_method :custom, MyCustomDelivery end def teardown - restore_delivery_method - end - - def test_should_be_the_set_delivery_method - assert_equal :file, FileDeliveryMethodMailer.delivery_method - end - - def test_should_have_default_file_delivery_method_settings - settings = {:location => "#{Dir.tmpdir}/mails"} - assert_equal settings, FileDeliveryMethodMailer.file_settings + ActionMailer::Base.delivery_methods.delete(:custom) + ActionMailer::Base.delivery_settings.delete(:custom) end -end -class CustomDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase - def setup - set_delivery_method :smtp + def test_allow_to_add_a_custom_delivery_method + ActionMailer::Base.delivery_method = :custom + assert_equal :custom, ActionMailer::Base.delivery_method end - def teardown - restore_delivery_method + def test_allow_to_customize_custom_settings + ActionMailer::Base.custom_settings = { :foo => :bar } + assert_equal Hash[:foo => :bar], ActionMailer::Base.custom_settings end - def test_should_be_the_set_delivery_method - assert_equal CustomDeliveryMethod, CustomerDeliveryMailer.delivery_method + def test_respond_to_custom_method_settings + assert_respond_to ActionMailer::Base, :custom_settings + assert_respond_to ActionMailer::Base, :custom_settings= end - def test_should_have_default_custom_delivery_method_settings - settings = {} - assert_equal settings, CustomerDeliveryMailer.custom_settings + def test_should_not_respond_for_invalid_method_settings + assert_raise NoMethodError do + ActionMailer::Base.another_settings + end end end -- cgit v1.2.3 From 2a3ec5fee447a9b3729d04499d9e72b44079faef Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Wed, 20 Jan 2010 14:12:05 +1100 Subject: Updating gemspec to 2.0.1 for mail --- actionmailer/actionmailer.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionmailer/actionmailer.gemspec b/actionmailer/actionmailer.gemspec index b860f3455a..cc1c25401e 100644 --- a/actionmailer/actionmailer.gemspec +++ b/actionmailer/actionmailer.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |s| s.homepage = "http://www.rubyonrails.org" s.add_dependency('actionpack', '= 3.0.pre') - s.add_dependency('mail', '~> 2.0.0') + s.add_dependency('mail', '~> 2.0.1') s.files = Dir['CHANGELOG', 'README', 'MIT-LICENSE', 'lib/**/*'] s.has_rdoc = true -- cgit v1.2.3 From c04baed627c85e586e337896d64f61f397554a46 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Wed, 20 Jan 2010 14:12:17 +1100 Subject: Fixing failing test on sendmail expectation --- actionmailer/test/mail_service_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index 7b5f8b1ffc..396dd00a91 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -679,7 +679,7 @@ class ActionMailerTest < Test::Unit::TestCase end def test_performs_delivery_via_sendmail - IO.expects(:popen).once.with('/usr/sbin/sendmail -i -t test@localhost', 'w+') + IO.expects(:popen).once.with('/usr/sbin/sendmail -i -t -f "system@loudthinking.com" test@localhost', 'w+') ActionMailer::Base.delivery_method = :sendmail TestMailer.deliver_signed_up(@recipient) end -- cgit v1.2.3 From 10c509fbfa70758ece26e8876d1c5c28f659f2f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Wed, 20 Jan 2010 22:25:09 +1100 Subject: Moved old API into deprecated_api.rb in preparation for new Rails 3 Mailer API --- actionmailer/lib/action_mailer.rb | 1 + .../lib/action_mailer/adv_attr_accessor.rb | 2 + actionmailer/lib/action_mailer/base.rb | 156 +------------------- actionmailer/lib/action_mailer/deprecated_api.rb | 163 +++++++++++++++++++++ actionmailer/test/base_test.rb | 39 +++++ 5 files changed, 208 insertions(+), 153 deletions(-) create mode 100644 actionmailer/lib/action_mailer/deprecated_api.rb create mode 100644 actionmailer/test/base_test.rb diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index f1c94e9e69..1765aee9cc 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -34,6 +34,7 @@ module ActionMailer autoload :Base autoload :DeliveryMethods autoload :DeprecatedBody + autoload :DeprecatedApi autoload :MailHelper autoload :Quoting autoload :TestCase diff --git a/actionmailer/lib/action_mailer/adv_attr_accessor.rb b/actionmailer/lib/action_mailer/adv_attr_accessor.rb index be6b1feca9..91992ed839 100644 --- a/actionmailer/lib/action_mailer/adv_attr_accessor.rb +++ b/actionmailer/lib/action_mailer/adv_attr_accessor.rb @@ -1,6 +1,8 @@ module ActionMailer module AdvAttrAccessor #:nodoc: def adv_attr_accessor(*names) + + # TODO: ActiveSupport::Deprecation.warn() names.each do |name| ivar = "@#{name}" diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index e105beef63..9df482cdf6 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -263,9 +263,11 @@ module ActionMailer #:nodoc: helper ActionMailer::MailHelper include ActionMailer::DeprecatedBody + include ActionMailer::DeprecatedApi include ActionMailer::DeliveryMethods + private_class_method :new #:nodoc: @@raise_delivery_errors = true @@ -459,41 +461,13 @@ module ActionMailer #:nodoc: end end - # Add a part to a multipart message, with the given content-type. The - # part itself is yielded to the block so that other properties (charset, - # body, headers, etc.) can be set on it. - def part(params) - params = {:content_type => params} if String === params - - if custom_headers = params.delete(:headers) - ActiveSupport::Deprecation.warn('Passing custom headers with :headers => {} is deprecated. ' << - 'Please just pass in custom headers directly.', caller[0,10]) - params.merge!(custom_headers) - end - - part = Mail::Part.new(params) - yield part if block_given? - @parts << part - end - - # Add an attachment to a multipart message. This is simply a part with the - # content-disposition set to "attachment". - def attachment(params, &block) - super # Run deprecation hooks - - params = { :content_type => params } if String === params - params = { :content_disposition => "attachment", - :content_transfer_encoding => "base64" }.merge(params) - - part(params, &block) - end - # Instantiate a new mailer object. If +method_name+ is not +nil+, the mailer # will be initialized according to the named method. If not, the mailer will # remain uninitialized (useful when you only need to invoke the "receive" # method, for instance). def initialize(method_name=nil, *args) super() + @mail = Mail.new process(method_name, *args) if method_name end @@ -521,129 +495,5 @@ module ActionMailer #:nodoc: self.class.deliver(mail) end - private - - # Render a message but does not set it as mail body. Useful for rendering - # data for part and attachments. - # - # Examples: - # - # render_message "special_message" - # render_message :template => "special_message" - # render_message :inline => "<%= 'Hi!' %>" - # - # TODO Deprecate me - def render_message(object) - case object - when String - render_to_body(:template => object) - else - render_to_body(object) - end - end - - # Set up the default values for the various instance variables of this - # mailer. Subclasses may override this method to provide different - # defaults. - def initialize_defaults(method_name) #:nodoc: - @charset ||= @@default_charset.dup - @content_type ||= @@default_content_type.dup - @implicit_parts_order ||= @@default_implicit_parts_order.dup - @mime_version ||= @@default_mime_version.dup if @@default_mime_version - - @mailer_name ||= self.class.mailer_name.dup - @delivery_method = self.class.delivery_method - @template ||= method_name - - @parts ||= [] - @headers ||= {} - @sent_on ||= Time.now - - super # Run deprecation hooks - end - - def create_parts #:nodoc: - super # Run deprecation hooks - - if String === response_body - @parts.unshift create_inline_part(response_body) - else - self.class.template_root.find_all(@template, {}, @mailer_name).each do |template| - @parts << create_inline_part(render_to_body(:_template => template), template.mime_type) - end - - if @parts.size > 1 - @content_type = "multipart/alternative" if @content_type !~ /^multipart/ - end - - # If this is a multipart e-mail add the mime_version if it is not - # already set. - @mime_version ||= "1.0" if !@parts.empty? - end - end - - def create_inline_part(body, mime_type=nil) #:nodoc: - ct = mime_type || "text/plain" - main_type, sub_type = split_content_type(ct.to_s) - - Mail::Part.new( - :content_type => [main_type, sub_type, {:charset => charset}], - :content_disposition => "inline", - :body => body - ) - end - - def create_mail #:nodoc: - m = Mail.new - - m.subject, = quote_any_if_necessary(charset, subject) - m.to, m.from = quote_any_address_if_necessary(charset, recipients, from) - m.bcc = quote_address_if_necessary(bcc, charset) unless bcc.nil? - m.cc = quote_address_if_necessary(cc, charset) unless cc.nil? - m.reply_to = quote_address_if_necessary(reply_to, charset) unless reply_to.nil? - m.mime_version = mime_version unless mime_version.nil? - m.date = sent_on.to_time rescue sent_on if sent_on - - headers.each { |k, v| m[k] = v } - - real_content_type, ctype_attrs = parse_content_type - main_type, sub_type = split_content_type(real_content_type) - - if @parts.size == 1 && @parts.first.parts.empty? - m.content_type([main_type, sub_type, ctype_attrs]) - m.body = @parts.first.body.encoded - else - @parts.each do |p| - m.add_part(p) - end - - m.body.set_sort_order(@implicit_parts_order) - m.body.sort_parts! - - if real_content_type =~ /multipart/ - ctype_attrs.delete "charset" - m.content_type([main_type, sub_type, ctype_attrs]) - end - end - - m.content_transfer_encoding = '8bit' unless m.body.only_us_ascii? - - @mail = m - end - - def split_content_type(ct) #:nodoc: - ct.to_s.split("/") - end - - def parse_content_type(defaults=nil) #:nodoc: - if @content_type.blank? - [ nil, {} ] - else - ctype, *attrs = @content_type.split(/;\s*/) - attrs = attrs.inject({}) { |h,s| k,v = s.split(/\=/, 2); h[k] = v; h } - [ctype, {"charset" => @charset}.merge(attrs)] - end - end - end end diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb new file mode 100644 index 0000000000..3334b47987 --- /dev/null +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -0,0 +1,163 @@ +module ActionMailer + # TODO Remove this module all together in Rails 3.1. Ensure that super + # hooks in ActionMailer::Base are removed as well. + # + # Moved here to allow us to add the new Mail API + module DeprecatedApi + extend ActionMailer::AdvAttrAccessor + + # Add a part to a multipart message, with the given content-type. The + # part itself is yielded to the block so that other properties (charset, + # body, headers, etc.) can be set on it. + def part(params) + params = {:content_type => params} if String === params + + if custom_headers = params.delete(:headers) + ActiveSupport::Deprecation.warn('Passing custom headers with :headers => {} is deprecated. ' << + 'Please just pass in custom headers directly.', caller[0,10]) + params.merge!(custom_headers) + end + + part = Mail::Part.new(params) + yield part if block_given? + @parts << part + end + + # Add an attachment to a multipart message. This is simply a part with the + # content-disposition set to "attachment". + def attachment(params, &block) + super # Run deprecation hooks + + params = { :content_type => params } if String === params + params = { :content_disposition => "attachment", + :content_transfer_encoding => "base64" }.merge(params) + + part(params, &block) + end + + private + + def create_mail #:nodoc: + m = @mail + + m.subject, = quote_any_if_necessary(charset, subject) + m.to, m.from = quote_any_address_if_necessary(charset, recipients, from) + m.bcc = quote_address_if_necessary(bcc, charset) unless bcc.nil? + m.cc = quote_address_if_necessary(cc, charset) unless cc.nil? + m.reply_to = quote_address_if_necessary(reply_to, charset) unless reply_to.nil? + m.mime_version = mime_version unless mime_version.nil? + m.date = sent_on.to_time rescue sent_on if sent_on + + headers.each { |k, v| m[k] = v } + + real_content_type, ctype_attrs = parse_content_type + main_type, sub_type = split_content_type(real_content_type) + + if @parts.size == 1 && @parts.first.parts.empty? + m.content_type([main_type, sub_type, ctype_attrs]) + m.body = @parts.first.body.encoded + else + @parts.each do |p| + m.add_part(p) + end + + m.body.set_sort_order(@implicit_parts_order) + m.body.sort_parts! + + if real_content_type =~ /multipart/ + ctype_attrs.delete "charset" + m.content_type([main_type, sub_type, ctype_attrs]) + end + end + + m.content_transfer_encoding = '8bit' unless m.body.only_us_ascii? + + @mail + end + + # Render a message but does not set it as mail body. Useful for rendering + # data for part and attachments. + # + # Examples: + # + # render_message "special_message" + # render_message :template => "special_message" + # render_message :inline => "<%= 'Hi!' %>" + # + # TODO Deprecate me + def render_message(object) + case object + when String + render_to_body(:template => object) + else + render_to_body(object) + end + end + + # Set up the default values for the various instance variables of this + # mailer. Subclasses may override this method to provide different + # defaults. + def initialize_defaults(method_name) #:nodoc: + @charset ||= self.class.default_charset.dup + @content_type ||= self.class.default_content_type.dup + @implicit_parts_order ||= self.class.default_implicit_parts_order.dup + @mime_version ||= self.class.default_mime_version.dup if self.class.default_mime_version + + @mailer_name ||= self.class.mailer_name.dup + @delivery_method = self.class.delivery_method + @template ||= method_name + + @parts ||= [] + @headers ||= {} + @sent_on ||= Time.now + + super # Run deprecation hooks + end + + def create_parts #:nodoc: + super # Run deprecation hooks + + if String === response_body + @parts.unshift create_inline_part(response_body) + else + self.class.template_root.find_all(@template, {}, @mailer_name).each do |template| + @parts << create_inline_part(render_to_body(:_template => template), template.mime_type) + end + + if @parts.size > 1 + @content_type = "multipart/alternative" if @content_type !~ /^multipart/ + end + + # If this is a multipart e-mail add the mime_version if it is not + # already set. + @mime_version ||= "1.0" if !@parts.empty? + end + end + + def create_inline_part(body, mime_type=nil) #:nodoc: + ct = mime_type || "text/plain" + main_type, sub_type = split_content_type(ct.to_s) + + Mail::Part.new( + :content_type => [main_type, sub_type, {:charset => charset}], + :content_disposition => "inline", + :body => body + ) + end + + def split_content_type(ct) #:nodoc: + ct.to_s.split("/") + end + + def parse_content_type(defaults=nil) #:nodoc: + if @content_type.blank? + [ nil, {} ] + else + ctype, *attrs = @content_type.split(/;\s*/) + attrs = attrs.inject({}) { |h,s| k,v = s.split(/\=/, 2); h[k] = v; h } + [ctype, {"charset" => @charset}.merge(attrs)] + end + end + + end +end \ No newline at end of file diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb new file mode 100644 index 0000000000..dc1fbc07be --- /dev/null +++ b/actionmailer/test/base_test.rb @@ -0,0 +1,39 @@ +# class Notifier < ActionMailer::Base +# delivers_from 'notifications@example.com' +# +# def welcome(user) +# @user = user # available to the view +# mail(:subject => 'Welcome!', :to => user.email_address) +# # auto renders both welcome.text.erb and welcome.html.erb +# end +# +# def goodbye(user) +# headers["Reply-To"] = 'cancelations@example.com' +# mail(:subject => 'Goodbye', :to => user.email_address) do |format| +# format.html { render "shared_template "} +# format.text # goodbye.text.erb +# end +# end +# +# def surprise(user, gift) +# attachments[gift.name] = File.read(gift.path) +# mail(:subject => 'Surprise!', :to => user.email_address) do |format| +# format.html(:charset => "ascii") # surprise.html.erb +# format.text(:transfer_encoding => "base64") # surprise.text.erb +# end +# end +# +# def special_surprise(user, gift) +# attachments[gift.name] = { :content_type => "application/x-gzip", :content => File.read(gift.path) } +# mail(:to => 'special@example.com') # subject not required +# # auto renders both special_surprise.text.erb and special_surprise.html.erb +# end +# end +# +# Notifier.welcome(user) # => returns a Mail object +# Notifier.welcome(user).deliver # => creates and sends the Mail in one step +class BaseTest < ActionMailer::Base + + + +end -- cgit v1.2.3 From c34cfcc29f705c95c2218889cbec1898e008335d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Wed, 20 Jan 2010 23:46:59 +1100 Subject: Created mail method for new API --- actionmailer/lib/action_mailer/base.rb | 59 ++++++++++++++++++------ actionmailer/lib/action_mailer/deprecated_api.rb | 4 +- actionmailer/test/base_test.rb | 46 ++++++++++++++++-- 3 files changed, 89 insertions(+), 20 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 9df482cdf6..8825bd35f9 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -297,7 +297,7 @@ module ActionMailer #:nodoc: @@default_implicit_parts_order = [ "text/plain", "text/enriched", "text/html" ] cattr_accessor :default_implicit_parts_order - @@protected_instance_variables = %w(@parts @mail) + @@protected_instance_variables = %w(@parts @message) cattr_reader :protected_instance_variables # Specify the BCC addresses for the message @@ -352,8 +352,8 @@ module ActionMailer #:nodoc: # location, you can use this to specify that location. adv_attr_accessor :mailer_name - # Expose the internal mail - attr_reader :mail + # Expose the internal Mail message + attr_reader :message # Alias controller_path to mailer_name so render :partial in views work. alias :controller_path :mailer_name @@ -374,7 +374,7 @@ module ActionMailer #:nodoc: def method_missing(method_symbol, *parameters) #:nodoc: if match = matches_dynamic_method?(method_symbol) case match[1] - when 'create' then new(match[2], *parameters).mail + when 'create' then new(match[2], *parameters).message when 'deliver' then new(match[2], *parameters).deliver! when 'new' then nil else super @@ -461,13 +461,40 @@ module ActionMailer #:nodoc: end end + def mail(headers = {}) + # Guard flag to prevent both the old and the new API from firing + # TODO - Move this @mail_was_called flag into deprecated_api.rb + @mail_was_called = true + + m = @message + + m.content_type ||= headers[:content_type] || @@default_content_type + m.charset ||= headers[:charset] || @@default_charset + m.mime_version ||= headers[:mime_version] || @@default_mime_version + + m.subject = quote_if_necessary(headers[:subject], m.charset) if headers[:subject] + m.to = quote_address_if_necessary(headers[:to], m.charset) if headers[:to] + m.from = quote_address_if_necessary(headers[:from], m.charset) if headers[:from] + m.cc = quote_address_if_necessary(headers[:cc], m.charset) if headers[:cc] + m.bcc = quote_address_if_necessary(headers[:bcc], m.charset) if headers[:bcc] + m.reply_to = quote_address_if_necessary(headers[:reply_to], m.charset) if headers[:reply_to] + m.mime_version = headers[:mime_version] if headers[:mime_version] + m.date = headers[:date] if headers[:date] + + m.body.set_sort_order(headers[:parts_order] || @@default_implicit_parts_order) + + # TODO: m.body.sort_parts! + m + end + # Instantiate a new mailer object. If +method_name+ is not +nil+, the mailer # will be initialized according to the named method. If not, the mailer will # remain uninitialized (useful when you only need to invoke the "receive" # method, for instance). def initialize(method_name=nil, *args) super() - @mail = Mail.new + @mail_was_called = false + @message = Mail.new process(method_name, *args) if method_name end @@ -475,23 +502,27 @@ module ActionMailer #:nodoc: # rendered and a new Mail object created. def process(method_name, *args) initialize_defaults(method_name) + super + + unless @mail_was_called + # Create e-mail parts + create_parts - # Create e-mail parts - create_parts + # Set the subject if not set yet + @subject ||= I18n.t(:subject, :scope => [:actionmailer, mailer_name, method_name], + :default => method_name.humanize) - # Set the subject if not set yet - @subject ||= I18n.t(:subject, :scope => [:actionmailer, mailer_name, method_name], - :default => method_name.humanize) - - # Build the mail object itself - create_mail + # Build the mail object itself + create_mail + end + @message end # Delivers a Mail object. By default, it delivers the cached mail # object (from the create! method). If no cached mail object exists, and # no alternate has been given as the parameter, this will fail. - def deliver!(mail = @mail) + def deliver!(mail = @message) self.class.deliver(mail) end diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index 3334b47987..e11dd4c46a 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -38,7 +38,7 @@ module ActionMailer private def create_mail #:nodoc: - m = @mail + m = @message m.subject, = quote_any_if_necessary(charset, subject) m.to, m.from = quote_any_address_if_necessary(charset, recipients, from) @@ -72,7 +72,7 @@ module ActionMailer m.content_transfer_encoding = '8bit' unless m.body.only_us_ascii? - @mail + @message end # Render a message but does not set it as mail body. Useful for rendering diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index dc1fbc07be..83d51274f0 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -1,3 +1,6 @@ +# encoding: utf-8 +require 'abstract_unit' + # class Notifier < ActionMailer::Base # delivers_from 'notifications@example.com' # @@ -30,10 +33,45 @@ # end # end # -# Notifier.welcome(user) # => returns a Mail object +# mail = Notifier.welcome(user) # => returns a Mail object +# mail.deliver +# # Notifier.welcome(user).deliver # => creates and sends the Mail in one step -class BaseTest < ActionMailer::Base +class BaseTest < Test::Unit::TestCase + class TestMailer < ActionMailer::Base + def welcome(hash = {}) + hash = {:to => 'mikel@test.lindsaar.net', :from => 'jose@test.plataformatec.com', + :subject => 'The first email on new API!'}.merge!(hash) + mail(hash) + end + end + + def test_the_method_call_to_mail_does_not_raise_error + assert_nothing_raised { TestMailer.deliver_welcome } + end + + def test_should_set_the_headers_of_the_mail_message + email = TestMailer.deliver_welcome + assert_equal(email.to, ['mikel@test.lindsaar.net']) + assert_equal(email.from, ['jose@test.plataformatec.com']) + assert_equal(email.subject, 'The first email on new API!') + end + + def test_calling_mail_should_pass_the_header_hash_to_the_new_mail_object + + end + + def test_it_should_guard_against_old_api_if_mail_method_called + + end + + # def test_that_class_defaults_are_set_on_instantiation + # pending + # end + # + # def test_should_set_the_subject_from_i18n + # pending + # end - -end +end \ No newline at end of file -- cgit v1.2.3 From d3da87ce771845f99bbdc04d6d6587b22655b063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Thu, 21 Jan 2010 00:10:22 +1100 Subject: Mail method accepting all headers set via the hash --- actionmailer/lib/action_mailer/base.rb | 6 ++++-- actionmailer/test/base_test.rb | 32 +++++++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 8825bd35f9..39ddafe7fe 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -1,4 +1,5 @@ require 'active_support/core_ext/class' +require "active_support/core_ext/module/delegation" require 'mail' require 'action_mailer/tmail_compat' @@ -267,7 +268,6 @@ module ActionMailer #:nodoc: include ActionMailer::DeliveryMethods - private_class_method :new #:nodoc: @@raise_delivery_errors = true @@ -355,6 +355,9 @@ module ActionMailer #:nodoc: # Expose the internal Mail message attr_reader :message + # Pass calls to headers and attachment to the Mail#Message instance + delegate :headers, :attachments, :to => :@message + # Alias controller_path to mailer_name so render :partial in views work. alias :controller_path :mailer_name @@ -478,7 +481,6 @@ module ActionMailer #:nodoc: m.cc = quote_address_if_necessary(headers[:cc], m.charset) if headers[:cc] m.bcc = quote_address_if_necessary(headers[:bcc], m.charset) if headers[:bcc] m.reply_to = quote_address_if_necessary(headers[:reply_to], m.charset) if headers[:reply_to] - m.mime_version = headers[:mime_version] if headers[:mime_version] m.date = headers[:date] if headers[:date] m.body.set_sort_order(headers[:parts_order] || @@default_implicit_parts_order) diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 83d51274f0..b8d2e46241 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -11,7 +11,7 @@ require 'abstract_unit' # end # # def goodbye(user) -# headers["Reply-To"] = 'cancelations@example.com' +# headers["X-SPAM"] = 'Not-SPAM' # mail(:subject => 'Goodbye', :to => user.email_address) do |format| # format.html { render "shared_template "} # format.text # goodbye.text.erb @@ -40,11 +40,14 @@ require 'abstract_unit' class BaseTest < Test::Unit::TestCase class TestMailer < ActionMailer::Base + def welcome(hash = {}) + headers['X-SPAM'] = "Not SPAM" hash = {:to => 'mikel@test.lindsaar.net', :from => 'jose@test.plataformatec.com', :subject => 'The first email on new API!'}.merge!(hash) mail(hash) end + end def test_the_method_call_to_mail_does_not_raise_error @@ -57,12 +60,31 @@ class BaseTest < Test::Unit::TestCase assert_equal(email.from, ['jose@test.plataformatec.com']) assert_equal(email.subject, 'The first email on new API!') end - - def test_calling_mail_should_pass_the_header_hash_to_the_new_mail_object - + + def test_should_allow_all_headers_set + @time = Time.now + email = TestMailer.deliver_welcome(:bcc => 'bcc@test.lindsaar.net', + :cc => 'cc@test.lindsaar.net', + :content_type => 'multipart/mixed', + :charset => 'iso-8559-1', + :mime_version => '2.0', + :reply_to => 'reply-to@test.lindsaar.net', + :date => @time) + assert_equal(email.bcc, ['bcc@test.lindsaar.net']) + assert_equal(email.cc, ['cc@test.lindsaar.net']) + assert_equal(email.content_type, 'multipart/mixed') + assert_equal(email.charset, 'iso-8559-1') + assert_equal(email.mime_version, '2.0') + assert_equal(email.reply_to, ['reply-to@test.lindsaar.net']) + assert_equal(email.date, @time) end - def test_it_should_guard_against_old_api_if_mail_method_called +# def test_should_allow_custom_headers_to_be_set +# email = TestMailer.deliver_welcome +# assert_equal("Not SPAM", email['X-SPAM']) +# end + + def test_should_use_class_defaults end -- cgit v1.2.3 From 3829f9ecfd6fcd54edbc15f624ee3b68f6dae135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Thu, 21 Jan 2010 20:03:55 +1100 Subject: Adding tests for attachments['blah.rb'] = {} et al --- actionmailer/actionmailer.gemspec | 2 +- actionmailer/lib/action_mailer/deprecated_api.rb | 12 ++++++++++- actionmailer/lib/action_mailer/tmail_compat.rb | 5 +++++ actionmailer/test/base_test.rb | 27 +++++++++++++++++++++++- actionmailer/test/mail_service_test.rb | 1 + 5 files changed, 44 insertions(+), 3 deletions(-) diff --git a/actionmailer/actionmailer.gemspec b/actionmailer/actionmailer.gemspec index cc1c25401e..9a8c1df9e8 100644 --- a/actionmailer/actionmailer.gemspec +++ b/actionmailer/actionmailer.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |s| s.homepage = "http://www.rubyonrails.org" s.add_dependency('actionpack', '= 3.0.pre') - s.add_dependency('mail', '~> 2.0.1') + s.add_dependency('mail', '~> 2.0.2') s.files = Dir['CHANGELOG', 'README', 'MIT-LICENSE', 'lib/**/*'] s.has_rdoc = true diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index e11dd4c46a..d096ea6180 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -19,6 +19,7 @@ module ActionMailer end part = Mail::Part.new(params) + yield part if block_given? @parts << part end @@ -29,7 +30,16 @@ module ActionMailer super # Run deprecation hooks params = { :content_type => params } if String === params - params = { :content_disposition => "attachment", + + if filename = params.delete(:filename) + content_disposition = "attachment; filename=\"#{File.basename(filename)}\"" + else + content_disposition = "attachment" + end + + params[:content] = params.delete(:data) if params[:data] + + params = { :content_disposition => content_disposition, :content_transfer_encoding => "base64" }.merge(params) part(params, &block) diff --git a/actionmailer/lib/action_mailer/tmail_compat.rb b/actionmailer/lib/action_mailer/tmail_compat.rb index 2fd25ff145..94f21c7cf3 100644 --- a/actionmailer/lib/action_mailer/tmail_compat.rb +++ b/actionmailer/lib/action_mailer/tmail_compat.rb @@ -16,5 +16,10 @@ module Mail end end + def original_filename + STDERR.puts("Message#original_filename is deprecated, please call Message#filename.\n#{caller}") + filename + end + end end \ No newline at end of file diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index b8d2e46241..f1f5f38482 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -42,12 +42,18 @@ class BaseTest < Test::Unit::TestCase class TestMailer < ActionMailer::Base def welcome(hash = {}) - headers['X-SPAM'] = "Not SPAM" hash = {:to => 'mikel@test.lindsaar.net', :from => 'jose@test.plataformatec.com', :subject => 'The first email on new API!'}.merge!(hash) mail(hash) end + def invoice(hash = {}) + attachments['invoice.pdf'] = 'This is test File content' + hash = {:to => 'mikel@test.lindsaar.net', :from => 'jose@test.plataformatec.com', + :subject => 'Your invoice is attached'}.merge!(hash) + mail(hash) + end + end def test_the_method_call_to_mail_does_not_raise_error @@ -84,6 +90,25 @@ class BaseTest < Test::Unit::TestCase # assert_equal("Not SPAM", email['X-SPAM']) # end + def test_should_allow_you_to_send_an_attachment + assert_nothing_raised { TestMailer.deliver_invoice } + end + + def test_should_allow_you_to_send_an_attachment + email = TestMailer.deliver_invoice + assert_equal(1, email.attachments.length) + end + + def test_should_allow_you_to_send_an_attachment + email = TestMailer.deliver_invoice + assert_equal('invoice.pdf', email.attachments[0].filename) + end + + def test_should_allow_you_to_send_an_attachment + email = TestMailer.deliver_invoice + assert_equal('This is test File content', email.attachments['invoice.pdf'].decoded) + end + def test_should_use_class_defaults end diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index 396dd00a91..f83e13f16f 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -898,6 +898,7 @@ EOF assert_equal "iso-8859-1", mail.parts[1].charset assert_equal "image/jpeg", mail.parts[2].mime_type + assert_equal "attachment", mail.parts[2][:content_disposition].disposition_type assert_equal "foo.jpg", mail.parts[2][:content_disposition].filename assert_equal "foo.jpg", mail.parts[2][:content_type].filename -- cgit v1.2.3 From 2df1810cf3cde71fb15594eac022cab27d6497a1 Mon Sep 17 00:00:00 2001 From: Prem Sichanugrist Date: Thu, 21 Jan 2010 23:30:17 +0700 Subject: Add test case for load initializers before routing behavior. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- railties/test/application/routing_test.rb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/railties/test/application/routing_test.rb b/railties/test/application/routing_test.rb index 725dd06929..50cb9e3acc 100644 --- a/railties/test/application/routing_test.rb +++ b/railties/test/application/routing_test.rb @@ -176,5 +176,33 @@ module ApplicationTests get '/foo' assert_equal 'baz', last_response.body end + + test 'resource routing with irrigular inflection' do + app_file 'config/initializers/inflection.rb', <<-RUBY + ActiveSupport::Inflector.inflections do |inflect| + inflect.irregular 'yazi', 'yazilar' + end + RUBY + + app_file 'config/routes.rb', <<-RUBY + AppTemplate::Application.routes.draw do |map| + resources :yazilar + end + RUBY + + controller 'yazilar', <<-RUBY + class YazilarController < ActionController::Base + def index + render :text => 'yazilar#index' + end + end + RUBY + + get '/yazilars' + assert_equal 404, last_response.status + + get '/yazilar' + assert_equal 200, last_response.status + end end end -- cgit v1.2.3 From 7fcf8590e788cef8b64cc266f75931c418902ca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 21 Jan 2010 23:14:20 +0100 Subject: Massive cleanup in Railties and load stack. --- actionpack/lib/action_controller/railtie.rb | 6 - railties/lib/rails.rb | 3 +- railties/lib/rails/application.rb | 64 ++++---- railties/lib/rails/bootstrap.rb | 62 ++------ railties/lib/rails/configuration.rb | 233 +++++++++++++++------------- railties/lib/rails/engine.rb | 107 +++++++++++++ railties/lib/rails/plugin.rb | 1 - railties/lib/rails/railtie.rb | 68 ++++---- 8 files changed, 322 insertions(+), 222 deletions(-) create mode 100644 railties/lib/rails/engine.rb diff --git a/actionpack/lib/action_controller/railtie.rb b/actionpack/lib/action_controller/railtie.rb index 7ea64c1923..ee94bf8364 100644 --- a/actionpack/lib/action_controller/railtie.rb +++ b/actionpack/lib/action_controller/railtie.rb @@ -19,12 +19,6 @@ module ActionController ActionController::Base.logger ||= Rails.logger end - # Routing must be initialized after plugins to allow the former to extend the routes - initializer "action_controller.initialize_routing" do |app| - app.route_configuration_files << app.config.routes_configuration_file - app.route_configuration_files << app.config.builtin_routes_configuration_file - end - initializer "action_controller.initialize_framework_caches" do ActionController::Base.cache_store ||= RAILS_CACHE end diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index 0bc7160815..93cf77ffd3 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -5,9 +5,10 @@ require 'active_support/core_ext/kernel/reporting' require 'active_support/core_ext/logger' require 'rails/initializable' -require 'rails/application' require 'rails/railtie' require 'rails/plugin' +require 'rails/engine' +require 'rails/application' require 'rails/railties_path' require 'rails/version' require 'rails/rack' diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 5c9892c630..898dd0ad9b 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -1,14 +1,12 @@ require "fileutils" -require 'active_support/core_ext/module/delegation' module Rails - class Application + class Application < Engine include Initializable class << self - attr_writer :config - alias configure class_eval - delegate :initialize!, :load_tasks, :load_generators, :root, :to => :instance + alias :configure :class_eval + delegate :initialize!, :load_tasks, :load_generators, :to => :instance private :new def instance @@ -16,7 +14,16 @@ module Rails end def config - @config ||= Configuration.new(Plugin::Configuration.default) + @config ||= Configuration.new(root) + end + + def root + @root ||= find_root_with_file_flag("config.ru", Dir.pwd) + end + + def inherited(base) + super + Railtie.plugins.delete(base) end def routes @@ -24,8 +31,7 @@ module Rails end end - delegate :config, :routes, :to => :'self.class' - delegate :root, :middleware, :to => :config + delegate :routes, :to => :'self.class' attr_reader :route_configuration_files def initialize @@ -38,12 +44,7 @@ module Rails run_initializers(self) self end - - def require_environment - require config.environment_path - rescue LoadError - end - + def routes_changed_at routes_changed_at = nil @@ -59,6 +60,7 @@ module Rails end def reload_routes! + routes = Rails::Application.routes routes.disable_clear_and_finalize = true routes.clear! @@ -70,6 +72,12 @@ module Rails routes.disable_clear_and_finalize = false end + + def require_environment + require config.environment_path + rescue LoadError + end + def load_tasks require "rails/tasks" plugins.each { |p| p.load_tasks } @@ -114,37 +122,23 @@ module Rails app.call(env) end - initializer :load_application_initializers do - Dir["#{root}/config/initializers/**/*.rb"].sort.each do |initializer| - load(initializer) - end + initializer :build_middleware_stack, :after => :load_application_initializers do + app end - initializer :build_middleware_stack do - app + initializer :add_builtin_route do |app| + if Rails.env.development? + app.route_configuration_files << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') + end end # Fires the user-supplied after_initialize block (Configuration#after_initialize) - initializer :after_initialize do + initializer :after_initialize, :after => :build_middleware_stack do config.after_initialize_blocks.each do |block| block.call end end - # Eager load application classes - initializer :load_application_classes do - next if $rails_rake_task - - if config.cache_classes - config.eager_load_paths.each do |load_path| - matcher = /\A#{Regexp.escape(load_path)}(.*)\.rb\Z/ - Dir.glob("#{load_path}/**/*.rb").sort.each do |file| - require_dependency file.sub(matcher, '\1') - end - end - end - end - # Disable dependency loading during request cycle initializer :disable_dependency_loading do if config.cache_classes && !config.dependency_loading diff --git a/railties/lib/rails/bootstrap.rb b/railties/lib/rails/bootstrap.rb index 5db663f9ef..688ab2f4b0 100644 --- a/railties/lib/rails/bootstrap.rb +++ b/railties/lib/rails/bootstrap.rb @@ -12,30 +12,25 @@ module Rails require "active_support/all" unless config.active_support.bare end - # Set the $LOAD_PATH based on the value of - # Configuration#load_paths. Duplicates are removed. - initializer :set_load_path do - config.paths.add_to_load_path - $LOAD_PATH.uniq! - end - - # Set the paths from which Rails will automatically load source files, and - # the load_once paths. - initializer :set_autoload_paths do - require 'active_support/dependencies' - ActiveSupport::Dependencies.load_paths = expand_load_path(config.load_paths) - ActiveSupport::Dependencies.load_once_paths = expand_load_path(config.load_once_paths) - - extra = ActiveSupport::Dependencies.load_once_paths - ActiveSupport::Dependencies.load_paths - unless extra.empty? - abort <<-end_error - load_once_paths must be a subset of the load_paths. - Extra items in load_once_paths: #{extra * ','} - end_error + initializer :initialize_logger do + Rails.logger ||= config.logger || begin + logger = ActiveSupport::BufferedLogger.new(config.paths.log.to_a.first) + logger.level = ActiveSupport::BufferedLogger.const_get(config.log_level.to_s.upcase) + logger.auto_flushing = false if Rails.env.production? + logger + rescue StandardError => e + logger = ActiveSupport::BufferedLogger.new(STDERR) + logger.level = ActiveSupport::BufferedLogger::WARN + logger.warn( + "Rails Error: Unable to access log file. Please ensure that #{config.log_path} exists and is chmod 0666. " + + "The log level has been raised to WARN and the output directed to STDERR until the problem is fixed." + ) + logger end + end - # Freeze the arrays so future modifications will fail rather than do nothing mysteriously - config.load_once_paths.freeze + initializer :container do + # FIXME This is just a dumb initializer used as hook end # Create tmp directories @@ -63,29 +58,6 @@ module Rails end end - initializer :initialize_logger do - Rails.logger ||= config.logger || begin - logger = ActiveSupport::BufferedLogger.new(config.log_path) - logger.level = ActiveSupport::BufferedLogger.const_get(config.log_level.to_s.upcase) - logger.auto_flushing = false if Rails.env.production? - logger - rescue StandardError => e - logger = ActiveSupport::BufferedLogger.new(STDERR) - logger.level = ActiveSupport::BufferedLogger::WARN - logger.warn( - "Rails Error: Unable to access log file. Please ensure that #{config.log_path} exists and is chmod 0666. " + - "The log level has been raised to WARN and the output directed to STDERR until the problem is fixed." - ) - logger - end - end - - # Sets the logger for dependencies and cache store. - initializer :initialize_framework_logging do - ActiveSupport::Dependencies.logger ||= Rails.logger - Rails.cache.logger ||= Rails.logger - end - # Sets the dependency loading mechanism based on the value of # Configuration#cache_classes. initializer :initialize_dependency_mechanism do diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index 7f1783a6b9..77248f2611 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -1,15 +1,9 @@ require 'active_support/ordered_options' module Rails - # Temporarily separate the plugin configuration class from the main - # configuration class while this bit is being cleaned up. - class Railtie::Configuration - def self.default - @default ||= new - end - - def self.default_middleware_stack - ActionDispatch::MiddlewareStack.new.tap do |middleware| + module SharedConfiguration + def self.middleware_stack + @default_middleware_stack ||= ActionDispatch::MiddlewareStack.new.tap do |middleware| middleware.use('::ActionDispatch::Static', lambda { Rails.public_path }, :if => lambda { Rails.application.config.serve_static_assets }) middleware.use('::Rack::Lock', :if => lambda { !ActionController::Base.allow_concurrency }) middleware.use('::Rack::Runtime') @@ -26,16 +20,23 @@ module Rails end end + def self.options + @options ||= Hash.new { |h,k| h[k] = ActiveSupport::OrderedOptions.new } + end + end + + # Temporarily separate the plugin configuration class from the main + # configuration class while this bit is being cleaned up. + class Railtie::Configuration + def self.default + @default ||= new + end + attr_reader :middleware - def initialize(base = nil) - if base - @options = base.options.dup - @middleware = base.middleware.dup - else - @options = Hash.new { |h,k| h[k] = ActiveSupport::OrderedOptions.new } - @middleware = self.class.default_middleware_stack - end + def initialize + @options = SharedConfiguration.options + @middleware = SharedConfiguration.middleware_stack end def respond_to?(name) @@ -61,27 +62,65 @@ module Rails /^(#{bits})(?:=)?$/ end + # TODO Remove :active_support as special case by adding a railtie + # for it and for I18n def config_keys - ([ :active_support, :action_view ] + - Railtie.plugin_names).map { |n| n.to_s }.uniq + ([:active_support] + Railtie.plugin_names).map { |n| n.to_s }.uniq end end - class Configuration < Railtie::Configuration + class Engine::Configuration < Railtie::Configuration + attr_reader :root + + def initialize(root) + @root = root + super() + end + + def paths + @paths ||= begin + paths = Rails::Application::Root.new(root) + paths.app "app", :load_path => true + paths.app_glob "app/*", :load_path => true, :eager_load => true + paths.app.controllers "app/controllers" + paths.app.metals "app/metal" + paths.app.views "app/views" + paths.lib "lib", :load_path => true + paths.config "config" + paths.config.environments "config/environments", :glob => "#{Rails.env}.rb" + paths.config.initializers "config/initializers" + paths.config.locales "config/locales" + paths.config.routes "config/routes.rb" + paths + end + end + + def eager_load_paths + @eager_load_paths ||= paths.eager_load + end + + def load_once_paths + @eager_load_paths ||= paths.load_once + end + + def load_paths + @load_paths ||= paths.load_paths + end + end + + class Configuration < Engine::Configuration attr_accessor :after_initialize_blocks, :cache_classes, :colorize_logging, :consider_all_requests_local, :dependency_loading, :filter_parameters, - :load_once_paths, :logger, :metals, :plugins, + :logger, :metals, :plugins, :preload_frameworks, :reload_plugins, :serve_static_assets, :time_zone, :whiny_nils attr_writer :cache_store, :controller_paths, - :database_configuration_file, :eager_load_paths, - :i18n, :load_paths, :log_level, :log_path, :paths, - :routes_configuration_file, :view_path + :database_configuration_file, + :i18n, :log_level, :log_path - def initialize(base = nil) + def initialize(*) super - @load_once_paths = [] @after_initialize_blocks = [] @filter_parameters = [] @dependency_loading = true @@ -92,46 +131,23 @@ module Rails @after_initialize_blocks << blk if blk end - def root - @root ||= begin - call_stack = caller.map { |p| p.split(':').first } - root_path = call_stack.detect { |p| p !~ %r[railties/lib/rails|rack/lib/rack] } - root_path = File.dirname(root_path) - - while root_path && File.directory?(root_path) && !File.exist?("#{root_path}/config.ru") - parent = File.dirname(root_path) - root_path = parent != root_path && parent - end - - root = File.exist?("#{root_path}/config.ru") ? root_path : Dir.pwd - - RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? - Pathname.new(root).expand_path : - Pathname.new(root).realpath - end - end - - def root=(root) - @root = Pathname.new(root).expand_path - end - def paths @paths ||= begin - paths = Rails::Application::Root.new(root) - paths.app "app", :load_path => true - paths.app.metals "app/metal", :eager_load => true - paths.app.models "app/models", :eager_load => true - paths.app.controllers "app/controllers", builtin_directories, :eager_load => true - paths.app.helpers "app/helpers", :eager_load => true - paths.app.services "app/services", :load_path => true - paths.lib "lib", :load_path => true - paths.vendor "vendor", :load_path => true - paths.vendor.plugins "vendor/plugins" - paths.tmp "tmp" - paths.tmp.cache "tmp/cache" - paths.config "config" - paths.config.locales "config/locales" - paths.config.environments "config/environments", :glob => "#{Rails.env}.rb" + paths = super + paths.builtin_controller builtin_directories, :eager_load => true + paths.config.database "config/database.yml" + paths.log "log/#{Rails.env}.log" + paths.tmp "tmp" + paths.tmp.cache "tmp/cache" + paths.vendor "vendor", :load_path => true + paths.vendor.plugins "vendor/plugins" + + if File.exists?("#{root}/test/mocks/#{Rails.env}") + ActiveSupport::Deprecation.warn "\"RAILS_ROOT/test/mocks/#{Rails.env}\" won't be added " << + "automatically to load paths anymore in next releases." + paths.mocks_path "test/mocks/#{Rails.env}", :load_path => true + end + paths end end @@ -163,17 +179,61 @@ module Rails # YAML::load. def database_configuration require 'erb' - YAML::load(ERB.new(IO.read(database_configuration_file)).result) + YAML::load(ERB.new(IO.read(paths.config.database.to_a.first)).result) + end + + def view_path=(value) + ActiveSupport::Deprecation.warn "config.view_path= is deprecated, " << + "please do config.paths.app.views= instead", caller + paths.app.views = value + end + + def view_path + ActiveSupport::Deprecation.warn "config.view_path is deprecated, " << + "please do config.paths.app.views instead", caller + paths.app.views.to_a.first + end + + def routes_configuration_file=(value) + ActiveSupport::Deprecation.warn "config.routes_configuration_file= is deprecated, " << + "please do config.paths.config.routes= instead", caller + paths.config.routes = value end def routes_configuration_file - @routes_configuration_file ||= File.join(root, 'config', 'routes.rb') + ActiveSupport::Deprecation.warn "config.routes_configuration_file is deprecated, " << + "please do config.paths.config.routes instead", caller + paths.config.routes.to_a.first + end + + def database_configuration_file=(value) + ActiveSupport::Deprecation.warn "config.database_configuration_file= is deprecated, " << + "please do config.paths.config.database= instead", caller + paths.config.database = value + end + + def database_configuration_file + ActiveSupport::Deprecation.warn "config.database_configuration_file is deprecated, " << + "please do config.paths.config.database instead", caller + paths.config.database.to_a.first + end + + def log_path=(value) + ActiveSupport::Deprecation.warn "config.log_path= is deprecated, " << + "please do config.paths.log= instead", caller + paths.config.log = value end - def builtin_routes_configuration_file - @builtin_routes_configuration_file ||= File.join(RAILTIES_PATH, 'builtin', 'routes.rb') + def log_path + ActiveSupport::Deprecation.warn "config.log_path is deprecated, " << + "please do config.paths.log instead", caller + paths.config.log.to_a.first end + + + # TODO Router needs this, but this wouldn't work with engines. + # There is a high chance of plugins routes to be broken. def controller_paths @controller_paths ||= begin paths = [File.join(root, 'app', 'controllers')] @@ -192,46 +252,11 @@ module Rails end end - def database_configuration_file - @database_configuration_file ||= File.join(root, 'config', 'database.yml') - end - - def view_path - @view_path ||= File.join(root, 'app', 'views') - end - - def eager_load_paths - @eager_load_paths ||= ["#{root}/app/*"] - end - - def load_paths - @load_paths ||= begin - paths = [] - - # Add the old mock paths only if the directories exists - paths.concat(Dir["#{root}/test/mocks/#{Rails.env}"]) if File.exists?("#{root}/test/mocks/#{Rails.env}") - - # Followed by the standard includes. - paths.concat %w( - app - app/* - lib - vendor - ).map { |dir| "#{root}/#{dir}" } - - paths.concat builtin_directories - end - end - + # Include builtins only in the development environment. def builtin_directories - # Include builtins only in the development environment. Rails.env.development? ? Dir["#{RAILTIES_PATH}/builtin/*/"] : [] end - def log_path - @log_path ||= File.join(root, 'log', "#{Rails.env}.log") - end - def log_level @log_level ||= Rails.env.production? ? :info : :debug end diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb new file mode 100644 index 0000000000..21c78036bd --- /dev/null +++ b/railties/lib/rails/engine.rb @@ -0,0 +1,107 @@ +require 'active_support/core_ext/module/delegation' + +module Rails + # TODO Move I18n and views path setup + class Engine < Railtie + + class << self + attr_accessor :called_from + + def root + @root ||= find_root_with_file_flag("lib") + end + + def config + @config ||= Configuration.new(root) + end + + def inherited(base) + base.called_from = begin + call_stack = caller.map { |p| p.split(':').first } + File.dirname(call_stack.detect { |p| p !~ %r[railties/lib/rails|rack/lib/rack] }) + end + super + end + + protected + + def find_root_with_file_flag(flag, default=nil) + root_path = self.called_from + + while root_path && File.directory?(root_path) && !File.exist?("#{root_path}/#{flag}") + parent = File.dirname(root_path) + root_path = parent != root_path && parent + end + + root = File.exist?("#{root_path}/flag") ? root_path : default + + raise "Could not find root path for #{self}" unless root + + RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? + Pathname.new(root).expand_path : + Pathname.new(root).realpath + end + end + + delegate :root, :config, :to => :'self.class' + delegate :middleware, :to => :config + + # Add configured load paths to ruby load paths and remove duplicates. + initializer :set_load_path, :before => :container do + config.paths.add_to_load_path + $LOAD_PATH.uniq! + end + + # Set the paths from which Rails will automatically load source files, + # and the load_once paths. + initializer :set_autoload_paths, :before => :container do + require 'active_support/dependencies' + + ActiveSupport::Dependencies.load_paths = expand_load_path(config.load_paths) + ActiveSupport::Dependencies.load_once_paths = expand_load_path(config.load_once_paths) + + extra = ActiveSupport::Dependencies.load_once_paths - ActiveSupport::Dependencies.load_paths + + unless extra.empty? + abort <<-end_error + load_once_paths must be a subset of the load_paths. + Extra items in load_once_paths: #{extra * ','} + end_error + end + + # Freeze the arrays so future modifications will fail rather than do nothing mysteriously + config.load_once_paths.freeze + end + + initializer :load_application_initializers do + Dir["#{root}/config/initializers/**/*.rb"].sort.each do |initializer| + load(initializer) + end + end + + # Routing must be initialized after plugins to allow the former to extend the routes + initializer :initialize_routing do |app| + app.route_configuration_files.concat(config.paths.config.routes.to_a) + end + + # Eager load application classes + initializer :load_application_classes do |app| + next if $rails_rake_task + + if app.config.cache_classes + config.eager_load_paths.each do |load_path| + matcher = /\A#{Regexp.escape(load_path)}(.*)\.rb\Z/ + Dir.glob("#{load_path}/**/*.rb").sort.each do |file| + require_dependency file.sub(matcher, '\1') + end + end + end + end + + private + + def expand_load_path(load_paths) + load_paths.map { |path| Dir.glob(path.to_s) }.flatten.uniq + end + end +end \ No newline at end of file diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb index c3b81bcd3e..dde06bfcbd 100644 --- a/railties/lib/rails/plugin.rb +++ b/railties/lib/rails/plugin.rb @@ -57,7 +57,6 @@ module Rails end end - # TODO Isn't it supposed to be :after => "action_controller.initialize_routing" ? initializer :add_routing_file, :after => :initialize_routing do |app| routing_file = "#{path}/config/routes.rb" if File.exist?(routing_file) diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb index e3297148e5..a7f52b25e4 100644 --- a/railties/lib/rails/railtie.rb +++ b/railties/lib/rails/railtie.rb @@ -2,43 +2,51 @@ module Rails class Railtie include Initializable - def self.plugin_name(plugin_name = nil) - @plugin_name ||= name.demodulize.underscore - @plugin_name = plugin_name if plugin_name - @plugin_name - end + ABSTRACT_RAILTIES = %w(Rails::Plugin Rails::Engine Rails::Application) - def self.inherited(klass) - @plugins ||= [] - @plugins << klass unless klass == Plugin - end + class << self + def abstract_railtie?(base) + ABSTRACT_RAILTIES.include?(base.name) + end - def self.plugins - @plugins - end + def inherited(base) + @@plugins ||= [] + @@plugins << base unless abstract_railtie?(base) + end - def self.plugin_names - plugins.map { |p| p.plugin_name } - end + def plugin_name(plugin_name = nil) + @plugin_name ||= name.demodulize.underscore + @plugin_name = plugin_name if plugin_name + @plugin_name + end - def self.config - Configuration.default - end + def plugins + @@plugins + end - def self.subscriber(subscriber) - Rails::Subscriber.add(plugin_name, subscriber) - end + def plugin_names + plugins.map { |p| p.plugin_name } + end - def self.rake_tasks(&blk) - @rake_tasks ||= [] - @rake_tasks << blk if blk - @rake_tasks - end + def config + Configuration.default + end + + def subscriber(subscriber) + Rails::Subscriber.add(plugin_name, subscriber) + end + + def rake_tasks(&blk) + @rake_tasks ||= [] + @rake_tasks << blk if blk + @rake_tasks + end - def self.generators(&blk) - @generators ||= [] - @generators << blk if blk - @generators + def generators(&blk) + @generators ||= [] + @generators << blk if blk + @generators + end end def rake_tasks -- cgit v1.2.3 From 02c5137eadbb3530033d919b7aebeb6f4f389b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 22 Jan 2010 01:10:31 +0100 Subject: Add view paths to Engine setup. --- actionmailer/lib/action_mailer/railtie.rb | 3 +- actionpack/lib/action_controller/railtie.rb | 3 +- railties/lib/rails/application.rb | 18 +++++----- railties/lib/rails/configuration.rb | 36 +++++++++---------- railties/lib/rails/engine.rb | 48 ++++++++++++++++--------- railties/lib/rails/railtie.rb | 1 + railties/test/application/configuration_test.rb | 4 +-- 7 files changed, 62 insertions(+), 51 deletions(-) diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb index b05d21ae5d..94d9eaf81b 100644 --- a/actionmailer/lib/action_mailer/railtie.rb +++ b/actionmailer/lib/action_mailer/railtie.rb @@ -21,8 +21,7 @@ module ActionMailer initializer "action_mailer.view_paths" do |app| # TODO: this should be combined with the logic for default config.action_mailer.view_paths - view_path = ActionView::PathSet.type_cast(app.config.view_path, app.config.cache_classes) - ActionMailer::Base.template_root = view_path if ActionMailer::Base.view_paths.blank? + ActionMailer::Base.template_root = [] if ActionMailer::Base.view_paths.blank? end end end \ No newline at end of file diff --git a/actionpack/lib/action_controller/railtie.rb b/actionpack/lib/action_controller/railtie.rb index ee94bf8364..621dd9373c 100644 --- a/actionpack/lib/action_controller/railtie.rb +++ b/actionpack/lib/action_controller/railtie.rb @@ -29,8 +29,7 @@ module ActionController # set to use Configuration#view_path. initializer "action_controller.initialize_framework_views" do |app| # TODO: this should be combined with the logic for default config.action_controller.view_paths - view_path = ActionView::PathSet.type_cast(app.config.view_path, app.config.cache_classes) - ActionController::Base.view_paths = view_path if ActionController::Base.view_paths.blank? + ActionController::Base.view_paths = [] if ActionController::Base.view_paths.blank? end end diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 898dd0ad9b..9be9584873 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -1,4 +1,4 @@ -require "fileutils" +require 'fileutils' module Rails class Application < Engine @@ -6,7 +6,7 @@ module Rails class << self alias :configure :class_eval - delegate :initialize!, :load_tasks, :load_generators, :to => :instance + delegate :initialize!, :load_tasks, :load_generators, :root, :to => :instance private :new def instance @@ -14,11 +14,11 @@ module Rails end def config - @config ||= Configuration.new(root) + @config ||= Configuration.new(original_root) end - def root - @root ||= find_root_with_file_flag("config.ru", Dir.pwd) + def original_root + @original_root ||= find_root_with_file_flag("config.ru", Dir.pwd) end def inherited(base) @@ -122,16 +122,16 @@ module Rails app.call(env) end - initializer :build_middleware_stack, :after => :load_application_initializers do - app - end - initializer :add_builtin_route do |app| if Rails.env.development? app.route_configuration_files << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') end end + initializer :build_middleware_stack, :after => :load_application_initializers do + app + end + # Fires the user-supplied after_initialize block (Configuration#after_initialize) initializer :after_initialize, :after => :build_middleware_stack do config.after_initialize_blocks.each do |block| diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index 77248f2611..9176809dbd 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -70,7 +70,8 @@ module Rails end class Engine::Configuration < Railtie::Configuration - attr_reader :root + attr_reader :root + attr_accessor :eager_load_paths, :load_once_paths, :load_paths def initialize(root) @root = root @@ -79,14 +80,15 @@ module Rails def paths @paths ||= begin - paths = Rails::Application::Root.new(root) + paths = Rails::Application::Root.new(@root) paths.app "app", :load_path => true paths.app_glob "app/*", :load_path => true, :eager_load => true - paths.app.controllers "app/controllers" + paths.app.controllers "app/controllers", :eager_load => true paths.app.metals "app/metal" paths.app.views "app/views" paths.lib "lib", :load_path => true paths.config "config" + paths.config.environment "config/environments/#{Rails.env}.rb" paths.config.environments "config/environments", :glob => "#{Rails.env}.rb" paths.config.initializers "config/initializers" paths.config.locales "config/locales" @@ -95,6 +97,10 @@ module Rails end end + def root=(value) + @root = paths.path = Pathname.new(value).expand_path + end + def eager_load_paths @eager_load_paths ||= paths.eager_load end @@ -106,6 +112,10 @@ module Rails def load_paths @load_paths ||= paths.load_paths end + + def controller_paths + paths.app.controllers.to_a.uniq + end end class Configuration < Engine::Configuration @@ -115,9 +125,7 @@ module Rails :preload_frameworks, :reload_plugins, :serve_static_assets, :time_zone, :whiny_nils - attr_writer :cache_store, :controller_paths, - :database_configuration_file, - :i18n, :log_level, :log_path + attr_writer :cache_store, :controller_paths, :i18n, :log_level def initialize(*) super @@ -134,7 +142,7 @@ module Rails def paths @paths ||= begin paths = super - paths.builtin_controller builtin_directories, :eager_load => true + paths.app.controllers << builtin_directories paths.config.database "config/database.yml" paths.log "log/#{Rails.env}.log" paths.tmp "tmp" @@ -144,7 +152,7 @@ module Rails if File.exists?("#{root}/test/mocks/#{Rails.env}") ActiveSupport::Deprecation.warn "\"RAILS_ROOT/test/mocks/#{Rails.env}\" won't be added " << - "automatically to load paths anymore in next releases." + "automatically to load paths anymore in future releases" paths.mocks_path "test/mocks/#{Rails.env}", :load_path => true end @@ -230,18 +238,6 @@ module Rails paths.config.log.to_a.first end - - - # TODO Router needs this, but this wouldn't work with engines. - # There is a high chance of plugins routes to be broken. - def controller_paths - @controller_paths ||= begin - paths = [File.join(root, 'app', 'controllers')] - paths.concat builtin_directories - paths - end - end - def cache_store @cache_store ||= begin if File.exist?("#{root}/tmp/cache/") diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 21c78036bd..a0139f9983 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -1,18 +1,19 @@ require 'active_support/core_ext/module/delegation' module Rails - # TODO Move I18n and views path setup + # TODO Move I18n here + # TODO Set routes namespaces class Engine < Railtie class << self attr_accessor :called_from - def root - @root ||= find_root_with_file_flag("lib") + def original_root + @original_root ||= find_root_with_file_flag("lib") end def config - @config ||= Configuration.new(root) + @config ||= Configuration.new(original_root) end def inherited(base) @@ -20,6 +21,7 @@ module Rails call_stack = caller.map { |p| p.split(':').first } File.dirname(call_stack.detect { |p| p !~ %r[railties/lib/rails|rack/lib/rack] }) end + super end @@ -33,7 +35,7 @@ module Rails root_path = parent != root_path && parent end - root = File.exist?("#{root_path}/flag") ? root_path : default + root = File.exist?("#{root_path}/#{flag}") ? root_path : default raise "Could not find root path for #{self}" unless root @@ -43,8 +45,8 @@ module Rails end end - delegate :root, :config, :to => :'self.class' - delegate :middleware, :to => :config + delegate :config, :to => :'self.class' + delegate :middleware, :root, :to => :config # Add configured load paths to ruby load paths and remove duplicates. initializer :set_load_path, :before => :container do @@ -57,10 +59,11 @@ module Rails initializer :set_autoload_paths, :before => :container do require 'active_support/dependencies' - ActiveSupport::Dependencies.load_paths = expand_load_path(config.load_paths) + ActiveSupport::Dependencies.load_paths = expand_load_path(config.load_paths) ActiveSupport::Dependencies.load_once_paths = expand_load_path(config.load_once_paths) - extra = ActiveSupport::Dependencies.load_once_paths - ActiveSupport::Dependencies.load_paths + extra = ActiveSupport::Dependencies.load_once_paths - + ActiveSupport::Dependencies.load_paths unless extra.empty? abort <<-end_error @@ -73,15 +76,24 @@ module Rails config.load_once_paths.freeze end - initializer :load_application_initializers do - Dir["#{root}/config/initializers/**/*.rb"].sort.each do |initializer| - load(initializer) - end + # Routing must be initialized after plugins to allow the former to extend the routes + initializer :add_routing_files do |app| + routes = select_existing(config.paths.config.routes) + app.route_configuration_files.concat(routes) end - # Routing must be initialized after plugins to allow the former to extend the routes - initializer :initialize_routing do |app| - app.route_configuration_files.concat(config.paths.config.routes.to_a) + initializer :add_view_paths do + views = select_existing(config.paths.app.views) + ActionController::Base.view_paths.concat(views) if defined? ActionController + ActionMailer::Base.view_paths.concat(views) if defined? ActionMailer + end + + initializer :load_application_initializers do + select_existing(config.paths.config.initializers).each do |initializers| + Dir["#{initializers}/**/*.rb"].sort.each do |initializer| + load(initializer) + end + end end # Eager load application classes @@ -100,6 +112,10 @@ module Rails private + def select_existing(paths) + paths.to_a.select { |path| File.exists?(path) }.uniq + end + def expand_load_path(load_paths) load_paths.map { |path| Dir.glob(path.to_s) }.flatten.uniq end diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb index a7f52b25e4..5b97fabe40 100644 --- a/railties/lib/rails/railtie.rb +++ b/railties/lib/rails/railtie.rb @@ -14,6 +14,7 @@ module Rails @@plugins << base unless abstract_railtie?(base) end + # This should be called railtie_name and engine_name def plugin_name(plugin_name = nil) @plugin_name ||= name.demodulize.underscore @plugin_name = plugin_name if plugin_name diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 6968e87986..2c842eb096 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -34,9 +34,9 @@ module ApplicationTests add_to_config <<-RUBY config.root = '#{new_app}' RUBY - + use_frameworks [] - + require "#{app_path}/config/environment" assert_equal Pathname.new(new_app), Rails.application.root end -- cgit v1.2.3 From 12c001fec449864db64eca9ba3a477a7da30b2ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Fri, 22 Jan 2010 12:46:19 +1100 Subject: Updating deprecated API to sanitize old style attachments hash to work with new mail.attachments method --- actionmailer/lib/action_mailer/deprecated_api.rb | 45 ++++++++++++++++++------ actionmailer/test/mail_service_test.rb | 2 +- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index d096ea6180..19c94aee8d 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -30,23 +30,48 @@ module ActionMailer super # Run deprecation hooks params = { :content_type => params } if String === params - - if filename = params.delete(:filename) - content_disposition = "attachment; filename=\"#{File.basename(filename)}\"" + + if params[:filename] + params = normalize_file_hash(params) else - content_disposition = "attachment" + params = normalize_nonfile_hash(params) end - - params[:content] = params.delete(:data) if params[:data] - - params = { :content_disposition => content_disposition, - :content_transfer_encoding => "base64" }.merge(params) - part(params, &block) end private + def normalize_nonfile_hash(params) + content_disposition = "attachment;" + + mime_type = params.delete(:mime_type) + + if content_type = params.delete(:content_type) + content_type = "#{mime_type || content_type};" + end + + params[:body] = params.delete(:data) if params[:data] + + { :content_type => content_type, + :content_disposition => content_disposition }.merge(params) + end + + def normalize_file_hash(params) + filename = File.basename(params.delete(:filename)) + content_disposition = "attachment; filename=\"#{File.basename(filename)}\"" + + mime_type = params.delete(:mime_type) + + if (content_type = params.delete(:content_type)) && (content_type !~ /filename=/) + content_type = "#{mime_type || content_type}; filename=\"#{filename}\"" + end + + params[:body] = params.delete(:data) if params[:data] + + { :content_type => content_type, + :content_disposition => content_disposition }.merge(params) + end + def create_mail #:nodoc: m = @message diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index f83e13f16f..51d722ea00 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -1036,7 +1036,7 @@ EOF def test_empty_header_values_omitted result = TestMailer.create_unnamed_attachment(@recipient).encoded assert_match %r{Content-Type: application/octet-stream;}, result - assert_match %r{Content-Disposition: attachment[^;]}, result + assert_match %r{Content-Disposition: attachment;}, result end def test_headers_with_nonalpha_chars -- cgit v1.2.3 From 77986f6bdb18414d730fa1ec686365dff26bb4fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Fri, 22 Jan 2010 12:49:13 +1100 Subject: Added use of AS::Notifications for tmail_compat.rb --- actionmailer/lib/action_mailer/tmail_compat.rb | 9 ++++++--- actionmailer/test/tmail_compat_test.rb | 2 -- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/actionmailer/lib/action_mailer/tmail_compat.rb b/actionmailer/lib/action_mailer/tmail_compat.rb index 94f21c7cf3..da13aac677 100644 --- a/actionmailer/lib/action_mailer/tmail_compat.rb +++ b/actionmailer/lib/action_mailer/tmail_compat.rb @@ -2,14 +2,16 @@ module Mail class Message def set_content_type(*args) - STDERR.puts("Message#set_content_type is deprecated, please just call Message#content_type with the same arguments.\n#{caller}") + ActiveSupport::Deprecation.warn('Message#set_content_type is deprecated, please just call ' << + 'Message#content_type with the same arguments.', caller[0,10]) content_type(*args) end alias :old_transfer_encoding :transfer_encoding def transfer_encoding(value = nil) if value - STDERR.puts("Message#transfer_encoding is deprecated, please call Message#content_transfer_encoding with the same arguments.\n#{caller}") + ActiveSupport::Deprecation.warn('Message#transfer_encoding is deprecated, please call ' << + 'Message#content_transfer_encoding with the same arguments.', caller[0,10]) content_transfer_encoding(value) else old_transfer_encoding @@ -17,7 +19,8 @@ module Mail end def original_filename - STDERR.puts("Message#original_filename is deprecated, please call Message#filename.\n#{caller}") + ActiveSupport::Deprecation.warn('Message#original_filename is deprecated, ' << + 'please call Message#filename.', caller[0,10]) filename end diff --git a/actionmailer/test/tmail_compat_test.rb b/actionmailer/test/tmail_compat_test.rb index a1ca6a7243..b7fcb3cfea 100644 --- a/actionmailer/test/tmail_compat_test.rb +++ b/actionmailer/test/tmail_compat_test.rb @@ -4,7 +4,6 @@ class TmailCompatTest < Test::Unit::TestCase def test_set_content_type_raises_deprecation_warning mail = Mail.new - STDERR.expects(:puts) # Deprecation warning assert_nothing_raised do mail.set_content_type "text/plain" end @@ -13,7 +12,6 @@ class TmailCompatTest < Test::Unit::TestCase def test_transfer_encoding_raises_deprecation_warning mail = Mail.new - STDERR.expects(:puts) # Deprecation warning assert_nothing_raised do mail.transfer_encoding "base64" end -- cgit v1.2.3 From 90bbed233e14957376d6c1985202c495b3af6ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Fri, 22 Jan 2010 12:51:07 +1100 Subject: Updating deprecated_body.rb to use :content instead of :data or :body in the params hash --- actionmailer/lib/action_mailer/deprecated_body.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/actionmailer/lib/action_mailer/deprecated_body.rb b/actionmailer/lib/action_mailer/deprecated_body.rb index c82610014f..daaf145327 100644 --- a/actionmailer/lib/action_mailer/deprecated_body.rb +++ b/actionmailer/lib/action_mailer/deprecated_body.rb @@ -14,10 +14,15 @@ module ActionMailer end def attachment(params, &block) + if params[:data] + ActiveSupport::Deprecation.warn('attachment :data => "string" is deprecated. To set the body of an attachment ' << + 'please use :content instead, like attachment :content => "string"', caller[0,10]) + params[:content] = params.delete(:data) + end if params[:body] - ActiveSupport::Deprecation.warn('attachment :body => "string" is deprecated. To set the body of an attachment ' << - 'please use :data instead, like attachment :data => "string"', caller[0,10]) - params[:data] = params.delete(:body) + ActiveSupport::Deprecation.warn('attachment :data => "string" is deprecated. To set the body of an attachment ' << + 'please use :content instead, like attachment :content => "string"', caller[0,10]) + params[:content] = params.delete(:body) end end -- cgit v1.2.3 From c9dc1ac95bc97800dd3deb82fe1cf6f98e27413d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Fri, 22 Jan 2010 13:32:16 +1100 Subject: Updating functional tests to not compare equality with encoded, Mail::Message has an == operator --- railties/lib/generators/test_unit/mailer/templates/functional_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/lib/generators/test_unit/mailer/templates/functional_test.rb b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb index 4de94076e9..d7366fea5f 100644 --- a/railties/lib/generators/test_unit/mailer/templates/functional_test.rb +++ b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb @@ -7,7 +7,7 @@ class <%= class_name %>Test < ActionMailer::TestCase @expected.body = read_fixture('<%= action %>') @expected.date = Time.now - assert_equal @expected.encoded, <%= class_name %>.create_<%= action %>(@expected.date).encoded + assert_equal @expected, <%= class_name %>.create_<%= action %>(@expected.date) end <% end -%> -- cgit v1.2.3 From 6fd7d1fc128f1d6d7bddaa6770739d7e936dd049 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Fri, 22 Jan 2010 19:38:50 +1100 Subject: Fixing typo in config.frameworks error --- railties/lib/rails/configuration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index 7f1783a6b9..21736a28eb 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -137,7 +137,7 @@ module Rails end def frameworks(*args) - raise "config.frameworks in no longer supported. See the generated " \ + raise "config.frameworks is no longer supported. See the generated " \ "config/boot.rb for steps on how to limit the frameworks that " \ "will be loaded" end -- cgit v1.2.3 From 343ac48f45a433b2ef0dc67f9cd9d1245fb5ef2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Fri, 22 Jan 2010 11:01:21 +0100 Subject: Moved deprecated_body.rb to deprecatead_api.rb --- actionmailer/lib/action_mailer.rb | 1 - actionmailer/lib/action_mailer/base.rb | 61 ---------- actionmailer/lib/action_mailer/deprecated_api.rb | 141 +++++++++++++++++----- actionmailer/lib/action_mailer/deprecated_body.rb | 53 -------- actionmailer/lib/action_mailer/mail_helper.rb | 5 + actionmailer/lib/action_mailer/tmail_compat.rb | 6 +- actionmailer/test/mail_service_test.rb | 12 -- 7 files changed, 118 insertions(+), 161 deletions(-) delete mode 100644 actionmailer/lib/action_mailer/deprecated_body.rb diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index 1765aee9cc..37c95baea7 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -33,7 +33,6 @@ module ActionMailer autoload :AdvAttrAccessor autoload :Base autoload :DeliveryMethods - autoload :DeprecatedBody autoload :DeprecatedApi autoload :MailHelper autoload :Quoting diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 39ddafe7fe..0b3b44e326 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -263,7 +263,6 @@ module ActionMailer #:nodoc: include AbstractController::UrlFor helper ActionMailer::MailHelper - include ActionMailer::DeprecatedBody include ActionMailer::DeprecatedApi include ActionMailer::DeliveryMethods @@ -297,69 +296,11 @@ module ActionMailer #:nodoc: @@default_implicit_parts_order = [ "text/plain", "text/enriched", "text/html" ] cattr_accessor :default_implicit_parts_order - @@protected_instance_variables = %w(@parts @message) - cattr_reader :protected_instance_variables - - # Specify the BCC addresses for the message - adv_attr_accessor :bcc - - # Specify the CC addresses for the message. - adv_attr_accessor :cc - - # Specify the charset to use for the message. This defaults to the - # +default_charset+ specified for ActionMailer::Base. - adv_attr_accessor :charset - - # Specify the content type for the message. This defaults to text/plain - # in most cases, but can be automatically set in some situations. - adv_attr_accessor :content_type - - # Specify the from address for the message. - adv_attr_accessor :from - - # Specify the address (if different than the "from" address) to direct - # replies to this message. - adv_attr_accessor :reply_to - - # Specify additional headers to be added to the message. - adv_attr_accessor :headers - - # Specify the order in which parts should be sorted, based on content-type. - # This defaults to the value for the +default_implicit_parts_order+. - adv_attr_accessor :implicit_parts_order - - # Defaults to "1.0", but may be explicitly given if needed. - adv_attr_accessor :mime_version - - # The recipient addresses for the message, either as a string (for a single - # address) or an array (for multiple addresses). - adv_attr_accessor :recipients - - # The date on which the message was sent. If not set (the default), the - # header will be set by the delivery agent. - adv_attr_accessor :sent_on - - # Specify the subject of the message. - adv_attr_accessor :subject - - # Specify the template name to use for current message. This is the "base" - # template name, without the extension or directory, and may be used to - # have multiple mailer methods share the same template. - adv_attr_accessor :template - - # Override the mailer name, which defaults to an inflected version of the - # mailer's class name. If you want to use a template in a non-standard - # location, you can use this to specify that location. - adv_attr_accessor :mailer_name - # Expose the internal Mail message attr_reader :message # Pass calls to headers and attachment to the Mail#Message instance delegate :headers, :attachments, :to => :@message - - # Alias controller_path to mailer_name so render :partial in views work. - alias :controller_path :mailer_name class << self @@ -504,9 +445,7 @@ module ActionMailer #:nodoc: # rendered and a new Mail object created. def process(method_name, *args) initialize_defaults(method_name) - super - unless @mail_was_called # Create e-mail parts create_parts diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index 19c94aee8d..32ea4162dc 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -3,8 +3,87 @@ module ActionMailer # hooks in ActionMailer::Base are removed as well. # # Moved here to allow us to add the new Mail API - module DeprecatedApi - extend ActionMailer::AdvAttrAccessor + module DeprecatedApi #:nodoc: + extend ActiveSupport::Concern + + included do + extend ActionMailer::AdvAttrAccessor + + @@protected_instance_variables = %w(@parts) + cattr_reader :protected_instance_variables + + # Specify the BCC addresses for the message + adv_attr_accessor :bcc + + # Specify the CC addresses for the message. + adv_attr_accessor :cc + + # Specify the charset to use for the message. This defaults to the + # +default_charset+ specified for ActionMailer::Base. + adv_attr_accessor :charset + + # Specify the content type for the message. This defaults to text/plain + # in most cases, but can be automatically set in some situations. + adv_attr_accessor :content_type + + # Specify the from address for the message. + adv_attr_accessor :from + + # Specify the address (if different than the "from" address) to direct + # replies to this message. + adv_attr_accessor :reply_to + + # Specify additional headers to be added to the message. + adv_attr_accessor :headers + + # Specify the order in which parts should be sorted, based on content-type. + # This defaults to the value for the +default_implicit_parts_order+. + adv_attr_accessor :implicit_parts_order + + # Defaults to "1.0", but may be explicitly given if needed. + adv_attr_accessor :mime_version + + # The recipient addresses for the message, either as a string (for a single + # address) or an array (for multiple addresses). + adv_attr_accessor :recipients + + # The date on which the message was sent. If not set (the default), the + # header will be set by the delivery agent. + adv_attr_accessor :sent_on + + # Specify the subject of the message. + adv_attr_accessor :subject + + # Specify the template name to use for current message. This is the "base" + # template name, without the extension or directory, and may be used to + # have multiple mailer methods share the same template. + adv_attr_accessor :template + + # Override the mailer name, which defaults to an inflected version of the + # mailer's class name. If you want to use a template in a non-standard + # location, you can use this to specify that location. + adv_attr_accessor :mailer_name + + # Define the body of the message. This is either a Hash (in which case it + # specifies the variables to pass to the template when it is rendered), + # or a string, in which case it specifies the actual text of the message. + adv_attr_accessor :body + + # Alias controller_path to mailer_name so render :partial in views work. + alias :controller_path :mailer_name + end + + def render(*args) + options = args.last.is_a?(Hash) ? args.last : {} + if options[:body] + ActiveSupport::Deprecation.warn(':body in render deprecated. Please call body ' << + 'with a hash instead', caller[0,1]) + + body options.delete(:body) + end + + super + end # Add a part to a multipart message, with the given content-type. The # part itself is yielded to the block so that other properties (charset, @@ -13,8 +92,6 @@ module ActionMailer params = {:content_type => params} if String === params if custom_headers = params.delete(:headers) - ActiveSupport::Deprecation.warn('Passing custom headers with :headers => {} is deprecated. ' << - 'Please just pass in custom headers directly.', caller[0,10]) params.merge!(custom_headers) end @@ -27,19 +104,38 @@ module ActionMailer # Add an attachment to a multipart message. This is simply a part with the # content-disposition set to "attachment". def attachment(params, &block) - super # Run deprecation hooks - params = { :content_type => params } if String === params + params[:content] ||= params.delete(:data) || params.delete(:body) + if params[:filename] params = normalize_file_hash(params) else params = normalize_nonfile_hash(params) end + part(params, &block) end - private + # Render a message but does not set it as mail body. Useful for rendering + # data for part and attachments. + # + # Examples: + # + # render_message "special_message" + # render_message :template => "special_message" + # render_message :inline => "<%= 'Hi!' %>" + # + def render_message(object) + case object + when String + render_to_body(:template => object) + else + render_to_body(object) + end + end + + private def normalize_nonfile_hash(params) content_disposition = "attachment;" @@ -109,25 +205,6 @@ module ActionMailer @message end - - # Render a message but does not set it as mail body. Useful for rendering - # data for part and attachments. - # - # Examples: - # - # render_message "special_message" - # render_message :template => "special_message" - # render_message :inline => "<%= 'Hi!' %>" - # - # TODO Deprecate me - def render_message(object) - case object - when String - render_to_body(:template => object) - else - render_to_body(object) - end - end # Set up the default values for the various instance variables of this # mailer. Subclasses may override this method to provide different @@ -139,18 +216,20 @@ module ActionMailer @mime_version ||= self.class.default_mime_version.dup if self.class.default_mime_version @mailer_name ||= self.class.mailer_name.dup - @delivery_method = self.class.delivery_method @template ||= method_name @parts ||= [] @headers ||= {} @sent_on ||= Time.now - - super # Run deprecation hooks + @body ||= {} end def create_parts #:nodoc: - super # Run deprecation hooks + if String === @body + self.response_body = @body + elsif @body.is_a?(Hash) && !@body.empty? + @body.each { |k, v| instance_variable_set(:"@#{k}", v) } + end if String === response_body @parts.unshift create_inline_part(response_body) @@ -179,7 +258,7 @@ module ActionMailer :body => body ) end - + def split_content_type(ct) #:nodoc: ct.to_s.split("/") end diff --git a/actionmailer/lib/action_mailer/deprecated_body.rb b/actionmailer/lib/action_mailer/deprecated_body.rb deleted file mode 100644 index daaf145327..0000000000 --- a/actionmailer/lib/action_mailer/deprecated_body.rb +++ /dev/null @@ -1,53 +0,0 @@ -module ActionMailer - # TODO Remove this module all together in a next release. Ensure that super - # hooks in ActionMailer::Base are removed as well. - module DeprecatedBody - extend ActionMailer::AdvAttrAccessor - - # Define the body of the message. This is either a Hash (in which case it - # specifies the variables to pass to the template when it is rendered), - # or a string, in which case it specifies the actual text of the message. - adv_attr_accessor :body - - def initialize_defaults(method_name) - @body ||= {} - end - - def attachment(params, &block) - if params[:data] - ActiveSupport::Deprecation.warn('attachment :data => "string" is deprecated. To set the body of an attachment ' << - 'please use :content instead, like attachment :content => "string"', caller[0,10]) - params[:content] = params.delete(:data) - end - if params[:body] - ActiveSupport::Deprecation.warn('attachment :data => "string" is deprecated. To set the body of an attachment ' << - 'please use :content instead, like attachment :content => "string"', caller[0,10]) - params[:content] = params.delete(:body) - end - end - - def create_parts - if String === @body - ActiveSupport::Deprecation.warn('body(String) is deprecated. To set the body with a text ' << - 'call render(:text => "body")', caller[0,10]) - self.response_body = @body - elsif @body.is_a?(Hash) && !@body.empty? - ActiveSupport::Deprecation.warn('body(Hash) is deprecated. Use instance variables to define ' << - 'assigns in your view', caller[0,10]) - @body.each { |k, v| instance_variable_set(:"@#{k}", v) } - end - end - - def render(*args) - options = args.last.is_a?(Hash) ? args.last : {} - if options[:body] - ActiveSupport::Deprecation.warn(':body in render deprecated. Please call body ' << - 'with a hash instead', caller[0,1]) - - body options.delete(:body) - end - - super - end - end -end diff --git a/actionmailer/lib/action_mailer/mail_helper.rb b/actionmailer/lib/action_mailer/mail_helper.rb index 701dc34431..702c9ba8f7 100644 --- a/actionmailer/lib/action_mailer/mail_helper.rb +++ b/actionmailer/lib/action_mailer/mail_helper.rb @@ -20,5 +20,10 @@ module ActionMailer def mailer #:nodoc: @controller end + + # Access the message instance. + def message + @message + end end end diff --git a/actionmailer/lib/action_mailer/tmail_compat.rb b/actionmailer/lib/action_mailer/tmail_compat.rb index da13aac677..d78332c135 100644 --- a/actionmailer/lib/action_mailer/tmail_compat.rb +++ b/actionmailer/lib/action_mailer/tmail_compat.rb @@ -3,7 +3,7 @@ module Mail def set_content_type(*args) ActiveSupport::Deprecation.warn('Message#set_content_type is deprecated, please just call ' << - 'Message#content_type with the same arguments.', caller[0,10]) + 'Message#content_type with the same arguments', caller[0,10]) content_type(*args) end @@ -11,7 +11,7 @@ module Mail def transfer_encoding(value = nil) if value ActiveSupport::Deprecation.warn('Message#transfer_encoding is deprecated, please call ' << - 'Message#content_transfer_encoding with the same arguments.', caller[0,10]) + 'Message#content_transfer_encoding with the same arguments', caller[0,10]) content_transfer_encoding(value) else old_transfer_encoding @@ -20,7 +20,7 @@ module Mail def original_filename ActiveSupport::Deprecation.warn('Message#original_filename is deprecated, ' << - 'please call Message#filename.', caller[0,10]) + 'please call Message#filename', caller[0,10]) filename end diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index 51d722ea00..ec820e3464 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -301,13 +301,6 @@ class TestMailer < ActionMailer::Base render :text => "testing" end - def body_ivar(recipient) - recipients recipient - subject "Body as a local variable" - from "test@example.com" - body :body => "foo", :bar => "baz" - end - def subject_with_i18n(recipient) recipients recipient from "system@loudthinking.com" @@ -1080,11 +1073,6 @@ EOF assert_equal "another@somewhere.test", MockSMTP.deliveries[0][1].to_s end - def test_body_is_stored_as_an_ivar - mail = TestMailer.create_body_ivar(@recipient) - assert_equal "body: foo\nbar: baz", mail.body.to_s - end - def test_starttls_is_enabled_if_supported ActionMailer::Base.delivery_settings[:smtp].merge!(:enable_starttls_auto => true) MockSMTP.any_instance.expects(:respond_to?).with(:enable_starttls_auto).returns(true) -- cgit v1.2.3 From bb9d71ff9e537597ff4d5962e7870ad99001f605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Fri, 22 Jan 2010 11:10:37 +0100 Subject: Move class methods to deprecated stuff. --- actionmailer/lib/action_mailer/base.rb | 53 +++--------------------- actionmailer/lib/action_mailer/deprecated_api.rb | 48 +++++++++++++++++++++ 2 files changed, 54 insertions(+), 47 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 0b3b44e326..2c1de0e3b4 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -253,7 +253,6 @@ module ActionMailer #:nodoc: # +implicit_parts_order+. class Base < AbstractController::Base include Quoting - extend AdvAttrAccessor include AbstractController::Logger include AbstractController::Rendering @@ -311,23 +310,6 @@ module ActionMailer #:nodoc: alias :controller_path :mailer_name - def respond_to?(method_symbol, include_private = false) #:nodoc: - matches_dynamic_method?(method_symbol) || super - end - - def method_missing(method_symbol, *parameters) #:nodoc: - if match = matches_dynamic_method?(method_symbol) - case match[1] - when 'create' then new(match[2], *parameters).message - when 'deliver' then new(match[2], *parameters).deliver! - when 'new' then nil - else super - end - else - super - end - end - # Receives a raw email, parses it into an email object, decodes it, # instantiates a new mailer, and passes the email object to the mailer # object's +receive+ method. If you want your mailer to be able to @@ -357,7 +339,6 @@ module ActionMailer #:nodoc: raise "no mail object available for delivery!" unless mail ActiveSupport::Notifications.instrument("action_mailer.deliver", :mailer => self.name) do |payload| - self.set_payload_for_mail(payload, mail) mail.delivery_method delivery_methods[delivery_method], @@ -396,18 +377,11 @@ module ActionMailer #:nodoc: payload[:date] = mail.date payload[:mail] = mail.encoded end - - private - - def matches_dynamic_method?(method_name) #:nodoc: - method_name = method_name.to_s - /^(create|deliver)_([_a-z]\w*)/.match(method_name) || /^(new)$/.match(method_name) - end end def mail(headers = {}) # Guard flag to prevent both the old and the new API from firing - # TODO - Move this @mail_was_called flag into deprecated_api.rb + # Should be removed when old API is deprecated @mail_was_called = true m = @message @@ -426,6 +400,11 @@ module ActionMailer #:nodoc: m.body.set_sort_order(headers[:parts_order] || @@default_implicit_parts_order) + # # Set the subject if not set yet + # @subject ||= I18n.t(:subject, :scope => [:actionmailer, mailer_name, method_name], + # :default => method_name.humanize) + + # TODO: m.body.sort_parts! m end @@ -436,30 +415,10 @@ module ActionMailer #:nodoc: # method, for instance). def initialize(method_name=nil, *args) super() - @mail_was_called = false @message = Mail.new process(method_name, *args) if method_name end - # Process the mailer via the given +method_name+. The body will be - # rendered and a new Mail object created. - def process(method_name, *args) - initialize_defaults(method_name) - super - unless @mail_was_called - # Create e-mail parts - create_parts - - # Set the subject if not set yet - @subject ||= I18n.t(:subject, :scope => [:actionmailer, mailer_name, method_name], - :default => method_name.humanize) - - # Build the mail object itself - create_mail - end - @message - end - # Delivers a Mail object. By default, it delivers the cached mail # object (from the create! method). If no cached mail object exists, and # no alternate has been given as the parameter, this will fail. diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index 32ea4162dc..430b0cef4a 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -73,6 +73,37 @@ module ActionMailer alias :controller_path :mailer_name end + module ClassMethods + def respond_to?(method_symbol, include_private = false) #:nodoc: + matches_dynamic_method?(method_symbol) || super + end + + def method_missing(method_symbol, *parameters) #:nodoc: + if match = matches_dynamic_method?(method_symbol) + case match[1] + when 'create' then new(match[2], *parameters).message + when 'deliver' then new(match[2], *parameters).deliver! + when 'new' then nil + else super + end + else + super + end + end + + private + + def matches_dynamic_method?(method_name) #:nodoc: + method_name = method_name.to_s + /^(create|deliver)_([_a-z]\w*)/.match(method_name) || /^(new)$/.match(method_name) + end + end + + def initialize(*) + super() + @mail_was_called = false + end + def render(*args) options = args.last.is_a?(Hash) ? args.last : {} if options[:body] @@ -85,6 +116,23 @@ module ActionMailer super end + def process(method_name, *args) + initialize_defaults(method_name) + super + unless @mail_was_called + # Create e-mail parts + create_parts + + # Set the subject if not set yet + @subject ||= I18n.t(:subject, :scope => [:actionmailer, mailer_name, method_name], + :default => method_name.humanize) + + # Build the mail object itself + create_mail + end + end + + # Add a part to a multipart message, with the given content-type. The # part itself is yielded to the block so that other properties (charset, # body, headers, etc.) can be set on it. -- cgit v1.2.3 From b30eb39ff072ce95ccd5ce94ae08d116c23fd260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Fri, 22 Jan 2010 11:57:54 +0100 Subject: Add more tests to new API. --- actionmailer/lib/action_mailer/base.rb | 38 +++++--- actionmailer/lib/action_mailer/deprecated_api.rb | 2 +- actionmailer/test/base_test.rb | 115 ++++++++++++++++------- 3 files changed, 107 insertions(+), 48 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 2c1de0e3b4..d75bbe952f 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -277,14 +277,14 @@ module ActionMailer #:nodoc: @@deliveries = [] cattr_accessor :deliveries - @@default_charset = "utf-8" - cattr_accessor :default_charset + extlib_inheritable_accessor :default_charset + self.default_charset = "utf-8" - @@default_content_type = "text/plain" - cattr_accessor :default_content_type + extlib_inheritable_accessor :default_content_type + self.default_content_type = "text/plain" - @@default_mime_version = "1.0" - cattr_accessor :default_mime_version + extlib_inheritable_accessor :default_mime_version + self.default_mime_version = "1.0" # This specifies the order that the parts of a multipart email will be. Usually you put # text/plain at the top so someone without a MIME capable email reader can read the plain @@ -292,14 +292,24 @@ module ActionMailer #:nodoc: # # Any content type that is not listed here will be inserted in the order you add them to # the email after the content types you list here. - @@default_implicit_parts_order = [ "text/plain", "text/enriched", "text/html" ] - cattr_accessor :default_implicit_parts_order + extlib_inheritable_accessor :default_implicit_parts_order + self.default_implicit_parts_order = [ "text/plain", "text/enriched", "text/html" ] # Expose the internal Mail message attr_reader :message - # Pass calls to headers and attachment to the Mail#Message instance - delegate :headers, :attachments, :to => :@message + def headers(args=nil) + if args + ActiveSupport::Deprecation.warn "headers(Hash) is deprecated, please do headers[key] = value instead", caller + @headers = args + else + @message + end + end + + def attachments + @message.attachments + end class << self @@ -386,9 +396,9 @@ module ActionMailer #:nodoc: m = @message - m.content_type ||= headers[:content_type] || @@default_content_type - m.charset ||= headers[:charset] || @@default_charset - m.mime_version ||= headers[:mime_version] || @@default_mime_version + m.content_type ||= headers[:content_type] || self.class.default_content_type + m.charset ||= headers[:charset] || self.class.default_charset + m.mime_version ||= headers[:mime_version] || self.class.default_mime_version m.subject = quote_if_necessary(headers[:subject], m.charset) if headers[:subject] m.to = quote_address_if_necessary(headers[:to], m.charset) if headers[:to] @@ -398,7 +408,7 @@ module ActionMailer #:nodoc: m.reply_to = quote_address_if_necessary(headers[:reply_to], m.charset) if headers[:reply_to] m.date = headers[:date] if headers[:date] - m.body.set_sort_order(headers[:parts_order] || @@default_implicit_parts_order) + m.body.set_sort_order(headers[:parts_order] || self.class.default_implicit_parts_order) # # Set the subject if not set yet # @subject ||= I18n.t(:subject, :scope => [:actionmailer, mailer_name, method_name], diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index 430b0cef4a..90e2aebf53 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -227,7 +227,7 @@ module ActionMailer m.mime_version = mime_version unless mime_version.nil? m.date = sent_on.to_time rescue sent_on if sent_on - headers.each { |k, v| m[k] = v } + @headers.each { |k, v| m[k] = v } real_content_type, ctype_attrs = parse_content_type main_type, sub_type = split_content_type(real_content_type) diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index f1f5f38482..b11631f444 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -37,37 +37,43 @@ require 'abstract_unit' # mail.deliver # # Notifier.welcome(user).deliver # => creates and sends the Mail in one step -class BaseTest < Test::Unit::TestCase - +class BaseTest < ActiveSupport::TestCase + DEFAULT_HEADERS = { + :to => 'mikel@test.lindsaar.net', + :from => 'jose@test.plataformatec.com', + :subject => 'The first email on new API!' + } + class TestMailer < ActionMailer::Base - def welcome(hash = {}) - hash = {:to => 'mikel@test.lindsaar.net', :from => 'jose@test.plataformatec.com', - :subject => 'The first email on new API!'}.merge!(hash) - mail(hash) + headers['X-SPAM'] = "Not SPAM" + mail(DEFAULT_HEADERS.merge(hash)) end - - def invoice(hash = {}) + + def attachment_with_content attachments['invoice.pdf'] = 'This is test File content' - hash = {:to => 'mikel@test.lindsaar.net', :from => 'jose@test.plataformatec.com', - :subject => 'Your invoice is attached'}.merge!(hash) - mail(hash) + mail(DEFAULT_HEADERS) + end + + def attachment_with_hash + attachments['invoice.jpg'] = { :content => "you smiling", :mime_type => "image/x-jpg", + :transfer_encoding => "base64" } + mail(DEFAULT_HEADERS) end - end - def test_the_method_call_to_mail_does_not_raise_error + test "method call to mail does not raise error" do assert_nothing_raised { TestMailer.deliver_welcome } end - def test_should_set_the_headers_of_the_mail_message + test "mail() should set the headers of the mail message" do email = TestMailer.deliver_welcome assert_equal(email.to, ['mikel@test.lindsaar.net']) assert_equal(email.from, ['jose@test.plataformatec.com']) assert_equal(email.subject, 'The first email on new API!') end - - def test_should_allow_all_headers_set + + test "mail() with bcc, cc, content_type, charset, mime_version, reply_to and date" do @time = Time.now email = TestMailer.deliver_welcome(:bcc => 'bcc@test.lindsaar.net', :cc => 'cc@test.lindsaar.net', @@ -85,32 +91,58 @@ class BaseTest < Test::Unit::TestCase assert_equal(email.date, @time) end -# def test_should_allow_custom_headers_to_be_set -# email = TestMailer.deliver_welcome -# assert_equal("Not SPAM", email['X-SPAM']) -# end - - def test_should_allow_you_to_send_an_attachment - assert_nothing_raised { TestMailer.deliver_invoice } + test "custom headers" do + email = TestMailer.deliver_welcome + assert_equal("Not SPAM", email['X-SPAM'].decoded) end - def test_should_allow_you_to_send_an_attachment - email = TestMailer.deliver_invoice + test "attachment with content" do + email = TestMailer.deliver_attachment_with_content assert_equal(1, email.attachments.length) + assert_equal('invoice.pdf', email.attachments[0].filename) + assert_equal('This is test File content', email.attachments['invoice.pdf'].decoded) end - def test_should_allow_you_to_send_an_attachment - email = TestMailer.deliver_invoice + test "attachment gets content type from filename" do + email = TestMailer.deliver_attachment_with_content assert_equal('invoice.pdf', email.attachments[0].filename) end - def test_should_allow_you_to_send_an_attachment - email = TestMailer.deliver_invoice - assert_equal('This is test File content', email.attachments['invoice.pdf'].decoded) + test "attachment with hash" do + email = TestMailer.deliver_attachment_with_hash + assert_equal(1, email.attachments.length) + assert_equal('invoice.jpg', email.attachments[0].filename) + assert_equal("\312\213\254\232)b", email.attachments['invoice.jpg'].decoded) + end + + test "uses default charset from class" do + swap TestMailer, :default_charset => "US-ASCII" do + email = TestMailer.deliver_welcome + assert_equal("US-ASCII", email.charset) + + email = TestMailer.deliver_welcome(:charset => "iso-8559-1") + assert_equal("iso-8559-1", email.charset) + end end - def test_should_use_class_defaults - + test "uses default content type from class" do + swap TestMailer, :default_content_type => "text/html" do + email = TestMailer.deliver_welcome + assert_equal("text/html", email.mime_type) + + email = TestMailer.deliver_welcome(:content_type => "application/xml") + assert_equal("application/xml", email.mime_type) + end + end + + test "uses default mime version from class" do + swap TestMailer, :default_mime_version => "2.0" do + email = TestMailer.deliver_welcome + assert_equal("2.0", email.mime_version) + + email = TestMailer.deliver_welcome(:mime_version => "1.0") + assert_equal("1.0", email.mime_version) + end end # def test_that_class_defaults_are_set_on_instantiation @@ -120,5 +152,22 @@ class BaseTest < Test::Unit::TestCase # def test_should_set_the_subject_from_i18n # pending # end - + + protected + + # Execute the block setting the given values and restoring old values after + # the block is executed. + def swap(object, new_values) + old_values = {} + new_values.each do |key, value| + old_values[key] = object.send key + object.send :"#{key}=", value + end + yield + ensure + old_values.each do |key, value| + object.send :"#{key}=", value + end + end + end \ No newline at end of file -- cgit v1.2.3 From dcb925369389fa98d1548b25504c8e3a07eaeea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Fri, 22 Jan 2010 13:27:20 +0100 Subject: Add basic template rendering to new DSL. --- actionmailer/lib/action_mailer/base.rb | 69 ++++++++++++++++------ actionmailer/lib/action_mailer/deprecated_api.rb | 9 +-- actionmailer/lib/action_mailer/mail_helper.rb | 2 +- actionmailer/test/base_test.rb | 66 +++++++++++---------- actionmailer/test/fixtures/base_mailer/welcome.erb | 1 + .../test/fixtures/test_mailer/body_ivar.erb | 2 - actionmailer/test/mail_service_test.rb | 9 --- actionpack/lib/action_view/render/rendering.rb | 2 + 8 files changed, 90 insertions(+), 70 deletions(-) create mode 100644 actionmailer/test/fixtures/base_mailer/welcome.erb delete mode 100644 actionmailer/test/fixtures/test_mailer/body_ivar.erb diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index d75bbe952f..1f432c2a80 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -280,6 +280,7 @@ module ActionMailer #:nodoc: extlib_inheritable_accessor :default_charset self.default_charset = "utf-8" + # TODO This should be used when calling render extlib_inheritable_accessor :default_content_type self.default_content_type = "text/plain" @@ -357,7 +358,7 @@ module ActionMailer #:nodoc: begin # TODO Move me to the instance if @@perform_deliveries - mail.deliver! + mail.deliver! self.deliveries << mail end rescue Exception => e # Net::SMTP errors or sendmail pipe errors @@ -393,32 +394,62 @@ module ActionMailer #:nodoc: # Guard flag to prevent both the old and the new API from firing # Should be removed when old API is deprecated @mail_was_called = true - m = @message - - m.content_type ||= headers[:content_type] || self.class.default_content_type - m.charset ||= headers[:charset] || self.class.default_charset - m.mime_version ||= headers[:mime_version] || self.class.default_mime_version - - m.subject = quote_if_necessary(headers[:subject], m.charset) if headers[:subject] - m.to = quote_address_if_necessary(headers[:to], m.charset) if headers[:to] - m.from = quote_address_if_necessary(headers[:from], m.charset) if headers[:from] - m.cc = quote_address_if_necessary(headers[:cc], m.charset) if headers[:cc] - m.bcc = quote_address_if_necessary(headers[:bcc], m.charset) if headers[:bcc] - m.reply_to = quote_address_if_necessary(headers[:reply_to], m.charset) if headers[:reply_to] - m.date = headers[:date] if headers[:date] - m.body.set_sort_order(headers[:parts_order] || self.class.default_implicit_parts_order) - - # # Set the subject if not set yet - # @subject ||= I18n.t(:subject, :scope => [:actionmailer, mailer_name, method_name], - # :default => method_name.humanize) + # Get default subject from I18n if none is set + headers[:subject] ||= I18n.t(:subject, :scope => [:actionmailer, mailer_name, action_name], + :default => action_name.humanize) + + # Give preference to headers and fallbacks to the ones set in mail + headers[:content_type] ||= m.content_type + headers[:charset] ||= m.charset + headers[:mime_version] ||= m.mime_version + + m.content_type = headers[:content_type] || self.class.default_content_type.dup + m.charset = headers[:charset] || self.class.default_charset.dup + m.mime_version = headers[:mime_version] || self.class.default_mime_version.dup + + m.subject ||= quote_if_necessary(headers[:subject], m.charset) if headers[:subject] + m.to ||= quote_address_if_necessary(headers[:to], m.charset) if headers[:to] + m.from ||= quote_address_if_necessary(headers[:from], m.charset) if headers[:from] + m.cc ||= quote_address_if_necessary(headers[:cc], m.charset) if headers[:cc] + m.bcc ||= quote_address_if_necessary(headers[:bcc], m.charset) if headers[:bcc] + m.reply_to ||= quote_address_if_necessary(headers[:reply_to], m.charset) if headers[:reply_to] + m.date ||= headers[:date] if headers[:date] + + if block_given? + # Do something + else + # TODO Ensure that we don't need to pass I18n.locale as detail + templates = self.class.template_root.find_all(action_name, {}, mailer_name) + + if templates.size == 1 + unless headers[:content_type] + proper_charset = m.charset + m.content_type = templates[0].mime_type.to_s + m.charset = proper_charset + end + m.body = render_to_body(:_template => templates[0]) + else + templates.each do |template| + part = Mail::Part.new + part.content_type = template.mime_type.to_s + part.charset = m.charset + part.body = render_to_body(:_template => template) + end + end + end + m.body.set_sort_order(headers[:parts_order] || self.class.default_implicit_parts_order.dup) # TODO: m.body.sort_parts! m end + def fill_in_part(part, template, charset) + + end + # Instantiate a new mailer object. If +method_name+ is not +nil+, the mailer # will be initialized according to the named method. If not, the mailer will # remain uninitialized (useful when you only need to invoke the "receive" diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index 90e2aebf53..b2bb6a64aa 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -120,19 +120,12 @@ module ActionMailer initialize_defaults(method_name) super unless @mail_was_called - # Create e-mail parts create_parts - - # Set the subject if not set yet - @subject ||= I18n.t(:subject, :scope => [:actionmailer, mailer_name, method_name], - :default => method_name.humanize) - - # Build the mail object itself create_mail end + @message end - # Add a part to a multipart message, with the given content-type. The # part itself is yielded to the block so that other properties (charset, # body, headers, etc.) can be set on it. diff --git a/actionmailer/lib/action_mailer/mail_helper.rb b/actionmailer/lib/action_mailer/mail_helper.rb index 702c9ba8f7..45ba6f0714 100644 --- a/actionmailer/lib/action_mailer/mail_helper.rb +++ b/actionmailer/lib/action_mailer/mail_helper.rb @@ -22,7 +22,7 @@ module ActionMailer end # Access the message instance. - def message + def message #:nodoc: @message end end diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index b11631f444..f22b20a6ba 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -44,7 +44,9 @@ class BaseTest < ActiveSupport::TestCase :subject => 'The first email on new API!' } - class TestMailer < ActionMailer::Base + class BaseMailer < ActionMailer::Base + self.mailer_name = "base_mailer" + def welcome(hash = {}) headers['X-SPAM'] = "Not SPAM" mail(DEFAULT_HEADERS.merge(hash)) @@ -63,11 +65,11 @@ class BaseTest < ActiveSupport::TestCase end test "method call to mail does not raise error" do - assert_nothing_raised { TestMailer.deliver_welcome } + assert_nothing_raised { BaseMailer.deliver_welcome } end test "mail() should set the headers of the mail message" do - email = TestMailer.deliver_welcome + email = BaseMailer.deliver_welcome assert_equal(email.to, ['mikel@test.lindsaar.net']) assert_equal(email.from, ['jose@test.plataformatec.com']) assert_equal(email.subject, 'The first email on new API!') @@ -75,7 +77,7 @@ class BaseTest < ActiveSupport::TestCase test "mail() with bcc, cc, content_type, charset, mime_version, reply_to and date" do @time = Time.now - email = TestMailer.deliver_welcome(:bcc => 'bcc@test.lindsaar.net', + email = BaseMailer.deliver_welcome(:bcc => 'bcc@test.lindsaar.net', :cc => 'cc@test.lindsaar.net', :content_type => 'multipart/mixed', :charset => 'iso-8559-1', @@ -91,68 +93,70 @@ class BaseTest < ActiveSupport::TestCase assert_equal(email.date, @time) end + test "mail() renders the template using the method being processed" do + email = BaseMailer.deliver_welcome + assert_equal("Welcome", email.body.encoded) + end + test "custom headers" do - email = TestMailer.deliver_welcome + email = BaseMailer.deliver_welcome assert_equal("Not SPAM", email['X-SPAM'].decoded) end test "attachment with content" do - email = TestMailer.deliver_attachment_with_content + email = BaseMailer.deliver_attachment_with_content assert_equal(1, email.attachments.length) assert_equal('invoice.pdf', email.attachments[0].filename) assert_equal('This is test File content', email.attachments['invoice.pdf'].decoded) end test "attachment gets content type from filename" do - email = TestMailer.deliver_attachment_with_content + email = BaseMailer.deliver_attachment_with_content assert_equal('invoice.pdf', email.attachments[0].filename) end test "attachment with hash" do - email = TestMailer.deliver_attachment_with_hash + email = BaseMailer.deliver_attachment_with_hash assert_equal(1, email.attachments.length) assert_equal('invoice.jpg', email.attachments[0].filename) assert_equal("\312\213\254\232)b", email.attachments['invoice.jpg'].decoded) end + # test "mail sets proper content type when attachment is included" do + # email = BaseMailer.deliver_attachment_with_content + # assert_equal(1, email.attachments.length) + # assert_equal("multipart/mixed", email.content_type) + # end + test "uses default charset from class" do - swap TestMailer, :default_charset => "US-ASCII" do - email = TestMailer.deliver_welcome + swap BaseMailer, :default_charset => "US-ASCII" do + email = BaseMailer.deliver_welcome assert_equal("US-ASCII", email.charset) - email = TestMailer.deliver_welcome(:charset => "iso-8559-1") + email = BaseMailer.deliver_welcome(:charset => "iso-8559-1") assert_equal("iso-8559-1", email.charset) end end - test "uses default content type from class" do - swap TestMailer, :default_content_type => "text/html" do - email = TestMailer.deliver_welcome - assert_equal("text/html", email.mime_type) - - email = TestMailer.deliver_welcome(:content_type => "application/xml") - assert_equal("application/xml", email.mime_type) - end - end - test "uses default mime version from class" do - swap TestMailer, :default_mime_version => "2.0" do - email = TestMailer.deliver_welcome + swap BaseMailer, :default_mime_version => "2.0" do + email = BaseMailer.deliver_welcome assert_equal("2.0", email.mime_version) - email = TestMailer.deliver_welcome(:mime_version => "1.0") + email = BaseMailer.deliver_welcome(:mime_version => "1.0") assert_equal("1.0", email.mime_version) end end - # def test_that_class_defaults_are_set_on_instantiation - # pending - # end - # - # def test_should_set_the_subject_from_i18n - # pending - # end + test "subject gets default from I18n" do + email = BaseMailer.deliver_welcome(:subject => nil) + assert_equal "Welcome", email.subject + I18n.backend.store_translations('en', :actionmailer => {:base_mailer => {:welcome => {:subject => "New Subject!"}}}) + email = BaseMailer.deliver_welcome(:subject => nil) + assert_equal "New Subject!", email.subject + end + protected # Execute the block setting the given values and restoring old values after diff --git a/actionmailer/test/fixtures/base_mailer/welcome.erb b/actionmailer/test/fixtures/base_mailer/welcome.erb new file mode 100644 index 0000000000..01f3f00c63 --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/welcome.erb @@ -0,0 +1 @@ +Welcome \ No newline at end of file diff --git a/actionmailer/test/fixtures/test_mailer/body_ivar.erb b/actionmailer/test/fixtures/test_mailer/body_ivar.erb deleted file mode 100644 index 1421e5c908..0000000000 --- a/actionmailer/test/fixtures/test_mailer/body_ivar.erb +++ /dev/null @@ -1,2 +0,0 @@ -body: <%= @body %> -bar: <%= @bar %> \ No newline at end of file diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index ec820e3464..62422fb4b3 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -416,15 +416,6 @@ class ActionMailerTest < Test::Unit::TestCase assert_equal expected.encoded, delivered.encoded end - def test_subject_with_i18n - assert_nothing_raised { TestMailer.deliver_subject_with_i18n(@recipient) } - assert_equal "Subject with i18n", ActionMailer::Base.deliveries.first.subject.to_s - - I18n.backend.store_translations('en', :actionmailer => {:test_mailer => {:subject_with_i18n => {:subject => "New Subject!"}}}) - assert_nothing_raised { TestMailer.deliver_subject_with_i18n(@recipient) } - assert_equal "New Subject!", ActionMailer::Base.deliveries.last.subject.to_s - end - def test_custom_template expected = new_mail expected.to = @recipient diff --git a/actionpack/lib/action_view/render/rendering.rb b/actionpack/lib/action_view/render/rendering.rb index ec278ca783..7c33f1334a 100644 --- a/actionpack/lib/action_view/render/rendering.rb +++ b/actionpack/lib/action_view/render/rendering.rb @@ -1,3 +1,5 @@ +require 'active_support/core_ext/object/try' + module ActionView module Rendering # Returns the result of a render that's dictated by the options hash. The primary options are: -- cgit v1.2.3 From 1cd55928c6f638affeb5d89293f478817675d7b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Fri, 22 Jan 2010 13:56:06 +0100 Subject: First work on implicit multipart. --- actionmailer/lib/action_mailer/base.rb | 49 +++++++++++----------- actionmailer/test/base_test.rb | 18 +++++++- .../base_mailer/implicit_multipart.html.erb | 1 + .../base_mailer/implicit_multipart.text.erb | 1 + 4 files changed, 44 insertions(+), 25 deletions(-) create mode 100644 actionmailer/test/fixtures/base_mailer/implicit_multipart.html.erb create mode 100644 actionmailer/test/fixtures/base_mailer/implicit_multipart.text.erb diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 1f432c2a80..fb1dab7c39 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -401,21 +401,18 @@ module ActionMailer #:nodoc: :default => action_name.humanize) # Give preference to headers and fallbacks to the ones set in mail - headers[:content_type] ||= m.content_type - headers[:charset] ||= m.charset - headers[:mime_version] ||= m.mime_version - - m.content_type = headers[:content_type] || self.class.default_content_type.dup - m.charset = headers[:charset] || self.class.default_charset.dup - m.mime_version = headers[:mime_version] || self.class.default_mime_version.dup - - m.subject ||= quote_if_necessary(headers[:subject], m.charset) if headers[:subject] - m.to ||= quote_address_if_necessary(headers[:to], m.charset) if headers[:to] - m.from ||= quote_address_if_necessary(headers[:from], m.charset) if headers[:from] - m.cc ||= quote_address_if_necessary(headers[:cc], m.charset) if headers[:cc] - m.bcc ||= quote_address_if_necessary(headers[:bcc], m.charset) if headers[:bcc] - m.reply_to ||= quote_address_if_necessary(headers[:reply_to], m.charset) if headers[:reply_to] - m.date ||= headers[:date] if headers[:date] + content_type = headers[:content_type] || m.content_type + charset = headers[:charset] || m.charset + mime_version = headers[:mime_version] || m.mime_version + body = nil + + m.subject ||= quote_if_necessary(headers[:subject], charset) if headers[:subject] + m.to ||= quote_address_if_necessary(headers[:to], charset) if headers[:to] + m.from ||= quote_address_if_necessary(headers[:from], charset) if headers[:from] + m.cc ||= quote_address_if_necessary(headers[:cc], charset) if headers[:cc] + m.bcc ||= quote_address_if_necessary(headers[:bcc], charset) if headers[:bcc] + m.reply_to ||= quote_address_if_necessary(headers[:reply_to], charset) if headers[:reply_to] + m.date ||= headers[:date] if headers[:date] if block_given? # Do something @@ -424,25 +421,29 @@ module ActionMailer #:nodoc: templates = self.class.template_root.find_all(action_name, {}, mailer_name) if templates.size == 1 - unless headers[:content_type] - proper_charset = m.charset - m.content_type = templates[0].mime_type.to_s - m.charset = proper_charset - end + content_type ||= templates[0].mime_type.to_s m.body = render_to_body(:_template => templates[0]) else + content_type ||= "multipart/alternate" + templates.each do |template| part = Mail::Part.new part.content_type = template.mime_type.to_s - part.charset = m.charset + part.charset = charset part.body = render_to_body(:_template => template) + m.add_part(part) end end end + + m.content_type = content_type || self.class.default_content_type.dup + m.charset = charset || self.class.default_charset.dup + m.mime_version = mime_version || self.class.default_mime_version.dup + + # TODO Add me and test me + # m.body.set_sort_order(headers[:parts_order] || self.class.default_implicit_parts_order.dup) + # m.body.sort_parts! - m.body.set_sort_order(headers[:parts_order] || self.class.default_implicit_parts_order.dup) - - # TODO: m.body.sort_parts! m end diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index f22b20a6ba..8502b29ba4 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -62,6 +62,10 @@ class BaseTest < ActiveSupport::TestCase :transfer_encoding => "base64" } mail(DEFAULT_HEADERS) end + + def implicit_multipart + mail(DEFAULT_HEADERS) + end end test "method call to mail does not raise error" do @@ -156,7 +160,19 @@ class BaseTest < ActiveSupport::TestCase email = BaseMailer.deliver_welcome(:subject => nil) assert_equal "New Subject!", email.subject end - + + test "implicit multipart tests" do + require 'ruby-debug' + $BREAK = true + email = BaseMailer.deliver_implicit_multipart + + assert_equal(2, email.parts.size) + + assert_equal("multipart/alternate", email.mime_type) + assert_equal("text/plain", email.parts[0].mime_type) + assert_equal("text/html", email.parts[1].mime_type) + end + protected # Execute the block setting the given values and restoring old values after diff --git a/actionmailer/test/fixtures/base_mailer/implicit_multipart.html.erb b/actionmailer/test/fixtures/base_mailer/implicit_multipart.html.erb new file mode 100644 index 0000000000..23745cd282 --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/implicit_multipart.html.erb @@ -0,0 +1 @@ +HTML Implicit Multipart \ No newline at end of file diff --git a/actionmailer/test/fixtures/base_mailer/implicit_multipart.text.erb b/actionmailer/test/fixtures/base_mailer/implicit_multipart.text.erb new file mode 100644 index 0000000000..d51437fc72 --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/implicit_multipart.text.erb @@ -0,0 +1 @@ +TEXT Implicit Multipart \ No newline at end of file -- cgit v1.2.3 From 951397b4a2143eee4b900356dab525aed99430ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Fri, 22 Jan 2010 14:38:41 +0100 Subject: Get implicit multipart and attachments working together. --- actionmailer/lib/action_mailer/base.rb | 50 ++++++----- actionmailer/lib/action_mailer/delivery_methods.rb | 2 + actionmailer/test/base_test.rb | 96 ++++++++++++++++++---- .../base_mailer/attachment_with_content.erb | 1 + 4 files changed, 109 insertions(+), 40 deletions(-) create mode 100644 actionmailer/test/fixtures/base_mailer/attachment_with_content.erb diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index fb1dab7c39..98e559154a 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -390,6 +390,7 @@ module ActionMailer #:nodoc: end end + # TODO Add new delivery method goodness def mail(headers = {}) # Guard flag to prevent both the old and the new API from firing # Should be removed when old API is deprecated @@ -402,9 +403,8 @@ module ActionMailer #:nodoc: # Give preference to headers and fallbacks to the ones set in mail content_type = headers[:content_type] || m.content_type - charset = headers[:charset] || m.charset - mime_version = headers[:mime_version] || m.mime_version - body = nil + charset = headers[:charset] || m.charset || self.class.default_charset.dup + mime_version = headers[:mime_version] || m.mime_version || self.class.default_mime_version.dup m.subject ||= quote_if_necessary(headers[:subject], charset) if headers[:subject] m.to ||= quote_address_if_necessary(headers[:to], charset) if headers[:to] @@ -420,35 +420,41 @@ module ActionMailer #:nodoc: # TODO Ensure that we don't need to pass I18n.locale as detail templates = self.class.template_root.find_all(action_name, {}, mailer_name) - if templates.size == 1 + if templates.size == 1 && !m.has_attachments? content_type ||= templates[0].mime_type.to_s m.body = render_to_body(:_template => templates[0]) + elsif templates.size > 1 && m.has_attachments? + container = Mail::Part.new + container.content_type = "multipart/alternate" + templates.each { |t| insert_part(container, t, charset) } + m.add_part(container) else - content_type ||= "multipart/alternate" - - templates.each do |template| - part = Mail::Part.new - part.content_type = template.mime_type.to_s - part.charset = charset - part.body = render_to_body(:_template => template) - m.add_part(part) - end + templates.each { |t| insert_part(m, t, charset) } end + + content_type ||= (m.has_attachments? ? "multipart/mixed" : "multipart/alternate") end - + + # Check if the content_type was not overwriten along the way and if so, + # fallback to default. m.content_type = content_type || self.class.default_content_type.dup - m.charset = charset || self.class.default_charset.dup - m.mime_version = mime_version || self.class.default_mime_version.dup - - # TODO Add me and test me - # m.body.set_sort_order(headers[:parts_order] || self.class.default_implicit_parts_order.dup) - # m.body.sort_parts! + m.charset = charset + m.mime_version = mime_version + + unless m.parts.empty? + m.body.set_sort_order(headers[:parts_order] || self.class.default_implicit_parts_order.dup) + m.body.sort_parts! + end m end - def fill_in_part(part, template, charset) - + def insert_part(container, template, charset) + part = Mail::Part.new + part.content_type = template.mime_type.to_s + part.charset = charset + part.body = render_to_body(:_template => template) + container.add_part(part) end # Instantiate a new mailer object. If +method_name+ is not +nil+, the mailer diff --git a/actionmailer/lib/action_mailer/delivery_methods.rb b/actionmailer/lib/action_mailer/delivery_methods.rb index c8c4148353..5883e446f2 100644 --- a/actionmailer/lib/action_mailer/delivery_methods.rb +++ b/actionmailer/lib/action_mailer/delivery_methods.rb @@ -27,6 +27,7 @@ module ActionMailer end module ClassMethods + # TODO Make me class inheritable def delivery_settings @@delivery_settings ||= Hash.new { |h,k| h[k] = {} } end @@ -51,6 +52,7 @@ module ActionMailer protected + # TODO Get rid of this method missing magic def method_missing(method_symbol, *parameters) #:nodoc: if match = matches_settings_method?(method_symbol) if match[2] diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 8502b29ba4..df0eed695d 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -3,13 +3,13 @@ require 'abstract_unit' # class Notifier < ActionMailer::Base # delivers_from 'notifications@example.com' -# +# # def welcome(user) # @user = user # available to the view # mail(:subject => 'Welcome!', :to => user.email_address) # # auto renders both welcome.text.erb and welcome.html.erb # end -# +# # def goodbye(user) # headers["X-SPAM"] = 'Not-SPAM' # mail(:subject => 'Goodbye', :to => user.email_address) do |format| @@ -17,7 +17,7 @@ require 'abstract_unit' # format.text # goodbye.text.erb # end # end -# +# # def surprise(user, gift) # attachments[gift.name] = File.read(gift.path) # mail(:subject => 'Surprise!', :to => user.email_address) do |format| @@ -25,17 +25,17 @@ require 'abstract_unit' # format.text(:transfer_encoding => "base64") # surprise.text.erb # end # end -# +# # def special_surprise(user, gift) # attachments[gift.name] = { :content_type => "application/x-gzip", :content => File.read(gift.path) } # mail(:to => 'special@example.com') # subject not required # # auto renders both special_surprise.text.erb and special_surprise.html.erb # end # end -# +# # mail = Notifier.welcome(user) # => returns a Mail object # mail.deliver -# +# # Notifier.welcome(user).deliver # => creates and sends the Mail in one step class BaseTest < ActiveSupport::TestCase DEFAULT_HEADERS = { @@ -44,6 +44,8 @@ class BaseTest < ActiveSupport::TestCase :subject => 'The first email on new API!' } + # TODO Think on the simple case where I want to send an e-mail + # with attachment and small text (without need to add a template). class BaseMailer < ActionMailer::Base self.mailer_name = "base_mailer" @@ -63,8 +65,9 @@ class BaseTest < ActiveSupport::TestCase mail(DEFAULT_HEADERS) end - def implicit_multipart - mail(DEFAULT_HEADERS) + def implicit_multipart(hash = {}) + attachments['invoice.pdf'] = 'This is test File content' if hash.delete(:attachments) + mail(DEFAULT_HEADERS.merge(hash)) end end @@ -72,6 +75,7 @@ class BaseTest < ActiveSupport::TestCase assert_nothing_raised { BaseMailer.deliver_welcome } end + # Basic mail usage without block test "mail() should set the headers of the mail message" do email = BaseMailer.deliver_welcome assert_equal(email.to, ['mikel@test.lindsaar.net']) @@ -102,11 +106,13 @@ class BaseTest < ActiveSupport::TestCase assert_equal("Welcome", email.body.encoded) end + # Custom headers test "custom headers" do email = BaseMailer.deliver_welcome assert_equal("Not SPAM", email['X-SPAM'].decoded) end + # Attachments test "attachment with content" do email = BaseMailer.deliver_attachment_with_content assert_equal(1, email.attachments.length) @@ -126,12 +132,22 @@ class BaseTest < ActiveSupport::TestCase assert_equal("\312\213\254\232)b", email.attachments['invoice.jpg'].decoded) end - # test "mail sets proper content type when attachment is included" do - # email = BaseMailer.deliver_attachment_with_content - # assert_equal(1, email.attachments.length) - # assert_equal("multipart/mixed", email.content_type) - # end + test "sets mime type to multipart/mixed when attachment is included" do + email = BaseMailer.deliver_attachment_with_content + assert_equal(1, email.attachments.length) + assert_equal("multipart/mixed", email.mime_type) + end + test "adds the rendered template as part" do + email = BaseMailer.deliver_attachment_with_content + assert_equal(2, email.parts.length) + assert_equal("text/html", email.parts[0].mime_type) + assert_equal("Attachment with content", email.parts[0].body.encoded) + assert_equal("application/pdf", email.parts[1].mime_type) + assert_equal("VGhpcyBpcyB0ZXN0IEZpbGUgY29udGVudA==\r\n", email.parts[1].body.encoded) + end + + # Defaults values test "uses default charset from class" do swap BaseMailer, :default_charset => "US-ASCII" do email = BaseMailer.deliver_welcome @@ -142,6 +158,16 @@ class BaseTest < ActiveSupport::TestCase end end + test "uses default content type from class" do + swap BaseMailer, :default_content_type => "text/html" do + email = BaseMailer.deliver_welcome + assert_equal("text/html", email.mime_type) + + email = BaseMailer.deliver_welcome(:content_type => "text/plain") + assert_equal("text/plain", email.mime_type) + end + end + test "uses default mime version from class" do swap BaseMailer, :default_mime_version => "2.0" do email = BaseMailer.deliver_welcome @@ -161,18 +187,52 @@ class BaseTest < ActiveSupport::TestCase assert_equal "New Subject!", email.subject end + # Implicit multipart test "implicit multipart tests" do - require 'ruby-debug' - $BREAK = true email = BaseMailer.deliver_implicit_multipart - assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) - assert_equal("text/html", email.parts[1].mime_type) + assert_equal("TEXT Implicit Multipart", email.parts[0].body.encoded) + assert_equal("text/html", email.parts[1].mime_type) + assert_equal("HTML Implicit Multipart", email.parts[1].body.encoded) + end + + test "implicit multipart tests with sort order" do + order = ["text/html", "text/plain"] + swap BaseMailer, :default_implicit_parts_order => order do + email = BaseMailer.deliver_implicit_multipart + assert_equal("text/html", email.parts[0].mime_type) + assert_equal("text/plain", email.parts[1].mime_type) + + email = BaseMailer.deliver_implicit_multipart(:parts_order => order.reverse) + assert_equal("text/plain", email.parts[0].mime_type) + assert_equal("text/html", email.parts[1].mime_type) + end + end + + test "implicit multipart with attachments creates nested parts" do + email = BaseMailer.deliver_implicit_multipart(:attachments => true) + assert_equal("application/pdf", email.parts[0].mime_type) + assert_equal("multipart/alternate", email.parts[1].mime_type) + assert_equal("text/plain", email.parts[1].parts[0].mime_type) + assert_equal("TEXT Implicit Multipart", email.parts[1].parts[0].body.encoded) + assert_equal("text/html", email.parts[1].parts[1].mime_type) + assert_equal("HTML Implicit Multipart", email.parts[1].parts[1].body.encoded) end + # TODO This should be fixed in mail. Sort parts should be recursive. + # test "implicit multipart with attachments and sort order" do + # order = ["text/html", "text/plain"] + # swap BaseMailer, :default_implicit_parts_order => order do + # email = BaseMailer.deliver_implicit_multipart(:attachments => true) + # assert_equal("application/pdf", email.parts[0].mime_type) + # assert_equal("multipart/alternate", email.parts[1].mime_type) + # assert_equal("text/plain", email.parts[1].parts[1].mime_type) + # assert_equal("text/html", email.parts[1].parts[0].mime_type) + # end + # end + protected # Execute the block setting the given values and restoring old values after diff --git a/actionmailer/test/fixtures/base_mailer/attachment_with_content.erb b/actionmailer/test/fixtures/base_mailer/attachment_with_content.erb new file mode 100644 index 0000000000..deb9dbd03b --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/attachment_with_content.erb @@ -0,0 +1 @@ +Attachment with content \ No newline at end of file -- cgit v1.2.3 From 4ae79367277954bf6616151b03cbe0660808f9bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 22 Jan 2010 16:24:44 +0100 Subject: Got tests working once again. --- railties/lib/rails/application.rb | 4 +--- railties/lib/rails/configuration.rb | 28 +++++++++++++++---------- railties/lib/rails/engine.rb | 4 +++- railties/lib/rails/paths.rb | 18 +++++++--------- railties/test/application/configuration_test.rb | 4 ++-- railties/test/initializer/path_test.rb | 23 +++++++------------- railties/test/paths_test.rb | 7 +------ 7 files changed, 40 insertions(+), 48 deletions(-) diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 9be9584873..db1f62f381 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -2,8 +2,6 @@ require 'fileutils' module Rails class Application < Engine - include Initializable - class << self alias :configure :class_eval delegate :initialize!, :load_tasks, :load_generators, :root, :to => :instance @@ -122,7 +120,7 @@ module Rails app.call(env) end - initializer :add_builtin_route do |app| + initializer :add_builtin_route, :before => :build_middleware_stack do |app| if Rails.env.development? app.route_configuration_files << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') end diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index 9176809dbd..01fab1e474 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -81,15 +81,13 @@ module Rails def paths @paths ||= begin paths = Rails::Application::Root.new(@root) - paths.app "app", :load_path => true - paths.app_glob "app/*", :load_path => true, :eager_load => true - paths.app.controllers "app/controllers", :eager_load => true - paths.app.metals "app/metal" + paths.app "app", :eager_load => true, :glob => "*" + paths.app.controllers "app/controllers", :eager_load => true + paths.app.metals "app/metal", :eager_load => true paths.app.views "app/views" paths.lib "lib", :load_path => true paths.config "config" - paths.config.environment "config/environments/#{Rails.env}.rb" - paths.config.environments "config/environments", :glob => "#{Rails.env}.rb" + paths.config.environment "config/environments", :glob => "#{Rails.env}.rb" paths.config.initializers "config/initializers" paths.config.locales "config/locales" paths.config.routes "config/routes.rb" @@ -112,10 +110,6 @@ module Rails def load_paths @load_paths ||= paths.load_paths end - - def controller_paths - paths.app.controllers.to_a.uniq - end end class Configuration < Engine::Configuration @@ -142,7 +136,7 @@ module Rails def paths @paths ||= begin paths = super - paths.app.controllers << builtin_directories + paths.app.controllers.concat(builtin_directories) paths.config.database "config/database.yml" paths.log "log/#{Rails.env}.log" paths.tmp "tmp" @@ -238,6 +232,18 @@ module Rails paths.config.log.to_a.first end + def controller_paths=(value) + ActiveSupport::Deprecation.warn "config.controller_paths= is deprecated, " << + "please do config.paths.app.controllers= instead", caller + paths.app.controllers = value + end + + def controller_paths + ActiveSupport::Deprecation.warn "config.controller_paths is deprecated, " << + "please do config.paths.app.controllers instead", caller + paths.app.controllers.to_a.uniq + end + def cache_store @cache_store ||= begin if File.exist?("#{root}/tmp/cache/") diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index a0139f9983..effbfee6c1 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -50,7 +50,9 @@ module Rails # Add configured load paths to ruby load paths and remove duplicates. initializer :set_load_path, :before => :container do - config.paths.add_to_load_path + expand_load_path(config.load_paths).reverse_each do |path| + $LOAD_PATH.unshift(path) if File.directory?(path) + end $LOAD_PATH.uniq! end diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb index b3d105d8c7..d81af3c709 100644 --- a/railties/lib/rails/paths.rb +++ b/railties/lib/rails/paths.rb @@ -39,6 +39,7 @@ module Rails all_paths.map { |path| path.paths if path.eager_load? }.compact.flatten.uniq end + # TODO Discover why do we need to call uniq! here def all_paths @all_paths.uniq! @all_paths @@ -48,12 +49,6 @@ module Rails all_paths.map { |path| path.paths if path.load_path? }.compact.flatten.uniq end - def add_to_load_path - load_paths.reverse_each do |path| - $LOAD_PATH.unshift(path) if File.directory?(path) - end - end - def push(*) raise "Application root can only have one physical path" end @@ -74,7 +69,7 @@ module Rails @children = {} @root = root @paths = paths.flatten - @glob = @options[:glob] || "**/*.rb" + @glob = @options.delete(:glob) @load_once = @options[:load_once] @eager_load = @options[:eager_load] @@ -128,10 +123,13 @@ module Rails def paths raise "You need to set a path root" unless @root.path - - @paths.map do |path| - path.index('/') == 0 ? path : File.expand_path(File.join(@root.path, path)) + result = @paths.map do |p| + path = File.expand_path(p, @root.path) + @glob ? Dir[File.join(path, @glob)] : path end + result.flatten! + result.uniq! + result end alias to_a paths diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 2c842eb096..6968e87986 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -34,9 +34,9 @@ module ApplicationTests add_to_config <<-RUBY config.root = '#{new_app}' RUBY - + use_frameworks [] - + require "#{app_path}/config/environment" assert_equal Pathname.new(new_app), Rails.application.root end diff --git a/railties/test/initializer/path_test.rb b/railties/test/initializer/path_test.rb index 328dda6d2c..76eb29bdf4 100644 --- a/railties/test/initializer/path_test.rb +++ b/railties/test/initializer/path_test.rb @@ -8,6 +8,7 @@ module InitializerTests build_app boot_rails FileUtils.rm_rf("#{app_path}/config/environments") + app_file "config/environments/development.rb", "" add_to_config <<-RUBY config.root = "#{app_path}" config.after_initialize do @@ -36,11 +37,8 @@ module InitializerTests end test "booting up Rails yields a valid paths object" do - assert_path @paths.app, "app" assert_path @paths.app.metals, "app", "metal" - assert_path @paths.app.models, "app", "models" - assert_path @paths.app.helpers, "app", "helpers" - assert_path @paths.app.services, "app", "services" + assert_path @paths.app.views, "app", "views" assert_path @paths.lib, "lib" assert_path @paths.vendor, "vendor" assert_path @paths.vendor.plugins, "vendor", "plugins" @@ -48,7 +46,7 @@ module InitializerTests assert_path @paths.tmp.cache, "tmp", "cache" assert_path @paths.config, "config" assert_path @paths.config.locales, "config", "locales" - assert_path @paths.config.environments, "config", "environments" + assert_path @paths.config.environment, "config", "environments", "development.rb" assert_equal root("app", "controllers"), @paths.app.controllers.to_a.first assert_equal Pathname.new(File.dirname(__FILE__)).join("..", "..", "builtin", "rails_info").expand_path, @@ -56,27 +54,22 @@ module InitializerTests end test "booting up Rails yields a list of paths that are eager" do - assert @paths.app.models.eager_load? + assert @paths.app.eager_load? assert @paths.app.controllers.eager_load? - assert @paths.app.helpers.eager_load? assert @paths.app.metals.eager_load? end test "environments has a glob equal to the current environment" do - assert_equal "#{Rails.env}.rb", @paths.config.environments.glob + assert_equal "#{Rails.env}.rb", @paths.config.environment.glob end test "load path includes each of the paths in config.paths as long as the directories exist" do - assert_in_load_path "app" assert_in_load_path "app", "controllers" assert_in_load_path "app", "models" assert_in_load_path "app", "helpers" assert_in_load_path "lib" assert_in_load_path "vendor" - assert_not_in_load_path "app", "views" - assert_not_in_load_path "app", "metal" - assert_not_in_load_path "app", "services" assert_not_in_load_path "config" assert_not_in_load_path "config", "locales" assert_not_in_load_path "config", "environments" @@ -86,17 +79,17 @@ module InitializerTests test "controller paths include builtin in development mode" do Rails.env.replace "development" - assert Rails::Configuration.new.paths.app.controllers.paths.any? { |p| p =~ /builtin/ } + assert Rails::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } end test "controller paths does not have builtin_directories in test mode" do Rails.env.replace "test" - assert !Rails::Configuration.new.paths.app.controllers.paths.any? { |p| p =~ /builtin/ } + assert !Rails::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } end test "controller paths does not have builtin_directories in production mode" do Rails.env.replace "production" - assert !Rails::Configuration.new.paths.app.controllers.paths.any? { |p| p =~ /builtin/ } + assert !Rails::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } end end diff --git a/railties/test/paths_test.rb b/railties/test/paths_test.rb index d60d6177f6..001282bb0d 100644 --- a/railties/test/paths_test.rb +++ b/railties/test/paths_test.rb @@ -193,12 +193,7 @@ class PathsTest < ActiveSupport::TestCase assert_equal 2, @root.eager_load.size end - test "a path should have a glob that defaults to **/*.rb" do - @root.app = "/app" - assert_equal "**/*.rb", @root.app.glob - end - - test "it should be possible to override a path's default glob" do + test "it should be possible to add a path's default glob" do @root.app = "/app" @root.app.glob = "*.rb" assert_equal "*.rb", @root.app.glob -- cgit v1.2.3 From c8cc8a987213bf90fe6922517d52befb7c0587a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 22 Jan 2010 20:44:29 +0100 Subject: Moved more configuration away from bootstrap. --- actionmailer/lib/action_mailer/railtie.rb | 5 -- actionpack/lib/action_controller/railtie.rb | 10 ---- activerecord/lib/active_record/railtie.rb | 10 ++-- activeresource/lib/active_resource/railtie.rb | 6 +++ activesupport/lib/active_support/railtie.rb | 29 +++++++++++ railties/lib/rails/all.rb | 1 + railties/lib/rails/application.rb | 39 +++++++++++++++ railties/lib/rails/bootstrap.rb | 72 --------------------------- railties/lib/rails/configuration.rb | 4 +- 9 files changed, 81 insertions(+), 95 deletions(-) create mode 100644 activesupport/lib/active_support/railtie.rb diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb index 94d9eaf81b..ac6f514dfa 100644 --- a/actionmailer/lib/action_mailer/railtie.rb +++ b/actionmailer/lib/action_mailer/railtie.rb @@ -18,10 +18,5 @@ module ActionMailer initializer "action_mailer.logger" do ActionMailer::Base.logger ||= Rails.logger end - - initializer "action_mailer.view_paths" do |app| - # TODO: this should be combined with the logic for default config.action_mailer.view_paths - ActionMailer::Base.template_root = [] if ActionMailer::Base.view_paths.blank? - end end end \ No newline at end of file diff --git a/actionpack/lib/action_controller/railtie.rb b/actionpack/lib/action_controller/railtie.rb index 621dd9373c..6b270d1136 100644 --- a/actionpack/lib/action_controller/railtie.rb +++ b/actionpack/lib/action_controller/railtie.rb @@ -22,15 +22,5 @@ module ActionController initializer "action_controller.initialize_framework_caches" do ActionController::Base.cache_store ||= RAILS_CACHE end - - # Sets +ActionController::Base#view_paths+ and +ActionMailer::Base#template_root+ - # (but only for those frameworks that are to be loaded). If the framework's - # paths have already been set, it is not changed, otherwise it is - # set to use Configuration#view_path. - initializer "action_controller.initialize_framework_views" do |app| - # TODO: this should be combined with the logic for default config.action_controller.view_paths - ActionController::Base.view_paths = [] if ActionController::Base.view_paths.blank? - end - end end diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index bc06333f1c..d5ec776b34 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -18,6 +18,11 @@ module ActiveRecord require "active_record/railties/subscriber" subscriber ActiveRecord::Railties::Subscriber.new + initializer "active_record.initialize_timezone" do + ActiveRecord::Base.time_zone_aware_attributes = true + ActiveRecord::Base.default_timezone = :utc + end + initializer "active_record.set_configs" do |app| app.config.active_record.each do |k,v| ActiveRecord::Base.send "#{k}=", v @@ -31,11 +36,6 @@ module ActiveRecord ActiveRecord::Base.establish_connection end - initializer "active_record.initialize_timezone" do - ActiveRecord::Base.time_zone_aware_attributes = true - ActiveRecord::Base.default_timezone = :utc - end - # Expose database runtime to controller for logging. initializer "active_record.log_runtime" do |app| require "active_record/railties/controller_runtime" diff --git a/activeresource/lib/active_resource/railtie.rb b/activeresource/lib/active_resource/railtie.rb index 1b9307d472..5c318f21e6 100644 --- a/activeresource/lib/active_resource/railtie.rb +++ b/activeresource/lib/active_resource/railtie.rb @@ -7,5 +7,11 @@ module ActiveResource require "active_resource/railties/subscriber" subscriber ActiveResource::Railties::Subscriber.new + + initializer "active_resource.set_configs" do |app| + app.config.active_resource.each do |k,v| + ActiveResource::Base.send "#{k}=", v + end + end end end \ No newline at end of file diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb new file mode 100644 index 0000000000..18e404f002 --- /dev/null +++ b/activesupport/lib/active_support/railtie.rb @@ -0,0 +1,29 @@ +require "active_support" +require "rails" + +module ActiveSupport + class Railtie < Rails::Railtie + plugin_name :active_support + + # Loads support for "whiny nil" (noisy warnings when methods are invoked + # on +nil+ values) if Configuration#whiny_nils is true. + initializer :initialize_whiny_nils do |app| + require 'active_support/whiny_nil' if app.config.whiny_nils + end + + # Sets the default value for Time.zone + # If assigned value cannot be matched to a TimeZone, an exception will be raised. + initializer :initialize_time_zone do |app| + require 'active_support/core_ext/time/zones' + zone_default = Time.__send__(:get_zone, app.config.time_zone) + + unless zone_default + raise \ + 'Value assigned to config.time_zone not recognized.' + + 'Run "rake -D time" for a list of tasks for finding appropriate time zone names.' + end + + Time.zone_default = zone_default + end + end +end \ No newline at end of file diff --git a/railties/lib/rails/all.rb b/railties/lib/rails/all.rb index 7dfe2b8b63..b8292a9b7e 100644 --- a/railties/lib/rails/all.rb +++ b/railties/lib/rails/all.rb @@ -1,6 +1,7 @@ require "rails" %w( + active_support active_model active_record action_controller diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index db1f62f381..5c4112e1d7 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -137,6 +137,45 @@ module Rails end end + # Set the i18n configuration from config.i18n but special-case for the load_path which should be + # appended to what's already set instead of overwritten. + initializer :initialize_i18n do + require 'active_support/i18n' + + config.i18n.each do |setting, value| + if setting == :load_path + I18n.load_path += value + else + I18n.send("#{setting}=", value) + end + end + + ActionDispatch::Callbacks.to_prepare do + I18n.reload! + end + end + + initializer :set_clear_dependencies_hook do + unless config.cache_classes + ActionDispatch::Callbacks.after do + ActiveSupport::Dependencies.clear + end + end + end + + initializer :initialize_notifications do + require 'active_support/notifications' + + if config.colorize_logging == false + Rails::Subscriber.colorize_logging = false + config.generators.colorize_logging = false + end + + ActiveSupport::Notifications.subscribe do |*args| + Rails::Subscriber.dispatch(args) + end + end + # Disable dependency loading during request cycle initializer :disable_dependency_loading do if config.cache_classes && !config.dependency_loading diff --git a/railties/lib/rails/bootstrap.rb b/railties/lib/rails/bootstrap.rb index 688ab2f4b0..3473f2fcaa 100644 --- a/railties/lib/rails/bootstrap.rb +++ b/railties/lib/rails/bootstrap.rb @@ -33,13 +33,6 @@ module Rails # FIXME This is just a dumb initializer used as hook end - # Create tmp directories - initializer :ensure_tmp_directories_exist do - %w(cache pids sessions sockets).each do |dir_to_make| - FileUtils.mkdir_p(File.join(root, 'tmp', dir_to_make)) - end - end - # Preload all frameworks specified by the Configuration#frameworks. # Used by Passenger to ensure everything's loaded before forking and # to avoid autoload race conditions in JRuby. @@ -64,70 +57,5 @@ module Rails # TODO: Remove files from the $" and always use require ActiveSupport::Dependencies.mechanism = config.cache_classes ? :require : :load end - - # Loads support for "whiny nil" (noisy warnings when methods are invoked - # on +nil+ values) if Configuration#whiny_nils is true. - initializer :initialize_whiny_nils do - require 'active_support/whiny_nil' if config.whiny_nils - end - - # Sets the default value for Time.zone - # If assigned value cannot be matched to a TimeZone, an exception will be raised. - initializer :initialize_time_zone do - require 'active_support/core_ext/time/zones' - zone_default = Time.__send__(:get_zone, config.time_zone) - - unless zone_default - raise \ - 'Value assigned to config.time_zone not recognized.' + - 'Run "rake -D time" for a list of tasks for finding appropriate time zone names.' - end - - Time.zone_default = zone_default - end - - # Set the i18n configuration from config.i18n but special-case for the load_path which should be - # appended to what's already set instead of overwritten. - initializer :initialize_i18n do - require 'active_support/i18n' - - config.i18n.each do |setting, value| - if setting == :load_path - I18n.load_path += value - else - I18n.send("#{setting}=", value) - end - end - - ActionDispatch::Callbacks.to_prepare do - I18n.reload! - end - end - - initializer :set_clear_dependencies_hook do - unless config.cache_classes - ActionDispatch::Callbacks.after do - ActiveSupport::Dependencies.clear - end - end - end - - initializer :initialize_notifications do - require 'active_support/notifications' - - if config.colorize_logging == false - Rails::Subscriber.colorize_logging = false - config.generators.colorize_logging = false - end - - ActiveSupport::Notifications.subscribe do |*args| - Rails::Subscriber.dispatch(args) - end - end - - private - def expand_load_path(load_paths) - load_paths.map { |path| Dir.glob(path.to_s) }.flatten.uniq - end end end diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index 01fab1e474..3ba27d79a7 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -62,10 +62,8 @@ module Rails /^(#{bits})(?:=)?$/ end - # TODO Remove :active_support as special case by adding a railtie - # for it and for I18n def config_keys - ([:active_support] + Railtie.plugin_names).map { |n| n.to_s }.uniq + Railtie.plugin_names.map { |n| n.to_s }.uniq end end -- cgit v1.2.3 From 98240c49b05093d6d14b9384a9bd695b58eefb59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 23 Jan 2010 01:29:29 +0100 Subject: Get rid of initializers global and create i18n railtie. --- actionpack/lib/action_controller/metal/helpers.rb | 2 + activesupport/lib/active_support/railtie.rb | 29 +++ .../generators/rails/app/templates/config/boot.rb | 4 +- railties/lib/rails.rb | 3 +- railties/lib/rails/application.rb | 76 ++---- railties/lib/rails/bootstrap.rb | 51 ++-- railties/lib/rails/configuration.rb | 285 +++++++++------------ railties/lib/rails/engine.rb | 48 ++-- railties/lib/rails/initializable.rb | 19 +- railties/test/application/initializer_test.rb | 4 +- railties/test/application/notifications_test.rb | 27 -- railties/test/initializable_test.rb | 28 +- railties/test/initializer/initialize_i18n_test.rb | 3 +- railties/test/initializer/path_test.rb | 2 +- 14 files changed, 256 insertions(+), 325 deletions(-) diff --git a/actionpack/lib/action_controller/metal/helpers.rb b/actionpack/lib/action_controller/metal/helpers.rb index cdd14560e1..24f8cb8a57 100644 --- a/actionpack/lib/action_controller/metal/helpers.rb +++ b/actionpack/lib/action_controller/metal/helpers.rb @@ -51,6 +51,8 @@ module ActionController included do # Set the default directory for helpers + # TODO This should support multiple directories in order + # to work with engines extlib_inheritable_accessor(:helpers_dir) do defined?(Rails.root) ? "#{Rails.root}/app/helpers" : "app/helpers" end diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index 18e404f002..d443e0e997 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -1,6 +1,35 @@ require "active_support" require "rails" +module I18n + class Railtie < Rails::Railtie + plugin_name :i18n + + # Initialize I18n load paths to an array + config.i18n.load_path = [] + + initializer :initialize_i18n do + require 'active_support/i18n' + + ActionDispatch::Callbacks.to_prepare do + I18n.reload! + end + end + + # Set the i18n configuration from config.i18n but special-case for + # the load_path which should be appended to what's already set instead of overwritten. + config.after_initialize do |app| + app.config.i18n.each do |setting, value| + if setting == :load_path + I18n.load_path += value + else + I18n.send("#{setting}=", value) + end + end + end + end +end + module ActiveSupport class Railtie < Rails::Railtie plugin_name :active_support diff --git a/railties/lib/generators/rails/app/templates/config/boot.rb b/railties/lib/generators/rails/app/templates/config/boot.rb index 466e1e50ec..cbfa5ca3e9 100644 --- a/railties/lib/generators/rails/app/templates/config/boot.rb +++ b/railties/lib/generators/rails/app/templates/config/boot.rb @@ -19,7 +19,7 @@ require 'rails/all' # To pick the frameworks you want, remove 'require "rails/all"' # and list the framework railties that you want: # -# require "active_model/railtie" +# require "active_support/railtie" # require "active_record/railtie" # require "action_controller/railtie" # require "action_view/railtie" @@ -28,7 +28,7 @@ require 'rails/all' <% else -%> # Pick the frameworks you want: # require "active_record/railtie" -require "active_model/railtie" +require "active_support/railtie" require "action_controller/railtie" require "action_view/railtie" require "action_mailer/railtie" diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index 93cf77ffd3..e3aa9e4c97 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -8,6 +8,7 @@ require 'rails/initializable' require 'rails/railtie' require 'rails/plugin' require 'rails/engine' +require 'rails/bootstrap' require 'rails/application' require 'rails/railties_path' require 'rails/version' @@ -33,8 +34,6 @@ else end module Rails - autoload :Bootstrap, 'rails/bootstrap' - class << self def application @@application ||= nil diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 5c4112e1d7..9b0f39feb1 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -2,6 +2,11 @@ require 'fileutils' module Rails class Application < Engine + + # TODO Clear up 2 way delegation flow between App class and instance. + # Infact just add a method_missing on the class. + # + # TODO I'd like to track the "default app" different using an inherited hook. class << self alias :configure :class_eval delegate :initialize!, :load_tasks, :load_generators, :root, :to => :instance @@ -70,10 +75,9 @@ module Rails routes.disable_clear_and_finalize = false end - def require_environment - require config.environment_path - rescue LoadError + environment = config.paths.config.environment.to_a.first + require environment if environment end def load_tasks @@ -92,13 +96,6 @@ module Rails plugins.each { |p| p.load_generators } end - def initializers - initializers = Bootstrap.new(self).initializers - plugins.each { |p| initializers += p.initializers } - initializers += super - initializers - end - # TODO: Fix this method. It loads all railties independent if :all is given # or not, otherwise frameworks are never loaded. def plugins @@ -120,59 +117,30 @@ module Rails app.call(env) end - initializer :add_builtin_route, :before => :build_middleware_stack do |app| + def initializers + my = super + hook = my.index { |i| i.name == :set_autoload_paths } + 1 + initializers = Bootstrap.new(self).initializers + initializers += my[0...hook] + plugins.each { |p| initializers += p.initializers } + initializers += my[hook..-1] + initializers + end + + initializer :add_builtin_route do |app| if Rails.env.development? app.route_configuration_files << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') end end - initializer :build_middleware_stack, :after => :load_application_initializers do + initializer :build_middleware_stack do app end - # Fires the user-supplied after_initialize block (Configuration#after_initialize) - initializer :after_initialize, :after => :build_middleware_stack do + # Fires the user-supplied after_initialize block (config#after_initialize) + initializer :after_initialize do config.after_initialize_blocks.each do |block| - block.call - end - end - - # Set the i18n configuration from config.i18n but special-case for the load_path which should be - # appended to what's already set instead of overwritten. - initializer :initialize_i18n do - require 'active_support/i18n' - - config.i18n.each do |setting, value| - if setting == :load_path - I18n.load_path += value - else - I18n.send("#{setting}=", value) - end - end - - ActionDispatch::Callbacks.to_prepare do - I18n.reload! - end - end - - initializer :set_clear_dependencies_hook do - unless config.cache_classes - ActionDispatch::Callbacks.after do - ActiveSupport::Dependencies.clear - end - end - end - - initializer :initialize_notifications do - require 'active_support/notifications' - - if config.colorize_logging == false - Rails::Subscriber.colorize_logging = false - config.generators.colorize_logging = false - end - - ActiveSupport::Notifications.subscribe do |*args| - Rails::Subscriber.dispatch(args) + block.call(self) end end diff --git a/railties/lib/rails/bootstrap.rb b/railties/lib/rails/bootstrap.rb index 3473f2fcaa..7c33955b2b 100644 --- a/railties/lib/rails/bootstrap.rb +++ b/railties/lib/rails/bootstrap.rb @@ -1,5 +1,5 @@ module Rails - class Bootstrap #< Railtie + class Bootstrap include Initializable def initialize(application) @@ -12,6 +12,15 @@ module Rails require "active_support/all" unless config.active_support.bare end + # Preload all frameworks specified by the Configuration#frameworks. + # Used by Passenger to ensure everything's loaded before forking and + # to avoid autoload race conditions in JRuby. + initializer :preload_frameworks do + require 'active_support/dependencies' + ActiveSupport::Autoload.eager_autoload! if config.preload_frameworks + end + + # Initialize the logger early in the stack in case we need to log some deprecation. initializer :initialize_logger do Rails.logger ||= config.logger || begin logger = ActiveSupport::BufferedLogger.new(config.paths.log.to_a.first) @@ -29,32 +38,42 @@ module Rails end end - initializer :container do - # FIXME This is just a dumb initializer used as hook - end - - # Preload all frameworks specified by the Configuration#frameworks. - # Used by Passenger to ensure everything's loaded before forking and - # to avoid autoload race conditions in JRuby. - initializer :preload_frameworks do - ActiveSupport::Autoload.eager_autoload! if config.preload_frameworks - end - + # Initialize cache early in the stack so railties can make use of it. initializer :initialize_cache do unless defined?(RAILS_CACHE) silence_warnings { Object.const_set "RAILS_CACHE", ActiveSupport::Cache.lookup_store(config.cache_store) } if RAILS_CACHE.respond_to?(:middleware) - # Insert middleware to setup and teardown local cache for each request config.middleware.insert_after(:"Rack::Lock", RAILS_CACHE.middleware) end end end - # Sets the dependency loading mechanism based on the value of - # Configuration#cache_classes. + # Initialize rails subscriber on top of notifications. + initializer :initialize_subscriber do |app| + require 'active_support/notifications' + + if app.config.colorize_logging == false + Rails::Subscriber.colorize_logging = false + app.config.generators.colorize_logging = false + end + + ActiveSupport::Notifications.subscribe do |*args| + Rails::Subscriber.dispatch(args) + end + end + + initializer :set_clear_dependencies_hook do + unless config.cache_classes + ActionDispatch::Callbacks.after do + ActiveSupport::Dependencies.clear + end + end + end + + # Sets the dependency loading mechanism. + # TODO: Remove files from the $" and always use require. initializer :initialize_dependency_mechanism do - # TODO: Remove files from the $" and always use require ActiveSupport::Dependencies.mechanism = config.cache_classes ? :require : :load end end diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index 3ba27d79a7..76ca52867b 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -1,59 +1,112 @@ require 'active_support/ordered_options' module Rails - module SharedConfiguration - def self.middleware_stack - @default_middleware_stack ||= ActionDispatch::MiddlewareStack.new.tap do |middleware| - middleware.use('::ActionDispatch::Static', lambda { Rails.public_path }, :if => lambda { Rails.application.config.serve_static_assets }) - middleware.use('::Rack::Lock', :if => lambda { !ActionController::Base.allow_concurrency }) - middleware.use('::Rack::Runtime') - middleware.use('::Rails::Rack::Logger') - middleware.use('::ActionDispatch::ShowExceptions', lambda { ActionController::Base.consider_all_requests_local }) - middleware.use('::ActionDispatch::Callbacks', lambda { !Rails.application.config.cache_classes }) - middleware.use('::ActionDispatch::Cookies') - middleware.use(lambda { ActionController::Base.session_store }, lambda { ActionController::Base.session_options }) - middleware.use('::ActionDispatch::Flash', :if => lambda { ActionController::Base.session_store }) - middleware.use(lambda { Rails::Rack::Metal.new(Rails.application.config.paths.app.metals.to_a, Rails.application.config.metals) }) - middleware.use('ActionDispatch::ParamsParser') - middleware.use('::Rack::MethodOverride') - middleware.use('::ActionDispatch::Head') + module Shared + # Those configuration values are shared between railtie, engines and so forth. + module Configuration + def middleware + @@default_middleware_stack ||= ActionDispatch::MiddlewareStack.new.tap do |middleware| + middleware.use('::ActionDispatch::Static', lambda { Rails.public_path }, :if => lambda { Rails.application.config.serve_static_assets }) + middleware.use('::Rack::Lock', :if => lambda { !ActionController::Base.allow_concurrency }) + middleware.use('::Rack::Runtime') + middleware.use('::Rails::Rack::Logger') + middleware.use('::ActionDispatch::ShowExceptions', lambda { ActionController::Base.consider_all_requests_local }) + middleware.use('::ActionDispatch::Callbacks', lambda { !Rails.application.config.cache_classes }) + middleware.use('::ActionDispatch::Cookies') + middleware.use(lambda { ActionController::Base.session_store }, lambda { ActionController::Base.session_options }) + middleware.use('::ActionDispatch::Flash', :if => lambda { ActionController::Base.session_store }) + middleware.use(lambda { Rails::Rack::Metal.new(Rails.application.config.paths.app.metals.to_a, Rails.application.config.metals) }) + middleware.use('ActionDispatch::ParamsParser') + middleware.use('::Rack::MethodOverride') + middleware.use('::ActionDispatch::Head') + end + end + + # Holds generators configuration: + # + # config.generators do |g| + # g.orm :datamapper, :migration => true + # g.template_engine :haml + # g.test_framework :rspec + # end + # + # If you want to disable color in console, do: + # + # config.generators.colorize_logging = false + # + def generators + @@generators ||= GeneratorsConfiguration.new + if block_given? + yield @@generators + else + @@generators + end + end + + def after_initialize_blocks + @@after_initialize_blocks ||= [] + end + + def after_initialize(&blk) + after_initialize_blocks << blk if blk + end + + protected + + def options + @@options ||= Hash.new { |h,k| h[k] = ActiveSupport::OrderedOptions.new } end end - def self.options - @options ||= Hash.new { |h,k| h[k] = ActiveSupport::OrderedOptions.new } + class GeneratorsConfiguration #:nodoc: + attr_accessor :aliases, :options, :colorize_logging + + def initialize + @aliases = Hash.new { |h,k| h[k] = {} } + @options = Hash.new { |h,k| h[k] = {} } + @colorize_logging = true + end + + def method_missing(method, *args) + method = method.to_s.sub(/=$/, '').to_sym + + if method == :rails + namespace, configuration = :rails, args.shift + elsif args.first.is_a?(Hash) + namespace, configuration = method, args.shift + else + namespace, configuration = args.shift, args.shift + @options[:rails][method] = namespace + end + + if configuration + aliases = configuration.delete(:aliases) + @aliases[namespace].merge!(aliases) if aliases + @options[namespace].merge!(configuration) + end + end end end - # Temporarily separate the plugin configuration class from the main - # configuration class while this bit is being cleaned up. + # Holds Railtie basic configuration. It does not include configuration values + # related with load paths and the application specifics. class Railtie::Configuration + include Shared::Configuration + def self.default @default ||= new end - attr_reader :middleware - - def initialize - @options = SharedConfiguration.options - @middleware = SharedConfiguration.middleware_stack - end - def respond_to?(name) super || name.to_s =~ config_key_regexp end - protected - - attr_reader :options - private def method_missing(name, *args, &blk) if name.to_s =~ config_key_regexp - return $2 == '=' ? @options[$1] = args.first : @options[$1] + return $2 == '=' ? options[$1] = args.first : options[$1] end - super end @@ -68,8 +121,8 @@ module Rails end class Engine::Configuration < Railtie::Configuration - attr_reader :root - attr_accessor :eager_load_paths, :load_once_paths, :load_paths + attr_reader :root + attr_writer :eager_load_paths, :load_once_paths, :load_paths def initialize(root) @root = root @@ -86,8 +139,8 @@ module Rails paths.lib "lib", :load_path => true paths.config "config" paths.config.environment "config/environments", :glob => "#{Rails.env}.rb" - paths.config.initializers "config/initializers" - paths.config.locales "config/locales" + paths.config.initializers "config/initializers", :glob => "**/*.rb" + paths.config.locales "config/locales", :glob => "*.{rb,yml}" paths.config.routes "config/routes.rb" paths end @@ -111,41 +164,35 @@ module Rails end class Configuration < Engine::Configuration - attr_accessor :after_initialize_blocks, :cache_classes, :colorize_logging, - :consider_all_requests_local, :dependency_loading, :filter_parameters, - :logger, :metals, :plugins, - :preload_frameworks, :reload_plugins, :serve_static_assets, - :time_zone, :whiny_nils + attr_accessor :cache_classes, :cache_store, :colorize_logging, + :consider_all_requests_local, :dependency_loading, + :filter_parameters, :log_level, :logger, :metals, + :plugins, :preload_frameworks, :reload_plugins, + :serve_static_assets, :time_zone, :whiny_nils - attr_writer :cache_store, :controller_paths, :i18n, :log_level - def initialize(*) + def initialize(*) super - @after_initialize_blocks = [] - @filter_parameters = [] - @dependency_loading = true - @serve_static_assets = true - end - - def after_initialize(&blk) - @after_initialize_blocks << blk if blk - end + @filter_parameters = [] + @dependency_loading = true + @serve_static_assets = true + end def paths @paths ||= begin paths = super - paths.app.controllers.concat(builtin_directories) + paths.app.controllers << builtin_controller if builtin_controller paths.config.database "config/database.yml" paths.log "log/#{Rails.env}.log" paths.tmp "tmp" paths.tmp.cache "tmp/cache" - paths.vendor "vendor", :load_path => true + paths.vendor "vendor", :load_path => true paths.vendor.plugins "vendor/plugins" if File.exists?("#{root}/test/mocks/#{Rails.env}") ActiveSupport::Deprecation.warn "\"RAILS_ROOT/test/mocks/#{Rails.env}\" won't be added " << "automatically to load paths anymore in future releases" - paths.mocks_path "test/mocks/#{Rails.env}", :load_path => true + paths.mocks_path "test/mocks", :load_path => true, :glob => Rails.env end paths @@ -182,6 +229,29 @@ module Rails YAML::load(ERB.new(IO.read(paths.config.database.to_a.first)).result) end + def cache_store + @cache_store ||= begin + if File.exist?("#{root}/tmp/cache/") + [ :file_store, "#{root}/tmp/cache/" ] + else + :memory_store + end + end + end + + def builtin_controller + File.join(RAILTIES_PATH, "builtin", "rails_info") if Rails.env.development? + end + + def log_level + @log_level ||= Rails.env.production? ? :info : :debug + end + + def time_zone + @time_zone ||= "UTC" + end + + # Deprecated paths def view_path=(value) ActiveSupport::Deprecation.warn "config.view_path= is deprecated, " << "please do config.paths.app.views= instead", caller @@ -241,108 +311,5 @@ module Rails "please do config.paths.app.controllers instead", caller paths.app.controllers.to_a.uniq end - - def cache_store - @cache_store ||= begin - if File.exist?("#{root}/tmp/cache/") - [ :file_store, "#{root}/tmp/cache/" ] - else - :memory_store - end - end - end - - # Include builtins only in the development environment. - def builtin_directories - Rails.env.development? ? Dir["#{RAILTIES_PATH}/builtin/*/"] : [] - end - - def log_level - @log_level ||= Rails.env.production? ? :info : :debug - end - - def time_zone - @time_zone ||= "UTC" - end - - def i18n - @i18n ||= begin - i18n = ActiveSupport::OrderedOptions.new - i18n.load_path = [] - - if File.exist?(File.join(root, 'config', 'locales')) - i18n.load_path << Dir[File.join(root, 'config', 'locales', '*.{rb,yml}')] - i18n.load_path.flatten! - end - - i18n - end - end - - def environment_path - "#{root}/config/environments/#{Rails.env}.rb" - end - - # Holds generators configuration: - # - # config.generators do |g| - # g.orm :datamapper, :migration => true - # g.template_engine :haml - # g.test_framework :rspec - # end - # - # If you want to disable color in console, do: - # - # config.generators.colorize_logging = false - # - def generators - @generators ||= Generators.new - if block_given? - yield @generators - else - @generators - end - end - - # Allow Notifications queue to be modified or add subscriptions: - # - # config.notifications.queue = MyNewQueue.new - # - # config.notifications.subscribe /action_dispatch.show_exception/ do |*args| - # ExceptionDeliver.deliver_exception(args) - # end - # - def notifications - ActiveSupport::Notifications - end - - class Generators #:nodoc: - attr_accessor :aliases, :options, :colorize_logging - - def initialize - @aliases = Hash.new { |h,k| h[k] = {} } - @options = Hash.new { |h,k| h[k] = {} } - @colorize_logging = true - end - - def method_missing(method, *args) - method = method.to_s.sub(/=$/, '').to_sym - - if method == :rails - namespace, configuration = :rails, args.shift - elsif args.first.is_a?(Hash) - namespace, configuration = method, args.shift - else - namespace, configuration = args.shift, args.shift - @options[:rails][method] = namespace - end - - if configuration - aliases = configuration.delete(:aliases) - @aliases[namespace].merge!(aliases) if aliases - @options[namespace].merge!(configuration) - end - end - end end end diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index effbfee6c1..93f39f176c 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -4,7 +4,6 @@ module Rails # TODO Move I18n here # TODO Set routes namespaces class Engine < Railtie - class << self attr_accessor :called_from @@ -49,8 +48,8 @@ module Rails delegate :middleware, :root, :to => :config # Add configured load paths to ruby load paths and remove duplicates. - initializer :set_load_path, :before => :container do - expand_load_path(config.load_paths).reverse_each do |path| + initializer :set_load_path do + config.load_paths.reverse_each do |path| $LOAD_PATH.unshift(path) if File.directory?(path) end $LOAD_PATH.uniq! @@ -58,11 +57,9 @@ module Rails # Set the paths from which Rails will automatically load source files, # and the load_once paths. - initializer :set_autoload_paths, :before => :container do - require 'active_support/dependencies' - - ActiveSupport::Dependencies.load_paths = expand_load_path(config.load_paths) - ActiveSupport::Dependencies.load_once_paths = expand_load_path(config.load_once_paths) + initializer :set_autoload_paths do + ActiveSupport::Dependencies.load_paths.concat(config.load_paths) + ActiveSupport::Dependencies.load_once_paths.concat(config.load_once_paths) extra = ActiveSupport::Dependencies.load_once_paths - ActiveSupport::Dependencies.load_paths @@ -74,31 +71,32 @@ module Rails end_error end - # Freeze the arrays so future modifications will fail rather than do nothing mysteriously + # Freeze so future modifications will fail rather than do nothing mysteriously config.load_once_paths.freeze end - # Routing must be initialized after plugins to allow the former to extend the routes initializer :add_routing_files do |app| - routes = select_existing(config.paths.config.routes) - app.route_configuration_files.concat(routes) + config.paths.config.routes.to_a.each do |route| + app.route_configuration_files << route if File.exists?(route) + end + end + + initializer :add_locales do + config.i18n.load_path.concat(config.paths.config.locales.to_a) end initializer :add_view_paths do - views = select_existing(config.paths.app.views) - ActionController::Base.view_paths.concat(views) if defined? ActionController - ActionMailer::Base.view_paths.concat(views) if defined? ActionMailer + views = config.paths.app.views.to_a + ActionController::Base.view_paths.concat(views) if defined?(ActionController) + ActionMailer::Base.view_paths.concat(views) if defined?(ActionMailer) end initializer :load_application_initializers do - select_existing(config.paths.config.initializers).each do |initializers| - Dir["#{initializers}/**/*.rb"].sort.each do |initializer| - load(initializer) - end + config.paths.config.initializers.each do |initializer| + load(initializer) end end - # Eager load application classes initializer :load_application_classes do |app| next if $rails_rake_task @@ -111,15 +109,5 @@ module Rails end end end - - private - - def select_existing(paths) - paths.to_a.select { |path| File.exists?(path) }.uniq - end - - def expand_load_path(load_paths) - load_paths.map { |path| Dir.glob(path.to_s) }.flatten.uniq - end end end \ No newline at end of file diff --git a/railties/lib/rails/initializable.rb b/railties/lib/rails/initializable.rb index 8fcb254590..cea4a0fdf7 100644 --- a/railties/lib/rails/initializable.rb +++ b/railties/lib/rails/initializable.rb @@ -19,12 +19,6 @@ module Rails @options[:after] end - def global - @options[:global] - end - - alias global? global - def run(*args) @context.instance_exec(*args, &block) end @@ -71,7 +65,7 @@ module Rails def initializers @initializers ||= begin - initializers = self.class.initializers_for(:instance) + initializers = self.class.initializers_chain Collection.new(initializers.map { |i| i.bind(self) }) end end @@ -81,26 +75,23 @@ module Rails @initializers ||= [] end - def initializers_for(scope = :global) + def initializers_chain initializers = Collection.new ancestors.reverse_each do |klass| next unless klass.respond_to?(:initializers) - initializers = initializers + klass.initializers.select { |i| - (scope == :global) == !!i.global? - } + initializers = initializers + klass.initializers end initializers end def initializer(name, opts = {}, &blk) raise ArgumentError, "A block must be passed when defining an initializer" unless blk - @initializers ||= [] - @initializers << Initializer.new(name, nil, opts, &blk) + initializers << Initializer.new(name, nil, opts, &blk) end def run_initializers(*args) return if @ran - initializers_for(:global).each do |initializer| + initializers_chain.each do |initializer| instance_exec(*args, &initializer.block) end @ran = true diff --git a/railties/test/application/initializer_test.rb b/railties/test/application/initializer_test.rb index 754c0f1839..205840360c 100644 --- a/railties/test/application/initializer_test.rb +++ b/railties/test/application/initializer_test.rb @@ -29,7 +29,7 @@ module ApplicationTests add_to_config <<-RUBY config.root = "#{app_path}" - config.eager_load_paths = "#{app_path}/lib" + config.eager_load_paths << "#{app_path}/lib" RUBY require "#{app_path}/config/environment" @@ -132,7 +132,7 @@ module ApplicationTests require "#{app_path}/config/environment" assert_equal [ - "#{app_path}/config/locales/en.yml", "my/other/locale.yml" + "my/other/locale.yml", "#{app_path}/config/locales/en.yml" ], Rails.application.config.i18n.load_path end diff --git a/railties/test/application/notifications_test.rb b/railties/test/application/notifications_test.rb index db8605edbe..061bb34c19 100644 --- a/railties/test/application/notifications_test.rb +++ b/railties/test/application/notifications_test.rb @@ -1,17 +1,6 @@ require "isolation/abstract_unit" module ApplicationTests - class MyQueue - def publish(name, *args) - raise name - end - - # Not a full queue implementation - def method_missing(name, *args, &blk) - self - end - end - class MockLogger def method_missing(*args) @logged ||= [] @@ -39,22 +28,6 @@ module ApplicationTests ActiveSupport::Notifications.notifier.wait end - test "new queue is set" do - # We don't want to load all frameworks, so remove them and clean up environments. - use_frameworks [] - FileUtils.rm_rf("#{app_path}/config/environments") - - add_to_config <<-RUBY - config.notifications.notifier = ActiveSupport::Notifications::Notifier.new(ApplicationTests::MyQueue.new) - RUBY - - require "#{app_path}/config/environment" - - assert_raise RuntimeError do - ActiveSupport::Notifications.publish('foo') - end - end - test "rails subscribers are added" do add_to_config <<-RUBY config.colorize_logging = false diff --git a/railties/test/initializable_test.rb b/railties/test/initializable_test.rb index e308cbcb0e..0c7378cb64 100644 --- a/railties/test/initializable_test.rb +++ b/railties/test/initializable_test.rb @@ -10,14 +10,14 @@ module InitializableTests attr_accessor :foo, :bar end - initializer :omg, :global => true do + initializer :omg do @foo ||= 0 @foo += 1 end end class Bar < Foo - initializer :bar, :global => true do + initializer :bar do @bar ||= 0 @bar += 1 end @@ -26,7 +26,7 @@ module InitializableTests module Word include Rails::Initializable - initializer :word, :global => true do + initializer :word do $word = "bird" end end @@ -34,11 +34,11 @@ module InitializableTests class Parent include Rails::Initializable - initializer :one, :global => true do + initializer :one do $arr << 1 end - initializer :two, :global => true do + initializer :two do $arr << 2 end end @@ -46,17 +46,17 @@ module InitializableTests class Child < Parent include Rails::Initializable - initializer :three, :before => :one, :global => true do + initializer :three, :before => :one do $arr << 3 end - initializer :four, :after => :one, :global => true do + initializer :four, :after => :one do $arr << 4 end end class Parent - initializer :five, :before => :one, :global => true do + initializer :five, :before => :one do $arr << 5 end end @@ -72,11 +72,11 @@ module InitializableTests $arr << 2 end - initializer :three, :global => true do + initializer :three do $arr << 3 end - initializer :four, :global => true do + initializer :four do $arr << 4 end end @@ -181,13 +181,7 @@ module InitializableTests $arr = [] instance = Instance.new instance.run_initializers - assert_equal [1, 2], $arr - end - - test "running globals" do - $arr = [] - Instance.run_initializers - assert_equal [3, 4], $arr + assert_equal [1, 2, 3, 4], $arr end end diff --git a/railties/test/initializer/initialize_i18n_test.rb b/railties/test/initializer/initialize_i18n_test.rb index 472566378d..904d2a6566 100644 --- a/railties/test/initializer/initialize_i18n_test.rb +++ b/railties/test/initializer/initialize_i18n_test.rb @@ -15,6 +15,7 @@ module InitializerTests config.root = "#{app_path}" config.i18n.load_path << "my/other/locale.yml" RUBY + require "#{app_path}/config/environment" #{RAILS_FRAMEWORK_ROOT}/railties/test/fixtures/plugins/engines/engine/config/locales/en.yml @@ -23,8 +24,8 @@ module InitializerTests #{RAILS_FRAMEWORK_ROOT}/activemodel/lib/active_model/locale/en.yml #{RAILS_FRAMEWORK_ROOT}/activerecord/lib/active_record/locale/en.yml #{RAILS_FRAMEWORK_ROOT}/actionpack/lib/action_view/locale/en.yml - #{RAILS_FRAMEWORK_ROOT}/railties/tmp/app/config/locales/en.yml my/other/locale.yml + #{RAILS_FRAMEWORK_ROOT}/railties/tmp/app/config/locales/en.yml ).map { |path| File.expand_path(path) }, I18n.load_path.map { |path| File.expand_path(path) } end diff --git a/railties/test/initializer/path_test.rb b/railties/test/initializer/path_test.rb index 76eb29bdf4..4f475fae11 100644 --- a/railties/test/initializer/path_test.rb +++ b/railties/test/initializer/path_test.rb @@ -45,7 +45,7 @@ module InitializerTests assert_path @paths.tmp, "tmp" assert_path @paths.tmp.cache, "tmp", "cache" assert_path @paths.config, "config" - assert_path @paths.config.locales, "config", "locales" + assert_path @paths.config.locales, "config", "locales", "en.yml" assert_path @paths.config.environment, "config", "environments", "development.rb" assert_equal root("app", "controllers"), @paths.app.controllers.to_a.first -- cgit v1.2.3 From 4eab3aad8d256b868390b739b075bd38661339b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 23 Jan 2010 02:03:11 +0100 Subject: Ensure user set load paths have higher preference and move Bootstrap inside Application. --- railties/lib/rails.rb | 1 - railties/lib/rails/application.rb | 121 ++++++++++++++++++---- railties/lib/rails/bootstrap.rb | 80 -------------- railties/lib/rails/configuration.rb | 3 +- railties/lib/rails/engine.rb | 4 +- railties/test/application/initializer_test.rb | 2 +- railties/test/initializer/initialize_i18n_test.rb | 2 +- 7 files changed, 105 insertions(+), 108 deletions(-) delete mode 100644 railties/lib/rails/bootstrap.rb diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index e3aa9e4c97..29afb672b6 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -8,7 +8,6 @@ require 'rails/initializable' require 'rails/railtie' require 'rails/plugin' require 'rails/engine' -require 'rails/bootstrap' require 'rails/application' require 'rails/railties_path' require 'rails/version' diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 9b0f39feb1..305d1c73e0 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -2,11 +2,14 @@ require 'fileutils' module Rails class Application < Engine - # TODO Clear up 2 way delegation flow between App class and instance. # Infact just add a method_missing on the class. # # TODO I'd like to track the "default app" different using an inherited hook. + # + # TODO Check helpers works as expected + # + # TODO Check routes namespaces class << self alias :configure :class_eval delegate :initialize!, :load_tasks, :load_generators, :root, :to => :instance @@ -118,36 +121,112 @@ module Rails end def initializers - my = super - hook = my.index { |i| i.name == :set_autoload_paths } + 1 - initializers = Bootstrap.new(self).initializers - initializers += my[0...hook] + initializers = Bootstrap.initializers + initializers += super plugins.each { |p| initializers += p.initializers } - initializers += my[hook..-1] + initializers += Finisher.initializers initializers end - initializer :add_builtin_route do |app| - if Rails.env.development? - app.route_configuration_files << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') + module Bootstrap + include Initializable + + initializer :load_all_active_support do |app| + require "active_support/all" unless app.config.active_support.bare end - end - initializer :build_middleware_stack do - app - end + # Preload all frameworks specified by the Configuration#frameworks. + # Used by Passenger to ensure everything's loaded before forking and + # to avoid autoload race conditions in JRuby. + initializer :preload_frameworks do |app| + require 'active_support/dependencies' + ActiveSupport::Autoload.eager_autoload! if app.config.preload_frameworks + end + + # Initialize the logger early in the stack in case we need to log some deprecation. + initializer :initialize_logger do |app| + Rails.logger ||= app.config.logger || begin + path = app.config.paths.log.to_a.first + logger = ActiveSupport::BufferedLogger.new(path) + logger.level = ActiveSupport::BufferedLogger.const_get(app.config.log_level.to_s.upcase) + logger.auto_flushing = false if Rails.env.production? + logger + rescue StandardError => e + logger = ActiveSupport::BufferedLogger.new(STDERR) + logger.level = ActiveSupport::BufferedLogger::WARN + logger.warn( + "Rails Error: Unable to access log file. Please ensure that #{path} exists and is chmod 0666. " + + "The log level has been raised to WARN and the output directed to STDERR until the problem is fixed." + ) + logger + end + end + + # Initialize cache early in the stack so railties can make use of it. + initializer :initialize_cache do |app| + unless defined?(RAILS_CACHE) + silence_warnings { Object.const_set "RAILS_CACHE", ActiveSupport::Cache.lookup_store(app.config.cache_store) } + + if RAILS_CACHE.respond_to?(:middleware) + app.config.middleware.insert_after(:"Rack::Lock", RAILS_CACHE.middleware) + end + end + end + + # Initialize rails subscriber on top of notifications. + initializer :initialize_subscriber do |app| + require 'active_support/notifications' + + if app.config.colorize_logging == false + Rails::Subscriber.colorize_logging = false + app.config.generators.colorize_logging = false + end - # Fires the user-supplied after_initialize block (config#after_initialize) - initializer :after_initialize do - config.after_initialize_blocks.each do |block| - block.call(self) + ActiveSupport::Notifications.subscribe do |*args| + Rails::Subscriber.dispatch(args) + end + end + + initializer :set_clear_dependencies_hook do |app| + unless app.config.cache_classes + ActionDispatch::Callbacks.after do + ActiveSupport::Dependencies.clear + end + end + end + + # Sets the dependency loading mechanism. + # TODO: Remove files from the $" and always use require. + initializer :initialize_dependency_mechanism do |app| + ActiveSupport::Dependencies.mechanism = app.config.cache_classes ? :require : :load end end - # Disable dependency loading during request cycle - initializer :disable_dependency_loading do - if config.cache_classes && !config.dependency_loading - ActiveSupport::Dependencies.unhook! + module Finisher + include Initializable + + initializer :add_builtin_route do |app| + if Rails.env.development? + app.route_configuration_files << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') + end + end + + initializer :build_middleware_stack do |app| + app.app + end + + # Fires the user-supplied after_initialize block (config#after_initialize) + initializer :after_initialize do |app| + app.config.after_initialize_blocks.each do |block| + block.call(app) + end + end + + # Disable dependency loading during request cycle + initializer :disable_dependency_loading do |app| + if app.config.cache_classes && !app.config.dependency_loading + ActiveSupport::Dependencies.unhook! + end end end end diff --git a/railties/lib/rails/bootstrap.rb b/railties/lib/rails/bootstrap.rb deleted file mode 100644 index 7c33955b2b..0000000000 --- a/railties/lib/rails/bootstrap.rb +++ /dev/null @@ -1,80 +0,0 @@ -module Rails - class Bootstrap - include Initializable - - def initialize(application) - @application = application - end - - delegate :config, :root, :to => :'@application' - - initializer :load_all_active_support do - require "active_support/all" unless config.active_support.bare - end - - # Preload all frameworks specified by the Configuration#frameworks. - # Used by Passenger to ensure everything's loaded before forking and - # to avoid autoload race conditions in JRuby. - initializer :preload_frameworks do - require 'active_support/dependencies' - ActiveSupport::Autoload.eager_autoload! if config.preload_frameworks - end - - # Initialize the logger early in the stack in case we need to log some deprecation. - initializer :initialize_logger do - Rails.logger ||= config.logger || begin - logger = ActiveSupport::BufferedLogger.new(config.paths.log.to_a.first) - logger.level = ActiveSupport::BufferedLogger.const_get(config.log_level.to_s.upcase) - logger.auto_flushing = false if Rails.env.production? - logger - rescue StandardError => e - logger = ActiveSupport::BufferedLogger.new(STDERR) - logger.level = ActiveSupport::BufferedLogger::WARN - logger.warn( - "Rails Error: Unable to access log file. Please ensure that #{config.log_path} exists and is chmod 0666. " + - "The log level has been raised to WARN and the output directed to STDERR until the problem is fixed." - ) - logger - end - end - - # Initialize cache early in the stack so railties can make use of it. - initializer :initialize_cache do - unless defined?(RAILS_CACHE) - silence_warnings { Object.const_set "RAILS_CACHE", ActiveSupport::Cache.lookup_store(config.cache_store) } - - if RAILS_CACHE.respond_to?(:middleware) - config.middleware.insert_after(:"Rack::Lock", RAILS_CACHE.middleware) - end - end - end - - # Initialize rails subscriber on top of notifications. - initializer :initialize_subscriber do |app| - require 'active_support/notifications' - - if app.config.colorize_logging == false - Rails::Subscriber.colorize_logging = false - app.config.generators.colorize_logging = false - end - - ActiveSupport::Notifications.subscribe do |*args| - Rails::Subscriber.dispatch(args) - end - end - - initializer :set_clear_dependencies_hook do - unless config.cache_classes - ActionDispatch::Callbacks.after do - ActiveSupport::Dependencies.clear - end - end - end - - # Sets the dependency loading mechanism. - # TODO: Remove files from the $" and always use require. - initializer :initialize_dependency_mechanism do - ActiveSupport::Dependencies.mechanism = config.cache_classes ? :require : :load - end - end -end diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index 76ca52867b..da2206d6a2 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -170,13 +170,12 @@ module Rails :plugins, :preload_frameworks, :reload_plugins, :serve_static_assets, :time_zone, :whiny_nils - def initialize(*) super @filter_parameters = [] @dependency_loading = true @serve_static_assets = true - end + end def paths @paths ||= begin diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 93f39f176c..03c78b6d4b 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -77,12 +77,12 @@ module Rails initializer :add_routing_files do |app| config.paths.config.routes.to_a.each do |route| - app.route_configuration_files << route if File.exists?(route) + app.route_configuration_files.unshift(route) if File.exists?(route) end end initializer :add_locales do - config.i18n.load_path.concat(config.paths.config.locales.to_a) + config.i18n.load_path.unshift(*config.paths.config.locales.to_a) end initializer :add_view_paths do diff --git a/railties/test/application/initializer_test.rb b/railties/test/application/initializer_test.rb index 205840360c..6686d82f19 100644 --- a/railties/test/application/initializer_test.rb +++ b/railties/test/application/initializer_test.rb @@ -132,7 +132,7 @@ module ApplicationTests require "#{app_path}/config/environment" assert_equal [ - "my/other/locale.yml", "#{app_path}/config/locales/en.yml" + "#{app_path}/config/locales/en.yml", "my/other/locale.yml" ], Rails.application.config.i18n.load_path end diff --git a/railties/test/initializer/initialize_i18n_test.rb b/railties/test/initializer/initialize_i18n_test.rb index 904d2a6566..64396bddb4 100644 --- a/railties/test/initializer/initialize_i18n_test.rb +++ b/railties/test/initializer/initialize_i18n_test.rb @@ -24,8 +24,8 @@ module InitializerTests #{RAILS_FRAMEWORK_ROOT}/activemodel/lib/active_model/locale/en.yml #{RAILS_FRAMEWORK_ROOT}/activerecord/lib/active_record/locale/en.yml #{RAILS_FRAMEWORK_ROOT}/actionpack/lib/action_view/locale/en.yml - my/other/locale.yml #{RAILS_FRAMEWORK_ROOT}/railties/tmp/app/config/locales/en.yml + my/other/locale.yml ).map { |path| File.expand_path(path) }, I18n.load_path.map { |path| File.expand_path(path) } end -- cgit v1.2.3 From bd24c75fc619fa80af03662cc4dd18fc9b70cafb Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Sat, 23 Jan 2010 18:45:59 +1100 Subject: Updated Gemspec to mail 2.0.3 from gemcutter --- actionmailer/actionmailer.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionmailer/actionmailer.gemspec b/actionmailer/actionmailer.gemspec index 9a8c1df9e8..576ca97334 100644 --- a/actionmailer/actionmailer.gemspec +++ b/actionmailer/actionmailer.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |s| s.homepage = "http://www.rubyonrails.org" s.add_dependency('actionpack', '= 3.0.pre') - s.add_dependency('mail', '~> 2.0.2') + s.add_dependency('mail', '~> 2.0.3') s.files = Dir['CHANGELOG', 'README', 'MIT-LICENSE', 'lib/**/*'] s.has_rdoc = true -- cgit v1.2.3 From ddfc0725a062880131745a1c529e94541d4c9ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sat, 23 Jan 2010 10:23:06 +0100 Subject: Added AbstractController::Collector. --- actionpack/lib/abstract_controller.rb | 1 + actionpack/lib/abstract_controller/collector.rb | 30 ++++++++++++ .../lib/action_controller/metal/mime_responds.rb | 29 ++--------- actionpack/test/abstract/collector_test.rb | 57 ++++++++++++++++++++++ 4 files changed, 91 insertions(+), 26 deletions(-) create mode 100644 actionpack/lib/abstract_controller/collector.rb create mode 100644 actionpack/test/abstract/collector_test.rb diff --git a/actionpack/lib/abstract_controller.rb b/actionpack/lib/abstract_controller.rb index 725d8fb8fc..2c2ef16622 100644 --- a/actionpack/lib/abstract_controller.rb +++ b/actionpack/lib/abstract_controller.rb @@ -10,6 +10,7 @@ module AbstractController autoload :Base autoload :Callbacks + autoload :Collector autoload :Helpers autoload :Layouts autoload :LocalizedCache diff --git a/actionpack/lib/abstract_controller/collector.rb b/actionpack/lib/abstract_controller/collector.rb new file mode 100644 index 0000000000..d429333661 --- /dev/null +++ b/actionpack/lib/abstract_controller/collector.rb @@ -0,0 +1,30 @@ +module AbstractController + module Collector + def self.generate_method_for_mime(mime) + sym = mime.is_a?(Symbol) ? mime : mime.to_sym + const = sym.to_s.upcase + class_eval <<-RUBY, __FILE__, __LINE__ + 1 + def #{sym}(*args, &block) # def html(*args, &block) + custom(Mime::#{const}, *args, &block) # custom(Mime::HTML, *args, &block) + end # end + RUBY + end + + Mime::SET.each do |mime| + generate_method_for_mime(mime) + end + + protected + + def method_missing(symbol, &block) + mime_constant = Mime.const_get(symbol.to_s.upcase) + + if Mime::SET.include?(mime_constant) + AbstractController::Collector.generate_method_for_mime(mime_constant) + send(symbol, &block) + else + super + end + end + end +end \ No newline at end of file diff --git a/actionpack/lib/action_controller/metal/mime_responds.rb b/actionpack/lib/action_controller/metal/mime_responds.rb index 4c02677729..08599d660e 100644 --- a/actionpack/lib/action_controller/metal/mime_responds.rb +++ b/actionpack/lib/action_controller/metal/mime_responds.rb @@ -1,3 +1,5 @@ +require 'abstract_controller/collector' + module ActionController #:nodoc: module MimeResponds #:nodoc: extend ActiveSupport::Concern @@ -265,6 +267,7 @@ module ActionController #:nodoc: end class Collector #:nodoc: + include AbstractController::Collector attr_accessor :order def initialize(&block) @@ -289,32 +292,6 @@ module ActionController #:nodoc: def response_for(mime) @responses[mime] || @responses[Mime::ALL] || @default_response end - - def self.generate_method_for_mime(mime) - sym = mime.is_a?(Symbol) ? mime : mime.to_sym - const = sym.to_s.upcase - class_eval <<-RUBY, __FILE__, __LINE__ + 1 - def #{sym}(&block) # def html(&block) - custom(Mime::#{const}, &block) # custom(Mime::HTML, &block) - end # end - RUBY - end - - Mime::SET.each do |mime| - generate_method_for_mime(mime) - end - - def method_missing(symbol, &block) - mime_constant = Mime.const_get(symbol.to_s.upcase) - - if Mime::SET.include?(mime_constant) - self.class.generate_method_for_mime(mime_constant) - send(symbol, &block) - else - super - end - end - end end end diff --git a/actionpack/test/abstract/collector_test.rb b/actionpack/test/abstract/collector_test.rb new file mode 100644 index 0000000000..2ebcebbbb7 --- /dev/null +++ b/actionpack/test/abstract/collector_test.rb @@ -0,0 +1,57 @@ +require 'abstract_unit' + +module AbstractController + module Testing + class MyCollector + include Collector + attr_accessor :responses + + def initialize + @responses = [] + end + + def custom(mime, *args, &block) + @responses << [mime, args, block] + end + end + + class TestCollector < ActiveSupport::TestCase + test "responds to default mime types" do + collector = MyCollector.new + assert_respond_to collector, :html + assert_respond_to collector, :text + end + + test "does not respond to unknown mime types" do + collector = MyCollector.new + assert !collector.respond_to?(:unknown) + end + + test "register mime types on method missing" do + AbstractController::Collector.send(:remove_method, :js) + collector = MyCollector.new + assert !collector.respond_to?(:js) + collector.js + assert_respond_to collector, :js + end + + test "does not register unknown mime types" do + collector = MyCollector.new + assert_raise NameError do + collector.unknown + end + end + + test "generated methods call custom with args received" do + collector = MyCollector.new + collector.html + collector.text(:foo) + collector.js(:bar) { :baz } + assert_equal [Mime::HTML, [], nil], collector.responses[0] + assert_equal [Mime::TEXT, [:foo], nil], collector.responses[1] + assert_equal [Mime::JS, [:bar]], collector.responses[2][0,2] + assert_equal :baz, collector.responses[2][2].call + end + end + end +end \ No newline at end of file -- cgit v1.2.3 From 5c3ef8c17dba23d000d301467b1a620811c940b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sat, 23 Jan 2010 10:24:19 +0100 Subject: Refactor subject with i18n. --- actionmailer/lib/action_mailer/base.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 98e559154a..94e20d4b63 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -398,8 +398,7 @@ module ActionMailer #:nodoc: m = @message # Get default subject from I18n if none is set - headers[:subject] ||= I18n.t(:subject, :scope => [:actionmailer, mailer_name, action_name], - :default => action_name.humanize) + headers[:subject] ||= default_subject # Give preference to headers and fallbacks to the ones set in mail content_type = headers[:content_type] || m.content_type @@ -418,7 +417,7 @@ module ActionMailer #:nodoc: # Do something else # TODO Ensure that we don't need to pass I18n.locale as detail - templates = self.class.template_root.find_all(action_name, {}, mailer_name) + templates = self.class.template_root.find_all(action_name, {}, self.class.mailer_name) if templates.size == 1 && !m.has_attachments? content_type ||= templates[0].mime_type.to_s @@ -449,6 +448,11 @@ module ActionMailer #:nodoc: m end + def default_subject + mailer_scope = self.class.mailer_name.gsub('/', '.') + I18n.t(:subject, :scope => [:actionmailer, mailer_scope, action_name], :default => action_name.humanize) + end + def insert_part(container, template, charset) part = Mail::Part.new part.content_type = template.mime_type.to_s -- cgit v1.2.3 From 502028a32bfa46ad18337d2a69f03e8b5dec3c4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sat, 23 Jan 2010 10:29:22 +0100 Subject: Move double render check out of AbstractController. --- actionpack/lib/abstract_controller/rendering.rb | 4 ---- actionpack/lib/action_controller/metal/rendering.rb | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index a168b1b4c5..1dec3f2c3e 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -41,10 +41,6 @@ module AbstractController # Mostly abstracts the fact that calling render twice is a DoubleRenderError. # Delegates render_to_body and sticks the result in self.response_body. def render(*args, &block) - if response_body - raise AbstractController::DoubleRenderError - end - options = _normalize_options(*args, &block) self.response_body = render_to_body(options) end diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index 72e2bbd00e..8f03035b2b 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -13,6 +13,10 @@ module ActionController end def render(*args) + if response_body + raise ::AbstractController::DoubleRenderError + end + args << {} unless args.last.is_a?(Hash) super(*args) self.content_type ||= args.last[:_template].mime_type.to_s -- cgit v1.2.3 From c6b16260fe3d1435848e78415bd0b40c10ad7424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sat, 23 Jan 2010 21:37:34 +1100 Subject: Added basic explicit multipart rendering and tests --- actionmailer/lib/action_mailer.rb | 1 + actionmailer/lib/action_mailer/base.rb | 28 ++++++++--- actionmailer/lib/action_mailer/mail_helper.rb | 2 +- actionmailer/test/base_test.rb | 67 ++++++++++++++++++++++----- 4 files changed, 79 insertions(+), 19 deletions(-) diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index 37c95baea7..67466e15e2 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -31,6 +31,7 @@ module ActionMailer extend ::ActiveSupport::Autoload autoload :AdvAttrAccessor + autoload :Collector autoload :Base autoload :DeliveryMethods autoload :DeprecatedApi diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 94e20d4b63..28e4c88b5a 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -297,8 +297,9 @@ module ActionMailer #:nodoc: self.default_implicit_parts_order = [ "text/plain", "text/enriched", "text/html" ] # Expose the internal Mail message + # TODO: Make this an _internal ivar? attr_reader :message - + def headers(args=nil) if args ActiveSupport::Deprecation.warn "headers(Hash) is deprecated, please do headers[key] = value instead", caller @@ -413,12 +414,25 @@ module ActionMailer #:nodoc: m.reply_to ||= quote_address_if_necessary(headers[:reply_to], charset) if headers[:reply_to] m.date ||= headers[:date] if headers[:date] - if block_given? - # Do something + if headers[:body] + templates = [ActionView::Template::Text.new(headers[:body], format_for_text)] + elsif block_given? + collector = ActionMailer::Collector.new(self, {:charset => charset}) do + render action_name + end + yield collector + + collector.responses.each do |response| + part = Mail::Part.new(response) + m.add_part(part) + end + else # TODO Ensure that we don't need to pass I18n.locale as detail templates = self.class.template_root.find_all(action_name, {}, self.class.mailer_name) - + end + + if templates if templates.size == 1 && !m.has_attachments? content_type ||= templates[0].mime_type.to_s m.body = render_to_body(:_template => templates[0]) @@ -430,17 +444,17 @@ module ActionMailer #:nodoc: else templates.each { |t| insert_part(m, t, charset) } end - - content_type ||= (m.has_attachments? ? "multipart/mixed" : "multipart/alternate") end + content_type ||= (m.has_attachments? ? "multipart/mixed" : "multipart/alternate") + # Check if the content_type was not overwriten along the way and if so, # fallback to default. m.content_type = content_type || self.class.default_content_type.dup m.charset = charset m.mime_version = mime_version - unless m.parts.empty? + if m.parts.present? && templates m.body.set_sort_order(headers[:parts_order] || self.class.default_implicit_parts_order.dup) m.body.sort_parts! end diff --git a/actionmailer/lib/action_mailer/mail_helper.rb b/actionmailer/lib/action_mailer/mail_helper.rb index 45ba6f0714..adba94cbef 100644 --- a/actionmailer/lib/action_mailer/mail_helper.rb +++ b/actionmailer/lib/action_mailer/mail_helper.rb @@ -18,7 +18,7 @@ module ActionMailer # Access the mailer instance. def mailer #:nodoc: - @controller + @_controller end # Access the message instance. diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index df0eed695d..bae50868ae 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -69,6 +69,14 @@ class BaseTest < ActiveSupport::TestCase attachments['invoice.pdf'] = 'This is test File content' if hash.delete(:attachments) mail(DEFAULT_HEADERS.merge(hash)) end + + def explicit_multipart(hash = {}) + mail(DEFAULT_HEADERS.merge(hash)) do |format| + format.text { render :text => "TEXT Explicit Multipart" } + format.html { render :text => "HTML Explicit Multipart" } + end + end + end test "method call to mail does not raise error" do @@ -106,6 +114,11 @@ class BaseTest < ActiveSupport::TestCase assert_equal("Welcome", email.body.encoded) end + test "can pass in :body to the mail method hash" do + email = BaseMailer.deliver_welcome(:body => "Hello there") + assert_equal("Hello there", email.body.encoded) + end + # Custom headers test "custom headers" do email = BaseMailer.deliver_welcome @@ -221,17 +234,49 @@ class BaseTest < ActiveSupport::TestCase assert_equal("HTML Implicit Multipart", email.parts[1].parts[1].body.encoded) end - # TODO This should be fixed in mail. Sort parts should be recursive. - # test "implicit multipart with attachments and sort order" do - # order = ["text/html", "text/plain"] - # swap BaseMailer, :default_implicit_parts_order => order do - # email = BaseMailer.deliver_implicit_multipart(:attachments => true) - # assert_equal("application/pdf", email.parts[0].mime_type) - # assert_equal("multipart/alternate", email.parts[1].mime_type) - # assert_equal("text/plain", email.parts[1].parts[1].mime_type) - # assert_equal("text/html", email.parts[1].parts[0].mime_type) - # end - # end + test "implicit multipart with attachments and sort order" do + order = ["text/html", "text/plain"] + swap BaseMailer, :default_implicit_parts_order => order do + email = BaseMailer.deliver_implicit_multipart(:attachments => true) + assert_equal("application/pdf", email.parts[0].mime_type) + assert_equal("multipart/alternate", email.parts[1].mime_type) + assert_equal("text/plain", email.parts[1].parts[1].mime_type) + assert_equal("text/html", email.parts[1].parts[0].mime_type) + end + end + + test "explicit multipart tests" do + email = BaseMailer.deliver_explicit_multipart + assert_equal(2, email.parts.size) + assert_equal("multipart/alternate", email.mime_type) + assert_equal("text/plain", email.parts[0].mime_type) + assert_equal("TEXT Explicit Multipart", email.parts[0].body.encoded) + assert_equal("text/html", email.parts[1].mime_type) + assert_equal("HTML Explicit Multipart", email.parts[1].body.encoded) + end + + test "explicit multipart does not sort order" do + order = ["text/html", "text/plain"] + swap BaseMailer, :default_implicit_parts_order => order do + email = BaseMailer.deliver_explicit_multipart + assert_equal("text/plain", email.parts[0].mime_type) + assert_equal("text/html", email.parts[1].mime_type) + + email = BaseMailer.deliver_explicit_multipart(:parts_order => order.reverse) + assert_equal("text/plain", email.parts[0].mime_type) + assert_equal("text/html", email.parts[1].mime_type) + end + end + + #test "explicit multipart with attachments creates nested parts" do + # email = BaseMailer.deliver_explicit_multipart(:attachments => true) + # assert_equal("application/pdf", email.parts[0].mime_type) + # assert_equal("multipart/alternate", email.parts[1].mime_type) + # assert_equal("text/plain", email.parts[1].parts[0].mime_type) + # assert_equal("TEXT Implicit Multipart", email.parts[1].parts[0].body.encoded) + # assert_equal("text/html", email.parts[1].parts[1].mime_type) + # assert_equal("HTML Implicit Multipart", email.parts[1].parts[1].body.encoded) + #end protected -- cgit v1.2.3 From 5a19d24892b9d842ef7d27875eacecbbad71a9aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sat, 23 Jan 2010 21:50:36 +1100 Subject: Adding collector to ActionMailer --- actionmailer/lib/action_mailer/collector.rb | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 actionmailer/lib/action_mailer/collector.rb diff --git a/actionmailer/lib/action_mailer/collector.rb b/actionmailer/lib/action_mailer/collector.rb new file mode 100644 index 0000000000..49c3f04bad --- /dev/null +++ b/actionmailer/lib/action_mailer/collector.rb @@ -0,0 +1,32 @@ +require 'abstract_controller/collector' + +module ActionMailer #:nodoc: + + class Collector + + include AbstractController::Collector + + attr_accessor :responses + + def initialize(context, options, &block) + @default_options = options + @default_render = block + @default_formats = context.formats + @context = context + @responses = [] + end + + def custom(mime, options={}, &block) + options = @default_options.merge(:content_type => mime.to_s).merge(options) + @context.formats = [mime.to_sym] + options[:body] = if block + block.call + else + @default_render.call + end + @responses << options + @context.formats = @default_formats + end + + end +end \ No newline at end of file -- cgit v1.2.3 From 6ba944608e527b8d7fc564a6e450e2d4c4355ddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sat, 23 Jan 2010 12:20:20 +0100 Subject: Make implicit and explicit templates pass through the same part creation process. --- actionmailer/lib/action_mailer/base.rb | 126 ++++++++++++++-------------- actionmailer/lib/action_mailer/collector.rb | 25 +++--- actionmailer/test/base_test.rb | 37 +++++--- 3 files changed, 104 insertions(+), 84 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 28e4c88b5a..5e61b8693a 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -1,5 +1,5 @@ require 'active_support/core_ext/class' -require "active_support/core_ext/module/delegation" +require 'active_support/core_ext/module/delegation' require 'mail' require 'action_mailer/tmail_compat' @@ -391,70 +391,63 @@ module ActionMailer #:nodoc: end end + # Instantiate a new mailer object. If +method_name+ is not +nil+, the mailer + # will be initialized according to the named method. If not, the mailer will + # remain uninitialized (useful when you only need to invoke the "receive" + # method, for instance). + def initialize(method_name=nil, *args) + super() + @message = Mail.new + process(method_name, *args) if method_name + end + + # Delivers a Mail object. By default, it delivers the cached mail + # object (from the create! method). If no cached mail object exists, and + # no alternate has been given as the parameter, this will fail. + def deliver!(mail = @message) + self.class.deliver(mail) + end + # TODO Add new delivery method goodness def mail(headers = {}) # Guard flag to prevent both the old and the new API from firing # Should be removed when old API is deprecated @mail_was_called = true - m = @message - # Get default subject from I18n if none is set - headers[:subject] ||= default_subject + m, sort_parts = @message, true - # Give preference to headers and fallbacks to the ones set in mail + # Give preference to headers and fallback to the ones set in mail content_type = headers[:content_type] || m.content_type charset = headers[:charset] || m.charset || self.class.default_charset.dup mime_version = headers[:mime_version] || m.mime_version || self.class.default_mime_version.dup - m.subject ||= quote_if_necessary(headers[:subject], charset) if headers[:subject] - m.to ||= quote_address_if_necessary(headers[:to], charset) if headers[:to] - m.from ||= quote_address_if_necessary(headers[:from], charset) if headers[:from] - m.cc ||= quote_address_if_necessary(headers[:cc], charset) if headers[:cc] - m.bcc ||= quote_address_if_necessary(headers[:bcc], charset) if headers[:bcc] - m.reply_to ||= quote_address_if_necessary(headers[:reply_to], charset) if headers[:reply_to] - m.date ||= headers[:date] if headers[:date] + headers[:subject] ||= default_subject + quote_fields(m, headers, charset) - if headers[:body] - templates = [ActionView::Template::Text.new(headers[:body], format_for_text)] + responses = if headers[:body] + [ { :body => headers[:body], :content_type => self.class.default_content_type.dup } ] elsif block_given? - collector = ActionMailer::Collector.new(self, {:charset => charset}) do - render action_name - end - yield collector - - collector.responses.each do |response| - part = Mail::Part.new(response) - m.add_part(part) - end - + sort_parts = false + collector = ActionMailer::Collector.new(self) { render(action_name) } + yield(collector) + collector.responses else # TODO Ensure that we don't need to pass I18n.locale as detail templates = self.class.template_root.find_all(action_name, {}, self.class.mailer_name) - end - - if templates - if templates.size == 1 && !m.has_attachments? - content_type ||= templates[0].mime_type.to_s - m.body = render_to_body(:_template => templates[0]) - elsif templates.size > 1 && m.has_attachments? - container = Mail::Part.new - container.content_type = "multipart/alternate" - templates.each { |t| insert_part(container, t, charset) } - m.add_part(container) - else - templates.each { |t| insert_part(m, t, charset) } + + templates.map do |template| + { :body => render_to_body(:_template => template), + :content_type => template.mime_type.to_s } end end - content_type ||= (m.has_attachments? ? "multipart/mixed" : "multipart/alternate") + content_type ||= create_parts_from_responses(m, responses, charset) - # Check if the content_type was not overwriten along the way and if so, - # fallback to default. - m.content_type = content_type || self.class.default_content_type.dup + m.content_type = content_type m.charset = charset m.mime_version = mime_version - if m.parts.present? && templates + if sort_parts && m.parts.present? m.body.set_sort_order(headers[:parts_order] || self.class.default_implicit_parts_order.dup) m.body.sort_parts! end @@ -462,34 +455,43 @@ module ActionMailer #:nodoc: m end - def default_subject + protected + + def default_subject #:nodoc: mailer_scope = self.class.mailer_name.gsub('/', '.') I18n.t(:subject, :scope => [:actionmailer, mailer_scope, action_name], :default => action_name.humanize) end - def insert_part(container, template, charset) - part = Mail::Part.new - part.content_type = template.mime_type.to_s - part.charset = charset - part.body = render_to_body(:_template => template) - container.add_part(part) + def quote_fields(m, headers, charset) #:nodoc: + m.subject ||= quote_if_necessary(headers[:subject], charset) if headers[:subject] + m.to ||= quote_address_if_necessary(headers[:to], charset) if headers[:to] + m.from ||= quote_address_if_necessary(headers[:from], charset) if headers[:from] + m.cc ||= quote_address_if_necessary(headers[:cc], charset) if headers[:cc] + m.bcc ||= quote_address_if_necessary(headers[:bcc], charset) if headers[:bcc] + m.reply_to ||= quote_address_if_necessary(headers[:reply_to], charset) if headers[:reply_to] + m.date ||= headers[:date] if headers[:date] end - # Instantiate a new mailer object. If +method_name+ is not +nil+, the mailer - # will be initialized according to the named method. If not, the mailer will - # remain uninitialized (useful when you only need to invoke the "receive" - # method, for instance). - def initialize(method_name=nil, *args) - super() - @message = Mail.new - process(method_name, *args) if method_name + def create_parts_from_responses(m, responses, charset) #:nodoc: + if responses.size == 1 && !m.has_attachments? + m.body = responses[0][:body] + return responses[0][:content_type] + elsif responses.size > 1 && m.has_attachments? + container = Mail::Part.new + container.content_type = "multipart/alternate" + responses.each { |r| insert_part(container, r, charset) } + m.add_part(container) + else + responses.each { |r| insert_part(m, r, charset) } + end + + m.has_attachments? ? "multipart/mixed" : "multipart/alternate" end - # Delivers a Mail object. By default, it delivers the cached mail - # object (from the create! method). If no cached mail object exists, and - # no alternate has been given as the parameter, this will fail. - def deliver!(mail = @message) - self.class.deliver(mail) + def insert_part(container, response, charset) #:nodoc: + response[:charset] ||= charset + part = Mail::Part.new(response) + container.add_part(part) end end diff --git a/actionmailer/lib/action_mailer/collector.rb b/actionmailer/lib/action_mailer/collector.rb index 49c3f04bad..0891b6f123 100644 --- a/actionmailer/lib/action_mailer/collector.rb +++ b/actionmailer/lib/action_mailer/collector.rb @@ -1,23 +1,29 @@ require 'abstract_controller/collector' +require 'active_support/core_ext/hash/reverse_merge' +require 'active_support/core_ext/array/extract_options' module ActionMailer #:nodoc: - class Collector - include AbstractController::Collector - - attr_accessor :responses + attr_reader :responses - def initialize(context, options, &block) - @default_options = options - @default_render = block - @default_formats = context.formats + def initialize(context, &block) @context = context @responses = [] + @default_render = block + @default_formats = context.formats + end + + # TODO Test me + def any(*args, &block) + options = args.extract_options! + raise "You have to supply at least one format" if args.empty? + args.each { |type| send(type, options, &block) } end + alias :all :any def custom(mime, options={}, &block) - options = @default_options.merge(:content_type => mime.to_s).merge(options) + options.reverse_merge!(:content_type => mime.to_s) @context.formats = [mime.to_sym] options[:body] = if block block.call @@ -27,6 +33,5 @@ module ActionMailer #:nodoc: @responses << options @context.formats = @default_formats end - end end \ No newline at end of file diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index bae50868ae..3033b2db0f 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -54,9 +54,9 @@ class BaseTest < ActiveSupport::TestCase mail(DEFAULT_HEADERS.merge(hash)) end - def attachment_with_content + def attachment_with_content(hash = {}) attachments['invoice.pdf'] = 'This is test File content' - mail(DEFAULT_HEADERS) + mail(DEFAULT_HEADERS.merge(hash)) end def attachment_with_hash @@ -69,8 +69,9 @@ class BaseTest < ActiveSupport::TestCase attachments['invoice.pdf'] = 'This is test File content' if hash.delete(:attachments) mail(DEFAULT_HEADERS.merge(hash)) end - + def explicit_multipart(hash = {}) + attachments['invoice.pdf'] = 'This is test File content' if hash.delete(:attachments) mail(DEFAULT_HEADERS.merge(hash)) do |format| format.text { render :text => "TEXT Explicit Multipart" } format.html { render :text => "HTML Explicit Multipart" } @@ -116,6 +117,7 @@ class BaseTest < ActiveSupport::TestCase test "can pass in :body to the mail method hash" do email = BaseMailer.deliver_welcome(:body => "Hello there") + assert_equal("text/plain", email.mime_type) assert_equal("Hello there", email.body.encoded) end @@ -154,12 +156,23 @@ class BaseTest < ActiveSupport::TestCase test "adds the rendered template as part" do email = BaseMailer.deliver_attachment_with_content assert_equal(2, email.parts.length) + assert_equal("multipart/mixed", email.mime_type) assert_equal("text/html", email.parts[0].mime_type) assert_equal("Attachment with content", email.parts[0].body.encoded) assert_equal("application/pdf", email.parts[1].mime_type) assert_equal("VGhpcyBpcyB0ZXN0IEZpbGUgY29udGVudA==\r\n", email.parts[1].body.encoded) end + test "adds the given :body as part" do + email = BaseMailer.deliver_attachment_with_content(:body => "I'm the eggman") + assert_equal(2, email.parts.length) + assert_equal("multipart/mixed", email.mime_type) + assert_equal("text/plain", email.parts[0].mime_type) + assert_equal("I'm the eggman", email.parts[0].body.encoded) + assert_equal("application/pdf", email.parts[1].mime_type) + assert_equal("VGhpcyBpcyB0ZXN0IEZpbGUgY29udGVudA==\r\n", email.parts[1].body.encoded) + end + # Defaults values test "uses default charset from class" do swap BaseMailer, :default_charset => "US-ASCII" do @@ -268,15 +281,15 @@ class BaseTest < ActiveSupport::TestCase end end - #test "explicit multipart with attachments creates nested parts" do - # email = BaseMailer.deliver_explicit_multipart(:attachments => true) - # assert_equal("application/pdf", email.parts[0].mime_type) - # assert_equal("multipart/alternate", email.parts[1].mime_type) - # assert_equal("text/plain", email.parts[1].parts[0].mime_type) - # assert_equal("TEXT Implicit Multipart", email.parts[1].parts[0].body.encoded) - # assert_equal("text/html", email.parts[1].parts[1].mime_type) - # assert_equal("HTML Implicit Multipart", email.parts[1].parts[1].body.encoded) - #end + test "explicit multipart with attachments creates nested parts" do + email = BaseMailer.deliver_explicit_multipart(:attachments => true) + assert_equal("application/pdf", email.parts[0].mime_type) + assert_equal("multipart/alternate", email.parts[1].mime_type) + assert_equal("text/plain", email.parts[1].parts[0].mime_type) + assert_equal("TEXT Explicit Multipart", email.parts[1].parts[0].body.encoded) + assert_equal("text/html", email.parts[1].parts[1].mime_type) + assert_equal("HTML Explicit Multipart", email.parts[1].parts[1].body.encoded) + end protected -- cgit v1.2.3 From c985a0ee3d9ae279fd02814ca60782e2f93215e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sat, 23 Jan 2010 12:46:33 +0100 Subject: Add some tests to collector with templates and any. --- actionmailer/lib/action_mailer/base.rb | 2 +- actionmailer/lib/action_mailer/collector.rb | 3 +- actionmailer/test/base_test.rb | 57 +++++++++++++++++----- .../explicit_multipart_templates.html.erb | 1 + .../explicit_multipart_templates.text.erb | 1 + 5 files changed, 50 insertions(+), 14 deletions(-) create mode 100644 actionmailer/test/fixtures/base_mailer/explicit_multipart_templates.html.erb create mode 100644 actionmailer/test/fixtures/base_mailer/explicit_multipart_templates.text.erb diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 5e61b8693a..4ab3761807 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -2,6 +2,7 @@ require 'active_support/core_ext/class' require 'active_support/core_ext/module/delegation' require 'mail' require 'action_mailer/tmail_compat' +require 'action_mailer/collector' module ActionMailer #:nodoc: # Action Mailer allows you to send email from your application using a mailer model and views. @@ -442,7 +443,6 @@ module ActionMailer #:nodoc: end content_type ||= create_parts_from_responses(m, responses, charset) - m.content_type = content_type m.charset = charset m.mime_version = mime_version diff --git a/actionmailer/lib/action_mailer/collector.rb b/actionmailer/lib/action_mailer/collector.rb index 0891b6f123..5431efccfe 100644 --- a/actionmailer/lib/action_mailer/collector.rb +++ b/actionmailer/lib/action_mailer/collector.rb @@ -14,11 +14,10 @@ module ActionMailer #:nodoc: @default_formats = context.formats end - # TODO Test me def any(*args, &block) options = args.extract_options! raise "You have to supply at least one format" if args.empty? - args.each { |type| send(type, options, &block) } + args.each { |type| send(type, options.dup, &block) } end alias :all :any diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 3033b2db0f..83943162d2 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -77,7 +77,19 @@ class BaseTest < ActiveSupport::TestCase format.html { render :text => "HTML Explicit Multipart" } end end - + + def explicit_multipart_templates(hash = {}) + mail(DEFAULT_HEADERS.merge(hash)) do |format| + format.html + format.text + end + end + + def explicit_multipart_with_any(hash = {}) + mail(DEFAULT_HEADERS.merge(hash)) do |format| + format.any(:text, :html){ render :text => "Format with any!" } + end + end end test "method call to mail does not raise error" do @@ -214,7 +226,7 @@ class BaseTest < ActiveSupport::TestCase end # Implicit multipart - test "implicit multipart tests" do + test "implicit multipart" do email = BaseMailer.deliver_implicit_multipart assert_equal(2, email.parts.size) assert_equal("multipart/alternate", email.mime_type) @@ -224,7 +236,7 @@ class BaseTest < ActiveSupport::TestCase assert_equal("HTML Implicit Multipart", email.parts[1].body.encoded) end - test "implicit multipart tests with sort order" do + test "implicit multipart with sort order" do order = ["text/html", "text/plain"] swap BaseMailer, :default_implicit_parts_order => order do email = BaseMailer.deliver_implicit_multipart @@ -258,7 +270,8 @@ class BaseTest < ActiveSupport::TestCase end end - test "explicit multipart tests" do + # Explicit multipart + test "explicit multipart" do email = BaseMailer.deliver_explicit_multipart assert_equal(2, email.parts.size) assert_equal("multipart/alternate", email.mime_type) @@ -282,15 +295,37 @@ class BaseTest < ActiveSupport::TestCase end test "explicit multipart with attachments creates nested parts" do - email = BaseMailer.deliver_explicit_multipart(:attachments => true) - assert_equal("application/pdf", email.parts[0].mime_type) - assert_equal("multipart/alternate", email.parts[1].mime_type) - assert_equal("text/plain", email.parts[1].parts[0].mime_type) - assert_equal("TEXT Explicit Multipart", email.parts[1].parts[0].body.encoded) - assert_equal("text/html", email.parts[1].parts[1].mime_type) - assert_equal("HTML Explicit Multipart", email.parts[1].parts[1].body.encoded) + email = BaseMailer.deliver_explicit_multipart(:attachments => true) + assert_equal("application/pdf", email.parts[0].mime_type) + assert_equal("multipart/alternate", email.parts[1].mime_type) + assert_equal("text/plain", email.parts[1].parts[0].mime_type) + assert_equal("TEXT Explicit Multipart", email.parts[1].parts[0].body.encoded) + assert_equal("text/html", email.parts[1].parts[1].mime_type) + assert_equal("HTML Explicit Multipart", email.parts[1].parts[1].body.encoded) end + # TODO Seems Mail is sorting the templates automatically, and not on demand + # test "explicit multipart with templates" do + # email = BaseMailer.deliver_explicit_multipart_templates + # assert_equal(2, email.parts.size) + # assert_equal("multipart/alternate", email.mime_type) + # assert_equal("text/html", email.parts[0].mime_type) + # assert_equal("HTML Explicit Multipart Templates", email.parts[0].body.encoded) + # assert_equal("text/plain", email.parts[1].mime_type) + # assert_equal("TEXT Explicit Multipart Templates", email.parts[1].body.encoded) + # end + + test "explicit multipart with any" do + email = BaseMailer.deliver_explicit_multipart_with_any + assert_equal(2, email.parts.size) + assert_equal("multipart/alternate", email.mime_type) + assert_equal("text/plain", email.parts[0].mime_type) + assert_equal("Format with any!", email.parts[0].body.encoded) + assert_equal("text/html", email.parts[1].mime_type) + assert_equal("Format with any!", email.parts[1].body.encoded) + end + + protected # Execute the block setting the given values and restoring old values after diff --git a/actionmailer/test/fixtures/base_mailer/explicit_multipart_templates.html.erb b/actionmailer/test/fixtures/base_mailer/explicit_multipart_templates.html.erb new file mode 100644 index 0000000000..c0a61b6249 --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/explicit_multipart_templates.html.erb @@ -0,0 +1 @@ +HTML Explicit Multipart Templates \ No newline at end of file diff --git a/actionmailer/test/fixtures/base_mailer/explicit_multipart_templates.text.erb b/actionmailer/test/fixtures/base_mailer/explicit_multipart_templates.text.erb new file mode 100644 index 0000000000..507230b1de --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/explicit_multipart_templates.text.erb @@ -0,0 +1 @@ +TEXT Explicit Multipart Templates \ No newline at end of file -- cgit v1.2.3 From 80130d1201c3bf9dc17b0e1fcd81c6b22e893b0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 23 Jan 2010 15:05:13 +0100 Subject: Extract routes reloading responsibilities from application and load them just upon a request. --- .../lib/action_dispatch/middleware/callbacks.rb | 2 +- actionpack/lib/action_dispatch/railtie.rb | 16 ++---- railties/lib/rails/application.rb | 67 +++++++--------------- railties/lib/rails/application/routes_reloader.rb | 46 +++++++++++++++ railties/lib/rails/configuration.rb | 5 +- railties/lib/rails/console_app.rb | 3 +- railties/lib/rails/engine.rb | 6 +- railties/lib/rails/plugin.rb | 3 +- 8 files changed, 77 insertions(+), 71 deletions(-) create mode 100644 railties/lib/rails/application/routes_reloader.rb diff --git a/actionpack/lib/action_dispatch/middleware/callbacks.rb b/actionpack/lib/action_dispatch/middleware/callbacks.rb index d07841218a..7cf75ffe63 100644 --- a/actionpack/lib/action_dispatch/middleware/callbacks.rb +++ b/actionpack/lib/action_dispatch/middleware/callbacks.rb @@ -37,7 +37,7 @@ module ActionDispatch def initialize(app, prepare_each_request = false) @app, @prepare_each_request = app, prepare_each_request - run_callbacks(:prepare) + run_callbacks(:prepare) unless @prepare_each_request end def call(env) diff --git a/actionpack/lib/action_dispatch/railtie.rb b/actionpack/lib/action_dispatch/railtie.rb index e4bd143e78..bd15ca9b3b 100644 --- a/actionpack/lib/action_dispatch/railtie.rb +++ b/actionpack/lib/action_dispatch/railtie.rb @@ -5,22 +5,14 @@ module ActionDispatch class Railtie < Rails::Railtie plugin_name :action_dispatch + # Initialize route files to an array + config.action_dispatch.route_files = [] + # Prepare dispatcher callbacks and run 'prepare' callbacks initializer "action_dispatch.prepare_dispatcher" do |app| # TODO: This used to say unless defined?(Dispatcher). Find out why and fix. require 'rails/dispatcher' - - unless app.config.cache_classes - # Setup dev mode route reloading - routes_last_modified = app.routes_changed_at - reload_routes = lambda do - unless app.routes_changed_at == routes_last_modified - routes_last_modified = app.routes_changed_at - app.reload_routes! - end - end - ActionDispatch::Callbacks.before { |callbacks| reload_routes.call } - end + ActionDispatch::Callbacks.to_prepare { app.routes_reloader.reload_if_changed } end end end \ No newline at end of file diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 305d1c73e0..46d6bb4e7c 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -2,25 +2,20 @@ require 'fileutils' module Rails class Application < Engine - # TODO Clear up 2 way delegation flow between App class and instance. - # Infact just add a method_missing on the class. - # - # TODO I'd like to track the "default app" different using an inherited hook. - # + autoload :RoutesReloader, 'rails/application/routes_reloader' + # TODO Check helpers works as expected - # # TODO Check routes namespaces class << self - alias :configure :class_eval - delegate :initialize!, :load_tasks, :load_generators, :root, :to => :instance - private :new + alias :configure :class_eval + def instance @instance ||= new end def config - @config ||= Configuration.new(original_root) + @config ||= Configuration.new(self.original_root) end def original_root @@ -30,52 +25,35 @@ module Rails def inherited(base) super Railtie.plugins.delete(base) + Rails.application = base.instance end - def routes - ActionController::Routing::Routes + protected + + def method_missing(*args, &block) + instance.send(*args, &block) end end - delegate :routes, :to => :'self.class' - attr_reader :route_configuration_files - def initialize require_environment - Rails.application ||= self - @route_configuration_files = [] end - def initialize! - run_initializers(self) - self + def routes + ActionController::Routing::Routes end - - def routes_changed_at - routes_changed_at = nil - - route_configuration_files.each do |config| - config_changed_at = File.stat(config).mtime - if routes_changed_at.nil? || config_changed_at > routes_changed_at - routes_changed_at = config_changed_at - end - end - - routes_changed_at + def routes_reloader + @routes_reloader ||= RoutesReloader.new(config) end def reload_routes! - routes = Rails::Application.routes - routes.disable_clear_and_finalize = true - - routes.clear! - route_configuration_files.each { |config| load(config) } - routes.finalize! + routes_reloader.reload! + end - nil - ensure - routes.disable_clear_and_finalize = false + def initialize! + run_initializers(self) + self end def require_environment @@ -109,10 +87,7 @@ module Rails end def app - @app ||= begin - reload_routes! - middleware.build(routes) - end + @app ||= middleware.build(routes) end def call(env) @@ -207,7 +182,7 @@ module Rails initializer :add_builtin_route do |app| if Rails.env.development? - app.route_configuration_files << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') + app.config.action_dispatch.route_files << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') end end diff --git a/railties/lib/rails/application/routes_reloader.rb b/railties/lib/rails/application/routes_reloader.rb new file mode 100644 index 0000000000..621bb1ccbd --- /dev/null +++ b/railties/lib/rails/application/routes_reloader.rb @@ -0,0 +1,46 @@ +module Rails + class Application + class RoutesReloader + attr_reader :config + + def initialize(config) + @config, @last_change_at = config, nil + end + + def changed_at + routes_changed_at = nil + + config.action_dispatch.route_files.each do |config| + config_changed_at = File.stat(config).mtime + + if routes_changed_at.nil? || config_changed_at > routes_changed_at + routes_changed_at = config_changed_at + end + end + + routes_changed_at + end + + def reload! + routes = Rails::Application.routes + routes.disable_clear_and_finalize = true + + routes.clear! + config.action_dispatch.route_files.each { |config| load(config) } + routes.finalize! + + nil + ensure + routes.disable_clear_and_finalize = false + end + + def reload_if_changed + current_change_at = changed_at + if @last_change_at != current_change_at + @last_change_at = current_change_at + reload! + end + end + end + end +end \ No newline at end of file diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index da2206d6a2..5d0c7fd4b4 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -213,10 +213,7 @@ module Rails self.preload_frameworks = true self.cache_classes = true self.dependency_loading = false - - if respond_to?(:action_controller) - action_controller.allow_concurrency = true - end + action_controller.allow_concurrency = true if respond_to?(:action_controller) self end diff --git a/railties/lib/rails/console_app.rb b/railties/lib/rails/console_app.rb index 2c4a7a51e8..98f7f774a9 100644 --- a/railties/lib/rails/console_app.rb +++ b/railties/lib/rails/console_app.rb @@ -26,7 +26,6 @@ end #reloads the environment def reload! puts "Reloading..." - ActionDispatch::Callbacks.new(lambda {}, true) - Rails.application.reload_routes! + ActionDispatch::Callbacks.new(lambda {}, true).call({}) true end diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 03c78b6d4b..aaa669ef32 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -1,8 +1,6 @@ require 'active_support/core_ext/module/delegation' module Rails - # TODO Move I18n here - # TODO Set routes namespaces class Engine < Railtie class << self attr_accessor :called_from @@ -75,9 +73,9 @@ module Rails config.load_once_paths.freeze end - initializer :add_routing_files do |app| + initializer :add_routing_files do config.paths.config.routes.to_a.each do |route| - app.route_configuration_files.unshift(route) if File.exists?(route) + config.action_dispatch.route_files.unshift(route) if File.exists?(route) end end diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb index dde06bfcbd..43632127fc 100644 --- a/railties/lib/rails/plugin.rb +++ b/railties/lib/rails/plugin.rb @@ -60,8 +60,7 @@ module Rails initializer :add_routing_file, :after => :initialize_routing do |app| routing_file = "#{path}/config/routes.rb" if File.exist?(routing_file) - app.route_configuration_files << routing_file - app.reload_routes! + app.config.action_dispatch.route_files.unshift(routing_file) end end end -- cgit v1.2.3 From 4f036032152518791d379f47260236f619713fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 23 Jan 2010 16:07:20 +0100 Subject: Break application.rb file in smaller chunks. --- railties/lib/rails/application.rb | 104 +--------------------------- railties/lib/rails/application/bootstrap.rb | 77 ++++++++++++++++++++ railties/lib/rails/application/finisher.rb | 31 +++++++++ 3 files changed, 110 insertions(+), 102 deletions(-) create mode 100644 railties/lib/rails/application/bootstrap.rb create mode 100644 railties/lib/rails/application/finisher.rb diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 46d6bb4e7c..81606d09e4 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -2,6 +2,8 @@ require 'fileutils' module Rails class Application < Engine + autoload :Bootstrap, 'rails/application/bootstrap' + autoload :Finisher, 'rails/application/finisher' autoload :RoutesReloader, 'rails/application/routes_reloader' # TODO Check helpers works as expected @@ -102,107 +104,5 @@ module Rails initializers += Finisher.initializers initializers end - - module Bootstrap - include Initializable - - initializer :load_all_active_support do |app| - require "active_support/all" unless app.config.active_support.bare - end - - # Preload all frameworks specified by the Configuration#frameworks. - # Used by Passenger to ensure everything's loaded before forking and - # to avoid autoload race conditions in JRuby. - initializer :preload_frameworks do |app| - require 'active_support/dependencies' - ActiveSupport::Autoload.eager_autoload! if app.config.preload_frameworks - end - - # Initialize the logger early in the stack in case we need to log some deprecation. - initializer :initialize_logger do |app| - Rails.logger ||= app.config.logger || begin - path = app.config.paths.log.to_a.first - logger = ActiveSupport::BufferedLogger.new(path) - logger.level = ActiveSupport::BufferedLogger.const_get(app.config.log_level.to_s.upcase) - logger.auto_flushing = false if Rails.env.production? - logger - rescue StandardError => e - logger = ActiveSupport::BufferedLogger.new(STDERR) - logger.level = ActiveSupport::BufferedLogger::WARN - logger.warn( - "Rails Error: Unable to access log file. Please ensure that #{path} exists and is chmod 0666. " + - "The log level has been raised to WARN and the output directed to STDERR until the problem is fixed." - ) - logger - end - end - - # Initialize cache early in the stack so railties can make use of it. - initializer :initialize_cache do |app| - unless defined?(RAILS_CACHE) - silence_warnings { Object.const_set "RAILS_CACHE", ActiveSupport::Cache.lookup_store(app.config.cache_store) } - - if RAILS_CACHE.respond_to?(:middleware) - app.config.middleware.insert_after(:"Rack::Lock", RAILS_CACHE.middleware) - end - end - end - - # Initialize rails subscriber on top of notifications. - initializer :initialize_subscriber do |app| - require 'active_support/notifications' - - if app.config.colorize_logging == false - Rails::Subscriber.colorize_logging = false - app.config.generators.colorize_logging = false - end - - ActiveSupport::Notifications.subscribe do |*args| - Rails::Subscriber.dispatch(args) - end - end - - initializer :set_clear_dependencies_hook do |app| - unless app.config.cache_classes - ActionDispatch::Callbacks.after do - ActiveSupport::Dependencies.clear - end - end - end - - # Sets the dependency loading mechanism. - # TODO: Remove files from the $" and always use require. - initializer :initialize_dependency_mechanism do |app| - ActiveSupport::Dependencies.mechanism = app.config.cache_classes ? :require : :load - end - end - - module Finisher - include Initializable - - initializer :add_builtin_route do |app| - if Rails.env.development? - app.config.action_dispatch.route_files << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') - end - end - - initializer :build_middleware_stack do |app| - app.app - end - - # Fires the user-supplied after_initialize block (config#after_initialize) - initializer :after_initialize do |app| - app.config.after_initialize_blocks.each do |block| - block.call(app) - end - end - - # Disable dependency loading during request cycle - initializer :disable_dependency_loading do |app| - if app.config.cache_classes && !app.config.dependency_loading - ActiveSupport::Dependencies.unhook! - end - end - end end end diff --git a/railties/lib/rails/application/bootstrap.rb b/railties/lib/rails/application/bootstrap.rb new file mode 100644 index 0000000000..819d00be4e --- /dev/null +++ b/railties/lib/rails/application/bootstrap.rb @@ -0,0 +1,77 @@ +module Rails + class Application + module Bootstrap + include Initializable + + initializer :load_all_active_support do |app| + require "active_support/all" unless app.config.active_support.bare + end + + # Preload all frameworks specified by the Configuration#frameworks. + # Used by Passenger to ensure everything's loaded before forking and + # to avoid autoload race conditions in JRuby. + initializer :preload_frameworks do |app| + require 'active_support/dependencies' + ActiveSupport::Autoload.eager_autoload! if app.config.preload_frameworks + end + + # Initialize the logger early in the stack in case we need to log some deprecation. + initializer :initialize_logger do |app| + Rails.logger ||= app.config.logger || begin + path = app.config.paths.log.to_a.first + logger = ActiveSupport::BufferedLogger.new(path) + logger.level = ActiveSupport::BufferedLogger.const_get(app.config.log_level.to_s.upcase) + logger.auto_flushing = false if Rails.env.production? + logger + rescue StandardError => e + logger = ActiveSupport::BufferedLogger.new(STDERR) + logger.level = ActiveSupport::BufferedLogger::WARN + logger.warn( + "Rails Error: Unable to access log file. Please ensure that #{path} exists and is chmod 0666. " + + "The log level has been raised to WARN and the output directed to STDERR until the problem is fixed." + ) + logger + end + end + + # Initialize cache early in the stack so railties can make use of it. + initializer :initialize_cache do |app| + unless defined?(RAILS_CACHE) + silence_warnings { Object.const_set "RAILS_CACHE", ActiveSupport::Cache.lookup_store(app.config.cache_store) } + + if RAILS_CACHE.respond_to?(:middleware) + app.config.middleware.insert_after(:"Rack::Lock", RAILS_CACHE.middleware) + end + end + end + + # Initialize rails subscriber on top of notifications. + initializer :initialize_subscriber do |app| + require 'active_support/notifications' + + if app.config.colorize_logging == false + Rails::Subscriber.colorize_logging = false + app.config.generators.colorize_logging = false + end + + ActiveSupport::Notifications.subscribe do |*args| + Rails::Subscriber.dispatch(args) + end + end + + initializer :set_clear_dependencies_hook do |app| + unless app.config.cache_classes + ActionDispatch::Callbacks.after do + ActiveSupport::Dependencies.clear + end + end + end + + # Sets the dependency loading mechanism. + # TODO: Remove files from the $" and always use require. + initializer :initialize_dependency_mechanism do |app| + ActiveSupport::Dependencies.mechanism = app.config.cache_classes ? :require : :load + end + end + end +end \ No newline at end of file diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb new file mode 100644 index 0000000000..4e7fffd0b3 --- /dev/null +++ b/railties/lib/rails/application/finisher.rb @@ -0,0 +1,31 @@ +module Rails + class Application + module Finisher + include Initializable + + initializer :add_builtin_route do |app| + if Rails.env.development? + app.config.action_dispatch.route_files << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') + end + end + + initializer :build_middleware_stack do |app| + app.app + end + + # Fires the user-supplied after_initialize block (config#after_initialize) + initializer :after_initialize do |app| + app.config.after_initialize_blocks.each do |block| + block.call(app) + end + end + + # Disable dependency loading during request cycle + initializer :disable_dependency_loading do |app| + if app.config.cache_classes && !app.config.dependency_loading + ActiveSupport::Dependencies.unhook! + end + end + end + end +end \ No newline at end of file -- cgit v1.2.3 From 13d66cdf2544af0d465d596383743b16b5005996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 23 Jan 2010 16:59:32 +0100 Subject: Extract Railtie load from application. --- railties/lib/rails/application.rb | 59 ++++++++++++----------- railties/lib/rails/application/railties.rb | 31 ++++++++++++ railties/lib/rails/application/routes_reloader.rb | 14 ++++-- railties/lib/rails/configuration.rb | 2 + railties/lib/rails/engine.rb | 9 ++-- railties/lib/rails/railtie.rb | 14 +++--- 6 files changed, 83 insertions(+), 46 deletions(-) create mode 100644 railties/lib/rails/application/railties.rb diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 81606d09e4..8f562350b4 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -4,6 +4,7 @@ module Rails class Application < Engine autoload :Bootstrap, 'rails/application/bootstrap' autoload :Finisher, 'rails/application/finisher' + autoload :Railties, 'rails/application/railties' autoload :RoutesReloader, 'rails/application/routes_reloader' # TODO Check helpers works as expected @@ -25,9 +26,22 @@ module Rails end def inherited(base) + # TODO Add this check + # raise "You cannot have more than one Rails::Application" if Rails.application super - Railtie.plugins.delete(base) - Rails.application = base.instance + + # TODO Add a test which ensures me + # Railtie.plugins.delete(base) + Rails.application ||= base.instance + + base.rake_tasks do + require "rails/tasks" + paths.lib.tasks.to_a.sort.each { |r| load(rake) } + task :environment do + $rails_rake_task = true + initialize! + end + end end protected @@ -38,11 +52,16 @@ module Rails end def initialize - require_environment + environment = config.paths.config.environment.to_a.first + require environment if environment end def routes - ActionController::Routing::Routes + ::ActionController::Routing::Routes + end + + def railties + @railties ||= Railties.new(config) end def routes_reloader @@ -58,34 +77,16 @@ module Rails self end - def require_environment - environment = config.paths.config.environment.to_a.first - require environment if environment - end - def load_tasks - require "rails/tasks" - plugins.each { |p| p.load_tasks } - # Load all application tasks - # TODO: extract out the path to the rake tasks - Dir["#{root}/lib/tasks/**/*.rake"].sort.each { |ext| load ext } - task :environment do - $rails_rake_task = true - initialize! - end + super + railties.all { |r| r.load_tasks } + self end def load_generators - plugins.each { |p| p.load_generators } - end - - # TODO: Fix this method. It loads all railties independent if :all is given - # or not, otherwise frameworks are never loaded. - def plugins - @plugins ||= begin - plugin_names = (config.plugins || [:all]).map { |p| p.to_sym } - Railtie.plugins.map(&:new) + Plugin.all(plugin_names, config.paths.vendor.plugins) - end + super + railties.all { |r| r.load_generators } + self end def app @@ -100,7 +101,7 @@ module Rails def initializers initializers = Bootstrap.initializers initializers += super - plugins.each { |p| initializers += p.initializers } + railties.all { |r| initializers += r.initializers } initializers += Finisher.initializers initializers end diff --git a/railties/lib/rails/application/railties.rb b/railties/lib/rails/application/railties.rb new file mode 100644 index 0000000000..d167d9bf4f --- /dev/null +++ b/railties/lib/rails/application/railties.rb @@ -0,0 +1,31 @@ +module Rails + class Application + class Railties + # TODO Write tests + def initialize(config) + @config = config + end + + def all(&block) + @all ||= railties + engines + plugins + @all.each(&block) if block + @all + end + + def railties + @railties ||= ::Rails::Railtie.subclasses.map(&:new) + end + + def engines + @engines ||= ::Rails::Engine.subclasses.map(&:new) + end + + def plugins + @plugins ||= begin + plugin_names = (@config.plugins || [:all]).map { |p| p.to_sym } + Plugin.all(plugin_names, @config.paths.vendor.plugins) + end + end + end + end +end \ No newline at end of file diff --git a/railties/lib/rails/application/routes_reloader.rb b/railties/lib/rails/application/routes_reloader.rb index 621bb1ccbd..6d61de2320 100644 --- a/railties/lib/rails/application/routes_reloader.rb +++ b/railties/lib/rails/application/routes_reloader.rb @@ -1,8 +1,8 @@ module Rails class Application class RoutesReloader - attr_reader :config - + # TODO Change config.action_dispatch.route_files to config.action_dispatch.routes_path + # TODO Write tests def initialize(config) @config, @last_change_at = config, nil end @@ -10,8 +10,8 @@ module Rails def changed_at routes_changed_at = nil - config.action_dispatch.route_files.each do |config| - config_changed_at = File.stat(config).mtime + files.each do |file| + config_changed_at = File.stat(file).mtime if routes_changed_at.nil? || config_changed_at > routes_changed_at routes_changed_at = config_changed_at @@ -26,7 +26,7 @@ module Rails routes.disable_clear_and_finalize = true routes.clear! - config.action_dispatch.route_files.each { |config| load(config) } + files.each { |file| load(file) } routes.finalize! nil @@ -41,6 +41,10 @@ module Rails reload! end end + + def files + @config.action_dispatch.route_files + end end end end \ No newline at end of file diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index 5d0c7fd4b4..b8bed01cdc 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -115,6 +115,7 @@ module Rails /^(#{bits})(?:=)?$/ end + # TODO Fix me def config_keys Railtie.plugin_names.map { |n| n.to_s }.uniq end @@ -182,6 +183,7 @@ module Rails paths = super paths.app.controllers << builtin_controller if builtin_controller paths.config.database "config/database.yml" + paths.lib.tasks "lib/tasks", :glob => "**/*.rake" paths.log "log/#{Rails.env}.log" paths.tmp "tmp" paths.tmp.cache "tmp/cache" diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index aaa669ef32..cf6ca7c3f5 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -4,6 +4,7 @@ module Rails class Engine < Railtie class << self attr_accessor :called_from + delegate :middleware, :root, :paths, :to => :config def original_root @original_root ||= find_root_with_file_flag("lib") @@ -18,7 +19,6 @@ module Rails call_stack = caller.map { |p| p.split(':').first } File.dirname(call_stack.detect { |p| p !~ %r[railties/lib/rails|rack/lib/rack] }) end - super end @@ -33,17 +33,14 @@ module Rails end root = File.exist?("#{root_path}/#{flag}") ? root_path : default - raise "Could not find root path for #{self}" unless root RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? - Pathname.new(root).expand_path : - Pathname.new(root).realpath + Pathname.new(root).expand_path : Pathname.new(root).realpath end end - delegate :config, :to => :'self.class' - delegate :middleware, :root, :to => :config + delegate :middleware, :paths, :root, :config, :to => :'self.class' # Add configured load paths to ruby load paths and remove duplicates. initializer :set_load_path do diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb index 5b97fabe40..84f7a86946 100644 --- a/railties/lib/rails/railtie.rb +++ b/railties/lib/rails/railtie.rb @@ -5,26 +5,30 @@ module Rails ABSTRACT_RAILTIES = %w(Rails::Plugin Rails::Engine Rails::Application) class << self + attr_reader :subclasses + def abstract_railtie?(base) ABSTRACT_RAILTIES.include?(base.name) end def inherited(base) - @@plugins ||= [] - @@plugins << base unless abstract_railtie?(base) + @subclasses ||= [] + @subclasses << base unless abstract_railtie?(base) end - # This should be called railtie_name and engine_name + # TODO This should be called railtie_name and engine_name def plugin_name(plugin_name = nil) @plugin_name ||= name.demodulize.underscore @plugin_name = plugin_name if plugin_name @plugin_name end + # TODO Deprecate me def plugins - @@plugins + @subclasses end + # TODO Deprecate me def plugin_names plugins.map { |p| p.plugin_name } end @@ -59,12 +63,10 @@ module Rails end def load_tasks - return unless rake_tasks rake_tasks.each { |blk| blk.call } end def load_generators - return unless generators generators.each { |blk| blk.call } end end -- cgit v1.2.3 From 924fa084e81b8b2f5ae9eab93d6b711c2b6b89d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 23 Jan 2010 17:13:25 +0100 Subject: First steps into making Plugin < Engine. --- railties/lib/rails/application.rb | 5 +++++ railties/lib/rails/application/finisher.rb | 12 ++++++++++++ railties/lib/rails/engine.rb | 20 ++++++++++---------- railties/lib/rails/paths.rb | 3 ++- railties/test/paths_test.rb | 7 +++++++ 5 files changed, 36 insertions(+), 11 deletions(-) diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 8f562350b4..1286d437c7 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -51,6 +51,11 @@ module Rails end end + # Application is always reloadable when config.cache_classes is false. + def reloadable?(app) + true + end + def initialize environment = config.paths.config.environment.to_a.first require environment if environment diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index 4e7fffd0b3..2ac881ac11 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -3,6 +3,18 @@ module Rails module Finisher include Initializable + initializer :ensure_load_once_paths_as_subset do + extra = ActiveSupport::Dependencies.load_once_paths - + ActiveSupport::Dependencies.load_paths + + unless extra.empty? + abort <<-end_error + load_once_paths must be a subset of the load_paths. + Extra items in load_once_paths: #{extra * ','} + end_error + end + end + initializer :add_builtin_route do |app| if Rails.env.development? app.config.action_dispatch.route_files << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index cf6ca7c3f5..b11c1ac73e 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -42,6 +42,10 @@ module Rails delegate :middleware, :paths, :root, :config, :to => :'self.class' + def reloadable?(app) + app.config.reload_plugins + end + # Add configured load paths to ruby load paths and remove duplicates. initializer :set_load_path do config.load_paths.reverse_each do |path| @@ -52,21 +56,17 @@ module Rails # Set the paths from which Rails will automatically load source files, # and the load_once paths. - initializer :set_autoload_paths do + initializer :set_autoload_paths do |app| ActiveSupport::Dependencies.load_paths.concat(config.load_paths) - ActiveSupport::Dependencies.load_once_paths.concat(config.load_once_paths) - - extra = ActiveSupport::Dependencies.load_once_paths - - ActiveSupport::Dependencies.load_paths - unless extra.empty? - abort <<-end_error - load_once_paths must be a subset of the load_paths. - Extra items in load_once_paths: #{extra * ','} - end_error + if reloadable?(app) + ActiveSupport::Dependencies.load_once_paths.concat(config.load_once_paths) + else + ActiveSupport::Dependencies.load_once_paths.concat(config.load_paths) end # Freeze so future modifications will fail rather than do nothing mysteriously + config.load_paths.freeze config.load_once_paths.freeze end diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb index d81af3c709..069371aa9c 100644 --- a/railties/lib/rails/paths.rb +++ b/railties/lib/rails/paths.rb @@ -73,7 +73,7 @@ module Rails @load_once = @options[:load_once] @eager_load = @options[:eager_load] - @load_path = @options[:load_path] || @eager_load + @load_path = @options[:load_path] || @eager_load || @load_once @root.all_paths << self end @@ -98,6 +98,7 @@ module Rails def load_once! @load_once = true + @load_path = true end def load_once? diff --git a/railties/test/paths_test.rb b/railties/test/paths_test.rb index 001282bb0d..343926340a 100644 --- a/railties/test/paths_test.rb +++ b/railties/test/paths_test.rb @@ -222,4 +222,11 @@ class PathsTest < ActiveSupport::TestCase @root.app.eager_load! assert_equal ["/foo/bar/app"], @root.load_paths end + + test "adding a path to the load once paths also adds it to the load path" do + @root.app = "app" + @root.app.load_once! + assert_equal ["/foo/bar/app"], @root.load_paths + end + end -- cgit v1.2.3 From 2b75b94ac0c329de12a0a94ba77f8aad5574514f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 23 Jan 2010 17:51:48 +0100 Subject: Plugin is now an Engine. --- railties/lib/rails.rb | 2 +- railties/lib/rails/application.rb | 1 - railties/lib/rails/configuration.rb | 15 ++++--- railties/lib/rails/engine.rb | 11 +++++- railties/lib/rails/plugin.rb | 78 +++++++++++++------------------------ 5 files changed, 46 insertions(+), 61 deletions(-) diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index 29afb672b6..667587cdce 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -6,8 +6,8 @@ require 'active_support/core_ext/logger' require 'rails/initializable' require 'rails/railtie' -require 'rails/plugin' require 'rails/engine' +require 'rails/plugin' require 'rails/application' require 'rails/railties_path' require 'rails/version' diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 1286d437c7..6d1702bf93 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -36,7 +36,6 @@ module Rails base.rake_tasks do require "rails/tasks" - paths.lib.tasks.to_a.sort.each { |r| load(rake) } task :environment do $rails_rake_task = true initialize! diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index b8bed01cdc..900173abcc 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -125,19 +125,19 @@ module Rails attr_reader :root attr_writer :eager_load_paths, :load_once_paths, :load_paths - def initialize(root) + def initialize(root=nil) @root = root - super() end def paths @paths ||= begin paths = Rails::Application::Root.new(@root) - paths.app "app", :eager_load => true, :glob => "*" - paths.app.controllers "app/controllers", :eager_load => true - paths.app.metals "app/metal", :eager_load => true + paths.app "app", :eager_load => true, :glob => "*" + paths.app.controllers "app/controllers", :eager_load => true + paths.app.metals "app/metal", :eager_load => true paths.app.views "app/views" - paths.lib "lib", :load_path => true + paths.lib "lib", :load_path => true + paths.lib.tasks "lib/tasks", :glob => "**/*.rake" paths.config "config" paths.config.environment "config/environments", :glob => "#{Rails.env}.rb" paths.config.initializers "config/initializers", :glob => "**/*.rb" @@ -183,7 +183,6 @@ module Rails paths = super paths.app.controllers << builtin_controller if builtin_controller paths.config.database "config/database.yml" - paths.lib.tasks "lib/tasks", :glob => "**/*.rake" paths.log "log/#{Rails.env}.log" paths.tmp "tmp" paths.tmp.cache "tmp/cache" @@ -215,7 +214,7 @@ module Rails self.preload_frameworks = true self.cache_classes = true self.dependency_loading = false - action_controller.allow_concurrency = true if respond_to?(:action_controller) + self.action_controller.allow_concurrency = true if respond_to?(:action_controller) self end diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index b11c1ac73e..39afac0604 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -40,12 +40,21 @@ module Rails end end - delegate :middleware, :paths, :root, :config, :to => :'self.class' + delegate :middleware, :paths, :root, :to => :config + + def config + self.class.config + end def reloadable?(app) app.config.reload_plugins end + def load_tasks + super + config.paths.lib.tasks.to_a.sort.each { |ext| load(ext) } + end + # Add configured load paths to ruby load paths and remove duplicates. initializer :set_load_path do config.load_paths.reverse_each do |path| diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb index 43632127fc..b4fd503631 100644 --- a/railties/lib/rails/plugin.rb +++ b/railties/lib/rails/plugin.rb @@ -1,67 +1,45 @@ module Rails - class Plugin < Railtie - def self.all(list, paths) - plugins = [] - paths.each do |path| - Dir["#{path}/*"].each do |plugin_path| - plugin = new(plugin_path) - next unless list.include?(plugin.name) || list.include?(:all) - plugins << plugin - end + class Plugin < Engine + class << self + def inherited(base) + raise "You should not inherit from Rails::Plugin" end - plugins.sort_by do |p| - [list.index(p.name) || list.index(:all), p.name.to_s] + def config + raise "Plugins does not provide configuration at the class level" end - end - - attr_reader :name, :path - - def initialize(path) - @name = File.basename(path).to_sym - @path = path - end - - def load_paths - Dir["#{path}/{lib}", "#{path}/app/{models,controllers,helpers}"] - end - - def load_tasks - Dir["#{path}/{tasks,lib/tasks,rails/tasks}/**/*.rake"].sort.each { |ext| load ext } - end - - initializer :add_to_load_path, :after => :set_autoload_paths do |app| - load_paths.each do |path| - $LOAD_PATH << path - require "active_support/dependencies" - ActiveSupport::Dependencies.load_paths << path + def all(list, paths) + plugins = [] + paths.each do |path| + Dir["#{path}/*"].each do |plugin_path| + plugin = new(plugin_path) + next unless list.include?(plugin.name) || list.include?(:all) + plugins << plugin + end + end - unless app.config.reload_plugins - ActiveSupport::Dependencies.load_once_paths << path + plugins.sort_by do |p| + [list.index(p.name) || list.index(:all), p.name.to_s] end end end - initializer :load_init_rb, :before => :load_application_initializers do |app| - file = "#{@path}/init.rb" - config = app.config - eval File.read(file), binding, file if File.file?(file) + attr_reader :name, :path + + def initialize(root) + @name = File.basename(root).to_sym + config.root = root end - initializer :add_view_paths, :after => :initialize_framework_views do - plugin_views = "#{path}/app/views" - if File.directory?(plugin_views) - ActionController::Base.view_paths.concat([plugin_views]) if defined? ActionController - ActionMailer::Base.view_paths.concat([plugin_views]) if defined? ActionMailer - end + def config + @config ||= Engine::Configuration.new end - initializer :add_routing_file, :after => :initialize_routing do |app| - routing_file = "#{path}/config/routes.rb" - if File.exist?(routing_file) - app.config.action_dispatch.route_files.unshift(routing_file) - end + initializer :load_init_rb do |app| + file = Dir["#{root}/{rails/init,init}.rb"].first + config = app.config + eval(File.read(file), binding, file) if file && File.file?(file) end end end -- cgit v1.2.3 From 788fce2550ed587d86d239d8fcd488f919d15b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 23 Jan 2010 18:41:53 +0100 Subject: Create configurable modules and ensure that they are added only on direct children. --- railties/lib/rails/application.rb | 58 +++++++++++++++--------------- railties/lib/rails/engine.rb | 38 ++++++++------------ railties/lib/rails/engine/configurable.rb | 24 +++++++++++++ railties/lib/rails/plugin.rb | 32 +++++++---------- railties/lib/rails/railtie.rb | 34 ++++++++++++------ railties/lib/rails/railtie/configurable.rb | 23 ++++++++++++ 6 files changed, 128 insertions(+), 81 deletions(-) create mode 100644 railties/lib/rails/engine/configurable.rb create mode 100644 railties/lib/rails/railtie/configurable.rb diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 6d1702bf93..676e395d39 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -9,6 +9,8 @@ module Rails # TODO Check helpers works as expected # TODO Check routes namespaces + # TODO raise "You cannot have more than one Rails::Application" if Rails.application + # TODO Ensure production settings are read properly class << self private :new alias :configure :class_eval @@ -17,30 +19,10 @@ module Rails @instance ||= new end - def config - @config ||= Configuration.new(self.original_root) - end - - def original_root - @original_root ||= find_root_with_file_flag("config.ru", Dir.pwd) - end - def inherited(base) - # TODO Add this check - # raise "You cannot have more than one Rails::Application" if Rails.application super - - # TODO Add a test which ensures me - # Railtie.plugins.delete(base) - Rails.application ||= base.instance - - base.rake_tasks do - require "rails/tasks" - task :environment do - $rails_rake_task = true - initialize! - end - end + Rails.application = base.instance + base.require_environment! end protected @@ -50,16 +32,15 @@ module Rails end end - # Application is always reloadable when config.cache_classes is false. - def reloadable?(app) - true - end - - def initialize + def require_environment! environment = config.paths.config.environment.to_a.first require environment if environment end + def config + @config ||= ::Rails::Configuration.new(self.class.find_root_with_flag("config.ru", Dir.pwd)) + end + def routes ::ActionController::Routing::Routes end @@ -82,12 +63,14 @@ module Rails end def load_tasks + initialize_tasks super railties.all { |r| r.load_tasks } self end def load_generators + initialize_generators super railties.all { |r| r.load_generators } self @@ -109,5 +92,24 @@ module Rails initializers += Finisher.initializers initializers end + + protected + + def initialize_tasks + require "rails/tasks" + task :environment do + $rails_rake_task = true + initialize! + end + end + + def initialize_generators + require "rails/generators" + end + + # Application is always reloadable when config.cache_classes is false. + def reloadable?(app) + true + end end end diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 39afac0604..b373b931f9 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -2,29 +2,23 @@ require 'active_support/core_ext/module/delegation' module Rails class Engine < Railtie + autoload :Configurable, "rails/engine/configurable" + class << self attr_accessor :called_from - delegate :middleware, :root, :paths, :to => :config - - def original_root - @original_root ||= find_root_with_file_flag("lib") - end - - def config - @config ||= Configuration.new(original_root) - end def inherited(base) - base.called_from = begin - call_stack = caller.map { |p| p.split(':').first } - File.dirname(call_stack.detect { |p| p !~ %r[railties/lib/rails|rack/lib/rack] }) + unless abstract_railtie?(base) + base.called_from = begin + call_stack = caller.map { |p| p.split(':').first } + File.dirname(call_stack.detect { |p| p !~ %r[railties/lib/rails|rack/lib/rack] }) + end end + super end - protected - - def find_root_with_file_flag(flag, default=nil) + def find_root_with_flag(flag, default=nil) root_path = self.called_from while root_path && File.directory?(root_path) && !File.exist?("#{root_path}/#{flag}") @@ -42,14 +36,6 @@ module Rails delegate :middleware, :paths, :root, :to => :config - def config - self.class.config - end - - def reloadable?(app) - app.config.reload_plugins - end - def load_tasks super config.paths.lib.tasks.to_a.sort.each { |ext| load(ext) } @@ -113,5 +99,11 @@ module Rails end end end + + protected + + def reloadable?(app) + app.config.reload_plugins + end end end \ No newline at end of file diff --git a/railties/lib/rails/engine/configurable.rb b/railties/lib/rails/engine/configurable.rb new file mode 100644 index 0000000000..fb420e8a12 --- /dev/null +++ b/railties/lib/rails/engine/configurable.rb @@ -0,0 +1,24 @@ +module Rails + class Engine + module Configurable + def self.included(base) + base.extend ClassMethods + base.delegate :middleware, :root, :paths, :to => :config + end + + module ClassMethods + def config + @config ||= Configuration.new(find_root_with_flag("lib")) + end + + def inherited(base) + raise "You cannot inherit from a Rails::Engine child" + end + end + + def config + self.class.config + end + end + end +end \ No newline at end of file diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb index b4fd503631..cb3fdc8501 100644 --- a/railties/lib/rails/plugin.rb +++ b/railties/lib/rails/plugin.rb @@ -1,27 +1,21 @@ module Rails class Plugin < Engine - class << self - def inherited(base) - raise "You should not inherit from Rails::Plugin" - end - - def config - raise "Plugins does not provide configuration at the class level" - end + def self.inherited(base) + raise "You cannot inherit from Rails::Plugin" + end - def all(list, paths) - plugins = [] - paths.each do |path| - Dir["#{path}/*"].each do |plugin_path| - plugin = new(plugin_path) - next unless list.include?(plugin.name) || list.include?(:all) - plugins << plugin - end + def self.all(list, paths) + plugins = [] + paths.each do |path| + Dir["#{path}/*"].each do |plugin_path| + plugin = new(plugin_path) + next unless list.include?(plugin.name) || list.include?(:all) + plugins << plugin end + end - plugins.sort_by do |p| - [list.index(p.name) || list.index(:all), p.name.to_s] - end + plugins.sort_by do |p| + [list.index(p.name) || list.index(:all), p.name.to_s] end end diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb index 84f7a86946..208b017348 100644 --- a/railties/lib/rails/railtie.rb +++ b/railties/lib/rails/railtie.rb @@ -1,19 +1,21 @@ module Rails class Railtie + autoload :Configurable, "rails/railtie/configurable" + include Initializable ABSTRACT_RAILTIES = %w(Rails::Plugin Rails::Engine Rails::Application) class << self - attr_reader :subclasses - - def abstract_railtie?(base) - ABSTRACT_RAILTIES.include?(base.name) + def subclasses + @subclasses ||= [] end def inherited(base) - @subclasses ||= [] - @subclasses << base unless abstract_railtie?(base) + unless abstract_railtie?(base) + base.send(:include, self::Configurable) if add_configurable?(base) + subclasses << base + end end # TODO This should be called railtie_name and engine_name @@ -25,7 +27,7 @@ module Rails # TODO Deprecate me def plugins - @subclasses + subclasses end # TODO Deprecate me @@ -33,10 +35,6 @@ module Rails plugins.map { |p| p.plugin_name } end - def config - Configuration.default - end - def subscriber(subscriber) Rails::Subscriber.add(plugin_name, subscriber) end @@ -52,6 +50,20 @@ module Rails @generators << blk if blk @generators end + + protected + + def abstract_railtie?(base) + ABSTRACT_RAILTIES.include?(base.name) + end + + # Just add configurable behavior if a Configurable module is defined + # and the class is a direct child from self. This is required to avoid + # application or plugins getting class configuration method from Railties + # and/or Engines. + def add_configurable?(base) + defined?(self::Configurable) && base.ancestors[1] == self + end end def rake_tasks diff --git a/railties/lib/rails/railtie/configurable.rb b/railties/lib/rails/railtie/configurable.rb new file mode 100644 index 0000000000..3850efa4a7 --- /dev/null +++ b/railties/lib/rails/railtie/configurable.rb @@ -0,0 +1,23 @@ +module Rails + class Railtie + module Configurable + def self.included(base) + base.extend ClassMethods + end + + module ClassMethods + def config + @config ||= Configuration.new + end + + def inherited(base) + raise "You cannot inherit from a Rails::Railtie child" + end + end + + def config + self.class.config + end + end + end +end -- cgit v1.2.3 From b17e358e3df34c03019e357f693611618092e1d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 23 Jan 2010 22:30:17 +0100 Subject: Move configuration to subfolders. --- railties/lib/rails.rb | 8 - railties/lib/rails/application.rb | 7 +- railties/lib/rails/application/configuration.rb | 85 +++++++ railties/lib/rails/configuration.rb | 292 +++++++----------------- railties/lib/rails/engine.rb | 4 +- railties/lib/rails/engine/configurable.rb | 2 +- railties/lib/rails/engine/configuration.rb | 48 ++++ railties/lib/rails/paths.rb | 2 +- railties/lib/rails/plugin.rb | 4 + railties/lib/rails/railtie.rb | 6 +- railties/lib/rails/railtie/configurable.rb | 2 +- railties/lib/rails/railtie/configuration.rb | 9 + railties/test/initializer/path_test.rb | 6 +- railties/test/paths_test.rb | 12 +- 14 files changed, 252 insertions(+), 235 deletions(-) create mode 100644 railties/lib/rails/application/configuration.rb create mode 100644 railties/lib/rails/engine/configuration.rb create mode 100644 railties/lib/rails/railtie/configuration.rb diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index 667587cdce..623555e7c1 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -4,16 +4,8 @@ require 'active_support' require 'active_support/core_ext/kernel/reporting' require 'active_support/core_ext/logger' -require 'rails/initializable' -require 'rails/railtie' -require 'rails/engine' -require 'rails/plugin' require 'rails/application' -require 'rails/railties_path' require 'rails/version' -require 'rails/rack' -require 'rails/paths' -require 'rails/configuration' require 'rails/deprecation' require 'rails/subscriber' require 'rails/ruby_version_check' diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 676e395d39..504a241da8 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -1,8 +1,13 @@ require 'fileutils' +require 'rails/railties_path' +require 'rails/railtie' +require 'rails/engine' +require 'rails/plugin' module Rails class Application < Engine autoload :Bootstrap, 'rails/application/bootstrap' + autoload :Configuration, 'rails/application/configuration' autoload :Finisher, 'rails/application/finisher' autoload :Railties, 'rails/application/railties' autoload :RoutesReloader, 'rails/application/routes_reloader' @@ -38,7 +43,7 @@ module Rails end def config - @config ||= ::Rails::Configuration.new(self.class.find_root_with_flag("config.ru", Dir.pwd)) + @config ||= Application::Configuration.new(self.class.find_root_with_flag("config.ru", Dir.pwd)) end def routes diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb new file mode 100644 index 0000000000..aaf18b5f51 --- /dev/null +++ b/railties/lib/rails/application/configuration.rb @@ -0,0 +1,85 @@ +require 'rails/engine/configuration' + +module Rails + class Application + class Configuration < ::Rails::Engine::Configuration + include ::Rails::Configuration::Deprecated + + attr_accessor :cache_classes, :cache_store, :colorize_logging, + :consider_all_requests_local, :dependency_loading, + :filter_parameters, :log_level, :logger, :metals, + :plugins, :preload_frameworks, :reload_plugins, + :serve_static_assets, :time_zone, :whiny_nils + + def initialize(*) + super + @filter_parameters = [] + @dependency_loading = true + @serve_static_assets = true + end + + def paths + @paths ||= begin + paths = super + paths.app.controllers << builtin_controller if builtin_controller + paths.config.database "config/database.yml" + paths.log "log/#{Rails.env}.log" + paths.tmp "tmp" + paths.tmp.cache "tmp/cache" + paths.vendor "vendor", :load_path => true + paths.vendor.plugins "vendor/plugins" + + if File.exists?("#{root}/test/mocks/#{Rails.env}") + ActiveSupport::Deprecation.warn "\"RAILS_ROOT/test/mocks/#{Rails.env}\" won't be added " << + "automatically to load paths anymore in future releases" + paths.mocks_path "test/mocks", :load_path => true, :glob => Rails.env + end + + paths + end + end + + # Enable threaded mode. Allows concurrent requests to controller actions and + # multiple database connections. Also disables automatic dependency loading + # after boot, and disables reloading code on every request, as these are + # fundamentally incompatible with thread safety. + def threadsafe! + self.preload_frameworks = true + self.cache_classes = true + self.dependency_loading = false + self.action_controller.allow_concurrency = true if respond_to?(:action_controller) + self + end + + # Loads and returns the contents of the #database_configuration_file. The + # contents of the file are processed via ERB before being sent through + # YAML::load. + def database_configuration + require 'erb' + YAML::load(ERB.new(IO.read(paths.config.database.to_a.first)).result) + end + + def cache_store + @cache_store ||= begin + if File.exist?("#{root}/tmp/cache/") + [ :file_store, "#{root}/tmp/cache/" ] + else + :memory_store + end + end + end + + def builtin_controller + File.join(RAILTIES_PATH, "builtin", "rails_info") if Rails.env.development? + end + + def log_level + @log_level ||= Rails.env.production? ? :info : :debug + end + + def time_zone + @time_zone ||= "UTC" + end + end + end +end \ No newline at end of file diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index 900173abcc..e0bd12497f 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -1,9 +1,10 @@ require 'active_support/ordered_options' +require 'rails/paths' +require 'rails/rack' module Rails - module Shared - # Those configuration values are shared between railtie, engines and so forth. - module Configuration + module Configuration + module Shared def middleware @@default_middleware_stack ||= ActionDispatch::MiddlewareStack.new.tap do |middleware| middleware.use('::ActionDispatch::Static', lambda { Rails.public_path }, :if => lambda { Rails.application.config.serve_static_assets }) @@ -35,7 +36,7 @@ module Rails # config.generators.colorize_logging = false # def generators - @@generators ||= GeneratorsConfiguration.new + @@generators ||= Rails::Configuration::Generators.new if block_given? yield @@generators else @@ -51,14 +52,34 @@ module Rails after_initialize_blocks << blk if blk end - protected + def respond_to?(name) + super || name.to_s =~ config_key_regexp + end + + private + + def method_missing(name, *args, &blk) + if name.to_s =~ config_key_regexp + return $2 == '=' ? options[$1] = args.first : options[$1] + end + super + end + + def config_key_regexp + bits = config_keys.map { |n| Regexp.escape(n.to_s) }.join('|') + /^(#{bits})(?:=)?$/ + end + + def config_keys + (Railtie.plugin_names + Engine.plugin_names).map { |n| n.to_s }.uniq + end def options @@options ||= Hash.new { |h,k| h[k] = ActiveSupport::OrderedOptions.new } end end - class GeneratorsConfiguration #:nodoc: + class Generators #:nodoc: attr_accessor :aliases, :options, :colorize_logging def initialize @@ -86,227 +107,74 @@ module Rails end end end - end - # Holds Railtie basic configuration. It does not include configuration values - # related with load paths and the application specifics. - class Railtie::Configuration - include Shared::Configuration - - def self.default - @default ||= new - end - - def respond_to?(name) - super || name.to_s =~ config_key_regexp - end - - private - - def method_missing(name, *args, &blk) - if name.to_s =~ config_key_regexp - return $2 == '=' ? options[$1] = args.first : options[$1] + module Deprecated + def frameworks(*args) + raise "config.frameworks in no longer supported. See the generated " \ + "config/boot.rb for steps on how to limit the frameworks that " \ + "will be loaded" end - super - end - - def config_key_regexp - bits = config_keys.map { |n| Regexp.escape(n.to_s) }.join('|') - /^(#{bits})(?:=)?$/ - end + alias :frameworks= :frameworks - # TODO Fix me - def config_keys - Railtie.plugin_names.map { |n| n.to_s }.uniq - end - end - - class Engine::Configuration < Railtie::Configuration - attr_reader :root - attr_writer :eager_load_paths, :load_once_paths, :load_paths - - def initialize(root=nil) - @root = root - end - - def paths - @paths ||= begin - paths = Rails::Application::Root.new(@root) - paths.app "app", :eager_load => true, :glob => "*" - paths.app.controllers "app/controllers", :eager_load => true - paths.app.metals "app/metal", :eager_load => true - paths.app.views "app/views" - paths.lib "lib", :load_path => true - paths.lib.tasks "lib/tasks", :glob => "**/*.rake" - paths.config "config" - paths.config.environment "config/environments", :glob => "#{Rails.env}.rb" - paths.config.initializers "config/initializers", :glob => "**/*.rb" - paths.config.locales "config/locales", :glob => "*.{rb,yml}" - paths.config.routes "config/routes.rb" - paths + def view_path=(value) + ActiveSupport::Deprecation.warn "config.view_path= is deprecated, " << + "please do config.paths.app.views= instead", caller + paths.app.views = value end - end - - def root=(value) - @root = paths.path = Pathname.new(value).expand_path - end - - def eager_load_paths - @eager_load_paths ||= paths.eager_load - end - - def load_once_paths - @eager_load_paths ||= paths.load_once - end - - def load_paths - @load_paths ||= paths.load_paths - end - end - - class Configuration < Engine::Configuration - attr_accessor :cache_classes, :cache_store, :colorize_logging, - :consider_all_requests_local, :dependency_loading, - :filter_parameters, :log_level, :logger, :metals, - :plugins, :preload_frameworks, :reload_plugins, - :serve_static_assets, :time_zone, :whiny_nils - - def initialize(*) - super - @filter_parameters = [] - @dependency_loading = true - @serve_static_assets = true - end - def paths - @paths ||= begin - paths = super - paths.app.controllers << builtin_controller if builtin_controller - paths.config.database "config/database.yml" - paths.log "log/#{Rails.env}.log" - paths.tmp "tmp" - paths.tmp.cache "tmp/cache" - paths.vendor "vendor", :load_path => true - paths.vendor.plugins "vendor/plugins" - - if File.exists?("#{root}/test/mocks/#{Rails.env}") - ActiveSupport::Deprecation.warn "\"RAILS_ROOT/test/mocks/#{Rails.env}\" won't be added " << - "automatically to load paths anymore in future releases" - paths.mocks_path "test/mocks", :load_path => true, :glob => Rails.env - end - - paths + def view_path + ActiveSupport::Deprecation.warn "config.view_path is deprecated, " << + "please do config.paths.app.views instead", caller + paths.app.views.to_a.first end - end - - def frameworks(*args) - raise "config.frameworks in no longer supported. See the generated " \ - "config/boot.rb for steps on how to limit the frameworks that " \ - "will be loaded" - end - alias frameworks= frameworks - - # Enable threaded mode. Allows concurrent requests to controller actions and - # multiple database connections. Also disables automatic dependency loading - # after boot, and disables reloading code on every request, as these are - # fundamentally incompatible with thread safety. - def threadsafe! - self.preload_frameworks = true - self.cache_classes = true - self.dependency_loading = false - self.action_controller.allow_concurrency = true if respond_to?(:action_controller) - self - end - - # Loads and returns the contents of the #database_configuration_file. The - # contents of the file are processed via ERB before being sent through - # YAML::load. - def database_configuration - require 'erb' - YAML::load(ERB.new(IO.read(paths.config.database.to_a.first)).result) - end - def cache_store - @cache_store ||= begin - if File.exist?("#{root}/tmp/cache/") - [ :file_store, "#{root}/tmp/cache/" ] - else - :memory_store - end + def routes_configuration_file=(value) + ActiveSupport::Deprecation.warn "config.routes_configuration_file= is deprecated, " << + "please do config.paths.config.routes= instead", caller + paths.config.routes = value end - end - - def builtin_controller - File.join(RAILTIES_PATH, "builtin", "rails_info") if Rails.env.development? - end - - def log_level - @log_level ||= Rails.env.production? ? :info : :debug - end - - def time_zone - @time_zone ||= "UTC" - end - # Deprecated paths - def view_path=(value) - ActiveSupport::Deprecation.warn "config.view_path= is deprecated, " << - "please do config.paths.app.views= instead", caller - paths.app.views = value - end - - def view_path - ActiveSupport::Deprecation.warn "config.view_path is deprecated, " << - "please do config.paths.app.views instead", caller - paths.app.views.to_a.first - end - - def routes_configuration_file=(value) - ActiveSupport::Deprecation.warn "config.routes_configuration_file= is deprecated, " << - "please do config.paths.config.routes= instead", caller - paths.config.routes = value - end - - def routes_configuration_file - ActiveSupport::Deprecation.warn "config.routes_configuration_file is deprecated, " << - "please do config.paths.config.routes instead", caller - paths.config.routes.to_a.first - end + def routes_configuration_file + ActiveSupport::Deprecation.warn "config.routes_configuration_file is deprecated, " << + "please do config.paths.config.routes instead", caller + paths.config.routes.to_a.first + end - def database_configuration_file=(value) - ActiveSupport::Deprecation.warn "config.database_configuration_file= is deprecated, " << - "please do config.paths.config.database= instead", caller - paths.config.database = value - end + def database_configuration_file=(value) + ActiveSupport::Deprecation.warn "config.database_configuration_file= is deprecated, " << + "please do config.paths.config.database= instead", caller + paths.config.database = value + end - def database_configuration_file - ActiveSupport::Deprecation.warn "config.database_configuration_file is deprecated, " << - "please do config.paths.config.database instead", caller - paths.config.database.to_a.first - end + def database_configuration_file + ActiveSupport::Deprecation.warn "config.database_configuration_file is deprecated, " << + "please do config.paths.config.database instead", caller + paths.config.database.to_a.first + end - def log_path=(value) - ActiveSupport::Deprecation.warn "config.log_path= is deprecated, " << - "please do config.paths.log= instead", caller - paths.config.log = value - end + def log_path=(value) + ActiveSupport::Deprecation.warn "config.log_path= is deprecated, " << + "please do config.paths.log= instead", caller + paths.config.log = value + end - def log_path - ActiveSupport::Deprecation.warn "config.log_path is deprecated, " << - "please do config.paths.log instead", caller - paths.config.log.to_a.first - end + def log_path + ActiveSupport::Deprecation.warn "config.log_path is deprecated, " << + "please do config.paths.log instead", caller + paths.config.log.to_a.first + end - def controller_paths=(value) - ActiveSupport::Deprecation.warn "config.controller_paths= is deprecated, " << - "please do config.paths.app.controllers= instead", caller - paths.app.controllers = value - end + def controller_paths=(value) + ActiveSupport::Deprecation.warn "config.controller_paths= is deprecated, " << + "please do config.paths.app.controllers= instead", caller + paths.app.controllers = value + end - def controller_paths - ActiveSupport::Deprecation.warn "config.controller_paths is deprecated, " << - "please do config.paths.app.controllers instead", caller - paths.app.controllers.to_a.uniq + def controller_paths + ActiveSupport::Deprecation.warn "config.controller_paths is deprecated, " << + "please do config.paths.app.controllers instead", caller + paths.app.controllers.to_a.uniq + end end end end diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index b373b931f9..d972050dc9 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -1,8 +1,10 @@ require 'active_support/core_ext/module/delegation' +require 'rails/railtie' module Rails class Engine < Railtie - autoload :Configurable, "rails/engine/configurable" + autoload :Configurable, "rails/engine/configurable" + autoload :Configuration, "rails/engine/configuration" class << self attr_accessor :called_from diff --git a/railties/lib/rails/engine/configurable.rb b/railties/lib/rails/engine/configurable.rb index fb420e8a12..d4b7ecc532 100644 --- a/railties/lib/rails/engine/configurable.rb +++ b/railties/lib/rails/engine/configurable.rb @@ -8,7 +8,7 @@ module Rails module ClassMethods def config - @config ||= Configuration.new(find_root_with_flag("lib")) + @config ||= Engine::Configuration.new(find_root_with_flag("lib")) end def inherited(base) diff --git a/railties/lib/rails/engine/configuration.rb b/railties/lib/rails/engine/configuration.rb new file mode 100644 index 0000000000..e2fdf125d3 --- /dev/null +++ b/railties/lib/rails/engine/configuration.rb @@ -0,0 +1,48 @@ +require 'rails/railtie/configuration' + +module Rails + class Engine + class Configuration < ::Rails::Railtie::Configuration + attr_reader :root + attr_writer :eager_load_paths, :load_once_paths, :load_paths + + def initialize(root=nil) + @root = root + end + + def paths + @paths ||= begin + paths = Rails::Paths::Root.new(@root) + paths.app "app", :eager_load => true, :glob => "*" + paths.app.controllers "app/controllers", :eager_load => true + paths.app.metals "app/metal", :eager_load => true + paths.app.views "app/views" + paths.lib "lib", :load_path => true + paths.lib.tasks "lib/tasks", :glob => "**/*.rake" + paths.config "config" + paths.config.environment "config/environments", :glob => "#{Rails.env}.rb" + paths.config.initializers "config/initializers", :glob => "**/*.rb" + paths.config.locales "config/locales", :glob => "*.{rb,yml}" + paths.config.routes "config/routes.rb" + paths + end + end + + def root=(value) + @root = paths.path = Pathname.new(value).expand_path + end + + def eager_load_paths + @eager_load_paths ||= paths.eager_load + end + + def load_once_paths + @eager_load_paths ||= paths.load_once + end + + def load_paths + @load_paths ||= paths.load_paths + end + end + end +end \ No newline at end of file diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb index 069371aa9c..88c0c1c68c 100644 --- a/railties/lib/rails/paths.rb +++ b/railties/lib/rails/paths.rb @@ -1,7 +1,7 @@ require 'set' module Rails - class Application + module Paths module PathParent def method_missing(id, *args) name = id.to_s diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb index cb3fdc8501..394e634903 100644 --- a/railties/lib/rails/plugin.rb +++ b/railties/lib/rails/plugin.rb @@ -1,9 +1,13 @@ +require 'rails/engine' + module Rails class Plugin < Engine def self.inherited(base) raise "You cannot inherit from Rails::Plugin" end + # TODO Right now, if a plugin has an Engine or a Railtie inside it, + # the initializers for this plugin will be executed twice. def self.all(list, paths) plugins = [] paths.each do |path| diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb index 208b017348..6424be5a55 100644 --- a/railties/lib/rails/railtie.rb +++ b/railties/lib/rails/railtie.rb @@ -1,6 +1,10 @@ +require 'rails/initializable' +require 'rails/configuration' + module Rails class Railtie - autoload :Configurable, "rails/railtie/configurable" + autoload :Configurable, "rails/railtie/configurable" + autoload :Configuration, "rails/railtie/configuration" include Initializable diff --git a/railties/lib/rails/railtie/configurable.rb b/railties/lib/rails/railtie/configurable.rb index 3850efa4a7..a2eb938c5a 100644 --- a/railties/lib/rails/railtie/configurable.rb +++ b/railties/lib/rails/railtie/configurable.rb @@ -7,7 +7,7 @@ module Rails module ClassMethods def config - @config ||= Configuration.new + @config ||= Railtie::Configuration.new end def inherited(base) diff --git a/railties/lib/rails/railtie/configuration.rb b/railties/lib/rails/railtie/configuration.rb new file mode 100644 index 0000000000..bfb43f7041 --- /dev/null +++ b/railties/lib/rails/railtie/configuration.rb @@ -0,0 +1,9 @@ +require 'rails/configuration' + +module Rails + class Railtie + class Configuration + include Rails::Configuration::Shared + end + end +end \ No newline at end of file diff --git a/railties/test/initializer/path_test.rb b/railties/test/initializer/path_test.rb index 4f475fae11..54bdddbdf2 100644 --- a/railties/test/initializer/path_test.rb +++ b/railties/test/initializer/path_test.rb @@ -79,17 +79,17 @@ module InitializerTests test "controller paths include builtin in development mode" do Rails.env.replace "development" - assert Rails::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } + assert Rails::Application::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } end test "controller paths does not have builtin_directories in test mode" do Rails.env.replace "test" - assert !Rails::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } + assert !Rails::Application::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } end test "controller paths does not have builtin_directories in production mode" do Rails.env.replace "production" - assert !Rails::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } + assert !Rails::Application::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } end end diff --git a/railties/test/paths_test.rb b/railties/test/paths_test.rb index 343926340a..eafe7a64e1 100644 --- a/railties/test/paths_test.rb +++ b/railties/test/paths_test.rb @@ -3,22 +3,22 @@ require 'rails/paths' class PathsTest < ActiveSupport::TestCase def setup - @root = Rails::Application::Root.new("/foo/bar") + @root = Rails::Paths::Root.new("/foo/bar") end test "the paths object is initialized with the root path" do - root = Rails::Application::Root.new("/fiz/baz") + root = Rails::Paths::Root.new("/fiz/baz") assert_equal "/fiz/baz", root.path end test "the paths object can be initialized with nil" do assert_nothing_raised do - Rails::Application::Root.new(nil) + Rails::Paths::Root.new(nil) end end test "a paths object initialized with nil can be updated" do - root = Rails::Application::Root.new(nil) + root = Rails::Paths::Root.new(nil) root.app = "app" root.path = "/root" assert_equal ["/root/app"], root.app.to_a @@ -30,7 +30,7 @@ class PathsTest < ActiveSupport::TestCase end test "raises exception if root path never set" do - root = Rails::Application::Root.new(nil) + root = Rails::Paths::Root.new(nil) root.app = "app" assert_raises RuntimeError do root.app.to_a @@ -110,7 +110,7 @@ class PathsTest < ActiveSupport::TestCase end test "the root can only have one physical path" do - assert_raise(RuntimeError) { Rails::Application::Root.new(["/fiz", "/biz"]) } + assert_raise(RuntimeError) { Rails::Paths::Root.new(["/fiz", "/biz"]) } assert_raise(RuntimeError) { @root.push "/biz" } assert_raise(RuntimeError) { @root.unshift "/biz" } assert_raise(RuntimeError) { @root.concat ["/biz"]} -- cgit v1.2.3 From d3c40242a58a8863cd216f6639f93df5fdb0c075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 23 Jan 2010 23:02:43 +0100 Subject: Move console stuff to its own directory. --- railties/lib/rails/commands/console.rb | 8 ++++---- railties/lib/rails/console/app.rb | 31 ++++++++++++++++++++++++++++++ railties/lib/rails/console/helpers.rb | 5 +++++ railties/lib/rails/console/sandbox.rb | 6 ++++++ railties/lib/rails/console_app.rb | 31 ------------------------------ railties/lib/rails/console_sandbox.rb | 6 ------ railties/lib/rails/console_with_helpers.rb | 5 ----- railties/test/application/console_test.rb | 4 ++-- 8 files changed, 48 insertions(+), 48 deletions(-) create mode 100644 railties/lib/rails/console/app.rb create mode 100644 railties/lib/rails/console/helpers.rb create mode 100644 railties/lib/rails/console/sandbox.rb delete mode 100644 railties/lib/rails/console_app.rb delete mode 100644 railties/lib/rails/console_sandbox.rb delete mode 100644 railties/lib/rails/console_with_helpers.rb diff --git a/railties/lib/rails/commands/console.rb b/railties/lib/rails/commands/console.rb index 27ac7fd20a..a984eff6e2 100644 --- a/railties/lib/rails/commands/console.rb +++ b/railties/lib/rails/commands/console.rb @@ -1,6 +1,6 @@ require 'optparse' require 'irb' -require "irb/completion" +require 'irb/completion' module Rails class Console @@ -24,9 +24,9 @@ module Rails end @app.initialize! - require "rails/console_app" - require "rails/console_sandbox" if options[:sandbox] - require "rails/console_with_helpers" + require "rails/console/app" + require "rails/console/sandbox" if options[:sandbox] + require "rails/console/helpers" if options[:debugger] begin diff --git a/railties/lib/rails/console/app.rb b/railties/lib/rails/console/app.rb new file mode 100644 index 0000000000..98f7f774a9 --- /dev/null +++ b/railties/lib/rails/console/app.rb @@ -0,0 +1,31 @@ +require 'active_support/all' +require 'active_support/test_case' +require 'action_controller' + +# work around the at_exit hook in test/unit, which kills IRB +Test::Unit.run = true if Test::Unit.respond_to?(:run=) + +# reference the global "app" instance, created on demand. To recreate the +# instance, pass a non-false value as the parameter. +def app(create=false) + @app_integration_instance = nil if create + @app_integration_instance ||= new_session do |sess| + sess.host! "www.example.com" + end +end + +# create a new session. If a block is given, the new session will be yielded +# to the block before being returned. +def new_session + app = ActionController::Dispatcher.new + session = ActionController::Integration::Session.new(app) + yield session if block_given? + session +end + +#reloads the environment +def reload! + puts "Reloading..." + ActionDispatch::Callbacks.new(lambda {}, true).call({}) + true +end diff --git a/railties/lib/rails/console/helpers.rb b/railties/lib/rails/console/helpers.rb new file mode 100644 index 0000000000..039db667c4 --- /dev/null +++ b/railties/lib/rails/console/helpers.rb @@ -0,0 +1,5 @@ +def helper + @helper ||= ApplicationController.helpers +end + +@controller = ApplicationController.new diff --git a/railties/lib/rails/console/sandbox.rb b/railties/lib/rails/console/sandbox.rb new file mode 100644 index 0000000000..65a3d68619 --- /dev/null +++ b/railties/lib/rails/console/sandbox.rb @@ -0,0 +1,6 @@ +ActiveRecord::Base.connection.increment_open_transactions +ActiveRecord::Base.connection.begin_db_transaction +at_exit do + ActiveRecord::Base.connection.rollback_db_transaction + ActiveRecord::Base.connection.decrement_open_transactions +end diff --git a/railties/lib/rails/console_app.rb b/railties/lib/rails/console_app.rb deleted file mode 100644 index 98f7f774a9..0000000000 --- a/railties/lib/rails/console_app.rb +++ /dev/null @@ -1,31 +0,0 @@ -require 'active_support/all' -require 'active_support/test_case' -require 'action_controller' - -# work around the at_exit hook in test/unit, which kills IRB -Test::Unit.run = true if Test::Unit.respond_to?(:run=) - -# reference the global "app" instance, created on demand. To recreate the -# instance, pass a non-false value as the parameter. -def app(create=false) - @app_integration_instance = nil if create - @app_integration_instance ||= new_session do |sess| - sess.host! "www.example.com" - end -end - -# create a new session. If a block is given, the new session will be yielded -# to the block before being returned. -def new_session - app = ActionController::Dispatcher.new - session = ActionController::Integration::Session.new(app) - yield session if block_given? - session -end - -#reloads the environment -def reload! - puts "Reloading..." - ActionDispatch::Callbacks.new(lambda {}, true).call({}) - true -end diff --git a/railties/lib/rails/console_sandbox.rb b/railties/lib/rails/console_sandbox.rb deleted file mode 100644 index 65a3d68619..0000000000 --- a/railties/lib/rails/console_sandbox.rb +++ /dev/null @@ -1,6 +0,0 @@ -ActiveRecord::Base.connection.increment_open_transactions -ActiveRecord::Base.connection.begin_db_transaction -at_exit do - ActiveRecord::Base.connection.rollback_db_transaction - ActiveRecord::Base.connection.decrement_open_transactions -end diff --git a/railties/lib/rails/console_with_helpers.rb b/railties/lib/rails/console_with_helpers.rb deleted file mode 100644 index 039db667c4..0000000000 --- a/railties/lib/rails/console_with_helpers.rb +++ /dev/null @@ -1,5 +0,0 @@ -def helper - @helper ||= ApplicationController.helpers -end - -@controller = ApplicationController.new diff --git a/railties/test/application/console_test.rb b/railties/test/application/console_test.rb index e8a4a4e158..22ab60f4a0 100644 --- a/railties/test/application/console_test.rb +++ b/railties/test/application/console_test.rb @@ -9,8 +9,8 @@ class ConsoleTest < Test::Unit::TestCase # Load steps taken from rails/commands/console.rb require "#{rails_root}/config/environment" - require 'rails/console_app' - require 'rails/console_with_helpers' + require 'rails/console/app' + require 'rails/console/helpers' end def test_app_method_should_return_integration_session -- cgit v1.2.3 From e7e4ed48df3048f32d94e398e99d0048a66ba67e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sun, 24 Jan 2010 09:34:50 +1100 Subject: Set sort order for explicit parts from the collector's template sequence --- actionmailer/lib/action_mailer/base.rb | 12 ++++++++---- actionmailer/test/base_test.rb | 19 +++++++++---------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 4ab3761807..e95643ca44 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -415,7 +415,7 @@ module ActionMailer #:nodoc: # Should be removed when old API is deprecated @mail_was_called = true - m, sort_parts = @message, true + m = @message # Give preference to headers and fallback to the ones set in mail content_type = headers[:content_type] || m.content_type @@ -425,12 +425,16 @@ module ActionMailer #:nodoc: headers[:subject] ||= default_subject quote_fields(m, headers, charset) + sort_order = headers[:parts_order] || self.class.default_implicit_parts_order.dup + responses = if headers[:body] [ { :body => headers[:body], :content_type => self.class.default_content_type.dup } ] elsif block_given? - sort_parts = false collector = ActionMailer::Collector.new(self) { render(action_name) } yield(collector) + # Collect the sort order of the parts from the collector as Mail will always + # sort parts on encode into a "sane" sequence. + sort_order = collector.responses.map { |r| r[:content_type] } collector.responses else # TODO Ensure that we don't need to pass I18n.locale as detail @@ -447,8 +451,8 @@ module ActionMailer #:nodoc: m.charset = charset m.mime_version = mime_version - if sort_parts && m.parts.present? - m.body.set_sort_order(headers[:parts_order] || self.class.default_implicit_parts_order.dup) + if m.multipart? + m.body.set_sort_order(sort_order) m.body.sort_parts! end diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 83943162d2..ad0e1d9fe2 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -304,16 +304,15 @@ class BaseTest < ActiveSupport::TestCase assert_equal("HTML Explicit Multipart", email.parts[1].parts[1].body.encoded) end - # TODO Seems Mail is sorting the templates automatically, and not on demand - # test "explicit multipart with templates" do - # email = BaseMailer.deliver_explicit_multipart_templates - # assert_equal(2, email.parts.size) - # assert_equal("multipart/alternate", email.mime_type) - # assert_equal("text/html", email.parts[0].mime_type) - # assert_equal("HTML Explicit Multipart Templates", email.parts[0].body.encoded) - # assert_equal("text/plain", email.parts[1].mime_type) - # assert_equal("TEXT Explicit Multipart Templates", email.parts[1].body.encoded) - # end + test "explicit multipart with templates" do + email = BaseMailer.deliver_explicit_multipart_templates + assert_equal(2, email.parts.size) + assert_equal("multipart/alternate", email.mime_type) + assert_equal("text/html", email.parts[0].mime_type) + assert_equal("HTML Explicit Multipart Templates", email.parts[0].body.encoded) + assert_equal("text/plain", email.parts[1].mime_type) + assert_equal("TEXT Explicit Multipart Templates", email.parts[1].body.encoded) + end test "explicit multipart with any" do email = BaseMailer.deliver_explicit_multipart_with_any -- cgit v1.2.3 From 258ca148004eaa63740ab2186338b3ac872b8187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sun, 24 Jan 2010 11:15:42 +1100 Subject: Delegated ActionMailer::Base.deliveries to Mail.deliveries, added callback support in Mail to call ActionMailer on delivery, moved deliver to deprecated API in preparation for new API --- actionmailer/actionmailer.gemspec | 2 +- actionmailer/lib/action_mailer/base.rb | 56 ++++++++---------------- actionmailer/lib/action_mailer/deprecated_api.rb | 32 ++++++++++++++ actionmailer/lib/action_mailer/test_case.rb | 2 +- actionmailer/test/asset_host_test.rb | 2 +- actionmailer/test/base_test.rb | 9 ++++ actionmailer/test/mail_helper_test.rb | 2 +- actionmailer/test/mail_layout_test.rb | 2 +- actionmailer/test/mail_render_test.rb | 4 +- actionmailer/test/mail_service_test.rb | 6 +-- actionmailer/test/url_test.rb | 2 +- 11 files changed, 70 insertions(+), 49 deletions(-) diff --git a/actionmailer/actionmailer.gemspec b/actionmailer/actionmailer.gemspec index 576ca97334..4f53c709c4 100644 --- a/actionmailer/actionmailer.gemspec +++ b/actionmailer/actionmailer.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |s| s.homepage = "http://www.rubyonrails.org" s.add_dependency('actionpack', '= 3.0.pre') - s.add_dependency('mail', '~> 2.0.3') + s.add_dependency('mail', '~> 2.0.5') s.files = Dir['CHANGELOG', 'README', 'MIT-LICENSE', 'lib/**/*'] s.has_rdoc = true diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index e95643ca44..c1dc415728 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -275,8 +275,16 @@ module ActionMailer #:nodoc: @@perform_deliveries = true cattr_accessor :perform_deliveries - @@deliveries = [] - cattr_accessor :deliveries + # Provides a list of emails that have been delivered by Mail + def self.deliveries + Mail.deliveries + end + + # Allows you to over write the default deliveries store from an array to some + # other object. If you just want to clear the store, call Mail.deliveries.clear. + def self.deliveries=(val) + Mail.deliveries = val + end extlib_inheritable_accessor :default_charset self.default_charset = "utf-8" @@ -342,35 +350,6 @@ module ActionMailer #:nodoc: end end - # Deliver the given mail object directly. This can be used to deliver - # a preconstructed mail object, like: - # - # email = MyMailer.create_some_mail(parameters) - # email.set_some_obscure_header "frobnicate" - # MyMailer.deliver(email) - def deliver(mail) - raise "no mail object available for delivery!" unless mail - - ActiveSupport::Notifications.instrument("action_mailer.deliver", :mailer => self.name) do |payload| - self.set_payload_for_mail(payload, mail) - - mail.delivery_method delivery_methods[delivery_method], - delivery_settings[delivery_method] - - begin - # TODO Move me to the instance - if @@perform_deliveries - mail.deliver! - self.deliveries << mail - end - rescue Exception => e # Net::SMTP errors or sendmail pipe errors - raise e if raise_delivery_errors - end - end - - mail - end - def template_root self.view_paths && self.view_paths.first end @@ -380,6 +359,12 @@ module ActionMailer #:nodoc: self.view_paths = ActionView::Base.process_view_paths(root) end + def delivered_email(mail) + ActiveSupport::Notifications.instrument("action_mailer.deliver", :mailer => self.name) do |payload| + self.set_payload_for_mail(payload, mail) + end + end + def set_payload_for_mail(payload, mail) #:nodoc: payload[:message_id] = mail.message_id payload[:subject] = mail.subject @@ -402,13 +387,6 @@ module ActionMailer #:nodoc: process(method_name, *args) if method_name end - # Delivers a Mail object. By default, it delivers the cached mail - # object (from the create! method). If no cached mail object exists, and - # no alternate has been given as the parameter, this will fail. - def deliver!(mail = @message) - self.class.deliver(mail) - end - # TODO Add new delivery method goodness def mail(headers = {}) # Guard flag to prevent both the old and the new API from firing @@ -417,6 +395,8 @@ module ActionMailer #:nodoc: m = @message + m.register_for_delivery_notification(self.class) + # Give preference to headers and fallback to the ones set in mail content_type = headers[:content_type] || m.content_type charset = headers[:charset] || m.charset || self.class.default_charset.dup diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index b2bb6a64aa..a9ebd70f86 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -71,9 +71,34 @@ module ActionMailer # Alias controller_path to mailer_name so render :partial in views work. alias :controller_path :mailer_name + end module ClassMethods + + # Deliver the given mail object directly. This can be used to deliver + # a preconstructed mail object, like: + # + # email = MyMailer.create_some_mail(parameters) + # email.set_some_obscure_header "frobnicate" + # MyMailer.deliver(email) + def deliver(mail) + raise "no mail object available for delivery!" unless mail + + ActiveSupport::Notifications.instrument("action_mailer.deliver", :mailer => self.name) do |payload| + self.set_payload_for_mail(payload, mail) + + mail.delivery_method delivery_methods[delivery_method], + delivery_settings[delivery_method] + + mail.raise_delivery_errors = raise_delivery_errors + mail.perform_deliveries = perform_deliveries + mail.deliver + end + + mail + end + def respond_to?(method_symbol, include_private = false) #:nodoc: matches_dynamic_method?(method_symbol) || super end @@ -104,6 +129,13 @@ module ActionMailer @mail_was_called = false end + # Delivers a Mail object. By default, it delivers the cached mail + # object (from the create! method). If no cached mail object exists, and + # no alternate has been given as the parameter, this will fail. + def deliver!(mail = @message) + self.class.deliver(mail) + end + def render(*args) options = args.last.is_a?(Hash) ? args.last : {} if options[:body] diff --git a/actionmailer/lib/action_mailer/test_case.rb b/actionmailer/lib/action_mailer/test_case.rb index 0ca4f5494e..7c4033a125 100644 --- a/actionmailer/lib/action_mailer/test_case.rb +++ b/actionmailer/lib/action_mailer/test_case.rb @@ -37,7 +37,7 @@ module ActionMailer def initialize_test_deliveries ActionMailer::Base.delivery_method = :test ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries = [] + ActionMailer::Base.deliveries.clear end def set_expected_mail diff --git a/actionmailer/test/asset_host_test.rb b/actionmailer/test/asset_host_test.rb index f3383e5608..7ba78b6daa 100644 --- a/actionmailer/test/asset_host_test.rb +++ b/actionmailer/test/asset_host_test.rb @@ -12,7 +12,7 @@ class AssetHostTest < Test::Unit::TestCase def setup set_delivery_method :test ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries = [] + ActionMailer::Base.deliveries.clear @recipient = 'test@localhost' end diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index ad0e1d9fe2..43a9fb29bb 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -324,6 +324,15 @@ class BaseTest < ActiveSupport::TestCase assert_equal("Format with any!", email.parts[1].body.encoded) end + test "ActionMailer should be told when Mail gets delivered" do + BaseMailer.expects(:delivered_email).once + email = BaseMailer.deliver_welcome + end + + # test "ActionMailer should be told when Mail gets delivered using new API" do + # BaseMailer.expects(:delivered_email).once + # email = BaseMailer.welcome.deliver + # end protected diff --git a/actionmailer/test/mail_helper_test.rb b/actionmailer/test/mail_helper_test.rb index 2d3565d159..d81bc57ce0 100644 --- a/actionmailer/test/mail_helper_test.rb +++ b/actionmailer/test/mail_helper_test.rb @@ -63,7 +63,7 @@ class MailerHelperTest < Test::Unit::TestCase def setup set_delivery_method :test ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries = [] + ActionMailer::Base.deliveries.clear @recipient = 'test@localhost' end diff --git a/actionmailer/test/mail_layout_test.rb b/actionmailer/test/mail_layout_test.rb index b9ff075461..b4bd583616 100644 --- a/actionmailer/test/mail_layout_test.rb +++ b/actionmailer/test/mail_layout_test.rb @@ -55,7 +55,7 @@ class LayoutMailerTest < Test::Unit::TestCase def setup set_delivery_method :test ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries = [] + ActionMailer::Base.deliveries.clear @recipient = 'test@localhost' end diff --git a/actionmailer/test/mail_render_test.rb b/actionmailer/test/mail_render_test.rb index 09ce5e4854..3424823c99 100644 --- a/actionmailer/test/mail_render_test.rb +++ b/actionmailer/test/mail_render_test.rb @@ -86,7 +86,7 @@ class RenderHelperTest < Test::Unit::TestCase def setup set_delivery_method :test ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries = [] + ActionMailer::Base.deliveries.clear @recipient = 'test@localhost' end @@ -135,7 +135,7 @@ class FirstSecondHelperTest < Test::Unit::TestCase def setup set_delivery_method :test ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries = [] + ActionMailer::Base.deliveries.clear @recipient = 'test@localhost' end diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index 62422fb4b3..df5afda447 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -337,7 +337,7 @@ class ActionMailerTest < Test::Unit::TestCase set_delivery_method :test ActionMailer::Base.perform_deliveries = true ActionMailer::Base.raise_delivery_errors = true - ActionMailer::Base.deliveries = [] + ActionMailer::Base.deliveries.clear @original_logger = TestMailer.logger @recipient = 'test@localhost' @@ -658,7 +658,7 @@ class ActionMailerTest < Test::Unit::TestCase def test_doesnt_raise_errors_when_raise_delivery_errors_is_false ActionMailer::Base.raise_delivery_errors = false - Mail::Message.any_instance.expects(:deliver!).raises(Exception) + Mail::TestMailer.any_instance.expects(:deliver!).raises(Exception) assert_nothing_raised { TestMailer.deliver_signed_up(@recipient) } end @@ -1113,7 +1113,7 @@ class MethodNamingTest < Test::Unit::TestCase def setup set_delivery_method :test ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries = [] + ActionMailer::Base.deliveries.clear end def teardown diff --git a/actionmailer/test/url_test.rb b/actionmailer/test/url_test.rb index 12bf609dce..b7ae5304ed 100644 --- a/actionmailer/test/url_test.rb +++ b/actionmailer/test/url_test.rb @@ -44,7 +44,7 @@ class ActionMailerUrlTest < Test::Unit::TestCase def setup set_delivery_method :test ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries = [] + ActionMailer::Base.deliveries.clear @recipient = 'test@localhost' end -- cgit v1.2.3 From afc758297c553de467b0c434330cb703d62795f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sun, 24 Jan 2010 12:30:13 +1100 Subject: Moving AS::Notifications call to one location in base --- actionmailer/lib/action_mailer/deprecated_api.rb | 16 +++++++--------- actionmailer/test/base_test.rb | 7 ++----- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index a9ebd70f86..a2fa481d0e 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -83,19 +83,17 @@ module ActionMailer # email.set_some_obscure_header "frobnicate" # MyMailer.deliver(email) def deliver(mail) + return if @mail_was_called raise "no mail object available for delivery!" unless mail - ActiveSupport::Notifications.instrument("action_mailer.deliver", :mailer => self.name) do |payload| - self.set_payload_for_mail(payload, mail) + mail.register_for_delivery_notification(self) - mail.delivery_method delivery_methods[delivery_method], - delivery_settings[delivery_method] - - mail.raise_delivery_errors = raise_delivery_errors - mail.perform_deliveries = perform_deliveries - mail.deliver - end + mail.delivery_method delivery_methods[delivery_method], + delivery_settings[delivery_method] + mail.raise_delivery_errors = raise_delivery_errors + mail.perform_deliveries = perform_deliveries + mail.deliver mail end diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 43a9fb29bb..0b650e9a28 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -325,15 +325,12 @@ class BaseTest < ActiveSupport::TestCase end test "ActionMailer should be told when Mail gets delivered" do + BaseMailer.deliveries.clear BaseMailer.expects(:delivered_email).once email = BaseMailer.deliver_welcome + assert_equal(1, BaseMailer.deliveries.length) end - # test "ActionMailer should be told when Mail gets delivered using new API" do - # BaseMailer.expects(:delivered_email).once - # email = BaseMailer.welcome.deliver - # end - protected # Execute the block setting the given values and restoring old values after -- cgit v1.2.3 From 2fde9d774b322fc708990675671231c64c691a33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 24 Jan 2010 09:00:18 +0100 Subject: Solve some pendencies. --- actionpack/lib/action_dispatch/railtie.rb | 2 +- railties/lib/rails/application.rb | 5 ++--- railties/lib/rails/application/finisher.rb | 2 +- railties/lib/rails/application/railties.rb | 2 +- railties/lib/rails/application/routes_reloader.rb | 13 ++++++------- railties/lib/rails/engine.rb | 4 ++-- railties/lib/rails/paths.rb | 23 ++++++++++++++--------- railties/lib/rails/plugin.rb | 9 +++++++-- railties/test/paths_test.rb | 1 + railties/test/plugins/configuration_test.rb | 6 +++--- 10 files changed, 38 insertions(+), 29 deletions(-) diff --git a/actionpack/lib/action_dispatch/railtie.rb b/actionpack/lib/action_dispatch/railtie.rb index bd15ca9b3b..9cc47e53ed 100644 --- a/actionpack/lib/action_dispatch/railtie.rb +++ b/actionpack/lib/action_dispatch/railtie.rb @@ -6,7 +6,7 @@ module ActionDispatch plugin_name :action_dispatch # Initialize route files to an array - config.action_dispatch.route_files = [] + config.action_dispatch.route_paths = [] # Prepare dispatcher callbacks and run 'prepare' callbacks initializer "action_dispatch.prepare_dispatcher" do |app| diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 504a241da8..a8ff125342 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -1,8 +1,7 @@ require 'fileutils' require 'rails/railties_path' -require 'rails/railtie' -require 'rails/engine' require 'rails/plugin' +require 'rails/engine' module Rails class Application < Engine @@ -14,7 +13,6 @@ module Rails # TODO Check helpers works as expected # TODO Check routes namespaces - # TODO raise "You cannot have more than one Rails::Application" if Rails.application # TODO Ensure production settings are read properly class << self private :new @@ -25,6 +23,7 @@ module Rails end def inherited(base) + raise "You cannot have more than one Rails::Application" if Rails.application super Rails.application = base.instance base.require_environment! diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index 2ac881ac11..db19011b7f 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -17,7 +17,7 @@ module Rails initializer :add_builtin_route do |app| if Rails.env.development? - app.config.action_dispatch.route_files << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') + app.config.action_dispatch.route_paths << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') end end diff --git a/railties/lib/rails/application/railties.rb b/railties/lib/rails/application/railties.rb index d167d9bf4f..b3e6693f89 100644 --- a/railties/lib/rails/application/railties.rb +++ b/railties/lib/rails/application/railties.rb @@ -1,7 +1,7 @@ module Rails class Application class Railties - # TODO Write tests + # TODO Write tests for this behavior extracted from Application def initialize(config) @config = config end diff --git a/railties/lib/rails/application/routes_reloader.rb b/railties/lib/rails/application/routes_reloader.rb index 6d61de2320..d861d27465 100644 --- a/railties/lib/rails/application/routes_reloader.rb +++ b/railties/lib/rails/application/routes_reloader.rb @@ -1,8 +1,7 @@ module Rails class Application class RoutesReloader - # TODO Change config.action_dispatch.route_files to config.action_dispatch.routes_path - # TODO Write tests + # TODO Write tests for this behavior extracted from Application def initialize(config) @config, @last_change_at = config, nil end @@ -10,8 +9,8 @@ module Rails def changed_at routes_changed_at = nil - files.each do |file| - config_changed_at = File.stat(file).mtime + paths.each do |path| + config_changed_at = File.stat(path).mtime if routes_changed_at.nil? || config_changed_at > routes_changed_at routes_changed_at = config_changed_at @@ -26,7 +25,7 @@ module Rails routes.disable_clear_and_finalize = true routes.clear! - files.each { |file| load(file) } + paths.each { |path| load(path) } routes.finalize! nil @@ -42,8 +41,8 @@ module Rails end end - def files - @config.action_dispatch.route_files + def paths + @config.action_dispatch.route_paths end end end diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index d972050dc9..cc878ac8f2 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -67,9 +67,9 @@ module Rails config.load_once_paths.freeze end - initializer :add_routing_files do + initializer :add_routing_paths do config.paths.config.routes.to_a.each do |route| - config.action_dispatch.route_files.unshift(route) if File.exists?(route) + config.action_dispatch.route_paths.unshift(route) if File.exists?(route) end end diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb index 88c0c1c68c..55874813da 100644 --- a/railties/lib/rails/paths.rb +++ b/railties/lib/rails/paths.rb @@ -31,22 +31,21 @@ module Rails @all_paths = [] end - def load_once - all_paths.map { |path| path.paths if path.load_once? }.compact.flatten.uniq + def all_paths + @all_paths.uniq! + @all_paths end - def eager_load - all_paths.map { |path| path.paths if path.eager_load? }.compact.flatten.uniq + def load_once + filter { |path| path.paths if path.load_once? } end - # TODO Discover why do we need to call uniq! here - def all_paths - @all_paths.uniq! - @all_paths + def eager_load + filter { |path| path.paths if path.eager_load? } end def load_paths - all_paths.map { |path| path.paths if path.load_path? }.compact.flatten.uniq + filter { |path| path.paths if path.load_path? } end def push(*) @@ -56,6 +55,12 @@ module Rails alias unshift push alias << push alias concat push + + protected + + def filter(&block) + all_paths.map(&block).compact.flatten.uniq.select { |p| File.exists?(p) } + end end class Path diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb index 394e634903..62dc7f30f8 100644 --- a/railties/lib/rails/plugin.rb +++ b/railties/lib/rails/plugin.rb @@ -6,8 +6,6 @@ module Rails raise "You cannot inherit from Rails::Plugin" end - # TODO Right now, if a plugin has an Engine or a Railtie inside it, - # the initializers for this plugin will be executed twice. def self.all(list, paths) plugins = [] paths.each do |path| @@ -39,5 +37,12 @@ module Rails config = app.config eval(File.read(file), binding, file) if file && File.file?(file) end + + # TODO Write tests for this sanity check + initializer :sanity_check_railties_collision do + if Engine.subclasses.map { |k| k.root.to_s }.include?(root.to_s) + raise "The plugin #{name.inspect} is a Railtie or an Engine and cannot be installed as Plugin" + end + end end end diff --git a/railties/test/paths_test.rb b/railties/test/paths_test.rb index eafe7a64e1..92c7b2ba0e 100644 --- a/railties/test/paths_test.rb +++ b/railties/test/paths_test.rb @@ -3,6 +3,7 @@ require 'rails/paths' class PathsTest < ActiveSupport::TestCase def setup + File.stubs(:exists?).returns(true) @root = Rails::Paths::Root.new("/foo/bar") end diff --git a/railties/test/plugins/configuration_test.rb b/railties/test/plugins/configuration_test.rb index 09f8943af9..c59040c712 100644 --- a/railties/test/plugins/configuration_test.rb +++ b/railties/test/plugins/configuration_test.rb @@ -26,11 +26,11 @@ module PluginsTest test "plugin config merges are deep" do class Foo < Rails::Railtie ; config.foo.greetings = 'hello' ; end - class MyApp < Rails::Application + class Bar < Rails::Railtie config.foo.bar = "bar" end - assert_equal "hello", MyApp.config.foo.greetings - assert_equal "bar", MyApp.config.foo.bar + assert_equal "hello", Bar.config.foo.greetings + assert_equal "bar", Bar.config.foo.bar end test "plugin can add subscribers" do -- cgit v1.2.3 From 5b26fa48755c461619f7d48f4cd28faa9db442f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 24 Jan 2010 09:42:28 +0100 Subject: Make plugin generator compatible with new schema. --- railties/lib/generators/rails/plugin/plugin_generator.rb | 2 +- .../rails/plugin/templates/lib/tasks/%file_name%_tasks.rake.tt | 4 ++++ .../generators/rails/plugin/templates/tasks/%file_name%_tasks.rake.tt | 4 ---- railties/test/generators/plugin_generator_test.rb | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 railties/lib/generators/rails/plugin/templates/lib/tasks/%file_name%_tasks.rake.tt delete mode 100644 railties/lib/generators/rails/plugin/templates/tasks/%file_name%_tasks.rake.tt diff --git a/railties/lib/generators/rails/plugin/plugin_generator.rb b/railties/lib/generators/rails/plugin/plugin_generator.rb index b68b8691db..8f01dcd589 100644 --- a/railties/lib/generators/rails/plugin/plugin_generator.rb +++ b/railties/lib/generators/rails/plugin/plugin_generator.rb @@ -17,7 +17,7 @@ module Rails def create_tasks_files return unless options[:tasks] - directory 'tasks', plugin_dir('tasks') + directory 'lib/tasks', plugin_dir('lib/tasks') end hook_for :generator do |generator| diff --git a/railties/lib/generators/rails/plugin/templates/lib/tasks/%file_name%_tasks.rake.tt b/railties/lib/generators/rails/plugin/templates/lib/tasks/%file_name%_tasks.rake.tt new file mode 100644 index 0000000000..72920a9d3a --- /dev/null +++ b/railties/lib/generators/rails/plugin/templates/lib/tasks/%file_name%_tasks.rake.tt @@ -0,0 +1,4 @@ +# desc "Explaining what the task does" +# task :<%= file_name %> do +# # Task goes here +# end diff --git a/railties/lib/generators/rails/plugin/templates/tasks/%file_name%_tasks.rake.tt b/railties/lib/generators/rails/plugin/templates/tasks/%file_name%_tasks.rake.tt deleted file mode 100644 index 72920a9d3a..0000000000 --- a/railties/lib/generators/rails/plugin/templates/tasks/%file_name%_tasks.rake.tt +++ /dev/null @@ -1,4 +0,0 @@ -# desc "Explaining what the task does" -# task :<%= file_name %> do -# # Task goes here -# end diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index 0a79e2cfb8..065dbe1423 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -48,7 +48,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase def test_creates_tasks_if_required run_generator ["plugin_fu", "--tasks"] - assert_file "vendor/plugins/plugin_fu/tasks/plugin_fu_tasks.rake" + assert_file "vendor/plugins/plugin_fu/lib/tasks/plugin_fu_tasks.rake" end def test_creates_generator_if_required -- cgit v1.2.3 From 25724c664d8af6c50903709da69a5871475383fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 24 Jan 2010 09:47:55 +0100 Subject: Load deprecated tasks for plugins. --- railties/lib/rails/plugin.rb | 11 +++++++++++ railties/test/plugins/vendored_test.rb | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb index 62dc7f30f8..b47679d140 100644 --- a/railties/lib/rails/plugin.rb +++ b/railties/lib/rails/plugin.rb @@ -23,6 +23,17 @@ module Rails attr_reader :name, :path + def load_tasks + super + extra_tasks = Dir["#{root}/{tasks,rails/tasks}/**/*.rake"] + + unless extra_tasks.empty? + ActiveSupport::Deprecation.warn "Having rake tasks in PLUGIN_PATH/tasks or " << + "PLUGIN_PATH/rails/tasks is deprecated. Use to PLUGIN_PATH/lib/tasks instead" + extra_tasks.sort.each { |ext| load(ext) } + end + end + def initialize(root) @name = File.basename(root).to_sym config.root = root diff --git a/railties/test/plugins/vendored_test.rb b/railties/test/plugins/vendored_test.rb index b3b85891b2..eae73ee5d8 100644 --- a/railties/test/plugins/vendored_test.rb +++ b/railties/test/plugins/vendored_test.rb @@ -145,6 +145,40 @@ module PluginsTest response = Rails.application.call(Rack::MockRequest.env_for("/sprokkit")) assert_equal "I am a Sprokkit", response[2].join end + + test "tasks are loaded by default" do + $executed = false + @plugin.write "lib/tasks/foo.rake", <<-RUBY + task :foo do + $executed = true + end + RUBY + + boot_rails + require 'rake' + require 'rake/rdoctask' + require 'rake/testtask' + Rails.application.load_tasks + Rake::Task[:foo].invoke + assert $executed + end + + test "deprecated tasks are also loaded" do + $executed = false + @plugin.write "tasks/foo.rake", <<-RUBY + task :foo do + $executed = true + end + RUBY + + boot_rails + require 'rake' + require 'rake/rdoctask' + require 'rake/testtask' + Rails.application.load_tasks + Rake::Task[:foo].invoke + assert $executed + end end class VendoredOrderingTest < Test::Unit::TestCase -- cgit v1.2.3 From 5cd9aad4fdf55c591fe8e12657008e83315251d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 24 Jan 2010 10:27:42 +0100 Subject: Add I18n tests to engines. --- activesupport/lib/active_support/railtie.rb | 2 + railties/test/initializer/initialize_i18n_test.rb | 56 ----------------------- railties/test/plugins/vendored_test.rb | 38 +++++++++++++++ 3 files changed, 40 insertions(+), 56 deletions(-) delete mode 100644 railties/test/initializer/initialize_i18n_test.rb diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index d443e0e997..74cc72eff1 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -26,6 +26,8 @@ module I18n I18n.send("#{setting}=", value) end end + + I18n.reload! end end end diff --git a/railties/test/initializer/initialize_i18n_test.rb b/railties/test/initializer/initialize_i18n_test.rb deleted file mode 100644 index 64396bddb4..0000000000 --- a/railties/test/initializer/initialize_i18n_test.rb +++ /dev/null @@ -1,56 +0,0 @@ -require "isolation/abstract_unit" - -module InitializerTests - class InitializeI18nTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - build_app - boot_rails - end - - # test_config_defaults_and_settings_should_be_added_to_i18n_defaults - test "i18n config defaults and settings should be added to i18n defaults" do - add_to_config <<-RUBY - config.root = "#{app_path}" - config.i18n.load_path << "my/other/locale.yml" - RUBY - - require "#{app_path}/config/environment" - - #{RAILS_FRAMEWORK_ROOT}/railties/test/fixtures/plugins/engines/engine/config/locales/en.yml - assert_equal %W( - #{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/locale/en.yml - #{RAILS_FRAMEWORK_ROOT}/activemodel/lib/active_model/locale/en.yml - #{RAILS_FRAMEWORK_ROOT}/activerecord/lib/active_record/locale/en.yml - #{RAILS_FRAMEWORK_ROOT}/actionpack/lib/action_view/locale/en.yml - #{RAILS_FRAMEWORK_ROOT}/railties/tmp/app/config/locales/en.yml - my/other/locale.yml - ).map { |path| File.expand_path(path) }, I18n.load_path.map { |path| File.expand_path(path) } - end - - test "i18n finds locale files in engines" do - # app_file "vendor/plugins/engine/init.rb", "" - # app_file "vendor/plugins/engine/app/models/hellos.rb", "class Hello ; end" - # app_file "vendor/plugins/engine/lib/omg.rb", "puts 'omg'" - # app_file "vendor/plugins/engine/config/locales/en.yml", "hello:" - # - # Rails::Initializer.run do |c| - # c.root = app_path - # c.i18n.load_path << "my/other/locale.yml" - # end - # Rails.initialize! - # - # #{RAILS_FRAMEWORK_ROOT}/railties/test/fixtures/plugins/engines/engine/config/locales/en.yml - # assert_equal %W( - # #{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/locale/en.yml - # #{RAILS_FRAMEWORK_ROOT}/activemodel/lib/active_model/locale/en.yml - # #{RAILS_FRAMEWORK_ROOT}/activerecord/lib/active_record/locale/en.yml - # #{RAILS_FRAMEWORK_ROOT}/actionpack/lib/action_view/locale/en.yml - # #{app_path}/config/locales/en.yml - # my/other/locale.yml - # #{app_path}/vendor/plugins/engine/config/locales/en.yml - # ).map { |path| File.expand_path(path) }, I18n.load_path.map { |path| File.expand_path(path) } - end - end -end \ No newline at end of file diff --git a/railties/test/plugins/vendored_test.rb b/railties/test/plugins/vendored_test.rb index eae73ee5d8..6207cd13c1 100644 --- a/railties/test/plugins/vendored_test.rb +++ b/railties/test/plugins/vendored_test.rb @@ -179,6 +179,44 @@ module PluginsTest Rake::Task[:foo].invoke assert $executed end + + test "i18n files are added with lower priority than application ones" do + add_to_config <<-RUBY + config.i18n.load_path << "#{app_path}/app/locales/en.yml" + RUBY + + app_file 'app/locales/en.yml', <<-YAML +en: + bar: "1" +YAML + + app_file 'config/locales/en.yml', <<-YAML +en: + foo: "2" + bar: "2" +YAML + + @plugin.write 'config/locales/en.yml', <<-YAML +en: + foo: "3" +YAML + + boot_rails + require "#{app_path}/config/environment" + + assert_equal %W( + #{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/locale/en.yml + #{RAILS_FRAMEWORK_ROOT}/activemodel/lib/active_model/locale/en.yml + #{RAILS_FRAMEWORK_ROOT}/activerecord/lib/active_record/locale/en.yml + #{RAILS_FRAMEWORK_ROOT}/actionpack/lib/action_view/locale/en.yml + #{app_path}/vendor/plugins/bukkits/config/locales/en.yml + #{app_path}/config/locales/en.yml + #{app_path}/app/locales/en.yml + ).map { |path| File.expand_path(path) }, I18n.load_path.map { |path| File.expand_path(path) } + + assert_equal "2", I18n.t(:foo) + assert_equal "1", I18n.t(:bar) + end end class VendoredOrderingTest < Test::Unit::TestCase -- cgit v1.2.3 From 73a9000402b5766e660dbf3489f5289c21c3f472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sun, 24 Jan 2010 20:38:53 +1100 Subject: Adding failing tests for calling just the action, instead of :create_action_name and :deliver_action_name --- actionmailer/lib/action_mailer/base.rb | 4 +++- actionmailer/test/base_test.rb | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index c1dc415728..e7eb6bffcd 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -387,7 +387,8 @@ module ActionMailer #:nodoc: process(method_name, *args) if method_name end - # TODO Add new delivery method goodness + # TODO: Clean this up and refactor before Rails 3.0 release. + # This works for now, but not neat def mail(headers = {}) # Guard flag to prevent both the old and the new API from firing # Should be removed when old API is deprecated @@ -446,6 +447,7 @@ module ActionMailer #:nodoc: I18n.t(:subject, :scope => [:actionmailer, mailer_scope, action_name], :default => action_name.humanize) end + # TODO: Move this into Mail def quote_fields(m, headers, charset) #:nodoc: m.subject ||= quote_if_necessary(headers[:subject], charset) if headers[:subject] m.to ||= quote_address_if_necessary(headers[:to], charset) if headers[:to] diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 0b650e9a28..7f41f3485c 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -327,7 +327,21 @@ class BaseTest < ActiveSupport::TestCase test "ActionMailer should be told when Mail gets delivered" do BaseMailer.deliveries.clear BaseMailer.expects(:delivered_email).once - email = BaseMailer.deliver_welcome + BaseMailer.deliver_welcome + assert_equal(1, BaseMailer.deliveries.length) + end + + test "Calling just the action should return the generated mail object" do + BaseMailer.deliveries.clear + email = BaseMailer.welcome + assert_equal(0, BaseMailer.deliveries.length) + assert_equal('The first email on new API!', email.subject) + end + + test "Calling deliver on the action should deliver the mail object" do + BaseMailer.deliveries.clear + BaseMailer.expects(:delivered_email).once + BaseMailer.welcome.deliver assert_equal(1, BaseMailer.deliveries.length) end -- cgit v1.2.3 From e0bdc4f446686a498c3117e27ed8561f5c6d34f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 24 Jan 2010 11:06:06 +0100 Subject: Ensure namespaced controllers in engines work. --- .../lib/action_dispatch/routing/route_set.rb | 28 +++++-------------- railties/lib/rails/engine.rb | 10 +++++++ railties/lib/rails/tasks/routes.rake | 1 + railties/test/plugins/vendored_test.rb | 32 +++++++++++++++++++++- 4 files changed, 49 insertions(+), 22 deletions(-) diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 660d28dbec..c49ac70562 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -222,19 +222,18 @@ module ActionDispatch end end - attr_accessor :routes, :named_routes - attr_accessor :disable_clear_and_finalize + attr_accessor :routes, :named_routes, :controller_namespaces + attr_accessor :disable_clear_and_finalize, :resources_path_names def self.default_resources_path_names { :new => 'new', :edit => 'edit' } end - attr_accessor :resources_path_names - def initialize self.routes = [] self.named_routes = NamedRouteCollection.new - self.resources_path_names = self.class.default_resources_path_names + self.resources_path_names = self.class.default_resources_path_names.dup + self.controller_namespaces = Set.new @disable_clear_and_finalize = false end @@ -281,32 +280,19 @@ module ActionDispatch def controller_constraints @controller_constraints ||= begin - source = controller_namespaces.map { |ns| "#{Regexp.escape(ns)}/#{CONTROLLER_REGEXP.source}" } + namespaces = controller_namespaces + in_memory_controller_namespaces + source = namespaces.map { |ns| "#{Regexp.escape(ns)}/#{CONTROLLER_REGEXP.source}" } source << CONTROLLER_REGEXP.source Regexp.compile(source.sort.reverse.join('|')) end end - def controller_namespaces + def in_memory_controller_namespaces namespaces = Set.new - - # Find any nested controllers already in memory ActionController::Base.subclasses.each do |klass| controller_name = klass.underscore namespaces << controller_name.split('/')[0...-1].join('/') end - - # TODO: Move this into Railties - if defined?(Rails.application) - # Find namespaces in controllers/ directory - Rails.application.config.controller_paths.each do |load_path| - load_path = File.expand_path(load_path) - Dir["#{load_path}/**/*_controller.rb"].collect do |path| - namespaces << File.dirname(path).sub(/#{load_path}\/?/, '') - end - end - end - namespaces.delete('') namespaces end diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index cc878ac8f2..6f724963b2 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -73,6 +73,16 @@ module Rails end end + initializer :add_routing_namespaces do |app| + config.paths.app.controllers.to_a.each do |load_path| + load_path = File.expand_path(load_path) + Dir["#{load_path}/*/*_controller.rb"].collect do |path| + namespace = File.dirname(path).sub(/#{load_path}\/?/, '') + app.routes.controller_namespaces << namespace unless namespace.empty? + end + end + end + initializer :add_locales do config.i18n.load_path.unshift(*config.paths.config.locales.to_a) end diff --git a/railties/lib/rails/tasks/routes.rake b/railties/lib/rails/tasks/routes.rake index 2395d73b2f..e8da72db4d 100644 --- a/railties/lib/rails/tasks/routes.rake +++ b/railties/lib/rails/tasks/routes.rake @@ -1,5 +1,6 @@ desc 'Print out all defined routes in match order, with names. Target specific controller with CONTROLLER=x.' task :routes => :environment do + Rails::Application.reload_routes! all_routes = ENV['CONTROLLER'] ? ActionController::Routing::Routes.routes.select { |route| route.defaults[:controller] == ENV['CONTROLLER'] } : ActionController::Routing::Routes.routes routes = all_routes.collect do |route| name = ActionController::Routing::Routes.named_routes.routes.index(route).to_s diff --git a/railties/test/plugins/vendored_test.rb b/railties/test/plugins/vendored_test.rb index 6207cd13c1..1fc8766def 100644 --- a/railties/test/plugins/vendored_test.rb +++ b/railties/test/plugins/vendored_test.rb @@ -17,6 +17,10 @@ module PluginsTest require "#{app_path}/config/environment" end + def app + @app ||= Rails.application + end + test "it loads the plugin's init.rb file" do boot_rails assert_equal "loaded", BUKKITS @@ -202,7 +206,6 @@ en: YAML boot_rails - require "#{app_path}/config/environment" assert_equal %W( #{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/locale/en.yml @@ -217,6 +220,33 @@ YAML assert_equal "2", I18n.t(:foo) assert_equal "1", I18n.t(:bar) end + + test "namespaced controllers with namespaced routes" do + @plugin.write "config/routes.rb", <<-RUBY + ActionController::Routing::Routes.draw do + namespace :admin do + match "index", :to => "admin/foo#index" + end + end + RUBY + + @plugin.write "app/controllers/admin/foo_controller.rb", <<-RUBY + class Admin::FooController < ApplicationController + def index + render :text => "Rendered from namespace" + end + end + RUBY + + boot_rails + + require 'rack/test' + extend Rack::Test::Methods + + get "/admin/index" + assert_equal 200, last_response.status + assert_equal "Rendered from namespace", last_response.body + end end class VendoredOrderingTest < Test::Unit::TestCase -- cgit v1.2.3 From 37e4deb2606557e5340b48169ffc1435bb331439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 24 Jan 2010 12:04:37 +0100 Subject: Ensure helpers work from configured path. --- actionpack/lib/action_controller/base.rb | 2 +- actionpack/lib/action_controller/metal/helpers.rb | 18 ++++++++++-------- railties/lib/rails/application.rb | 2 -- railties/lib/rails/engine/configuration.rb | 1 + 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index f46231d72b..215b70734c 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -7,7 +7,6 @@ module ActionController include AbstractController::Translation include ActionController::Helpers - helper :all # By default, all helpers should be included include ActionController::HideActions include ActionController::UrlFor @@ -67,6 +66,7 @@ module ActionController def self.inherited(klass) ::ActionController::Base.subclasses << klass.to_s super + klass.helper :all end def self.subclasses diff --git a/actionpack/lib/action_controller/metal/helpers.rb b/actionpack/lib/action_controller/metal/helpers.rb index 24f8cb8a57..757ce3c319 100644 --- a/actionpack/lib/action_controller/metal/helpers.rb +++ b/actionpack/lib/action_controller/metal/helpers.rb @@ -50,11 +50,8 @@ module ActionController include AbstractController::Helpers included do - # Set the default directory for helpers - # TODO This should support multiple directories in order - # to work with engines - extlib_inheritable_accessor(:helpers_dir) do - defined?(Rails.root) ? "#{Rails.root}/app/helpers" : "app/helpers" + extlib_inheritable_accessor(:helpers_path) do + defined?(Rails::Application) ? Rails::Application.paths.app.helpers.to_a : [] end end @@ -107,10 +104,15 @@ module ActionController raise e unless e.missing_name? "#{module_name}Helper" end - # Extract helper names from files in app/helpers/**/*.rb + # Extract helper names from files in app/helpers/**/*_helper.rb def all_application_helpers - extract = /^#{Regexp.quote(helpers_dir)}\/?(.*)_helper.rb$/ - Dir["#{helpers_dir}/**/*_helper.rb"].map { |file| file.sub extract, '\1' } + helpers = [] + helpers_path.each do |path| + extract = /^#{Regexp.quote(path)}\/?(.*)_helper.rb$/ + helpers += Dir["#{path}/**/*_helper.rb"].map { |file| file.sub(extract, '\1') } + end + helpers.uniq! + helpers end end end diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index a8ff125342..90118c8cfc 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -11,8 +11,6 @@ module Rails autoload :Railties, 'rails/application/railties' autoload :RoutesReloader, 'rails/application/routes_reloader' - # TODO Check helpers works as expected - # TODO Check routes namespaces # TODO Ensure production settings are read properly class << self private :new diff --git a/railties/lib/rails/engine/configuration.rb b/railties/lib/rails/engine/configuration.rb index e2fdf125d3..93afdcf911 100644 --- a/railties/lib/rails/engine/configuration.rb +++ b/railties/lib/rails/engine/configuration.rb @@ -15,6 +15,7 @@ module Rails paths = Rails::Paths::Root.new(@root) paths.app "app", :eager_load => true, :glob => "*" paths.app.controllers "app/controllers", :eager_load => true + paths.app.helpers "app/helpers", :eager_load => true paths.app.metals "app/metal", :eager_load => true paths.app.views "app/views" paths.lib "lib", :load_path => true -- cgit v1.2.3 From b92608770e20618ab6a6c67099dd19ae4533689e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 24 Jan 2010 12:15:46 +0100 Subject: Ensure environment config has higher priority than application ones. --- railties/lib/rails/application.rb | 2 -- railties/lib/rails/application/bootstrap.rb | 4 ++++ railties/test/application/initializer_test.rb | 13 ++++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 90118c8cfc..e14719c758 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -11,7 +11,6 @@ module Rails autoload :Railties, 'rails/application/railties' autoload :RoutesReloader, 'rails/application/routes_reloader' - # TODO Ensure production settings are read properly class << self private :new alias :configure :class_eval @@ -24,7 +23,6 @@ module Rails raise "You cannot have more than one Rails::Application" if Rails.application super Rails.application = base.instance - base.require_environment! end protected diff --git a/railties/lib/rails/application/bootstrap.rb b/railties/lib/rails/application/bootstrap.rb index 819d00be4e..3c339ffc57 100644 --- a/railties/lib/rails/application/bootstrap.rb +++ b/railties/lib/rails/application/bootstrap.rb @@ -3,6 +3,10 @@ module Rails module Bootstrap include Initializable + initializer :load_environment_config do |app| + app.require_environment! + end + initializer :load_all_active_support do |app| require "active_support/all" unless app.config.active_support.bare end diff --git a/railties/test/application/initializer_test.rb b/railties/test/application/initializer_test.rb index 6686d82f19..053757979b 100644 --- a/railties/test/application/initializer_test.rb +++ b/railties/test/application/initializer_test.rb @@ -38,13 +38,24 @@ module ApplicationTests end test "load environment with global" do - app_file "config/environments/development.rb", "$initialize_test_set_from_env = 'success'" + app_file "config/environments/development.rb", <<-RUBY + $initialize_test_set_from_env = 'success' + AppTemplate::Application.configure do + config.cache_classes = true + config.time_zone = "Brasilia" + end + RUBY + assert_nil $initialize_test_set_from_env add_to_config <<-RUBY config.root = "#{app_path}" + config.time_zone = "UTC" RUBY + require "#{app_path}/config/environment" assert_equal "success", $initialize_test_set_from_env + assert AppTemplate::Application.config.cache_classes + assert_equal "Brasilia", AppTemplate::Application.config.time_zone end test "action_controller load paths set only if action controller in use" do -- cgit v1.2.3 From e548f96b1d5cb6529dd6fbc6544f03a3a840b48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 24 Jan 2010 12:23:21 +0100 Subject: Rename plugin_name to railtie_name and engine_name. --- actionmailer/lib/action_mailer/railtie.rb | 2 +- actionpack/lib/action_controller/railtie.rb | 2 +- actionpack/lib/action_dispatch/railtie.rb | 2 +- actionpack/lib/action_view/railtie.rb | 2 +- activerecord/lib/active_record/railtie.rb | 2 +- activeresource/lib/active_resource/railtie.rb | 2 +- activesupport/lib/active_support/railtie.rb | 4 ++-- railties/lib/rails/configuration.rb | 2 +- railties/lib/rails/engine.rb | 3 +++ railties/lib/rails/railtie.rb | 21 +++++++-------------- 10 files changed, 19 insertions(+), 23 deletions(-) diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb index ac6f514dfa..fbbcf98854 100644 --- a/actionmailer/lib/action_mailer/railtie.rb +++ b/actionmailer/lib/action_mailer/railtie.rb @@ -3,7 +3,7 @@ require "rails" module ActionMailer class Railtie < Rails::Railtie - plugin_name :action_mailer + railtie_name :action_mailer require "action_mailer/railties/subscriber" subscriber ActionMailer::Railties::Subscriber.new diff --git a/actionpack/lib/action_controller/railtie.rb b/actionpack/lib/action_controller/railtie.rb index 6b270d1136..f15c012471 100644 --- a/actionpack/lib/action_controller/railtie.rb +++ b/actionpack/lib/action_controller/railtie.rb @@ -3,7 +3,7 @@ require "rails" module ActionController class Railtie < Rails::Railtie - plugin_name :action_controller + railtie_name :action_controller require "action_controller/railties/subscriber" subscriber ActionController::Railties::Subscriber.new diff --git a/actionpack/lib/action_dispatch/railtie.rb b/actionpack/lib/action_dispatch/railtie.rb index 9cc47e53ed..979679712a 100644 --- a/actionpack/lib/action_dispatch/railtie.rb +++ b/actionpack/lib/action_dispatch/railtie.rb @@ -3,7 +3,7 @@ require "rails" module ActionDispatch class Railtie < Rails::Railtie - plugin_name :action_dispatch + railtie_name :action_dispatch # Initialize route files to an array config.action_dispatch.route_paths = [] diff --git a/actionpack/lib/action_view/railtie.rb b/actionpack/lib/action_view/railtie.rb index 968dc7b25e..d9e2557d89 100644 --- a/actionpack/lib/action_view/railtie.rb +++ b/actionpack/lib/action_view/railtie.rb @@ -3,7 +3,7 @@ require "rails" module ActionView class Railtie < Rails::Railtie - plugin_name :action_view + railtie_name :action_view require "action_view/railties/subscriber" subscriber ActionView::Railties::Subscriber.new diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index d5ec776b34..7b6d792931 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -8,7 +8,7 @@ require "rails" module ActiveRecord class Railtie < Rails::Railtie - plugin_name :active_record + railtie_name :active_record rake_tasks do load "active_record/railties/databases.rake" diff --git a/activeresource/lib/active_resource/railtie.rb b/activeresource/lib/active_resource/railtie.rb index 5c318f21e6..7e35fdc0eb 100644 --- a/activeresource/lib/active_resource/railtie.rb +++ b/activeresource/lib/active_resource/railtie.rb @@ -3,7 +3,7 @@ require "rails" module ActiveResource class Railtie < Rails::Railtie - plugin_name :active_resource + railtie_name :active_resource require "active_resource/railties/subscriber" subscriber ActiveResource::Railties::Subscriber.new diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index 74cc72eff1..55608ac1c5 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -3,7 +3,7 @@ require "rails" module I18n class Railtie < Rails::Railtie - plugin_name :i18n + railtie_name :i18n # Initialize I18n load paths to an array config.i18n.load_path = [] @@ -34,7 +34,7 @@ end module ActiveSupport class Railtie < Rails::Railtie - plugin_name :active_support + railtie_name :active_support # Loads support for "whiny nil" (noisy warnings when methods are invoked # on +nil+ values) if Configuration#whiny_nils is true. diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index e0bd12497f..c29cd0ef2c 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -71,7 +71,7 @@ module Rails end def config_keys - (Railtie.plugin_names + Engine.plugin_names).map { |n| n.to_s }.uniq + (Railtie.railtie_names + Engine.engine_names).map { |n| n.to_s }.uniq end def options diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 6f724963b2..842785875a 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -9,6 +9,9 @@ module Rails class << self attr_accessor :called_from + alias :engine_name :railtie_name + alias :engine_names :railtie_names + def inherited(base) unless abstract_railtie?(base) base.called_from = begin diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb index 6424be5a55..3cf358d75f 100644 --- a/railties/lib/rails/railtie.rb +++ b/railties/lib/rails/railtie.rb @@ -22,25 +22,18 @@ module Rails end end - # TODO This should be called railtie_name and engine_name - def plugin_name(plugin_name = nil) - @plugin_name ||= name.demodulize.underscore - @plugin_name = plugin_name if plugin_name - @plugin_name + def railtie_name(railtie_name = nil) + @railtie_name ||= name.demodulize.underscore + @railtie_name = railtie_name if railtie_name + @railtie_name end - # TODO Deprecate me - def plugins - subclasses - end - - # TODO Deprecate me - def plugin_names - plugins.map { |p| p.plugin_name } + def railtie_names + subclasses.map { |p| p.railtie_name } end def subscriber(subscriber) - Rails::Subscriber.add(plugin_name, subscriber) + Rails::Subscriber.add(railtie_name, subscriber) end def rake_tasks(&blk) -- cgit v1.2.3 From dd05b6c543f48050f494214da7803da6f5655292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 24 Jan 2010 12:49:12 +0100 Subject: Add tests for plugin sanity check. --- railties/lib/rails/engine/configurable.rb | 3 ++- railties/lib/rails/plugin.rb | 3 +-- railties/test/plugins/vendored_test.rb | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/railties/lib/rails/engine/configurable.rb b/railties/lib/rails/engine/configurable.rb index d4b7ecc532..9a370f0abb 100644 --- a/railties/lib/rails/engine/configurable.rb +++ b/railties/lib/rails/engine/configurable.rb @@ -3,10 +3,11 @@ module Rails module Configurable def self.included(base) base.extend ClassMethods - base.delegate :middleware, :root, :paths, :to => :config end module ClassMethods + delegate :middleware, :root, :paths, :to => :config + def config @config ||= Engine::Configuration.new(find_root_with_flag("lib")) end diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb index b47679d140..4c73809177 100644 --- a/railties/lib/rails/plugin.rb +++ b/railties/lib/rails/plugin.rb @@ -49,10 +49,9 @@ module Rails eval(File.read(file), binding, file) if file && File.file?(file) end - # TODO Write tests for this sanity check initializer :sanity_check_railties_collision do if Engine.subclasses.map { |k| k.root.to_s }.include?(root.to_s) - raise "The plugin #{name.inspect} is a Railtie or an Engine and cannot be installed as Plugin" + raise "\"#{name}\" is a Railtie/Engine and cannot be installed as plugin" end end end diff --git a/railties/test/plugins/vendored_test.rb b/railties/test/plugins/vendored_test.rb index 1fc8766def..86f3ecd1f7 100644 --- a/railties/test/plugins/vendored_test.rb +++ b/railties/test/plugins/vendored_test.rb @@ -247,6 +247,30 @@ YAML assert_equal 200, last_response.status assert_equal "Rendered from namespace", last_response.body end + + test "plugin cannot declare an engine for it" do + @plugin.write "lib/bukkits.rb", <<-RUBY + class Bukkits + class Engine < Rails::Engine + end + end + RUBY + + @plugin.write "init.rb", <<-RUBY + require "bukkits" + RUBY + + rescued = false + + begin + boot_rails + rescue Exception => e + rescued = true + assert_equal '"bukkits" is a Railtie/Engine and cannot be installed as plugin', e.message + end + + assert rescued, "Expected boot rails to fail" + end end class VendoredOrderingTest < Test::Unit::TestCase -- cgit v1.2.3 From 84ebfa4550b2325c6c89bc13aa6f904ff88d0db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 24 Jan 2010 14:48:00 +0100 Subject: Ensure metals and initializers in plugins are loaded. --- actionpack/lib/action_dispatch/railtie.rb | 3 --- .../lib/generators/rails/metal/templates/metal.rb | 2 +- railties/lib/rails/application/finisher.rb | 2 +- railties/lib/rails/application/routes_reloader.rb | 14 +++++------ railties/lib/rails/configuration.rb | 2 +- railties/lib/rails/engine.rb | 18 ++++++++------ railties/lib/rails/engine/configuration.rb | 2 +- railties/lib/rails/rack/metal.rb | 29 ++++++++++++++++------ railties/test/initializer/path_test.rb | 4 ++- railties/test/plugins/vendored_test.rb | 28 +++++++++++++++++++++ 10 files changed, 75 insertions(+), 29 deletions(-) diff --git a/actionpack/lib/action_dispatch/railtie.rb b/actionpack/lib/action_dispatch/railtie.rb index 979679712a..335daafc01 100644 --- a/actionpack/lib/action_dispatch/railtie.rb +++ b/actionpack/lib/action_dispatch/railtie.rb @@ -5,9 +5,6 @@ module ActionDispatch class Railtie < Rails::Railtie railtie_name :action_dispatch - # Initialize route files to an array - config.action_dispatch.route_paths = [] - # Prepare dispatcher callbacks and run 'prepare' callbacks initializer "action_dispatch.prepare_dispatcher" do |app| # TODO: This used to say unless defined?(Dispatcher). Find out why and fix. diff --git a/railties/lib/generators/rails/metal/templates/metal.rb b/railties/lib/generators/rails/metal/templates/metal.rb index 2f5d4e7593..8cc3f1f258 100644 --- a/railties/lib/generators/rails/metal/templates/metal.rb +++ b/railties/lib/generators/rails/metal/templates/metal.rb @@ -1,5 +1,5 @@ # Allow the metal piece to run in isolation -require File.expand_path('../../../config/environment', __FILE__) +require File.expand_path('../../../config/environment', __FILE__) unless defined?(Rails) class <%= class_name %> def self.call(env) diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index db19011b7f..6461b76d3d 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -17,7 +17,7 @@ module Rails initializer :add_builtin_route do |app| if Rails.env.development? - app.config.action_dispatch.route_paths << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') + RoutesReloader.paths << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') end end diff --git a/railties/lib/rails/application/routes_reloader.rb b/railties/lib/rails/application/routes_reloader.rb index d861d27465..fe0cfb7801 100644 --- a/railties/lib/rails/application/routes_reloader.rb +++ b/railties/lib/rails/application/routes_reloader.rb @@ -1,7 +1,11 @@ module Rails class Application + # TODO Write tests for this behavior extracted from Application class RoutesReloader - # TODO Write tests for this behavior extracted from Application + def self.paths + @paths ||= [] + end + def initialize(config) @config, @last_change_at = config, nil end @@ -9,7 +13,7 @@ module Rails def changed_at routes_changed_at = nil - paths.each do |path| + self.class.paths.each do |path| config_changed_at = File.stat(path).mtime if routes_changed_at.nil? || config_changed_at > routes_changed_at @@ -25,7 +29,7 @@ module Rails routes.disable_clear_and_finalize = true routes.clear! - paths.each { |path| load(path) } + self.class.paths.each { |path| load(path) } routes.finalize! nil @@ -40,10 +44,6 @@ module Rails reload! end end - - def paths - @config.action_dispatch.route_paths - end end end end \ No newline at end of file diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index c29cd0ef2c..3c5c1c1e16 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -16,7 +16,7 @@ module Rails middleware.use('::ActionDispatch::Cookies') middleware.use(lambda { ActionController::Base.session_store }, lambda { ActionController::Base.session_options }) middleware.use('::ActionDispatch::Flash', :if => lambda { ActionController::Base.session_store }) - middleware.use(lambda { Rails::Rack::Metal.new(Rails.application.config.paths.app.metals.to_a, Rails.application.config.metals) }) + middleware.use(lambda { Rails::Rack::Metal.new(Rails.application.config.metals) }) middleware.use('ActionDispatch::ParamsParser') middleware.use('::Rack::MethodOverride') middleware.use('::ActionDispatch::Head') diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 842785875a..e40052e0f1 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -71,13 +71,13 @@ module Rails end initializer :add_routing_paths do - config.paths.config.routes.to_a.each do |route| - config.action_dispatch.route_paths.unshift(route) if File.exists?(route) + paths.config.routes.to_a.each do |route| + Rails::Application::RoutesReloader.paths.unshift(route) if File.exists?(route) end end initializer :add_routing_namespaces do |app| - config.paths.app.controllers.to_a.each do |load_path| + paths.app.controllers.to_a.each do |load_path| load_path = File.expand_path(load_path) Dir["#{load_path}/*/*_controller.rb"].collect do |path| namespace = File.dirname(path).sub(/#{load_path}\/?/, '') @@ -87,17 +87,21 @@ module Rails end initializer :add_locales do - config.i18n.load_path.unshift(*config.paths.config.locales.to_a) + config.i18n.load_path.unshift(*paths.config.locales.to_a) end initializer :add_view_paths do - views = config.paths.app.views.to_a + views = paths.app.views.to_a ActionController::Base.view_paths.concat(views) if defined?(ActionController) ActionMailer::Base.view_paths.concat(views) if defined?(ActionMailer) end + initializer :add_metals do + Rails::Rack::Metal.paths.concat(paths.app.metals.to_a) + end + initializer :load_application_initializers do - config.paths.config.initializers.each do |initializer| + paths.config.initializers.to_a.sort.each do |initializer| load(initializer) end end @@ -107,7 +111,7 @@ module Rails if app.config.cache_classes config.eager_load_paths.each do |load_path| - matcher = /\A#{Regexp.escape(load_path)}(.*)\.rb\Z/ + matcher = /\A#{Regexp.escape(load_path)}\/(.*)\.rb\Z/ Dir.glob("#{load_path}/**/*.rb").sort.each do |file| require_dependency file.sub(matcher, '\1') end diff --git a/railties/lib/rails/engine/configuration.rb b/railties/lib/rails/engine/configuration.rb index 93afdcf911..a328e14170 100644 --- a/railties/lib/rails/engine/configuration.rb +++ b/railties/lib/rails/engine/configuration.rb @@ -16,7 +16,7 @@ module Rails paths.app "app", :eager_load => true, :glob => "*" paths.app.controllers "app/controllers", :eager_load => true paths.app.helpers "app/helpers", :eager_load => true - paths.app.metals "app/metal", :eager_load => true + paths.app.metals "app/metal" paths.app.views "app/views" paths.lib "lib", :load_path => true paths.lib.tasks "lib/tasks", :glob => "**/*.rake" diff --git a/railties/lib/rails/rack/metal.rb b/railties/lib/rails/rack/metal.rb index 565f95d7c4..732936da32 100644 --- a/railties/lib/rails/rack/metal.rb +++ b/railties/lib/rails/rack/metal.rb @@ -3,14 +3,29 @@ require 'action_dispatch' module Rails module Rack class Metal - def initialize(metal_roots, metals=nil) - load_list = metals || Dir["{#{metal_roots.join(",")}}/**/*.rb"] + def self.paths + @paths ||= [] + end + + def initialize(list=nil) + metals = [] + list = Array(list || :all).map(&:to_sym) + + self.class.paths.each do |path| + matcher = /\A#{Regexp.escape(path)}\/(.*)\.rb\Z/ + Dir.glob("#{path}/**/*.rb").sort.each do |metal_path| + metal = metal_path.sub(matcher, '\1').to_sym + next unless list.include?(metal) || list.include?(:all) + require_dependency metal + metals << metal + end + end + + metals = metals.sort_by do |m| + [list.index(m) || list.index(:all), m.to_s] + end - @metals = load_list.map { |metal| - metal = File.basename(metal, '.rb') - require_dependency metal - metal.camelize.constantize - }.compact + @metals = metals.map { |m| m.to_s.camelize.constantize } end def new(app) diff --git a/railties/test/initializer/path_test.rb b/railties/test/initializer/path_test.rb index 54bdddbdf2..7a40d7fa6e 100644 --- a/railties/test/initializer/path_test.rb +++ b/railties/test/initializer/path_test.rb @@ -38,6 +38,7 @@ module InitializerTests test "booting up Rails yields a valid paths object" do assert_path @paths.app.metals, "app", "metal" + assert_path @paths.app.helpers, "app", "helpers" assert_path @paths.app.views, "app", "views" assert_path @paths.lib, "lib" assert_path @paths.vendor, "vendor" @@ -56,7 +57,7 @@ module InitializerTests test "booting up Rails yields a list of paths that are eager" do assert @paths.app.eager_load? assert @paths.app.controllers.eager_load? - assert @paths.app.metals.eager_load? + assert @paths.app.helpers.eager_load? end test "environments has a glob equal to the current environment" do @@ -70,6 +71,7 @@ module InitializerTests assert_in_load_path "lib" assert_in_load_path "vendor" + assert_not_in_load_path "app", "metal" assert_not_in_load_path "config" assert_not_in_load_path "config", "locales" assert_not_in_load_path "config", "environments" diff --git a/railties/test/plugins/vendored_test.rb b/railties/test/plugins/vendored_test.rb index 86f3ecd1f7..05c01846e1 100644 --- a/railties/test/plugins/vendored_test.rb +++ b/railties/test/plugins/vendored_test.rb @@ -221,6 +221,24 @@ YAML assert_equal "1", I18n.t(:bar) end + test "plugin metals are added to the middleware stack" do + @plugin.write 'app/metal/foo_metal.rb', <<-RUBY + class FooMetal + def self.call(env) + [200, { "Content-Type" => "text/html"}, ["FooMetal"]] + end + end + RUBY + + boot_rails + require 'rack/test' + extend Rack::Test::Methods + + get "/" + assert_equal 200, last_response.status + assert_equal "FooMetal", last_response.body + end + test "namespaced controllers with namespaced routes" do @plugin.write "config/routes.rb", <<-RUBY ActionController::Routing::Routes.draw do @@ -248,6 +266,16 @@ YAML assert_equal "Rendered from namespace", last_response.body end + test "plugin with initializers" do + $plugin_initializer = false + @plugin.write "config/initializers/foo.rb", <<-RUBY + $plugin_initializer = true + RUBY + + boot_rails + assert $plugin_initializer + end + test "plugin cannot declare an engine for it" do @plugin.write "lib/bukkits.rb", <<-RUBY class Bukkits -- cgit v1.2.3 From 6545a68264682e8d0a0ee0e913fa98d92fef9428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 24 Jan 2010 15:08:06 +0100 Subject: Fix failing tests after merge. --- actionmailer/lib/action_mailer/mail_helper.rb | 2 +- actionpack/lib/action_controller/metal/helpers.rb | 1 + actionpack/test/abstract/helper_test.rb | 2 +- actionpack/test/controller/helper_test.rb | 4 ++-- actionpack/test/fixtures/helpers/fun/games_helper.rb | 6 ++++-- actionpack/test/fixtures/helpers/fun/pdf_helper.rb | 6 ++++-- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/actionmailer/lib/action_mailer/mail_helper.rb b/actionmailer/lib/action_mailer/mail_helper.rb index 701dc34431..df71330fd5 100644 --- a/actionmailer/lib/action_mailer/mail_helper.rb +++ b/actionmailer/lib/action_mailer/mail_helper.rb @@ -18,7 +18,7 @@ module ActionMailer # Access the mailer instance. def mailer #:nodoc: - @controller + @_controller end end end diff --git a/actionpack/lib/action_controller/metal/helpers.rb b/actionpack/lib/action_controller/metal/helpers.rb index 757ce3c319..0e3db86861 100644 --- a/actionpack/lib/action_controller/metal/helpers.rb +++ b/actionpack/lib/action_controller/metal/helpers.rb @@ -111,6 +111,7 @@ module ActionController extract = /^#{Regexp.quote(path)}\/?(.*)_helper.rb$/ helpers += Dir["#{path}/**/*_helper.rb"].map { |file| file.sub(extract, '\1') } end + helpers.sort! helpers.uniq! helpers end diff --git a/actionpack/test/abstract/helper_test.rb b/actionpack/test/abstract/helper_test.rb index ade29140ba..0cdf5c2298 100644 --- a/actionpack/test/abstract/helper_test.rb +++ b/actionpack/test/abstract/helper_test.rb @@ -1,6 +1,6 @@ require 'abstract_unit' -ActionController::Base.helpers_dir = File.dirname(__FILE__) + '/../fixtures/helpers' +ActionController::Base.helpers_path = [File.dirname(__FILE__) + '/../fixtures/helpers'] module AbstractController module Testing diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb index 9030e562bb..fe0961e575 100644 --- a/actionpack/test/controller/helper_test.rb +++ b/actionpack/test/controller/helper_test.rb @@ -1,7 +1,7 @@ require 'abstract_unit' require 'active_support/core_ext/kernel/reporting' -ActionController::Base.helpers_dir = File.dirname(__FILE__) + '/../fixtures/helpers' +ActionController::Base.helpers_path = [File.dirname(__FILE__) + '/../fixtures/helpers'] module Fun class GamesController < ActionController::Base @@ -106,7 +106,7 @@ class HelperTest < Test::Unit::TestCase end def test_all_helpers_with_alternate_helper_dir - @controller_class.helpers_dir = File.dirname(__FILE__) + '/../fixtures/alternate_helpers' + @controller_class.helpers_path = [File.dirname(__FILE__) + '/../fixtures/alternate_helpers'] # Reload helpers @controller_class._helpers = Module.new diff --git a/actionpack/test/fixtures/helpers/fun/games_helper.rb b/actionpack/test/fixtures/helpers/fun/games_helper.rb index bf60d9db0c..3b7adce086 100644 --- a/actionpack/test/fixtures/helpers/fun/games_helper.rb +++ b/actionpack/test/fixtures/helpers/fun/games_helper.rb @@ -1,3 +1,5 @@ -module Fun::GamesHelper - def stratego() "Iz guuut!" end +module Fun + module GamesHelper + def stratego() "Iz guuut!" end + end end \ No newline at end of file diff --git a/actionpack/test/fixtures/helpers/fun/pdf_helper.rb b/actionpack/test/fixtures/helpers/fun/pdf_helper.rb index c4aea5a3f3..0171be8500 100644 --- a/actionpack/test/fixtures/helpers/fun/pdf_helper.rb +++ b/actionpack/test/fixtures/helpers/fun/pdf_helper.rb @@ -1,3 +1,5 @@ -module Fun::PdfHelper - def foobar() 'baz' end +module Fun + module PdfHelper + def foobar() 'baz' end + end end -- cgit v1.2.3 From 7409b734841c8bd691006634dd072212aa905cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sun, 24 Jan 2010 16:37:28 +0100 Subject: Some refactoring. --- actionmailer/lib/action_mailer/base.rb | 164 ++++++++++++--------- actionmailer/lib/action_mailer/delivery_methods.rb | 92 ++++++------ actionmailer/lib/action_mailer/deprecated_api.rb | 66 ++++----- actionmailer/lib/action_mailer/tmail_compat.rb | 6 +- 4 files changed, 164 insertions(+), 164 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index e7eb6bffcd..b881611cfb 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -263,33 +263,42 @@ module ActionMailer #:nodoc: include AbstractController::UrlFor helper ActionMailer::MailHelper + include ActionMailer::DeprecatedApi + extend ActionMailer::DeliveryMethods + + add_delivery_method :smtp, Mail::SMTP, + :address => "localhost", + :port => 25, + :domain => 'localhost.localdomain', + :user_name => nil, + :password => nil, + :authentication => nil, + :enable_starttls_auto => true + + add_delivery_method :file, Mail::FileDelivery, + :location => defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails" + + add_delivery_method :sendmail, Mail::Sendmail, + :location => '/usr/sbin/sendmail', + :arguments => '-i -t' - include ActionMailer::DeliveryMethods + add_delivery_method :test, Mail::TestMailer + + superclass_delegating_reader :delivery_method + self.delivery_method = :smtp private_class_method :new #:nodoc: - @@raise_delivery_errors = true cattr_accessor :raise_delivery_errors + @@raise_delivery_errors = true - @@perform_deliveries = true cattr_accessor :perform_deliveries - - # Provides a list of emails that have been delivered by Mail - def self.deliveries - Mail.deliveries - end - - # Allows you to over write the default deliveries store from an array to some - # other object. If you just want to clear the store, call Mail.deliveries.clear. - def self.deliveries=(val) - Mail.deliveries = val - end + @@perform_deliveries = true extlib_inheritable_accessor :default_charset self.default_charset = "utf-8" - # TODO This should be used when calling render extlib_inheritable_accessor :default_content_type self.default_content_type = "text/plain" @@ -305,24 +314,9 @@ module ActionMailer #:nodoc: extlib_inheritable_accessor :default_implicit_parts_order self.default_implicit_parts_order = [ "text/plain", "text/enriched", "text/html" ] - # Expose the internal Mail message - # TODO: Make this an _internal ivar? - attr_reader :message - - def headers(args=nil) - if args - ActiveSupport::Deprecation.warn "headers(Hash) is deprecated, please do headers[key] = value instead", caller - @headers = args - else - @message - end - end - - def attachments - @message.attachments - end - class << self + # Provides a list of emails that have been delivered by Mail + delegate :deliveries, :deliveries=, :to => Mail def mailer_name @mailer_name ||= name.underscore @@ -359,6 +353,7 @@ module ActionMailer #:nodoc: self.view_paths = ActionView::Base.process_view_paths(root) end + # TODO The delivery should happen inside the instrument block def delivered_email(mail) ActiveSupport::Notifications.instrument("action_mailer.deliver", :mailer => self.name) do |payload| self.set_payload_for_mail(payload, mail) @@ -377,66 +372,63 @@ module ActionMailer #:nodoc: end end + attr_internal :message + # Instantiate a new mailer object. If +method_name+ is not +nil+, the mailer # will be initialized according to the named method. If not, the mailer will # remain uninitialized (useful when you only need to invoke the "receive" # method, for instance). def initialize(method_name=nil, *args) super() - @message = Mail.new + @_message = Mail.new process(method_name, *args) if method_name end - # TODO: Clean this up and refactor before Rails 3.0 release. - # This works for now, but not neat - def mail(headers = {}) - # Guard flag to prevent both the old and the new API from firing - # Should be removed when old API is deprecated - @mail_was_called = true + def headers(args=nil) + if args + ActiveSupport::Deprecation.warn "headers(Hash) is deprecated, please do headers[key] = value instead", caller[0,2] + @headers = args + else + @_message + end + end - m = @message + def attachments + @_message.attachments + end - m.register_for_delivery_notification(self.class) + def mail(headers={}, &block) + # Guard flag to prevent both the old and the new API from firing + # Should be removed when old API is removed + @mail_was_called = true + m = @_message # Give preference to headers and fallback to the ones set in mail content_type = headers[:content_type] || m.content_type charset = headers[:charset] || m.charset || self.class.default_charset.dup mime_version = headers[:mime_version] || m.mime_version || self.class.default_mime_version.dup + # Set subjects and fields quotings headers[:subject] ||= default_subject - quote_fields(m, headers, charset) - - sort_order = headers[:parts_order] || self.class.default_implicit_parts_order.dup - - responses = if headers[:body] - [ { :body => headers[:body], :content_type => self.class.default_content_type.dup } ] - elsif block_given? - collector = ActionMailer::Collector.new(self) { render(action_name) } - yield(collector) - # Collect the sort order of the parts from the collector as Mail will always - # sort parts on encode into a "sane" sequence. - sort_order = collector.responses.map { |r| r[:content_type] } - collector.responses - else - # TODO Ensure that we don't need to pass I18n.locale as detail - templates = self.class.template_root.find_all(action_name, {}, self.class.mailer_name) - - templates.map do |template| - { :body => render_to_body(:_template => template), - :content_type => template.mime_type.to_s } - end - end + quote_fields!(headers, charset) + # Render the templates and blocks + responses, sort_order = collect_responses_and_sort_order(headers, &block) content_type ||= create_parts_from_responses(m, responses, charset) + + # Tidy up content type, charset, mime version and sort order m.content_type = content_type m.charset = charset m.mime_version = mime_version + sort_order = headers[:parts_order] || sort_order || self.class.default_implicit_parts_order.dup if m.multipart? m.body.set_sort_order(sort_order) m.body.sort_parts! end + # Finaly set delivery behavior configured in class + wrap_delivery_behavior!(headers[:delivery_method]) m end @@ -448,14 +440,44 @@ module ActionMailer #:nodoc: end # TODO: Move this into Mail - def quote_fields(m, headers, charset) #:nodoc: - m.subject ||= quote_if_necessary(headers[:subject], charset) if headers[:subject] - m.to ||= quote_address_if_necessary(headers[:to], charset) if headers[:to] - m.from ||= quote_address_if_necessary(headers[:from], charset) if headers[:from] - m.cc ||= quote_address_if_necessary(headers[:cc], charset) if headers[:cc] - m.bcc ||= quote_address_if_necessary(headers[:bcc], charset) if headers[:bcc] - m.reply_to ||= quote_address_if_necessary(headers[:reply_to], charset) if headers[:reply_to] - m.date ||= headers[:date] if headers[:date] + def quote_fields!(headers, charset) #:nodoc: + m = @_message + m.subject ||= quote_if_necessary(headers[:subject], charset) if headers[:subject] + m.to ||= quote_address_if_necessary(headers[:to], charset) if headers[:to] + m.from ||= quote_address_if_necessary(headers[:from], charset) if headers[:from] + m.cc ||= quote_address_if_necessary(headers[:cc], charset) if headers[:cc] + m.bcc ||= quote_address_if_necessary(headers[:bcc], charset) if headers[:bcc] + m.reply_to ||= quote_address_if_necessary(headers[:reply_to], charset) if headers[:reply_to] + m.date ||= headers[:date] if headers[:date] + end + + def collect_responses_and_sort_order(headers) #:nodoc: + responses, sort_order = [], nil + + if block_given? + collector = ActionMailer::Collector.new(self) { render(action_name) } + yield(collector) + sort_order = collector.responses.map { |r| r[:content_type] } + responses = collector.responses + elsif headers[:body] + responses << { + :body => headers[:body], + :content_type => self.class.default_content_type.dup + } + else + self.class.template_root.find_all(action_name, {}, self.class.mailer_name).each do |template| + responses << { + :body => render_to_body(:_template => template), + :content_type => template.mime_type.to_s + } + end + end + + [responses, sort_order] + end + + def wrap_delivery_behavior!(method=nil) #:nodoc: + self.class.wrap_delivery_behavior(@_message, method) end def create_parts_from_responses(m, responses, charset) #:nodoc: diff --git a/actionmailer/lib/action_mailer/delivery_methods.rb b/actionmailer/lib/action_mailer/delivery_methods.rb index 5883e446f2..16b84d4118 100644 --- a/actionmailer/lib/action_mailer/delivery_methods.rb +++ b/actionmailer/lib/action_mailer/delivery_methods.rb @@ -1,73 +1,63 @@ module ActionMailer # This modules makes a DSL for adding delivery methods to ActionMailer module DeliveryMethods - extend ActiveSupport::Concern - - included do - add_delivery_method :smtp, Mail::SMTP, - :address => "localhost", - :port => 25, - :domain => 'localhost.localdomain', - :user_name => nil, - :password => nil, - :authentication => nil, - :enable_starttls_auto => true - - add_delivery_method :file, Mail::FileDelivery, - :location => defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails" + # TODO Make me class inheritable + def delivery_settings + @@delivery_settings ||= Hash.new { |h,k| h[k] = {} } + end - add_delivery_method :sendmail, Mail::Sendmail, - :location => '/usr/sbin/sendmail', - :arguments => '-i -t' + def delivery_methods + @@delivery_methods ||= {} + end - add_delivery_method :test, Mail::TestMailer + def delivery_method=(method) + raise ArgumentError, "Unknown delivery method #{method.inspect}" unless delivery_methods[method] + @delivery_method = method + end - superclass_delegating_reader :delivery_method - self.delivery_method = :smtp + def add_delivery_method(symbol, klass, default_options={}) + self.delivery_methods[symbol] = klass + self.delivery_settings[symbol] = default_options end - module ClassMethods - # TODO Make me class inheritable - def delivery_settings - @@delivery_settings ||= Hash.new { |h,k| h[k] = {} } - end + def wrap_delivery_behavior(mail, method=nil) + method ||= delivery_method - def delivery_methods - @@delivery_methods ||= {} - end + mail.register_for_delivery_notification(self) - def delivery_method=(method) - raise ArgumentError, "Unknown delivery method #{method.inspect}" unless delivery_methods[method] - @delivery_method = method + if method.is_a?(Symbol) + mail.delivery_method(delivery_methods[method], + delivery_settings[method]) + else + mail.delivery_method(method) end - def add_delivery_method(symbol, klass, default_options={}) - self.delivery_methods[symbol] = klass - self.delivery_settings[symbol] = default_options - end + mail.perform_deliveries = perform_deliveries + mail.raise_delivery_errors = raise_delivery_errors + end - def respond_to?(method_symbol, include_private = false) #:nodoc: - matches_settings_method?(method_symbol) || super - end - protected + def respond_to?(method_symbol, include_private = false) #:nodoc: + matches_settings_method?(method_symbol) || super + end - # TODO Get rid of this method missing magic - def method_missing(method_symbol, *parameters) #:nodoc: - if match = matches_settings_method?(method_symbol) - if match[2] - delivery_settings[match[1].to_sym] = parameters[0] - else - delivery_settings[match[1].to_sym] - end + protected + + # TODO Get rid of this method missing magic + def method_missing(method_symbol, *parameters) #:nodoc: + if match = matches_settings_method?(method_symbol) + if match[2] + delivery_settings[match[1].to_sym] = parameters[0] else - super + delivery_settings[match[1].to_sym] end + else + super end + end - def matches_settings_method?(method_name) #:nodoc: - /(#{delivery_methods.keys.join('|')})_settings(=)?$/.match(method_name.to_s) - end + def matches_settings_method?(method_name) #:nodoc: + /(#{delivery_methods.keys.join('|')})_settings(=)?$/.match(method_name.to_s) end end end \ No newline at end of file diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index a2fa481d0e..f969584a17 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -71,7 +71,6 @@ module ActionMailer # Alias controller_path to mailer_name so render :partial in views work. alias :controller_path :mailer_name - end module ClassMethods @@ -82,17 +81,14 @@ module ActionMailer # email = MyMailer.create_some_mail(parameters) # email.set_some_obscure_header "frobnicate" # MyMailer.deliver(email) - def deliver(mail) - return if @mail_was_called - raise "no mail object available for delivery!" unless mail - - mail.register_for_delivery_notification(self) - - mail.delivery_method delivery_methods[delivery_method], - delivery_settings[delivery_method] + def deliver(mail, show_warning=true) + if show_warning + ActiveSupport::Deprecation.warn "ActionMailer::Base.deliver is deprecated, just call " << + "deliver in the instance instead", caller + end - mail.raise_delivery_errors = raise_delivery_errors - mail.perform_deliveries = perform_deliveries + raise "no mail object available for delivery!" unless mail + wrap_delivery_behavior(mail) mail.deliver mail end @@ -122,23 +118,19 @@ module ActionMailer end end - def initialize(*) - super() - @mail_was_called = false - end - # Delivers a Mail object. By default, it delivers the cached mail # object (from the create! method). If no cached mail object exists, and # no alternate has been given as the parameter, this will fail. - def deliver!(mail = @message) - self.class.deliver(mail) + def deliver!(mail = @_message) + self.class.deliver(mail, false) end + alias :deliver :deliver! def render(*args) options = args.last.is_a?(Hash) ? args.last : {} if options[:body] - ActiveSupport::Deprecation.warn(':body in render deprecated. Please call body ' << - 'with a hash instead', caller[0,1]) + ActiveSupport::Deprecation.warn(':body in render deprecated. Please use instance ' << + 'variables as assigns instead', caller[0,1]) body options.delete(:body) end @@ -153,7 +145,7 @@ module ActionMailer create_parts create_mail end - @message + @_message end # Add a part to a multipart message, with the given content-type. The @@ -175,6 +167,7 @@ module ActionMailer # Add an attachment to a multipart message. This is simply a part with the # content-disposition set to "attachment". def attachment(params, &block) + ActiveSupport::Deprecation.warn "attachment is deprecated, please use the attachments API instead", caller[0,2] params = { :content_type => params } if String === params params[:content] ||= params.delete(:data) || params.delete(:body) @@ -197,13 +190,9 @@ module ActionMailer # render_message :template => "special_message" # render_message :inline => "<%= 'Hi!' %>" # - def render_message(object) - case object - when String - render_to_body(:template => object) - else - render_to_body(object) - end + def render_message(*args) + ActiveSupport::Deprecation.warn "render_message is deprecated, use render instead", caller[0,2] + render(*args) end private @@ -240,14 +229,12 @@ module ActionMailer end def create_mail #:nodoc: - m = @message - - m.subject, = quote_any_if_necessary(charset, subject) - m.to, m.from = quote_any_address_if_necessary(charset, recipients, from) - m.bcc = quote_address_if_necessary(bcc, charset) unless bcc.nil? - m.cc = quote_address_if_necessary(cc, charset) unless cc.nil? - m.reply_to = quote_address_if_necessary(reply_to, charset) unless reply_to.nil? - m.mime_version = mime_version unless mime_version.nil? + m = @_message + + quote_fields!({:subject => subject, :to => recipients, :from => from, + :bcc => bcc, :cc => cc, :reply_to => reply_to}, charset) + + m.mime_version = mime_version unless mime_version.nil? m.date = sent_on.to_time rescue sent_on if sent_on @headers.each { |k, v| m[k] = v } @@ -274,7 +261,7 @@ module ActionMailer m.content_transfer_encoding = '8bit' unless m.body.only_us_ascii? - @message + @_message end # Set up the default values for the various instance variables of this @@ -286,8 +273,9 @@ module ActionMailer @implicit_parts_order ||= self.class.default_implicit_parts_order.dup @mime_version ||= self.class.default_mime_version.dup if self.class.default_mime_version - @mailer_name ||= self.class.mailer_name.dup - @template ||= method_name + @mailer_name ||= self.class.mailer_name.dup + @template ||= method_name + @mail_was_called = false @parts ||= [] @headers ||= {} diff --git a/actionmailer/lib/action_mailer/tmail_compat.rb b/actionmailer/lib/action_mailer/tmail_compat.rb index d78332c135..c6efdc53b6 100644 --- a/actionmailer/lib/action_mailer/tmail_compat.rb +++ b/actionmailer/lib/action_mailer/tmail_compat.rb @@ -3,7 +3,7 @@ module Mail def set_content_type(*args) ActiveSupport::Deprecation.warn('Message#set_content_type is deprecated, please just call ' << - 'Message#content_type with the same arguments', caller[0,10]) + 'Message#content_type with the same arguments', caller[0,2]) content_type(*args) end @@ -11,7 +11,7 @@ module Mail def transfer_encoding(value = nil) if value ActiveSupport::Deprecation.warn('Message#transfer_encoding is deprecated, please call ' << - 'Message#content_transfer_encoding with the same arguments', caller[0,10]) + 'Message#content_transfer_encoding with the same arguments', caller[0,2]) content_transfer_encoding(value) else old_transfer_encoding @@ -20,7 +20,7 @@ module Mail def original_filename ActiveSupport::Deprecation.warn('Message#original_filename is deprecated, ' << - 'please call Message#filename', caller[0,10]) + 'please call Message#filename', caller[0,2]) filename end -- cgit v1.2.3 From 92126521551a7c62e9032eda4a2b8a6d92c0279f Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sun, 24 Jan 2010 10:29:38 -0600 Subject: Add Rails::Application pointer to the default app to add symmetry to Foo::Application --- railties/lib/rails/application.rb | 6 +++++- railties/lib/rails/tasks/middleware.rake | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index e14719c758..ab66d1e90b 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -16,7 +16,11 @@ module Rails alias :configure :class_eval def instance - @instance ||= new + if instance_of?(Rails::Application) + Rails.application.instance + else + @instance ||= new + end end def inherited(base) diff --git a/railties/lib/rails/tasks/middleware.rake b/railties/lib/rails/tasks/middleware.rake index 5a5bd7a7e9..c3aaddb153 100644 --- a/railties/lib/rails/tasks/middleware.rake +++ b/railties/lib/rails/tasks/middleware.rake @@ -3,5 +3,5 @@ task :middleware => :environment do Rails.configuration.middleware.active.each do |middleware| puts "use #{middleware.inspect}" end - puts "run #{Rails.application.class.name}" + puts "run #{Rails::Application.class.name}" end -- cgit v1.2.3 From f30d73bab4c676b187276797ac2a6dc89132c43f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sun, 24 Jan 2010 17:31:18 +0100 Subject: Add new class delivery method API. --- actionmailer/lib/action_mailer/base.rb | 18 ++- actionmailer/lib/action_mailer/deprecated_api.rb | 25 ++-- actionmailer/test/asset_host_test.rb | 12 +- actionmailer/test/base_test.rb | 135 +++++++++------------ actionmailer/test/mail_helper_test.rb | 28 ++--- actionmailer/test/mail_layout_test.rb | 42 +++---- actionmailer/test/mail_render_test.rb | 62 +++++----- actionmailer/test/mail_service_test.rb | 148 +++++++++++------------ actionmailer/test/subscriber_test.rb | 18 +-- actionmailer/test/test_helper_test.rb | 24 ++-- actionmailer/test/tmail_compat_test.rb | 14 ++- actionmailer/test/url_test.rb | 4 +- 12 files changed, 259 insertions(+), 271 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index b881611cfb..8e30c54c49 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -253,6 +253,8 @@ module ActionMailer #:nodoc: # and appear last in the mime encoded message. You can also pick a different order from inside a method with # +implicit_parts_order+. class Base < AbstractController::Base + abstract! + include Quoting include AbstractController::Logger @@ -264,8 +266,8 @@ module ActionMailer #:nodoc: helper ActionMailer::MailHelper - include ActionMailer::DeprecatedApi extend ActionMailer::DeliveryMethods + include ActionMailer::DeprecatedApi add_delivery_method :smtp, Mail::SMTP, :address => "localhost", @@ -370,6 +372,20 @@ module ActionMailer #:nodoc: payload[:date] = mail.date payload[:mail] = mail.encoded end + + def respond_to?(method, *args) + super || action_methods.include?(method.to_s) + end + + protected + + def method_missing(method, *args) + if action_methods.include?(method.to_s) + new(method, *args).message + else + super + end + end end attr_internal :message diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index f969584a17..f36b1befd6 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -1,8 +1,8 @@ module ActionMailer - # TODO Remove this module all together in Rails 3.1. Ensure that super - # hooks in ActionMailer::Base are removed as well. - # - # Moved here to allow us to add the new Mail API + # Part of this API is deprecated and is going to be removed in Rails 3.1 (just check + # the methods which give you a warning). + # All the rest will be deprecated after 3.1 release instead, this allows a smoother + # migration path. module DeprecatedApi #:nodoc: extend ActiveSupport::Concern @@ -83,8 +83,8 @@ module ActionMailer # MyMailer.deliver(email) def deliver(mail, show_warning=true) if show_warning - ActiveSupport::Deprecation.warn "ActionMailer::Base.deliver is deprecated, just call " << - "deliver in the instance instead", caller + ActiveSupport::Deprecation.warn "#{self}.deliver is deprecated, call " << + "deliver in the mailer instance instead", caller[0,2] end raise "no mail object available for delivery!" unless mail @@ -100,9 +100,14 @@ module ActionMailer def method_missing(method_symbol, *parameters) #:nodoc: if match = matches_dynamic_method?(method_symbol) case match[1] - when 'create' then new(match[2], *parameters).message - when 'deliver' then new(match[2], *parameters).deliver! - when 'new' then nil + when 'create' + ActiveSupport::Deprecation.warn "#{self}.create_#{match[2]} is deprecated, " << + "use #{self}.#{match[2]} instead", caller[0,2] + new(match[2], *parameters).message + when 'deliver' + ActiveSupport::Deprecation.warn "#{self}.deliver_#{match[2]} is deprecated, " << + "use #{self}.#{match[2]}.deliver instead", caller[0,2] + new(match[2], *parameters).deliver else super end else @@ -167,7 +172,6 @@ module ActionMailer # Add an attachment to a multipart message. This is simply a part with the # content-disposition set to "attachment". def attachment(params, &block) - ActiveSupport::Deprecation.warn "attachment is deprecated, please use the attachments API instead", caller[0,2] params = { :content_type => params } if String === params params[:content] ||= params.delete(:data) || params.delete(:body) @@ -259,6 +263,7 @@ module ActionMailer end end + wrap_delivery_behavior! m.content_transfer_encoding = '8bit' unless m.body.only_us_ascii? @_message diff --git a/actionmailer/test/asset_host_test.rb b/actionmailer/test/asset_host_test.rb index 7ba78b6daa..124032f1d9 100644 --- a/actionmailer/test/asset_host_test.rb +++ b/actionmailer/test/asset_host_test.rb @@ -1,8 +1,8 @@ require 'abstract_unit' class AssetHostMailer < ActionMailer::Base - def email_with_asset(recipient) - recipients recipient + def email_with_asset + recipients 'test@localhost' subject "testing email containing asset path while asset_host is set" from "tester@example.com" end @@ -13,8 +13,6 @@ class AssetHostTest < Test::Unit::TestCase set_delivery_method :test ActionMailer::Base.perform_deliveries = true ActionMailer::Base.deliveries.clear - - @recipient = 'test@localhost' end def teardown @@ -23,7 +21,7 @@ class AssetHostTest < Test::Unit::TestCase def test_asset_host_as_string ActionController::Base.asset_host = "http://www.example.com" - mail = AssetHostMailer.deliver_email_with_asset(@recipient) + mail = AssetHostMailer.email_with_asset assert_equal "\"Somelogo\"", mail.body.to_s.strip end @@ -35,7 +33,7 @@ class AssetHostTest < Test::Unit::TestCase "http://assets.example.com" end } - mail = AssetHostMailer.deliver_email_with_asset(@recipient) + mail = AssetHostMailer.email_with_asset assert_equal "\"Somelogo\"", mail.body.to_s.strip end @@ -48,7 +46,7 @@ class AssetHostTest < Test::Unit::TestCase end } mail = nil - assert_nothing_raised { mail = AssetHostMailer.deliver_email_with_asset(@recipient) } + assert_nothing_raised { mail = AssetHostMailer.email_with_asset } assert_equal "\"Somelogo\"", mail.body.to_s.strip end end \ No newline at end of file diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 7f41f3485c..3b2a072dce 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -3,40 +3,6 @@ require 'abstract_unit' # class Notifier < ActionMailer::Base # delivers_from 'notifications@example.com' -# -# def welcome(user) -# @user = user # available to the view -# mail(:subject => 'Welcome!', :to => user.email_address) -# # auto renders both welcome.text.erb and welcome.html.erb -# end -# -# def goodbye(user) -# headers["X-SPAM"] = 'Not-SPAM' -# mail(:subject => 'Goodbye', :to => user.email_address) do |format| -# format.html { render "shared_template "} -# format.text # goodbye.text.erb -# end -# end -# -# def surprise(user, gift) -# attachments[gift.name] = File.read(gift.path) -# mail(:subject => 'Surprise!', :to => user.email_address) do |format| -# format.html(:charset => "ascii") # surprise.html.erb -# format.text(:transfer_encoding => "base64") # surprise.text.erb -# end -# end -# -# def special_surprise(user, gift) -# attachments[gift.name] = { :content_type => "application/x-gzip", :content => File.read(gift.path) } -# mail(:to => 'special@example.com') # subject not required -# # auto renders both special_surprise.text.erb and special_surprise.html.erb -# end -# end -# -# mail = Notifier.welcome(user) # => returns a Mail object -# mail.deliver -# -# Notifier.welcome(user).deliver # => creates and sends the Mail in one step class BaseTest < ActiveSupport::TestCase DEFAULT_HEADERS = { :to => 'mikel@test.lindsaar.net', @@ -44,8 +10,6 @@ class BaseTest < ActiveSupport::TestCase :subject => 'The first email on new API!' } - # TODO Think on the simple case where I want to send an e-mail - # with attachment and small text (without need to add a template). class BaseMailer < ActionMailer::Base self.mailer_name = "base_mailer" @@ -60,7 +24,7 @@ class BaseTest < ActiveSupport::TestCase end def attachment_with_hash - attachments['invoice.jpg'] = { :content => "you smiling", :mime_type => "image/x-jpg", + attachments['invoice.jpg'] = { :data => "you smiling", :mime_type => "image/x-jpg", :transfer_encoding => "base64" } mail(DEFAULT_HEADERS) end @@ -93,12 +57,12 @@ class BaseTest < ActiveSupport::TestCase end test "method call to mail does not raise error" do - assert_nothing_raised { BaseMailer.deliver_welcome } + assert_nothing_raised { BaseMailer.welcome.deliver } end # Basic mail usage without block test "mail() should set the headers of the mail message" do - email = BaseMailer.deliver_welcome + email = BaseMailer.welcome.deliver assert_equal(email.to, ['mikel@test.lindsaar.net']) assert_equal(email.from, ['jose@test.plataformatec.com']) assert_equal(email.subject, 'The first email on new API!') @@ -106,13 +70,13 @@ class BaseTest < ActiveSupport::TestCase test "mail() with bcc, cc, content_type, charset, mime_version, reply_to and date" do @time = Time.now - email = BaseMailer.deliver_welcome(:bcc => 'bcc@test.lindsaar.net', - :cc => 'cc@test.lindsaar.net', - :content_type => 'multipart/mixed', - :charset => 'iso-8559-1', - :mime_version => '2.0', - :reply_to => 'reply-to@test.lindsaar.net', - :date => @time) + email = BaseMailer.welcome(:bcc => 'bcc@test.lindsaar.net', + :cc => 'cc@test.lindsaar.net', + :content_type => 'multipart/mixed', + :charset => 'iso-8559-1', + :mime_version => '2.0', + :reply_to => 'reply-to@test.lindsaar.net', + :date => @time).deliver assert_equal(email.bcc, ['bcc@test.lindsaar.net']) assert_equal(email.cc, ['cc@test.lindsaar.net']) assert_equal(email.content_type, 'multipart/mixed') @@ -123,50 +87,50 @@ class BaseTest < ActiveSupport::TestCase end test "mail() renders the template using the method being processed" do - email = BaseMailer.deliver_welcome + email = BaseMailer.welcome.deliver assert_equal("Welcome", email.body.encoded) end test "can pass in :body to the mail method hash" do - email = BaseMailer.deliver_welcome(:body => "Hello there") + email = BaseMailer.welcome(:body => "Hello there").deliver assert_equal("text/plain", email.mime_type) assert_equal("Hello there", email.body.encoded) end # Custom headers test "custom headers" do - email = BaseMailer.deliver_welcome + email = BaseMailer.welcome.deliver assert_equal("Not SPAM", email['X-SPAM'].decoded) end # Attachments test "attachment with content" do - email = BaseMailer.deliver_attachment_with_content + email = BaseMailer.attachment_with_content.deliver assert_equal(1, email.attachments.length) assert_equal('invoice.pdf', email.attachments[0].filename) assert_equal('This is test File content', email.attachments['invoice.pdf'].decoded) end test "attachment gets content type from filename" do - email = BaseMailer.deliver_attachment_with_content + email = BaseMailer.attachment_with_content.deliver assert_equal('invoice.pdf', email.attachments[0].filename) end test "attachment with hash" do - email = BaseMailer.deliver_attachment_with_hash + email = BaseMailer.attachment_with_hash.deliver assert_equal(1, email.attachments.length) assert_equal('invoice.jpg', email.attachments[0].filename) assert_equal("\312\213\254\232)b", email.attachments['invoice.jpg'].decoded) end test "sets mime type to multipart/mixed when attachment is included" do - email = BaseMailer.deliver_attachment_with_content + email = BaseMailer.attachment_with_content.deliver assert_equal(1, email.attachments.length) assert_equal("multipart/mixed", email.mime_type) end test "adds the rendered template as part" do - email = BaseMailer.deliver_attachment_with_content + email = BaseMailer.attachment_with_content.deliver assert_equal(2, email.parts.length) assert_equal("multipart/mixed", email.mime_type) assert_equal("text/html", email.parts[0].mime_type) @@ -176,7 +140,7 @@ class BaseTest < ActiveSupport::TestCase end test "adds the given :body as part" do - email = BaseMailer.deliver_attachment_with_content(:body => "I'm the eggman") + email = BaseMailer.attachment_with_content(:body => "I'm the eggman").deliver assert_equal(2, email.parts.length) assert_equal("multipart/mixed", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) @@ -188,46 +152,46 @@ class BaseTest < ActiveSupport::TestCase # Defaults values test "uses default charset from class" do swap BaseMailer, :default_charset => "US-ASCII" do - email = BaseMailer.deliver_welcome + email = BaseMailer.welcome.deliver assert_equal("US-ASCII", email.charset) - email = BaseMailer.deliver_welcome(:charset => "iso-8559-1") + email = BaseMailer.welcome(:charset => "iso-8559-1").deliver assert_equal("iso-8559-1", email.charset) end end test "uses default content type from class" do swap BaseMailer, :default_content_type => "text/html" do - email = BaseMailer.deliver_welcome + email = BaseMailer.welcome.deliver assert_equal("text/html", email.mime_type) - email = BaseMailer.deliver_welcome(:content_type => "text/plain") + email = BaseMailer.welcome(:content_type => "text/plain").deliver assert_equal("text/plain", email.mime_type) end end test "uses default mime version from class" do swap BaseMailer, :default_mime_version => "2.0" do - email = BaseMailer.deliver_welcome + email = BaseMailer.welcome.deliver assert_equal("2.0", email.mime_version) - email = BaseMailer.deliver_welcome(:mime_version => "1.0") + email = BaseMailer.welcome(:mime_version => "1.0").deliver assert_equal("1.0", email.mime_version) end end test "subject gets default from I18n" do - email = BaseMailer.deliver_welcome(:subject => nil) + email = BaseMailer.welcome(:subject => nil).deliver assert_equal "Welcome", email.subject I18n.backend.store_translations('en', :actionmailer => {:base_mailer => {:welcome => {:subject => "New Subject!"}}}) - email = BaseMailer.deliver_welcome(:subject => nil) + email = BaseMailer.welcome(:subject => nil).deliver assert_equal "New Subject!", email.subject end # Implicit multipart test "implicit multipart" do - email = BaseMailer.deliver_implicit_multipart + email = BaseMailer.implicit_multipart.deliver assert_equal(2, email.parts.size) assert_equal("multipart/alternate", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) @@ -239,18 +203,18 @@ class BaseTest < ActiveSupport::TestCase test "implicit multipart with sort order" do order = ["text/html", "text/plain"] swap BaseMailer, :default_implicit_parts_order => order do - email = BaseMailer.deliver_implicit_multipart + email = BaseMailer.implicit_multipart.deliver assert_equal("text/html", email.parts[0].mime_type) assert_equal("text/plain", email.parts[1].mime_type) - email = BaseMailer.deliver_implicit_multipart(:parts_order => order.reverse) + email = BaseMailer.implicit_multipart(:parts_order => order.reverse).deliver assert_equal("text/plain", email.parts[0].mime_type) assert_equal("text/html", email.parts[1].mime_type) end end test "implicit multipart with attachments creates nested parts" do - email = BaseMailer.deliver_implicit_multipart(:attachments => true) + email = BaseMailer.implicit_multipart(:attachments => true).deliver assert_equal("application/pdf", email.parts[0].mime_type) assert_equal("multipart/alternate", email.parts[1].mime_type) assert_equal("text/plain", email.parts[1].parts[0].mime_type) @@ -262,7 +226,7 @@ class BaseTest < ActiveSupport::TestCase test "implicit multipart with attachments and sort order" do order = ["text/html", "text/plain"] swap BaseMailer, :default_implicit_parts_order => order do - email = BaseMailer.deliver_implicit_multipart(:attachments => true) + email = BaseMailer.implicit_multipart(:attachments => true).deliver assert_equal("application/pdf", email.parts[0].mime_type) assert_equal("multipart/alternate", email.parts[1].mime_type) assert_equal("text/plain", email.parts[1].parts[1].mime_type) @@ -272,7 +236,7 @@ class BaseTest < ActiveSupport::TestCase # Explicit multipart test "explicit multipart" do - email = BaseMailer.deliver_explicit_multipart + email = BaseMailer.explicit_multipart.deliver assert_equal(2, email.parts.size) assert_equal("multipart/alternate", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) @@ -284,18 +248,18 @@ class BaseTest < ActiveSupport::TestCase test "explicit multipart does not sort order" do order = ["text/html", "text/plain"] swap BaseMailer, :default_implicit_parts_order => order do - email = BaseMailer.deliver_explicit_multipart + email = BaseMailer.explicit_multipart.deliver assert_equal("text/plain", email.parts[0].mime_type) assert_equal("text/html", email.parts[1].mime_type) - email = BaseMailer.deliver_explicit_multipart(:parts_order => order.reverse) + email = BaseMailer.explicit_multipart(:parts_order => order.reverse).deliver assert_equal("text/plain", email.parts[0].mime_type) assert_equal("text/html", email.parts[1].mime_type) end end test "explicit multipart with attachments creates nested parts" do - email = BaseMailer.deliver_explicit_multipart(:attachments => true) + email = BaseMailer.explicit_multipart(:attachments => true).deliver assert_equal("application/pdf", email.parts[0].mime_type) assert_equal("multipart/alternate", email.parts[1].mime_type) assert_equal("text/plain", email.parts[1].parts[0].mime_type) @@ -305,7 +269,7 @@ class BaseTest < ActiveSupport::TestCase end test "explicit multipart with templates" do - email = BaseMailer.deliver_explicit_multipart_templates + email = BaseMailer.explicit_multipart_templates.deliver assert_equal(2, email.parts.size) assert_equal("multipart/alternate", email.mime_type) assert_equal("text/html", email.parts[0].mime_type) @@ -315,7 +279,7 @@ class BaseTest < ActiveSupport::TestCase end test "explicit multipart with any" do - email = BaseMailer.deliver_explicit_multipart_with_any + email = BaseMailer.explicit_multipart_with_any.deliver assert_equal(2, email.parts.size) assert_equal("multipart/alternate", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) @@ -324,21 +288,30 @@ class BaseTest < ActiveSupport::TestCase assert_equal("Format with any!", email.parts[1].body.encoded) end - test "ActionMailer should be told when Mail gets delivered" do - BaseMailer.deliveries.clear - BaseMailer.expects(:delivered_email).once - BaseMailer.deliver_welcome - assert_equal(1, BaseMailer.deliveries.length) + # Class level API with method missing + test "should respond to action methods" do + assert BaseMailer.respond_to?(:welcome) + assert BaseMailer.respond_to?(:implicit_multipart) + assert !BaseMailer.respond_to?(:mail) + assert !BaseMailer.respond_to?(:headers) end - test "Calling just the action should return the generated mail object" do + test "calling just the action should return the generated mail object" do BaseMailer.deliveries.clear email = BaseMailer.welcome assert_equal(0, BaseMailer.deliveries.length) assert_equal('The first email on new API!', email.subject) end - test "Calling deliver on the action should deliver the mail object" do + test "calling deliver on the action should deliver the mail object" do + BaseMailer.deliveries.clear + BaseMailer.expects(:delivered_email).once + BaseMailer.welcome.deliver + assert_equal(1, BaseMailer.deliveries.length) + end + + # Delivery hooks + test "ActionMailer should be told when Mail gets delivered" do BaseMailer.deliveries.clear BaseMailer.expects(:delivered_email).once BaseMailer.welcome.deliver diff --git a/actionmailer/test/mail_helper_test.rb b/actionmailer/test/mail_helper_test.rb index d81bc57ce0..a9b3cd3ce1 100644 --- a/actionmailer/test/mail_helper_test.rb +++ b/actionmailer/test/mail_helper_test.rb @@ -10,22 +10,22 @@ class HelperMailer < ActionMailer::Base helper MailerHelper helper :example - def use_helper(recipient) - recipients recipient + def use_helper + recipients 'test@localhost' subject "using helpers" from "tester@example.com" end - def use_example_helper(recipient) - recipients recipient + def use_example_helper + recipients 'test@localhost' subject "using helpers" from "tester@example.com" @text = "emphasize me!" end - def use_mail_helper(recipient) - recipients recipient + def use_mail_helper + recipients 'test@localhost' subject "using mailing helpers" from "tester@example.com" @@ -37,8 +37,8 @@ class HelperMailer < ActionMailer::Base "it off!" end - def use_helper_method(recipient) - recipients recipient + def use_helper_method + recipients 'test@localhost' subject "using helpers" from "tester@example.com" @@ -53,7 +53,7 @@ class HelperMailer < ActionMailer::Base helper_method :name_of_the_mailer_class end -class MailerHelperTest < Test::Unit::TestCase +class MailerHelperTest < ActiveSupport::TestCase def new_mail( charset="utf-8" ) mail = Mail.new mail.set_content_type "text", "plain", { "charset" => charset } if charset @@ -64,8 +64,6 @@ class MailerHelperTest < Test::Unit::TestCase set_delivery_method :test ActionMailer::Base.perform_deliveries = true ActionMailer::Base.deliveries.clear - - @recipient = 'test@localhost' end def teardown @@ -73,22 +71,22 @@ class MailerHelperTest < Test::Unit::TestCase end def test_use_helper - mail = HelperMailer.create_use_helper(@recipient) + mail = HelperMailer.use_helper assert_match %r{Mr. Joe Person}, mail.encoded end def test_use_example_helper - mail = HelperMailer.create_use_example_helper(@recipient) + mail = HelperMailer.use_example_helper assert_match %r{emphasize me!}, mail.encoded end def test_use_helper_method - mail = HelperMailer.create_use_helper_method(@recipient) + mail = HelperMailer.use_helper_method assert_match %r{HelperMailer}, mail.encoded end def test_use_mail_helper - mail = HelperMailer.create_use_mail_helper(@recipient) + mail = HelperMailer.use_mail_helper assert_match %r{ But soft!}, mail.encoded assert_match %r{east, and\r\n Juliet}, mail.encoded end diff --git a/actionmailer/test/mail_layout_test.rb b/actionmailer/test/mail_layout_test.rb index b4bd583616..4038fbf339 100644 --- a/actionmailer/test/mail_layout_test.rb +++ b/actionmailer/test/mail_layout_test.rb @@ -2,14 +2,14 @@ require 'abstract_unit' class AutoLayoutMailer < ActionMailer::Base - def hello(recipient) - recipients recipient + def hello + recipients 'test@localhost' subject "You have a mail" from "tester@example.com" end - def spam(recipient) - recipients recipient + def spam + recipients 'test@localhost' subject "You have a mail" from "tester@example.com" @@ -17,8 +17,8 @@ class AutoLayoutMailer < ActionMailer::Base render(:inline => "Hello, <%= @world %>", :layout => 'spam') end - def nolayout(recipient) - recipients recipient + def nolayout + recipients 'test@localhost' subject "You have a mail" from "tester@example.com" @@ -26,8 +26,8 @@ class AutoLayoutMailer < ActionMailer::Base render(:inline => "Hello, <%= @world %>", :layout => false) end - def multipart(recipient, type = nil) - recipients recipient + def multipart(type = nil) + recipients 'test@localhost' subject "You have a mail" from "tester@example.com" @@ -38,14 +38,14 @@ end class ExplicitLayoutMailer < ActionMailer::Base layout 'spam', :except => [:logout] - def signup(recipient) - recipients recipient + def signup + recipients 'test@localhost' subject "You have a mail" from "tester@example.com" end - def logout(recipient) - recipients recipient + def logout + recipients 'test@localhost' subject "You have a mail" from "tester@example.com" end @@ -56,8 +56,6 @@ class LayoutMailerTest < Test::Unit::TestCase set_delivery_method :test ActionMailer::Base.perform_deliveries = true ActionMailer::Base.deliveries.clear - - @recipient = 'test@localhost' end def teardown @@ -65,12 +63,12 @@ class LayoutMailerTest < Test::Unit::TestCase end def test_should_pickup_default_layout - mail = AutoLayoutMailer.create_hello(@recipient) + mail = AutoLayoutMailer.hello assert_equal "Hello from layout Inside", mail.body.to_s.strip end def test_should_pickup_multipart_layout - mail = AutoLayoutMailer.create_multipart(@recipient) + mail = AutoLayoutMailer.multipart # CHANGED: content_type returns an object # assert_equal "multipart/alternative", mail.content_type assert_equal "multipart/alternative", mail.mime_type @@ -94,7 +92,7 @@ class LayoutMailerTest < Test::Unit::TestCase end def test_should_pickup_multipartmixed_layout - mail = AutoLayoutMailer.create_multipart(@recipient, "multipart/mixed") + mail = AutoLayoutMailer.multipart("multipart/mixed") # CHANGED: content_type returns an object # assert_equal "multipart/mixed", mail.content_type assert_equal "multipart/mixed", mail.mime_type @@ -116,7 +114,7 @@ class LayoutMailerTest < Test::Unit::TestCase end def test_should_fix_multipart_layout - mail = AutoLayoutMailer.create_multipart(@recipient, "text/plain") + mail = AutoLayoutMailer.multipart("text/plain") assert_equal "multipart/alternative", mail.mime_type assert_equal 2, mail.parts.size @@ -129,22 +127,22 @@ class LayoutMailerTest < Test::Unit::TestCase def test_should_pickup_layout_given_to_render - mail = AutoLayoutMailer.create_spam(@recipient) + mail = AutoLayoutMailer.spam assert_equal "Spammer layout Hello, Earth", mail.body.to_s.strip end def test_should_respect_layout_false - mail = AutoLayoutMailer.create_nolayout(@recipient) + mail = AutoLayoutMailer.nolayout assert_equal "Hello, Earth", mail.body.to_s.strip end def test_explicit_class_layout - mail = ExplicitLayoutMailer.create_signup(@recipient) + mail = ExplicitLayoutMailer.signup assert_equal "Spammer layout We do not spam", mail.body.to_s.strip end def test_explicit_layout_exceptions - mail = ExplicitLayoutMailer.create_logout(@recipient) + mail = ExplicitLayoutMailer.logout assert_equal "You logged out", mail.body.to_s.strip end end diff --git a/actionmailer/test/mail_render_test.rb b/actionmailer/test/mail_render_test.rb index 3424823c99..804200fd36 100644 --- a/actionmailer/test/mail_render_test.rb +++ b/actionmailer/test/mail_render_test.rb @@ -1,8 +1,8 @@ require 'abstract_unit' class RenderMailer < ActionMailer::Base - def inline_template(recipient) - recipients recipient + def inline_template + recipients 'test@localhost' subject "using helpers" from "tester@example.com" @@ -10,46 +10,46 @@ class RenderMailer < ActionMailer::Base render :inline => "Hello, <%= @world %>" end - def file_template(recipient) - recipients recipient + def file_template + recipients 'test@localhost' subject "using helpers" from "tester@example.com" - @recipient = recipient + @recipient = 'test@localhost' render :file => "templates/signed_up" end - def implicit_body(recipient) - recipients recipient + def implicit_body + recipients 'test@localhost' subject "using helpers" from "tester@example.com" - @recipient = recipient + @recipient = 'test@localhost' render :template => "templates/signed_up" end - def rxml_template(recipient) - recipients recipient + def rxml_template + recipients 'test@localhost' subject "rendering rxml template" from "tester@example.com" end - def included_subtemplate(recipient) - recipients recipient + def included_subtemplate + recipients 'test@localhost' subject "Including another template in the one being rendered" from "tester@example.com" end - def mailer_accessor(recipient) - recipients recipient + def mailer_accessor + recipients 'test@localhost' subject "Mailer Accessor" from "tester@example.com" render :inline => "Look, <%= mailer.subject %>!" end - def no_instance_variable(recipient) - recipients recipient + def no_instance_variable + recipients 'test@localhost' subject "No Instance Variable" from "tester@example.com" @@ -65,16 +65,16 @@ class RenderMailer < ActionMailer::Base end class FirstMailer < ActionMailer::Base - def share(recipient) - recipients recipient + def share + recipients 'test@localhost' subject "using helpers" from "tester@example.com" end end class SecondMailer < ActionMailer::Base - def share(recipient) - recipients recipient + def share + recipients 'test@localhost' subject "using helpers" from "tester@example.com" end @@ -96,37 +96,37 @@ class RenderHelperTest < Test::Unit::TestCase end def test_implicit_body - mail = RenderMailer.create_implicit_body(@recipient) + mail = RenderMailer.implicit_body assert_equal "Hello there, \n\nMr. test@localhost", mail.body.to_s.strip end def test_inline_template - mail = RenderMailer.create_inline_template(@recipient) + mail = RenderMailer.inline_template assert_equal "Hello, Earth", mail.body.to_s.strip end def test_file_template - mail = RenderMailer.create_file_template(@recipient) + mail = RenderMailer.file_template assert_equal "Hello there, \n\nMr. test@localhost", mail.body.to_s.strip end def test_rxml_template - mail = RenderMailer.deliver_rxml_template(@recipient) + mail = RenderMailer.rxml_template.deliver assert_equal "\n", mail.body.to_s.strip end def test_included_subtemplate - mail = RenderMailer.deliver_included_subtemplate(@recipient) + mail = RenderMailer.included_subtemplate.deliver assert_equal "Hey Ho, let's go!", mail.body.to_s.strip end def test_mailer_accessor - mail = RenderMailer.deliver_mailer_accessor(@recipient) + mail = RenderMailer.mailer_accessor.deliver assert_equal "Look, Mailer Accessor!", mail.body.to_s.strip end def test_no_instance_variable - mail = RenderMailer.deliver_no_instance_variable(@recipient) + mail = RenderMailer.no_instance_variable.deliver assert_equal "Look, subject.nil? is true!", mail.body.to_s.strip end end @@ -145,13 +145,13 @@ class FirstSecondHelperTest < Test::Unit::TestCase end def test_ordering - mail = FirstMailer.create_share(@recipient) + mail = FirstMailer.share assert_equal "first mail", mail.body.to_s.strip - mail = SecondMailer.create_share(@recipient) + mail = SecondMailer.share assert_equal "second mail", mail.body.to_s.strip - mail = FirstMailer.create_share(@recipient) + mail = FirstMailer.share assert_equal "first mail", mail.body.to_s.strip - mail = SecondMailer.create_share(@recipient) + mail = SecondMailer.share assert_equal "second mail", mail.body.to_s.strip end end diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index df5afda447..b3bf1b9acd 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -120,11 +120,11 @@ class TestMailer < ActionMailer::Base content_type "multipart/alternative" part "text/plain" do |p| - p.body = render_message(:text => "blah") + p.body = render(:text => "blah") end part "text/html" do |p| - p.body = render_message(:inline => "<%= content_tag(:b, 'blah') %>") + p.body = render(:inline => "<%= content_tag(:b, 'blah') %>") end end @@ -297,7 +297,7 @@ class TestMailer < ActionMailer::Base recipients "no.one@nowhere.test" subject "return path test" from "some.one@somewhere.test" - headers "return-path" => "another@somewhere.test" + headers["return-path"] = "another@somewhere.test" render :text => "testing" end @@ -350,7 +350,7 @@ class ActionMailerTest < Test::Unit::TestCase def test_nested_parts created = nil - assert_nothing_raised { created = TestMailer.create_nested_multipart(@recipient)} + assert_nothing_raised { created = TestMailer.nested_multipart(@recipient)} assert_equal 2, created.parts.size assert_equal 2, created.parts.first.parts.size @@ -366,8 +366,8 @@ class ActionMailerTest < Test::Unit::TestCase def test_nested_parts_with_body created = nil - TestMailer.create_nested_multipart_with_body(@recipient) - assert_nothing_raised { created = TestMailer.create_nested_multipart_with_body(@recipient)} + TestMailer.nested_multipart_with_body(@recipient) + assert_nothing_raised { created = TestMailer.nested_multipart_with_body(@recipient)} assert_equal 1,created.parts.size assert_equal 2,created.parts.first.parts.size @@ -382,7 +382,7 @@ class ActionMailerTest < Test::Unit::TestCase def test_attachment_with_custom_header created = nil - assert_nothing_raised { created = TestMailer.create_attachment_with_custom_header(@recipient) } + assert_nothing_raised { created = TestMailer.attachment_with_custom_header(@recipient) } assert created.parts.any? { |p| p.header['content-id'].to_s == "" } end @@ -397,7 +397,7 @@ class ActionMailerTest < Test::Unit::TestCase expected.date = Time.now created = nil - assert_nothing_raised { created = TestMailer.create_signed_up(@recipient) } + assert_nothing_raised { created = TestMailer.signed_up(@recipient) } assert_not_nil created expected.message_id = '<123@456>' @@ -405,7 +405,7 @@ class ActionMailerTest < Test::Unit::TestCase assert_equal expected.encoded, created.encoded - assert_nothing_raised { TestMailer.deliver_signed_up(@recipient) } + assert_nothing_raised { TestMailer.signed_up(@recipient).deliver } delivered = ActionMailer::Base.deliveries.first assert_not_nil delivered @@ -425,7 +425,7 @@ class ActionMailerTest < Test::Unit::TestCase expected.date = Time.local(2004, 12, 12) created = nil - assert_nothing_raised { created = TestMailer.create_custom_template(@recipient) } + assert_nothing_raised { created = TestMailer.custom_template(@recipient) } assert_not_nil created expected.message_id = '<123@456>' created.message_id = '<123@456>' @@ -448,7 +448,7 @@ class ActionMailerTest < Test::Unit::TestCase # Now that the template is registered, there should be one part. The text/plain part. created = nil - assert_nothing_raised { created = TestMailer.create_custom_templating_extension(@recipient) } + assert_nothing_raised { created = TestMailer.custom_templating_extension(@recipient) } assert_not_nil created assert_equal 2, created.parts.length assert_equal 'text/plain', created.parts[0].mime_type @@ -464,13 +464,13 @@ class ActionMailerTest < Test::Unit::TestCase expected.date = Time.local(2004, 12, 12) created = nil - assert_nothing_raised { created = TestMailer.create_cancelled_account(@recipient) } + assert_nothing_raised { created = TestMailer.cancelled_account(@recipient) } assert_not_nil created expected.message_id = '<123@456>' created.message_id = '<123@456>' assert_equal expected.encoded, created.encoded - assert_nothing_raised { TestMailer.deliver_cancelled_account(@recipient) } + assert_nothing_raised { TestMailer.cancelled_account(@recipient).deliver } assert_not_nil ActionMailer::Base.deliveries.first delivered = ActionMailer::Base.deliveries.first expected.message_id = '<123@456>' @@ -491,7 +491,7 @@ class ActionMailerTest < Test::Unit::TestCase created = nil assert_nothing_raised do - created = TestMailer.create_cc_bcc @recipient + created = TestMailer.cc_bcc @recipient end assert_not_nil created expected.message_id = '<123@456>' @@ -499,7 +499,7 @@ class ActionMailerTest < Test::Unit::TestCase assert_equal expected.encoded, created.encoded assert_nothing_raised do - TestMailer.deliver_cc_bcc @recipient + TestMailer.cc_bcc(@recipient).deliver end assert_not_nil ActionMailer::Base.deliveries.first @@ -512,7 +512,7 @@ class ActionMailerTest < Test::Unit::TestCase def test_from_without_name_for_smtp ActionMailer::Base.delivery_method = :smtp - TestMailer.deliver_from_without_name + TestMailer.from_without_name.deliver mail = MockSMTP.deliveries.first assert_not_nil mail @@ -523,7 +523,7 @@ class ActionMailerTest < Test::Unit::TestCase def test_from_with_name_for_smtp ActionMailer::Base.delivery_method = :smtp - TestMailer.deliver_from_with_name + TestMailer.from_with_name.deliver mail = MockSMTP.deliveries.first assert_not_nil mail @@ -544,7 +544,7 @@ class ActionMailerTest < Test::Unit::TestCase created = nil assert_nothing_raised do - created = TestMailer.create_different_reply_to @recipient + created = TestMailer.different_reply_to @recipient end assert_not_nil created @@ -554,7 +554,7 @@ class ActionMailerTest < Test::Unit::TestCase assert_equal expected.encoded, created.encoded assert_nothing_raised do - TestMailer.deliver_different_reply_to @recipient + TestMailer.different_reply_to(@recipient).deliver end delivered = ActionMailer::Base.deliveries.first @@ -578,7 +578,7 @@ class ActionMailerTest < Test::Unit::TestCase created = nil assert_nothing_raised do - created = TestMailer.create_iso_charset @recipient + created = TestMailer.iso_charset @recipient end assert_not_nil created @@ -588,7 +588,7 @@ class ActionMailerTest < Test::Unit::TestCase assert_equal expected.encoded, created.encoded assert_nothing_raised do - TestMailer.deliver_iso_charset @recipient + TestMailer.iso_charset(@recipient).deliver end delivered = ActionMailer::Base.deliveries.first @@ -612,7 +612,7 @@ class ActionMailerTest < Test::Unit::TestCase created = nil assert_nothing_raised do - created = TestMailer.create_unencoded_subject @recipient + created = TestMailer.unencoded_subject @recipient end assert_not_nil created @@ -622,7 +622,7 @@ class ActionMailerTest < Test::Unit::TestCase assert_equal expected.encoded, created.encoded assert_nothing_raised do - TestMailer.deliver_unencoded_subject @recipient + TestMailer.unencoded_subject(@recipient).deliver end delivered = ActionMailer::Base.deliveries.first @@ -634,38 +634,33 @@ class ActionMailerTest < Test::Unit::TestCase assert_equal expected.encoded, delivered.encoded end - def test_instances_are_nil - assert_nil ActionMailer::Base.new - assert_nil TestMailer.new - end - def test_deliveries_array assert_not_nil ActionMailer::Base.deliveries assert_equal 0, ActionMailer::Base.deliveries.size - TestMailer.deliver_signed_up(@recipient) + TestMailer.signed_up(@recipient).deliver assert_equal 1, ActionMailer::Base.deliveries.size assert_not_nil ActionMailer::Base.deliveries.first end def test_perform_deliveries_flag ActionMailer::Base.perform_deliveries = false - TestMailer.deliver_signed_up(@recipient) + TestMailer.signed_up(@recipient).deliver assert_equal 0, ActionMailer::Base.deliveries.size ActionMailer::Base.perform_deliveries = true - TestMailer.deliver_signed_up(@recipient) + TestMailer.signed_up(@recipient).deliver assert_equal 1, ActionMailer::Base.deliveries.size end def test_doesnt_raise_errors_when_raise_delivery_errors_is_false ActionMailer::Base.raise_delivery_errors = false Mail::TestMailer.any_instance.expects(:deliver!).raises(Exception) - assert_nothing_raised { TestMailer.deliver_signed_up(@recipient) } + assert_nothing_raised { TestMailer.signed_up(@recipient).deliver } end def test_performs_delivery_via_sendmail IO.expects(:popen).once.with('/usr/sbin/sendmail -i -t -f "system@loudthinking.com" test@localhost', 'w+') ActionMailer::Base.delivery_method = :sendmail - TestMailer.deliver_signed_up(@recipient) + TestMailer.signed_up(@recipient).deliver end def test_unquote_quoted_printable_subject @@ -750,7 +745,7 @@ EOF created = nil assert_nothing_raised do - created = TestMailer.create_extended_headers @recipient + created = TestMailer.extended_headers @recipient end assert_not_nil created @@ -760,7 +755,7 @@ EOF assert_equal expected.encoded, created.encoded assert_nothing_raised do - TestMailer.deliver_extended_headers @recipient + TestMailer.extended_headers(@recipient).deliver end delivered = ActionMailer::Base.deliveries.first @@ -783,7 +778,7 @@ EOF expected.bcc = quote_address_if_necessary @recipient, "utf-8" expected.date = Time.local 2004, 12, 12 - created = TestMailer.create_utf8_body @recipient + created = TestMailer.utf8_body @recipient assert_match(/åœö blah/, created.encoded) end @@ -798,7 +793,7 @@ EOF expected.bcc = quote_address_if_necessary @recipient, "utf-8" expected.date = Time.local 2004, 12, 12 - created = TestMailer.create_utf8_body @recipient + created = TestMailer.utf8_body @recipient assert_match(/\nFrom: =\?utf-8\?Q\?Foo_.*?\?= \r/, created.encoded) assert_match(/\nTo: =\?utf-8\?Q\?Foo_.*?\?= , \r\n\tExample Recipient _Google}, mail.body.to_s end def test_various_newlines - mail = TestMailer.create_various_newlines(@recipient) + mail = TestMailer.various_newlines(@recipient) assert_equal("line #1\nline #2\nline #3\nline #4\n\n" + "line #5\n\nline#6\n\nline #7", mail.body.to_s) end def test_various_newlines_multipart - mail = TestMailer.create_various_newlines_multipart(@recipient) + mail = TestMailer.various_newlines_multipart(@recipient) assert_equal "line #1\nline #2\nline #3\nline #4\n\n", mail.parts[0].body.to_s assert_equal "

line #1

\n

line #2

\n

line #3

\n

line #4

\n\n", mail.parts[1].body.to_s assert_equal "line #1\r\nline #2\r\nline #3\r\nline #4\r\n\r\n", mail.parts[0].body.encoded @@ -962,7 +957,7 @@ EOF def test_headers_removed_on_smtp_delivery ActionMailer::Base.delivery_method = :smtp - TestMailer.deliver_cc_bcc(@recipient) + TestMailer.cc_bcc(@recipient).deliver assert MockSMTP.deliveries[0][2].include?("root@loudthinking.com") assert MockSMTP.deliveries[0][2].include?("nobody@loudthinking.com") assert MockSMTP.deliveries[0][2].include?(@recipient) @@ -975,7 +970,7 @@ EOF ActionMailer::Base.delivery_method = :file tmp_location = ActionMailer::Base.file_settings[:location] - TestMailer.deliver_cc_bcc(@recipient) + TestMailer.cc_bcc(@recipient).deliver assert File.exists?(tmp_location) assert File.directory?(tmp_location) assert File.exists?(File.join(tmp_location, @recipient)) @@ -1002,12 +997,12 @@ EOF expected = "01 Quien Te Dij\212at. Pitbull.mp3" if expected.respond_to?(:force_encoding) - result = attachment.original_filename.dup + result = attachment.filename.dup expected.force_encoding(Encoding::ASCII_8BIT) result.force_encoding(Encoding::ASCII_8BIT) assert_equal expected, result else - assert_equal expected, attachment.original_filename + assert_equal expected, attachment.filename end end @@ -1018,13 +1013,13 @@ EOF end def test_empty_header_values_omitted - result = TestMailer.create_unnamed_attachment(@recipient).encoded + result = TestMailer.unnamed_attachment(@recipient).encoded assert_match %r{Content-Type: application/octet-stream;}, result assert_match %r{Content-Disposition: attachment;}, result end def test_headers_with_nonalpha_chars - mail = TestMailer.create_headers_with_nonalpha_chars(@recipient) + mail = TestMailer.headers_with_nonalpha_chars(@recipient) assert !mail.from_addrs.empty? assert !mail.cc_addrs.empty? assert !mail.bcc_addrs.empty? @@ -1033,33 +1028,33 @@ EOF assert_match(/:/, mail[:bcc].decoded) end - def test_deliver_with_mail_object - mail = TestMailer.create_headers_with_nonalpha_chars(@recipient) - assert_nothing_raised { TestMailer.deliver(mail) } + def test_with_mail_object_deliver + mail = TestMailer.headers_with_nonalpha_chars(@recipient) + assert_nothing_raised { mail.deliver } assert_equal 1, TestMailer.deliveries.length end def test_multipart_with_template_path_with_dots - mail = FunkyPathMailer.create_multipart_with_template_path_with_dots(@recipient) + mail = FunkyPathMailer.multipart_with_template_path_with_dots(@recipient) assert_equal 2, mail.parts.length assert "text/plain", mail.parts[1].mime_type assert "utf-8", mail.parts[1].charset end def test_custom_content_type_attributes - mail = TestMailer.create_custom_content_type_attributes + mail = TestMailer.custom_content_type_attributes assert_match %r{format=flowed}, mail.content_type assert_match %r{charset=utf-8}, mail.content_type end def test_return_path_with_create - mail = TestMailer.create_return_path + mail = TestMailer.return_path assert_equal "another@somewhere.test", mail.return_path end def test_return_path_with_deliver ActionMailer::Base.delivery_method = :smtp - TestMailer.deliver_return_path + TestMailer.return_path.deliver assert_match %r{^Return-Path: }, MockSMTP.deliveries[0][0] assert_equal "another@somewhere.test", MockSMTP.deliveries[0][1].to_s end @@ -1069,7 +1064,7 @@ EOF MockSMTP.any_instance.expects(:respond_to?).with(:enable_starttls_auto).returns(true) MockSMTP.any_instance.expects(:enable_starttls_auto) ActionMailer::Base.delivery_method = :smtp - TestMailer.deliver_signed_up(@recipient) + TestMailer.signed_up(@recipient).deliver end def test_starttls_is_disabled_if_not_supported @@ -1077,16 +1072,16 @@ EOF MockSMTP.any_instance.expects(:respond_to?).with(:enable_starttls_auto).returns(false) MockSMTP.any_instance.expects(:enable_starttls_auto).never ActionMailer::Base.delivery_method = :smtp - TestMailer.deliver_signed_up(@recipient) + TestMailer.signed_up(@recipient).deliver end def test_starttls_is_not_enabled - ActionMailer::Base.delivery_settings[:smtp].merge!(:enable_starttls_auto => false) + TestMailer.delivery_settings[:smtp].merge!(:enable_starttls_auto => false) MockSMTP.any_instance.expects(:respond_to?).never - ActionMailer::Base.delivery_method = :smtp - TestMailer.deliver_signed_up(@recipient) + TestMailer.delivery_method = :smtp + TestMailer.signed_up(@recipient).deliver ensure - ActionMailer::Base.delivery_settings[:smtp].merge!(:enable_starttls_auto => true) + TestMailer.delivery_settings[:smtp].merge!(:enable_starttls_auto => true) end end @@ -1103,7 +1098,7 @@ class InheritableTemplateRootTest < Test::Unit::TestCase end end -class MethodNamingTest < Test::Unit::TestCase +class MethodNamingTest < ActiveSupport::TestCase class TestMailer < ActionMailer::Base def send render :text => 'foo' @@ -1123,12 +1118,13 @@ class MethodNamingTest < Test::Unit::TestCase def test_send_method assert_nothing_raised do assert_emails 1 do - TestMailer.deliver_send + assert_deprecated do + TestMailer.deliver_send + end end end end end - class RespondToTest < Test::Unit::TestCase class RespondToMailer < ActionMailer::Base; end @@ -1191,4 +1187,4 @@ class RespondToTest < Test::Unit::TestCase assert_match(/undefined method.*not_a_method/, error.message) end -end +end \ No newline at end of file diff --git a/actionmailer/test/subscriber_test.rb b/actionmailer/test/subscriber_test.rb index aed5d2ca7e..6c347b8392 100644 --- a/actionmailer/test/subscriber_test.rb +++ b/actionmailer/test/subscriber_test.rb @@ -24,21 +24,21 @@ class AMSubscriberTest < ActionMailer::TestCase end def test_deliver_is_notified - TestMailer.deliver_basic + TestMailer.basic.deliver wait - assert_equal 1, @logger.logged(:info).size - assert_match /Sent mail to somewhere@example.com/, @logger.logged(:info).first - assert_equal 1, @logger.logged(:debug).size - assert_match /Hello world/, @logger.logged(:debug).first + assert_equal(1, @logger.logged(:info).size) + assert_match(/Sent mail to somewhere@example.com/, @logger.logged(:info).first) + assert_equal(1, @logger.logged(:debug).size) + assert_match(/Hello world/, @logger.logged(:debug).first) end def test_receive_is_notified fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email") TestMailer.receive(fixture) wait - assert_equal 1, @logger.logged(:info).size - assert_match /Received mail/, @logger.logged(:info).first - assert_equal 1, @logger.logged(:debug).size - assert_match /Jamis/, @logger.logged(:debug).first + assert_equal(1, @logger.logged(:info).size) + assert_match(/Received mail/, @logger.logged(:info).first) + assert_equal(1, @logger.logged(:debug).size) + assert_match(/Jamis/, @logger.logged(:debug).first) end end \ No newline at end of file diff --git a/actionmailer/test/test_helper_test.rb b/actionmailer/test/test_helper_test.rb index 48e4433e98..3a38a91c28 100644 --- a/actionmailer/test/test_helper_test.rb +++ b/actionmailer/test/test_helper_test.rb @@ -44,7 +44,7 @@ class TestHelperMailerTest < ActionMailer::TestCase def test_assert_emails assert_nothing_raised do assert_emails 1 do - TestHelperMailer.deliver_test + TestHelperMailer.test.deliver end end end @@ -52,27 +52,27 @@ class TestHelperMailerTest < ActionMailer::TestCase def test_repeated_assert_emails_calls assert_nothing_raised do assert_emails 1 do - TestHelperMailer.deliver_test + TestHelperMailer.test.deliver end end assert_nothing_raised do assert_emails 2 do - TestHelperMailer.deliver_test - TestHelperMailer.deliver_test + TestHelperMailer.test.deliver + TestHelperMailer.test.deliver end end end def test_assert_emails_with_no_block assert_nothing_raised do - TestHelperMailer.deliver_test + TestHelperMailer.test.deliver assert_emails 1 end assert_nothing_raised do - TestHelperMailer.deliver_test - TestHelperMailer.deliver_test + TestHelperMailer.test.deliver + TestHelperMailer.test.deliver assert_emails 3 end end @@ -80,7 +80,7 @@ class TestHelperMailerTest < ActionMailer::TestCase def test_assert_no_emails assert_nothing_raised do assert_no_emails do - TestHelperMailer.create_test + TestHelperMailer.test end end end @@ -88,7 +88,7 @@ class TestHelperMailerTest < ActionMailer::TestCase def test_assert_emails_too_few_sent error = assert_raise ActiveSupport::TestCase::Assertion do assert_emails 2 do - TestHelperMailer.deliver_test + TestHelperMailer.test.deliver end end @@ -98,8 +98,8 @@ class TestHelperMailerTest < ActionMailer::TestCase def test_assert_emails_too_many_sent error = assert_raise ActiveSupport::TestCase::Assertion do assert_emails 1 do - TestHelperMailer.deliver_test - TestHelperMailer.deliver_test + TestHelperMailer.test.deliver + TestHelperMailer.test.deliver end end @@ -109,7 +109,7 @@ class TestHelperMailerTest < ActionMailer::TestCase def test_assert_no_emails_failure error = assert_raise ActiveSupport::TestCase::Assertion do assert_no_emails do - TestHelperMailer.deliver_test + TestHelperMailer.test.deliver end end diff --git a/actionmailer/test/tmail_compat_test.rb b/actionmailer/test/tmail_compat_test.rb index b7fcb3cfea..7c1d9a07c1 100644 --- a/actionmailer/test/tmail_compat_test.rb +++ b/actionmailer/test/tmail_compat_test.rb @@ -1,19 +1,23 @@ require 'abstract_unit' -class TmailCompatTest < Test::Unit::TestCase +class TmailCompatTest < ActiveSupport::TestCase def test_set_content_type_raises_deprecation_warning mail = Mail.new - assert_nothing_raised do - mail.set_content_type "text/plain" + assert_deprecated do + assert_nothing_raised do + mail.set_content_type "text/plain" + end end assert_equal mail.mime_type, "text/plain" end def test_transfer_encoding_raises_deprecation_warning mail = Mail.new - assert_nothing_raised do - mail.transfer_encoding "base64" + assert_deprecated do + assert_nothing_raised do + mail.transfer_encoding "base64" + end end assert_equal mail.content_transfer_encoding, "base64" end diff --git a/actionmailer/test/url_test.rb b/actionmailer/test/url_test.rb index b7ae5304ed..10b6a36efd 100644 --- a/actionmailer/test/url_test.rb +++ b/actionmailer/test/url_test.rb @@ -67,14 +67,14 @@ class ActionMailerUrlTest < Test::Unit::TestCase expected.date = Time.local(2004, 12, 12) created = nil - assert_nothing_raised { created = TestMailer.create_signed_up_with_url(@recipient) } + assert_nothing_raised { created = TestMailer.signed_up_with_url(@recipient) } assert_not_nil created expected.message_id = '<123@456>' created.message_id = '<123@456>' assert_equal expected.encoded, created.encoded - assert_nothing_raised { TestMailer.deliver_signed_up_with_url(@recipient) } + assert_nothing_raised { TestMailer.signed_up_with_url(@recipient).deliver } assert_not_nil ActionMailer::Base.deliveries.first delivered = ActionMailer::Base.deliveries.first -- cgit v1.2.3 From 9543298d02fbd28c5edaadeed0d14f1ba19263dc Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sun, 24 Jan 2010 10:35:45 -0600 Subject: Use Rails::Application ref in Rakefile and console scripts. Less places you need to change if you rename your application. --- railties/lib/generators/rails/app/templates/Rakefile | 2 +- railties/lib/generators/rails/app/templates/script/console.tt | 2 +- railties/lib/generators/rails/app/templates/script/dbconsole.tt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/railties/lib/generators/rails/app/templates/Rakefile b/railties/lib/generators/rails/app/templates/Rakefile index c19ad0e945..9cb2046439 100755 --- a/railties/lib/generators/rails/app/templates/Rakefile +++ b/railties/lib/generators/rails/app/templates/Rakefile @@ -7,4 +7,4 @@ require 'rake' require 'rake/testtask' require 'rake/rdoctask' -<%= app_const %>.load_tasks +Rails::Application.load_tasks diff --git a/railties/lib/generators/rails/app/templates/script/console.tt b/railties/lib/generators/rails/app/templates/script/console.tt index 915c5b8294..47aa254f9f 100755 --- a/railties/lib/generators/rails/app/templates/script/console.tt +++ b/railties/lib/generators/rails/app/templates/script/console.tt @@ -2,4 +2,4 @@ require File.expand_path('../../config/boot', __FILE__) require 'rails/commands/console' require File.expand_path('../../config/application', __FILE__) -Rails::Console.start(<%= app_const %>) +Rails::Console.start(Rails::Application) diff --git a/railties/lib/generators/rails/app/templates/script/dbconsole.tt b/railties/lib/generators/rails/app/templates/script/dbconsole.tt index a92f6f2844..1e53c1d761 100755 --- a/railties/lib/generators/rails/app/templates/script/dbconsole.tt +++ b/railties/lib/generators/rails/app/templates/script/dbconsole.tt @@ -2,4 +2,4 @@ require File.expand_path('../../config/boot', __FILE__) require 'rails/commands/dbconsole' require File.expand_path('../../config/application', __FILE__) -Rails::DBConsole.start(<%= app_const %>) +Rails::DBConsole.start(Rails::Application) -- cgit v1.2.3 From 5dead5bb88cf04b039df8a1a51ffdb18d0443efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sun, 24 Jan 2010 17:49:44 +0100 Subject: Maintain old_api and deprecated_api in different files. --- actionmailer/lib/action_mailer.rb | 1 + actionmailer/lib/action_mailer/base.rb | 1 + actionmailer/lib/action_mailer/deprecated_api.rb | 252 +---------------------- actionmailer/lib/action_mailer/old_api.rb | 250 ++++++++++++++++++++++ 4 files changed, 261 insertions(+), 243 deletions(-) create mode 100644 actionmailer/lib/action_mailer/old_api.rb diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index 67466e15e2..8339826197 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -36,6 +36,7 @@ module ActionMailer autoload :DeliveryMethods autoload :DeprecatedApi autoload :MailHelper + autoload :OldApi autoload :Quoting autoload :TestCase autoload :TestHelper diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 8e30c54c49..77b9ac4a97 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -267,6 +267,7 @@ module ActionMailer #:nodoc: helper ActionMailer::MailHelper extend ActionMailer::DeliveryMethods + include ActionMailer::OldApi include ActionMailer::DeprecatedApi add_delivery_method :smtp, Mail::SMTP, diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index f36b1befd6..530a9c1922 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -1,78 +1,10 @@ module ActionMailer - # Part of this API is deprecated and is going to be removed in Rails 3.1 (just check - # the methods which give you a warning). - # All the rest will be deprecated after 3.1 release instead, this allows a smoother - # migration path. + # This is the API which is deprecated and is going to be removed on Rails 3.1 release. + # Part of the old API will be deprecated after 3.1, for a smoother deprecation process. + # Chech those in OldApi instead. module DeprecatedApi #:nodoc: extend ActiveSupport::Concern - included do - extend ActionMailer::AdvAttrAccessor - - @@protected_instance_variables = %w(@parts) - cattr_reader :protected_instance_variables - - # Specify the BCC addresses for the message - adv_attr_accessor :bcc - - # Specify the CC addresses for the message. - adv_attr_accessor :cc - - # Specify the charset to use for the message. This defaults to the - # +default_charset+ specified for ActionMailer::Base. - adv_attr_accessor :charset - - # Specify the content type for the message. This defaults to text/plain - # in most cases, but can be automatically set in some situations. - adv_attr_accessor :content_type - - # Specify the from address for the message. - adv_attr_accessor :from - - # Specify the address (if different than the "from" address) to direct - # replies to this message. - adv_attr_accessor :reply_to - - # Specify additional headers to be added to the message. - adv_attr_accessor :headers - - # Specify the order in which parts should be sorted, based on content-type. - # This defaults to the value for the +default_implicit_parts_order+. - adv_attr_accessor :implicit_parts_order - - # Defaults to "1.0", but may be explicitly given if needed. - adv_attr_accessor :mime_version - - # The recipient addresses for the message, either as a string (for a single - # address) or an array (for multiple addresses). - adv_attr_accessor :recipients - - # The date on which the message was sent. If not set (the default), the - # header will be set by the delivery agent. - adv_attr_accessor :sent_on - - # Specify the subject of the message. - adv_attr_accessor :subject - - # Specify the template name to use for current message. This is the "base" - # template name, without the extension or directory, and may be used to - # have multiple mailer methods share the same template. - adv_attr_accessor :template - - # Override the mailer name, which defaults to an inflected version of the - # mailer's class name. If you want to use a template in a non-standard - # location, you can use this to specify that location. - adv_attr_accessor :mailer_name - - # Define the body of the message. This is either a Hash (in which case it - # specifies the variables to pass to the template when it is rendered), - # or a string, in which case it specifies the actual text of the message. - adv_attr_accessor :body - - # Alias controller_path to mailer_name so render :partial in views work. - alias :controller_path :mailer_name - end - module ClassMethods # Deliver the given mail object directly. This can be used to deliver @@ -107,7 +39,7 @@ module ActionMailer when 'deliver' ActiveSupport::Deprecation.warn "#{self}.deliver_#{match[2]} is deprecated, " << "use #{self}.#{match[2]}.deliver instead", caller[0,2] - new(match[2], *parameters).deliver + new(match[2], *parameters).message.deliver else super end else @@ -127,6 +59,8 @@ module ActionMailer # object (from the create! method). If no cached mail object exists, and # no alternate has been given as the parameter, this will fail. def deliver!(mail = @_message) + ActiveSupport::Deprecation.warn "Calling deliver in the AM::Base object is deprecated, " << + "please call deliver in the Mail instance", caller[0,2] self.class.deliver(mail, false) end alias :deliver :deliver! @@ -143,48 +77,6 @@ module ActionMailer super end - def process(method_name, *args) - initialize_defaults(method_name) - super - unless @mail_was_called - create_parts - create_mail - end - @_message - end - - # Add a part to a multipart message, with the given content-type. The - # part itself is yielded to the block so that other properties (charset, - # body, headers, etc.) can be set on it. - def part(params) - params = {:content_type => params} if String === params - - if custom_headers = params.delete(:headers) - params.merge!(custom_headers) - end - - part = Mail::Part.new(params) - - yield part if block_given? - @parts << part - end - - # Add an attachment to a multipart message. This is simply a part with the - # content-disposition set to "attachment". - def attachment(params, &block) - params = { :content_type => params } if String === params - - params[:content] ||= params.delete(:data) || params.delete(:body) - - if params[:filename] - params = normalize_file_hash(params) - else - params = normalize_nonfile_hash(params) - end - - part(params, &block) - end - # Render a message but does not set it as mail body. Useful for rendering # data for part and attachments. # @@ -201,140 +93,14 @@ module ActionMailer private - def normalize_nonfile_hash(params) - content_disposition = "attachment;" - - mime_type = params.delete(:mime_type) - - if content_type = params.delete(:content_type) - content_type = "#{mime_type || content_type};" - end - - params[:body] = params.delete(:data) if params[:data] - - { :content_type => content_type, - :content_disposition => content_disposition }.merge(params) - end - - def normalize_file_hash(params) - filename = File.basename(params.delete(:filename)) - content_disposition = "attachment; filename=\"#{File.basename(filename)}\"" - - mime_type = params.delete(:mime_type) - - if (content_type = params.delete(:content_type)) && (content_type !~ /filename=/) - content_type = "#{mime_type || content_type}; filename=\"#{filename}\"" - end - - params[:body] = params.delete(:data) if params[:data] - - { :content_type => content_type, - :content_disposition => content_disposition }.merge(params) - end - - def create_mail #:nodoc: - m = @_message - - quote_fields!({:subject => subject, :to => recipients, :from => from, - :bcc => bcc, :cc => cc, :reply_to => reply_to}, charset) - - m.mime_version = mime_version unless mime_version.nil? - m.date = sent_on.to_time rescue sent_on if sent_on - - @headers.each { |k, v| m[k] = v } - - real_content_type, ctype_attrs = parse_content_type - main_type, sub_type = split_content_type(real_content_type) - - if @parts.size == 1 && @parts.first.parts.empty? - m.content_type([main_type, sub_type, ctype_attrs]) - m.body = @parts.first.body.encoded - else - @parts.each do |p| - m.add_part(p) - end - - m.body.set_sort_order(@implicit_parts_order) - m.body.sort_parts! - - if real_content_type =~ /multipart/ - ctype_attrs.delete "charset" - m.content_type([main_type, sub_type, ctype_attrs]) - end - end - - wrap_delivery_behavior! - m.content_transfer_encoding = '8bit' unless m.body.only_us_ascii? - - @_message - end - - # Set up the default values for the various instance variables of this - # mailer. Subclasses may override this method to provide different - # defaults. - def initialize_defaults(method_name) #:nodoc: - @charset ||= self.class.default_charset.dup - @content_type ||= self.class.default_content_type.dup - @implicit_parts_order ||= self.class.default_implicit_parts_order.dup - @mime_version ||= self.class.default_mime_version.dup if self.class.default_mime_version - - @mailer_name ||= self.class.mailer_name.dup - @template ||= method_name - @mail_was_called = false - - @parts ||= [] - @headers ||= {} - @sent_on ||= Time.now - @body ||= {} - end def create_parts #:nodoc: - if String === @body - self.response_body = @body - elsif @body.is_a?(Hash) && !@body.empty? + if @body.is_a?(Hash) && !@body.empty? + ActiveSupport::Deprecation.warn "Giving a hash to body is deprecated, please use instance variables instead", caller[0,2] @body.each { |k, v| instance_variable_set(:"@#{k}", v) } end - if String === response_body - @parts.unshift create_inline_part(response_body) - else - self.class.template_root.find_all(@template, {}, @mailer_name).each do |template| - @parts << create_inline_part(render_to_body(:_template => template), template.mime_type) - end - - if @parts.size > 1 - @content_type = "multipart/alternative" if @content_type !~ /^multipart/ - end - - # If this is a multipart e-mail add the mime_version if it is not - # already set. - @mime_version ||= "1.0" if !@parts.empty? - end - end - - def create_inline_part(body, mime_type=nil) #:nodoc: - ct = mime_type || "text/plain" - main_type, sub_type = split_content_type(ct.to_s) - - Mail::Part.new( - :content_type => [main_type, sub_type, {:charset => charset}], - :content_disposition => "inline", - :body => body - ) - end - - def split_content_type(ct) #:nodoc: - ct.to_s.split("/") - end - - def parse_content_type(defaults=nil) #:nodoc: - if @content_type.blank? - [ nil, {} ] - else - ctype, *attrs = @content_type.split(/;\s*/) - attrs = attrs.inject({}) { |h,s| k,v = s.split(/\=/, 2); h[k] = v; h } - [ctype, {"charset" => @charset}.merge(attrs)] - end + super end end diff --git a/actionmailer/lib/action_mailer/old_api.rb b/actionmailer/lib/action_mailer/old_api.rb new file mode 100644 index 0000000000..204dc473e8 --- /dev/null +++ b/actionmailer/lib/action_mailer/old_api.rb @@ -0,0 +1,250 @@ +module ActionMailer + module OldApi + extend ActiveSupport::Concern + + included do + extend ActionMailer::AdvAttrAccessor + + @@protected_instance_variables = %w(@parts) + cattr_reader :protected_instance_variables + + # Specify the BCC addresses for the message + adv_attr_accessor :bcc + + # Specify the CC addresses for the message. + adv_attr_accessor :cc + + # Specify the charset to use for the message. This defaults to the + # +default_charset+ specified for ActionMailer::Base. + adv_attr_accessor :charset + + # Specify the content type for the message. This defaults to text/plain + # in most cases, but can be automatically set in some situations. + adv_attr_accessor :content_type + + # Specify the from address for the message. + adv_attr_accessor :from + + # Specify the address (if different than the "from" address) to direct + # replies to this message. + adv_attr_accessor :reply_to + + # Specify additional headers to be added to the message. + adv_attr_accessor :headers + + # Specify the order in which parts should be sorted, based on content-type. + # This defaults to the value for the +default_implicit_parts_order+. + adv_attr_accessor :implicit_parts_order + + # Defaults to "1.0", but may be explicitly given if needed. + adv_attr_accessor :mime_version + + # The recipient addresses for the message, either as a string (for a single + # address) or an array (for multiple addresses). + adv_attr_accessor :recipients + + # The date on which the message was sent. If not set (the default), the + # header will be set by the delivery agent. + adv_attr_accessor :sent_on + + # Specify the subject of the message. + adv_attr_accessor :subject + + # Specify the template name to use for current message. This is the "base" + # template name, without the extension or directory, and may be used to + # have multiple mailer methods share the same template. + adv_attr_accessor :template + + # Override the mailer name, which defaults to an inflected version of the + # mailer's class name. If you want to use a template in a non-standard + # location, you can use this to specify that location. + adv_attr_accessor :mailer_name + + # Define the body of the message. This is either a Hash (in which case it + # specifies the variables to pass to the template when it is rendered), + # or a string, in which case it specifies the actual text of the message. + adv_attr_accessor :body + + # Alias controller_path to mailer_name so render :partial in views work. + alias :controller_path :mailer_name + end + + def process(method_name, *args) + initialize_defaults(method_name) + super + unless @mail_was_called + create_parts + create_mail + end + @_message + end + + # Add a part to a multipart message, with the given content-type. The + # part itself is yielded to the block so that other properties (charset, + # body, headers, etc.) can be set on it. + def part(params) + params = {:content_type => params} if String === params + + if custom_headers = params.delete(:headers) + params.merge!(custom_headers) + end + + part = Mail::Part.new(params) + + yield part if block_given? + @parts << part + end + + # Add an attachment to a multipart message. This is simply a part with the + # content-disposition set to "attachment". + def attachment(params, &block) + params = { :content_type => params } if String === params + + params[:content] ||= params.delete(:data) || params.delete(:body) + + if params[:filename] + params = normalize_file_hash(params) + else + params = normalize_nonfile_hash(params) + end + + part(params, &block) + end + + protected + + def normalize_nonfile_hash(params) + content_disposition = "attachment;" + + mime_type = params.delete(:mime_type) + + if content_type = params.delete(:content_type) + content_type = "#{mime_type || content_type};" + end + + params[:body] = params.delete(:data) if params[:data] + + { :content_type => content_type, + :content_disposition => content_disposition }.merge(params) + end + + def normalize_file_hash(params) + filename = File.basename(params.delete(:filename)) + content_disposition = "attachment; filename=\"#{File.basename(filename)}\"" + + mime_type = params.delete(:mime_type) + + if (content_type = params.delete(:content_type)) && (content_type !~ /filename=/) + content_type = "#{mime_type || content_type}; filename=\"#{filename}\"" + end + + params[:body] = params.delete(:data) if params[:data] + + { :content_type => content_type, + :content_disposition => content_disposition }.merge(params) + end + + def create_mail #:nodoc: + m = @_message + + quote_fields!({:subject => subject, :to => recipients, :from => from, + :bcc => bcc, :cc => cc, :reply_to => reply_to}, charset) + + m.mime_version = mime_version unless mime_version.nil? + m.date = sent_on.to_time rescue sent_on if sent_on + + @headers.each { |k, v| m[k] = v } + + real_content_type, ctype_attrs = parse_content_type + main_type, sub_type = split_content_type(real_content_type) + + if @parts.size == 1 && @parts.first.parts.empty? + m.content_type([main_type, sub_type, ctype_attrs]) + m.body = @parts.first.body.encoded + else + @parts.each do |p| + m.add_part(p) + end + + m.body.set_sort_order(@implicit_parts_order) + m.body.sort_parts! + + if real_content_type =~ /multipart/ + ctype_attrs.delete "charset" + m.content_type([main_type, sub_type, ctype_attrs]) + end + end + + wrap_delivery_behavior! + m.content_transfer_encoding = '8bit' unless m.body.only_us_ascii? + + @_message + end + + # Set up the default values for the various instance variables of this + # mailer. Subclasses may override this method to provide different + # defaults. + def initialize_defaults(method_name) #:nodoc: + @charset ||= self.class.default_charset.dup + @content_type ||= self.class.default_content_type.dup + @implicit_parts_order ||= self.class.default_implicit_parts_order.dup + @mime_version ||= self.class.default_mime_version.dup if self.class.default_mime_version + + @mailer_name ||= self.class.mailer_name.dup + @template ||= method_name + @mail_was_called = false + + @parts ||= [] + @headers ||= {} + @sent_on ||= Time.now + @body ||= {} + end + + def create_parts #:nodoc: + if String === @body + self.response_body = @body + end + + if String === response_body + @parts.unshift create_inline_part(response_body) + else + self.class.template_root.find_all(@template, {}, @mailer_name).each do |template| + @parts << create_inline_part(render_to_body(:_template => template), template.mime_type) + end + + if @parts.size > 1 + @content_type = "multipart/alternative" if @content_type !~ /^multipart/ + end + + # If this is a multipart e-mail add the mime_version if it is not + # already set. + @mime_version ||= "1.0" if !@parts.empty? + end + end + + def create_inline_part(body, mime_type=nil) #:nodoc: + ct = mime_type || "text/plain" + main_type, sub_type = split_content_type(ct.to_s) + + Mail::Part.new( + :content_type => [main_type, sub_type, {:charset => charset}], + :content_disposition => "inline", + :body => body + ) + end + + def split_content_type(ct) #:nodoc: + ct.to_s.split("/") + end + + def parse_content_type(defaults=nil) #:nodoc: + if @content_type.blank? + [ nil, {} ] + else + ctype, *attrs = @content_type.split(/;\s*/) + attrs = attrs.inject({}) { |h,s| k,v = s.split(/\=/, 2); h[k] = v; h } + [ctype, {"charset" => @charset}.merge(attrs)] + end + end + end +end \ No newline at end of file -- cgit v1.2.3 From 0d931fecbb1132abb71a83bb91435812f2012d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sun, 24 Jan 2010 18:11:57 +0100 Subject: Finish cleaning up delivery methods implementation. --- actionmailer/lib/action_mailer/base.rb | 29 +------ actionmailer/lib/action_mailer/delivery_methods.rb | 96 ++++++++++++---------- actionmailer/test/delivery_method_test.rb | 73 ---------------- actionmailer/test/delivery_methods_test.rb | 72 ++++++++++++++++ actionmailer/test/mail_service_test.rb | 22 ++--- 5 files changed, 138 insertions(+), 154 deletions(-) delete mode 100644 actionmailer/test/delivery_method_test.rb create mode 100644 actionmailer/test/delivery_methods_test.rb diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 77b9ac4a97..ad3a9c3c6d 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -253,10 +253,9 @@ module ActionMailer #:nodoc: # and appear last in the mime encoded message. You can also pick a different order from inside a method with # +implicit_parts_order+. class Base < AbstractController::Base + include DeliveryMethods, Quoting abstract! - include Quoting - include AbstractController::Logger include AbstractController::Rendering include AbstractController::LocalizedCache @@ -266,31 +265,9 @@ module ActionMailer #:nodoc: helper ActionMailer::MailHelper - extend ActionMailer::DeliveryMethods include ActionMailer::OldApi include ActionMailer::DeprecatedApi - add_delivery_method :smtp, Mail::SMTP, - :address => "localhost", - :port => 25, - :domain => 'localhost.localdomain', - :user_name => nil, - :password => nil, - :authentication => nil, - :enable_starttls_auto => true - - add_delivery_method :file, Mail::FileDelivery, - :location => defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails" - - add_delivery_method :sendmail, Mail::Sendmail, - :location => '/usr/sbin/sendmail', - :arguments => '-i -t' - - add_delivery_method :test, Mail::TestMailer - - superclass_delegating_reader :delivery_method - self.delivery_method = :smtp - private_class_method :new #:nodoc: cattr_accessor :raise_delivery_errors @@ -493,10 +470,6 @@ module ActionMailer #:nodoc: [responses, sort_order] end - def wrap_delivery_behavior!(method=nil) #:nodoc: - self.class.wrap_delivery_behavior(@_message, method) - end - def create_parts_from_responses(m, responses, charset) #:nodoc: if responses.size == 1 && !m.has_attachments? m.body = responses[0][:body] diff --git a/actionmailer/lib/action_mailer/delivery_methods.rb b/actionmailer/lib/action_mailer/delivery_methods.rb index 16b84d4118..38325e512f 100644 --- a/actionmailer/lib/action_mailer/delivery_methods.rb +++ b/actionmailer/lib/action_mailer/delivery_methods.rb @@ -1,63 +1,75 @@ +require 'tmpdir' + module ActionMailer - # This modules makes a DSL for adding delivery methods to ActionMailer + # Provides a DSL for adding delivery methods to ActionMailer. module DeliveryMethods - # TODO Make me class inheritable - def delivery_settings - @@delivery_settings ||= Hash.new { |h,k| h[k] = {} } - end + extend ActiveSupport::Concern - def delivery_methods - @@delivery_methods ||= {} - end + included do + extlib_inheritable_accessor :delivery_methods, :delivery_method, + :instance_writer => false - def delivery_method=(method) - raise ArgumentError, "Unknown delivery method #{method.inspect}" unless delivery_methods[method] - @delivery_method = method - end + self.delivery_methods = {} + self.delivery_method = :smtp - def add_delivery_method(symbol, klass, default_options={}) - self.delivery_methods[symbol] = klass - self.delivery_settings[symbol] = default_options - end + add_delivery_method :smtp, Mail::SMTP, + :address => "localhost", + :port => 25, + :domain => 'localhost.localdomain', + :user_name => nil, + :password => nil, + :authentication => nil, + :enable_starttls_auto => true - def wrap_delivery_behavior(mail, method=nil) - method ||= delivery_method + add_delivery_method :file, Mail::FileDelivery, + :location => defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails" - mail.register_for_delivery_notification(self) + add_delivery_method :sendmail, Mail::Sendmail, + :location => '/usr/sbin/sendmail', + :arguments => '-i -t' - if method.is_a?(Symbol) - mail.delivery_method(delivery_methods[method], - delivery_settings[method]) - else - mail.delivery_method(method) - end - - mail.perform_deliveries = perform_deliveries - mail.raise_delivery_errors = raise_delivery_errors + add_delivery_method :test, Mail::TestMailer end + module ClassMethods + # Adds a new delivery method through the given class using the given symbol + # as alias and the default options supplied: + # + # Example: + # + # add_delivery_method :sendmail, Mail::Sendmail, + # :location => '/usr/sbin/sendmail', + # :arguments => '-i -t' + # + def add_delivery_method(symbol, klass, default_options={}) + unless respond_to?(:"#{symbol}_settings") + extlib_inheritable_accessor(:"#{symbol}_settings", :instance_writer => false) + end - def respond_to?(method_symbol, include_private = false) #:nodoc: - matches_settings_method?(method_symbol) || super - end + send(:"#{symbol}_settings=", default_options) + self.delivery_methods[symbol.to_sym] = klass + end - protected + def wrap_delivery_behavior(mail, method=delivery_method) #:nodoc: + mail.register_for_delivery_notification(self) - # TODO Get rid of this method missing magic - def method_missing(method_symbol, *parameters) #:nodoc: - if match = matches_settings_method?(method_symbol) - if match[2] - delivery_settings[match[1].to_sym] = parameters[0] + if method.is_a?(Symbol) + if klass = delivery_methods[method.to_sym] + mail.delivery_method(klass, send(:"#{method}_settings")) + else + raise "Invalid delivery method #{method.inspect}" + end else - delivery_settings[match[1].to_sym] + mail.delivery_method(method) end - else - super + + mail.perform_deliveries = perform_deliveries + mail.raise_delivery_errors = raise_delivery_errors end end - def matches_settings_method?(method_name) #:nodoc: - /(#{delivery_methods.keys.join('|')})_settings(=)?$/.match(method_name.to_s) + def wrap_delivery_behavior!(*args) #:nodoc: + self.class.wrap_delivery_behavior(message, *args) end end end \ No newline at end of file diff --git a/actionmailer/test/delivery_method_test.rb b/actionmailer/test/delivery_method_test.rb deleted file mode 100644 index 1e7408d6d6..0000000000 --- a/actionmailer/test/delivery_method_test.rb +++ /dev/null @@ -1,73 +0,0 @@ -require 'abstract_unit' -require 'mail' - -class MyCustomDelivery -end - -class DefaultsDeliveryMethodsTest < ActionMailer::TestCase - def setup - set_delivery_method :smtp - end - - def teardown - restore_delivery_method - end - - def test_should_be_the_default_smtp - assert_equal :smtp, ActionMailer::Base.delivery_method - end - - def test_should_have_default_smtp_delivery_method_settings - settings = { :address => "localhost", - :port => 25, - :domain => 'localhost.localdomain', - :user_name => nil, - :password => nil, - :authentication => nil, - :enable_starttls_auto => true } - assert_equal settings, ActionMailer::Base.smtp_settings - end - - def test_should_have_default_file_delivery_method_settings - settings = {:location => "#{Dir.tmpdir}/mails"} - assert_equal settings, ActionMailer::Base.file_settings - end - - def test_should_have_default_sendmail_delivery_method_settings - settings = {:location => '/usr/sbin/sendmail', - :arguments => '-i -t'} - assert_equal settings, ActionMailer::Base.sendmail_settings - end -end - -class CustomDeliveryMethodsTest < ActionMailer::TestCase - def setup - ActionMailer::Base.add_delivery_method :custom, MyCustomDelivery - end - - def teardown - ActionMailer::Base.delivery_methods.delete(:custom) - ActionMailer::Base.delivery_settings.delete(:custom) - end - - def test_allow_to_add_a_custom_delivery_method - ActionMailer::Base.delivery_method = :custom - assert_equal :custom, ActionMailer::Base.delivery_method - end - - def test_allow_to_customize_custom_settings - ActionMailer::Base.custom_settings = { :foo => :bar } - assert_equal Hash[:foo => :bar], ActionMailer::Base.custom_settings - end - - def test_respond_to_custom_method_settings - assert_respond_to ActionMailer::Base, :custom_settings - assert_respond_to ActionMailer::Base, :custom_settings= - end - - def test_should_not_respond_for_invalid_method_settings - assert_raise NoMethodError do - ActionMailer::Base.another_settings - end - end -end diff --git a/actionmailer/test/delivery_methods_test.rb b/actionmailer/test/delivery_methods_test.rb new file mode 100644 index 0000000000..de3d54197d --- /dev/null +++ b/actionmailer/test/delivery_methods_test.rb @@ -0,0 +1,72 @@ +require 'abstract_unit' +require 'mail' + +class MyCustomDelivery +end + +class DefaultsDeliveryMethodsTest < ActionMailer::TestCase + def setup + set_delivery_method :smtp + end + + def teardown + restore_delivery_method + end + + def test_should_be_the_default_smtp + assert_equal :smtp, ActionMailer::Base.delivery_method + end + + def test_should_have_default_smtp_delivery_method_settings + settings = { :address => "localhost", + :port => 25, + :domain => 'localhost.localdomain', + :user_name => nil, + :password => nil, + :authentication => nil, + :enable_starttls_auto => true } + assert_equal settings, ActionMailer::Base.smtp_settings + end + + def test_should_have_default_file_delivery_method_settings + settings = {:location => "#{Dir.tmpdir}/mails"} + assert_equal settings, ActionMailer::Base.file_settings + end + + def test_should_have_default_sendmail_delivery_method_settings + settings = {:location => '/usr/sbin/sendmail', + :arguments => '-i -t'} + assert_equal settings, ActionMailer::Base.sendmail_settings + end +end + +class CustomDeliveryMethodsTest < ActionMailer::TestCase + def setup + ActionMailer::Base.add_delivery_method :custom, MyCustomDelivery + end + + def teardown + ActionMailer::Base.delivery_methods.delete(:custom) + end + + def test_allow_to_add_a_custom_delivery_method + ActionMailer::Base.delivery_method = :custom + assert_equal :custom, ActionMailer::Base.delivery_method + end + + def test_allow_to_customize_custom_settings + ActionMailer::Base.custom_settings = { :foo => :bar } + assert_equal Hash[:foo => :bar], ActionMailer::Base.custom_settings + end + + def test_respond_to_custom_method_settings + assert_respond_to ActionMailer::Base, :custom_settings + assert_respond_to ActionMailer::Base, :custom_settings= + end + + def test_should_not_respond_for_invalid_method_settings + assert_raise NoMethodError do + ActionMailer::Base.another_settings + end + end +end diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index b3bf1b9acd..c0a3f655b9 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -511,7 +511,7 @@ class ActionMailerTest < Test::Unit::TestCase end def test_from_without_name_for_smtp - ActionMailer::Base.delivery_method = :smtp + TestMailer.delivery_method = :smtp TestMailer.from_without_name.deliver mail = MockSMTP.deliveries.first @@ -522,7 +522,7 @@ class ActionMailerTest < Test::Unit::TestCase end def test_from_with_name_for_smtp - ActionMailer::Base.delivery_method = :smtp + TestMailer.delivery_method = :smtp TestMailer.from_with_name.deliver mail = MockSMTP.deliveries.first @@ -659,7 +659,7 @@ class ActionMailerTest < Test::Unit::TestCase def test_performs_delivery_via_sendmail IO.expects(:popen).once.with('/usr/sbin/sendmail -i -t -f "system@loudthinking.com" test@localhost', 'w+') - ActionMailer::Base.delivery_method = :sendmail + TestMailer.delivery_method = :sendmail TestMailer.signed_up(@recipient).deliver end @@ -956,7 +956,7 @@ EOF end def test_headers_removed_on_smtp_delivery - ActionMailer::Base.delivery_method = :smtp + TestMailer.delivery_method = :smtp TestMailer.cc_bcc(@recipient).deliver assert MockSMTP.deliveries[0][2].include?("root@loudthinking.com") assert MockSMTP.deliveries[0][2].include?("nobody@loudthinking.com") @@ -1053,35 +1053,35 @@ EOF end def test_return_path_with_deliver - ActionMailer::Base.delivery_method = :smtp + TestMailer.delivery_method = :smtp TestMailer.return_path.deliver assert_match %r{^Return-Path: }, MockSMTP.deliveries[0][0] assert_equal "another@somewhere.test", MockSMTP.deliveries[0][1].to_s end def test_starttls_is_enabled_if_supported - ActionMailer::Base.delivery_settings[:smtp].merge!(:enable_starttls_auto => true) + TestMailer.smtp_settings.merge!(:enable_starttls_auto => true) MockSMTP.any_instance.expects(:respond_to?).with(:enable_starttls_auto).returns(true) MockSMTP.any_instance.expects(:enable_starttls_auto) - ActionMailer::Base.delivery_method = :smtp + TestMailer.delivery_method = :smtp TestMailer.signed_up(@recipient).deliver end def test_starttls_is_disabled_if_not_supported - ActionMailer::Base.delivery_settings[:smtp].merge!(:enable_starttls_auto => true) + TestMailer.smtp_settings.merge!(:enable_starttls_auto => true) MockSMTP.any_instance.expects(:respond_to?).with(:enable_starttls_auto).returns(false) MockSMTP.any_instance.expects(:enable_starttls_auto).never - ActionMailer::Base.delivery_method = :smtp + TestMailer.delivery_method = :smtp TestMailer.signed_up(@recipient).deliver end def test_starttls_is_not_enabled - TestMailer.delivery_settings[:smtp].merge!(:enable_starttls_auto => false) + TestMailer.smtp_settings.merge!(:enable_starttls_auto => false) MockSMTP.any_instance.expects(:respond_to?).never TestMailer.delivery_method = :smtp TestMailer.signed_up(@recipient).deliver ensure - TestMailer.delivery_settings[:smtp].merge!(:enable_starttls_auto => true) + TestMailer.smtp_settings.merge!(:enable_starttls_auto => true) end end -- cgit v1.2.3 From 99f960a3d73b62a957988bbee0906264f35afc2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sun, 24 Jan 2010 18:40:04 +0100 Subject: Handle some TODOs and deprecations. --- .../lib/action_mailer/adv_attr_accessor.rb | 2 -- actionmailer/lib/action_mailer/base.rb | 39 +++++++++++----------- actionmailer/lib/action_mailer/deprecated_api.rb | 21 +++++++----- actionmailer/lib/action_mailer/old_api.rb | 16 ++++----- actionmailer/lib/action_mailer/test_helper.rb | 1 - actionmailer/test/mail_service_test.rb | 6 ++-- 6 files changed, 45 insertions(+), 40 deletions(-) diff --git a/actionmailer/lib/action_mailer/adv_attr_accessor.rb b/actionmailer/lib/action_mailer/adv_attr_accessor.rb index 91992ed839..be6b1feca9 100644 --- a/actionmailer/lib/action_mailer/adv_attr_accessor.rb +++ b/actionmailer/lib/action_mailer/adv_attr_accessor.rb @@ -1,8 +1,6 @@ module ActionMailer module AdvAttrAccessor #:nodoc: def adv_attr_accessor(*names) - - # TODO: ActiveSupport::Deprecation.warn() names.each do |name| ivar = "@#{name}" diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index ad3a9c3c6d..7e984124b7 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -302,7 +302,6 @@ module ActionMailer #:nodoc: @mailer_name ||= name.underscore end attr_writer :mailer_name - alias :controller_path :mailer_name # Receives a raw email, parses it into an email object, decodes it, @@ -324,23 +323,21 @@ module ActionMailer #:nodoc: end end - def template_root - self.view_paths && self.view_paths.first - end - - # Should template root overwrite the whole view_paths? - def template_root=(root) - self.view_paths = ActionView::Base.process_view_paths(root) - end - # TODO The delivery should happen inside the instrument block def delivered_email(mail) - ActiveSupport::Notifications.instrument("action_mailer.deliver", :mailer => self.name) do |payload| + ActiveSupport::Notifications.instrument("action_mailer.deliver") do |payload| self.set_payload_for_mail(payload, mail) end end + def respond_to?(method, *args) #:nodoc: + super || action_methods.include?(method.to_s) + end + + protected + def set_payload_for_mail(payload, mail) #:nodoc: + payload[:mailer] = self.name payload[:message_id] = mail.message_id payload[:subject] = mail.subject payload[:to] = mail.to @@ -351,13 +348,7 @@ module ActionMailer #:nodoc: payload[:mail] = mail.encoded end - def respond_to?(method, *args) - super || action_methods.include?(method.to_s) - end - - protected - - def method_missing(method, *args) + def method_missing(method, *args) #:nodoc: if action_methods.include?(method.to_s) new(method, *args).message else @@ -459,7 +450,7 @@ module ActionMailer #:nodoc: :content_type => self.class.default_content_type.dup } else - self.class.template_root.find_all(action_name, {}, self.class.mailer_name).each do |template| + each_template do |template| responses << { :body => render_to_body(:_template => template), :content_type => template.mime_type.to_s @@ -470,6 +461,16 @@ module ActionMailer #:nodoc: [responses, sort_order] end + def each_template(&block) #:nodoc: + self.class.view_paths.each do |load_paths| + templates = load_paths.find_all(action_name, {}, self.class.mailer_name) + unless templates.empty? + templates.each(&block) + return + end + end + end + def create_parts_from_responses(m, responses, charset) #:nodoc: if responses.size == 1 && !m.has_attachments? m.body = responses[0][:body] diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index 530a9c1922..0eb8d85676 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -25,11 +25,20 @@ module ActionMailer mail end - def respond_to?(method_symbol, include_private = false) #:nodoc: + def template_root + self.view_paths && self.view_paths.first + end + + def template_root=(root) + ActiveSupport::Deprecation.warn "template_root= is deprecated, use view_paths.unshift instead", caller[0,2] + self.view_paths = ActionView::Base.process_view_paths(root) + end + + def respond_to?(method_symbol, include_private = false) matches_dynamic_method?(method_symbol) || super end - def method_missing(method_symbol, *parameters) #:nodoc: + def method_missing(method_symbol, *parameters) if match = matches_dynamic_method?(method_symbol) case match[1] when 'create' @@ -49,7 +58,7 @@ module ActionMailer private - def matches_dynamic_method?(method_name) #:nodoc: + def matches_dynamic_method?(method_name) method_name = method_name.to_s /^(create|deliver)_([_a-z]\w*)/.match(method_name) || /^(new)$/.match(method_name) end @@ -70,10 +79,8 @@ module ActionMailer if options[:body] ActiveSupport::Deprecation.warn(':body in render deprecated. Please use instance ' << 'variables as assigns instead', caller[0,1]) - body options.delete(:body) end - super end @@ -93,13 +100,11 @@ module ActionMailer private - - def create_parts #:nodoc: + def create_parts if @body.is_a?(Hash) && !@body.empty? ActiveSupport::Deprecation.warn "Giving a hash to body is deprecated, please use instance variables instead", caller[0,2] @body.each { |k, v| instance_variable_set(:"@#{k}", v) } end - super end diff --git a/actionmailer/lib/action_mailer/old_api.rb b/actionmailer/lib/action_mailer/old_api.rb index 204dc473e8..f5b077ab98 100644 --- a/actionmailer/lib/action_mailer/old_api.rb +++ b/actionmailer/lib/action_mailer/old_api.rb @@ -1,5 +1,5 @@ module ActionMailer - module OldApi + module OldApi #:nodoc: extend ActiveSupport::Concern included do @@ -144,7 +144,7 @@ module ActionMailer :content_disposition => content_disposition }.merge(params) end - def create_mail #:nodoc: + def create_mail m = @_message quote_fields!({:subject => subject, :to => recipients, :from => from, @@ -184,7 +184,7 @@ module ActionMailer # Set up the default values for the various instance variables of this # mailer. Subclasses may override this method to provide different # defaults. - def initialize_defaults(method_name) #:nodoc: + def initialize_defaults(method_name) @charset ||= self.class.default_charset.dup @content_type ||= self.class.default_content_type.dup @implicit_parts_order ||= self.class.default_implicit_parts_order.dup @@ -200,7 +200,7 @@ module ActionMailer @body ||= {} end - def create_parts #:nodoc: + def create_parts if String === @body self.response_body = @body end @@ -208,7 +208,7 @@ module ActionMailer if String === response_body @parts.unshift create_inline_part(response_body) else - self.class.template_root.find_all(@template, {}, @mailer_name).each do |template| + self.class.view_paths.first.find_all(@template, {}, @mailer_name).each do |template| @parts << create_inline_part(render_to_body(:_template => template), template.mime_type) end @@ -222,7 +222,7 @@ module ActionMailer end end - def create_inline_part(body, mime_type=nil) #:nodoc: + def create_inline_part(body, mime_type=nil) ct = mime_type || "text/plain" main_type, sub_type = split_content_type(ct.to_s) @@ -233,11 +233,11 @@ module ActionMailer ) end - def split_content_type(ct) #:nodoc: + def split_content_type(ct) ct.to_s.split("/") end - def parse_content_type(defaults=nil) #:nodoc: + def parse_content_type(defaults=nil) if @content_type.blank? [ nil, {} ] else diff --git a/actionmailer/lib/action_mailer/test_helper.rb b/actionmailer/lib/action_mailer/test_helper.rb index f234c0248c..3a1612442f 100644 --- a/actionmailer/lib/action_mailer/test_helper.rb +++ b/actionmailer/lib/action_mailer/test_helper.rb @@ -58,7 +58,6 @@ module ActionMailer end end -# TODO: Deprecate this module Test module Unit class TestCase diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index c0a3f655b9..aa31c9a803 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -1085,13 +1085,15 @@ EOF end end -class InheritableTemplateRootTest < Test::Unit::TestCase +class InheritableTemplateRootTest < ActiveSupport::TestCase def test_attr expected = File.expand_path("#{File.dirname(__FILE__)}/fixtures/path.with.dots") assert_equal expected, FunkyPathMailer.template_root.to_s sub = Class.new(FunkyPathMailer) - sub.template_root = 'test/path' + assert_deprecated do + sub.template_root = 'test/path' + end assert_equal File.expand_path('test/path'), sub.template_root.to_s assert_equal expected, FunkyPathMailer.template_root.to_s -- cgit v1.2.3 From bd96614101262e0ad0cc176ed8e2d95a5c17936b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sun, 24 Jan 2010 19:36:42 +0100 Subject: Move old tests to a specific folder and add some delivery method tests. --- actionmailer/Rakefile | 4 +- actionmailer/lib/action_mailer/base.rb | 10 +- actionmailer/lib/action_mailer/delivery_methods.rb | 16 +- actionmailer/lib/action_mailer/mail_helper.rb | 2 +- actionmailer/test/abstract_unit.rb | 24 +- actionmailer/test/adv_attr_test.rb | 36 - actionmailer/test/asset_host_test.rb | 52 - actionmailer/test/base_test.rb | 8 - actionmailer/test/delivery_methods_test.rb | 112 +- actionmailer/test/mail_helper_test.rb | 94 -- actionmailer/test/mail_layout_test.rb | 148 --- actionmailer/test/mail_render_test.rb | 157 --- actionmailer/test/mail_service_test.rb | 1192 -------------------- actionmailer/test/mail_test.rb | 2 - actionmailer/test/old_base/adv_attr_test.rb | 36 + actionmailer/test/old_base/asset_host_test.rb | 52 + actionmailer/test/old_base/mail_helper_test.rb | 94 ++ actionmailer/test/old_base/mail_layout_test.rb | 148 +++ actionmailer/test/old_base/mail_render_test.rb | 157 +++ actionmailer/test/old_base/mail_service_test.rb | 1192 ++++++++++++++++++++ actionmailer/test/old_base/tmail_compat_test.rb | 25 + actionmailer/test/old_base/url_test.rb | 84 ++ actionmailer/test/tmail_compat_test.rb | 25 - actionmailer/test/url_test.rb | 84 -- 24 files changed, 1906 insertions(+), 1848 deletions(-) delete mode 100644 actionmailer/test/adv_attr_test.rb delete mode 100644 actionmailer/test/asset_host_test.rb delete mode 100644 actionmailer/test/mail_helper_test.rb delete mode 100644 actionmailer/test/mail_layout_test.rb delete mode 100644 actionmailer/test/mail_render_test.rb delete mode 100644 actionmailer/test/mail_service_test.rb create mode 100644 actionmailer/test/old_base/adv_attr_test.rb create mode 100644 actionmailer/test/old_base/asset_host_test.rb create mode 100644 actionmailer/test/old_base/mail_helper_test.rb create mode 100644 actionmailer/test/old_base/mail_layout_test.rb create mode 100644 actionmailer/test/old_base/mail_render_test.rb create mode 100644 actionmailer/test/old_base/mail_service_test.rb create mode 100644 actionmailer/test/old_base/tmail_compat_test.rb create mode 100644 actionmailer/test/old_base/url_test.rb delete mode 100644 actionmailer/test/tmail_compat_test.rb delete mode 100644 actionmailer/test/url_test.rb diff --git a/actionmailer/Rakefile b/actionmailer/Rakefile index 6c19371514..2619d9359e 100644 --- a/actionmailer/Rakefile +++ b/actionmailer/Rakefile @@ -22,14 +22,14 @@ task :default => [ :test ] # Run the unit tests Rake::TestTask.new { |t| t.libs << "test" - t.pattern = 'test/*_test.rb' + t.pattern = 'test/**/*_test.rb' t.warning = true } namespace :test do task :isolated do ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME')) - Dir.glob("test/*_test.rb").all? do |file| + Dir.glob("test/**/*_test.rb").all? do |file| system(ruby, '-Ilib:test', file) end or raise "Failures" end diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 7e984124b7..1b81cbf5af 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -256,6 +256,7 @@ module ActionMailer #:nodoc: include DeliveryMethods, Quoting abstract! + # TODO Add some sanity tests for the included modules include AbstractController::Logger include AbstractController::Rendering include AbstractController::LocalizedCache @@ -270,12 +271,6 @@ module ActionMailer #:nodoc: private_class_method :new #:nodoc: - cattr_accessor :raise_delivery_errors - @@raise_delivery_errors = true - - cattr_accessor :perform_deliveries - @@perform_deliveries = true - extlib_inheritable_accessor :default_charset self.default_charset = "utf-8" @@ -295,9 +290,6 @@ module ActionMailer #:nodoc: self.default_implicit_parts_order = [ "text/plain", "text/enriched", "text/html" ] class << self - # Provides a list of emails that have been delivered by Mail - delegate :deliveries, :deliveries=, :to => Mail - def mailer_name @mailer_name ||= name.underscore end diff --git a/actionmailer/lib/action_mailer/delivery_methods.rb b/actionmailer/lib/action_mailer/delivery_methods.rb index 38325e512f..21909d5d57 100644 --- a/actionmailer/lib/action_mailer/delivery_methods.rb +++ b/actionmailer/lib/action_mailer/delivery_methods.rb @@ -1,7 +1,8 @@ require 'tmpdir' module ActionMailer - # Provides a DSL for adding delivery methods to ActionMailer. + # This modules handles everything related to the delivery, from registering new + # delivery methods to configuring the mail object to be send. module DeliveryMethods extend ActiveSupport::Concern @@ -9,6 +10,13 @@ module ActionMailer extlib_inheritable_accessor :delivery_methods, :delivery_method, :instance_writer => false + # Do not make this inheritable, because we always want it to propagate + cattr_accessor :raise_delivery_errors + self.raise_delivery_errors = true + + cattr_accessor :perform_deliveries + self.perform_deliveries = true + self.delivery_methods = {} self.delivery_method = :smtp @@ -32,6 +40,9 @@ module ActionMailer end module ClassMethods + # Provides a list of emails that have been delivered by Mail + delegate :deliveries, :deliveries=, :to => Mail + # Adds a new delivery method through the given class using the given symbol # as alias and the default options supplied: # @@ -50,7 +61,8 @@ module ActionMailer self.delivery_methods[symbol.to_sym] = klass end - def wrap_delivery_behavior(mail, method=delivery_method) #:nodoc: + def wrap_delivery_behavior(mail, method=nil) #:nodoc: + method ||= self.delivery_method mail.register_for_delivery_notification(self) if method.is_a?(Symbol) diff --git a/actionmailer/lib/action_mailer/mail_helper.rb b/actionmailer/lib/action_mailer/mail_helper.rb index adba94cbef..01da954b03 100644 --- a/actionmailer/lib/action_mailer/mail_helper.rb +++ b/actionmailer/lib/action_mailer/mail_helper.rb @@ -23,7 +23,7 @@ module ActionMailer # Access the message instance. def message #:nodoc: - @message + @_message end end end diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index 1fc5ab85e0..781e49ae05 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -8,7 +8,6 @@ $:.unshift(lib) unless $:.include?('lib') || $:.include?(lib) require 'rubygems' require 'test/unit' - require 'action_mailer' # Show backtraces for deprecated behavior for quicker cleanup. @@ -18,15 +17,11 @@ ActiveSupport::Deprecation.debug = true ActionView::Template.register_template_handler :haml, lambda { |template| "Look its HAML!".inspect } ActionView::Template.register_template_handler :bak, lambda { |template| "Lame backup".inspect } -ActionView::Base::DEFAULT_CONFIG = { :assets_dir => '/nowhere' } - -$:.unshift "#{File.dirname(__FILE__)}/fixtures/helpers" +FIXTURE_LOAD_PATH = File.expand_path('fixtures', File.dirname(__FILE__)) +ActionMailer::Base.view_paths = FIXTURE_LOAD_PATH +$:.unshift File.join(FIXTURE_LOAD_PATH, 'helpers') -FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures') -ActionMailer::Base.template_root = FIXTURE_LOAD_PATH - -class MockSMTP - +class MockSMTP def self.deliveries @@deliveries end @@ -42,7 +37,6 @@ class MockSMTP def start(*args) yield self end - end class Net::SMTP @@ -51,14 +45,6 @@ class Net::SMTP end end -def uses_gem(gem_name, test_name, version = '> 0') - gem gem_name.to_s, version - require gem_name.to_s - yield -rescue LoadError - $stderr.puts "Skipping #{test_name} tests. `gem install #{gem_name}` and try again." -end - def set_delivery_method(method) @old_delivery_method = ActionMailer::Base.delivery_method ActionMailer::Base.delivery_method = method @@ -66,4 +52,4 @@ end def restore_delivery_method ActionMailer::Base.delivery_method = @old_delivery_method -end +end \ No newline at end of file diff --git a/actionmailer/test/adv_attr_test.rb b/actionmailer/test/adv_attr_test.rb deleted file mode 100644 index f22d733bc5..0000000000 --- a/actionmailer/test/adv_attr_test.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'abstract_unit' -require 'action_mailer/adv_attr_accessor' - -class AdvAttrTest < ActiveSupport::TestCase - class Person - cattr_reader :protected_instance_variables - @@protected_instance_variables = [] - - extend ActionMailer::AdvAttrAccessor - adv_attr_accessor :name - end - - def setup - @person = Person.new - end - - def test_adv_attr - assert_nil @person.name - @person.name 'Bob' - assert_equal 'Bob', @person.name - end - - def test_adv_attr_writer - assert_nil @person.name - @person.name = 'Bob' - assert_equal 'Bob', @person.name - end - - def test_raise_an_error_with_multiple_args - assert_raise(ArgumentError) { @person.name('x', 'y') } - end - - def test_ivar_is_added_to_protected_instnace_variables - assert Person.protected_instance_variables.include?('@name') - end -end diff --git a/actionmailer/test/asset_host_test.rb b/actionmailer/test/asset_host_test.rb deleted file mode 100644 index 124032f1d9..0000000000 --- a/actionmailer/test/asset_host_test.rb +++ /dev/null @@ -1,52 +0,0 @@ -require 'abstract_unit' - -class AssetHostMailer < ActionMailer::Base - def email_with_asset - recipients 'test@localhost' - subject "testing email containing asset path while asset_host is set" - from "tester@example.com" - end -end - -class AssetHostTest < Test::Unit::TestCase - def setup - set_delivery_method :test - ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries.clear - end - - def teardown - restore_delivery_method - end - - def test_asset_host_as_string - ActionController::Base.asset_host = "http://www.example.com" - mail = AssetHostMailer.email_with_asset - assert_equal "\"Somelogo\"", mail.body.to_s.strip - end - - def test_asset_host_as_one_arguement_proc - ActionController::Base.asset_host = Proc.new { |source| - if source.starts_with?('/images') - "http://images.example.com" - else - "http://assets.example.com" - end - } - mail = AssetHostMailer.email_with_asset - assert_equal "\"Somelogo\"", mail.body.to_s.strip - end - - def test_asset_host_as_two_arguement_proc - ActionController::Base.asset_host = Proc.new {|source,request| - if request && request.ssl? - "https://www.example.com" - else - "http://www.example.com" - end - } - mail = nil - assert_nothing_raised { mail = AssetHostMailer.email_with_asset } - assert_equal "\"Somelogo\"", mail.body.to_s.strip - end -end \ No newline at end of file diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 3b2a072dce..dd17bf868b 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -310,14 +310,6 @@ class BaseTest < ActiveSupport::TestCase assert_equal(1, BaseMailer.deliveries.length) end - # Delivery hooks - test "ActionMailer should be told when Mail gets delivered" do - BaseMailer.deliveries.clear - BaseMailer.expects(:delivered_email).once - BaseMailer.welcome.deliver - assert_equal(1, BaseMailer.deliveries.length) - end - protected # Execute the block setting the given values and restoring old values after diff --git a/actionmailer/test/delivery_methods_test.rb b/actionmailer/test/delivery_methods_test.rb index de3d54197d..5b2ce61ca9 100644 --- a/actionmailer/test/delivery_methods_test.rb +++ b/actionmailer/test/delivery_methods_test.rb @@ -4,20 +4,17 @@ require 'mail' class MyCustomDelivery end -class DefaultsDeliveryMethodsTest < ActionMailer::TestCase - def setup - set_delivery_method :smtp +class BogusDelivery + def initialize(*) end - def teardown - restore_delivery_method - end - - def test_should_be_the_default_smtp - assert_equal :smtp, ActionMailer::Base.delivery_method + def deliver!(mail) + raise "failed" end +end - def test_should_have_default_smtp_delivery_method_settings +class DefaultsDeliveryMethodsTest < ActiveSupport::TestCase + test "default smtp settings" do settings = { :address => "localhost", :port => 25, :domain => 'localhost.localdomain', @@ -28,45 +25,126 @@ class DefaultsDeliveryMethodsTest < ActionMailer::TestCase assert_equal settings, ActionMailer::Base.smtp_settings end - def test_should_have_default_file_delivery_method_settings + test "default file delivery settings" do settings = {:location => "#{Dir.tmpdir}/mails"} assert_equal settings, ActionMailer::Base.file_settings end - def test_should_have_default_sendmail_delivery_method_settings + test "default sendmail settings" do settings = {:location => '/usr/sbin/sendmail', :arguments => '-i -t'} assert_equal settings, ActionMailer::Base.sendmail_settings end end -class CustomDeliveryMethodsTest < ActionMailer::TestCase +class CustomDeliveryMethodsTest < ActiveSupport::TestCase def setup + @old_delivery_method = ActionMailer::Base.delivery_method ActionMailer::Base.add_delivery_method :custom, MyCustomDelivery end def teardown + ActionMailer::Base.delivery_method = @old_delivery_method ActionMailer::Base.delivery_methods.delete(:custom) end - def test_allow_to_add_a_custom_delivery_method + test "allow to add custom delivery method" do ActionMailer::Base.delivery_method = :custom assert_equal :custom, ActionMailer::Base.delivery_method end - def test_allow_to_customize_custom_settings + test "allow to customize custom settings" do ActionMailer::Base.custom_settings = { :foo => :bar } assert_equal Hash[:foo => :bar], ActionMailer::Base.custom_settings end - def test_respond_to_custom_method_settings + test "respond to custom settings" do assert_respond_to ActionMailer::Base, :custom_settings assert_respond_to ActionMailer::Base, :custom_settings= end - def test_should_not_respond_for_invalid_method_settings + test "does not respond to unknown settings" do assert_raise NoMethodError do ActionMailer::Base.another_settings end end end + +class MailDeliveryTest < ActiveSupport::TestCase + class DeliverMail < ActionMailer::Base + DEFAULT_HEADERS = { + :to => 'mikel@test.lindsaar.net', + :from => 'jose@test.plataformatec.com' + } + + def welcome(hash={}) + mail(DEFAULT_HEADERS.merge(hash)) + end + end + + def setup + ActionMailer::Base.delivery_method = :smtp + end + + def teardown + DeliverMail.delivery_method = :smtp + DeliverMail.perform_deliveries = true + DeliverMail.raise_delivery_errors = true + end + + test "ActionMailer should be told when Mail gets delivered" do + DeliverMail.deliveries.clear + DeliverMail.expects(:delivered_email).once + DeliverMail.welcome.deliver + assert_equal(1, DeliverMail.deliveries.length) + end + + test "delivery method can be customized per instance" do + email = DeliverMail.welcome.deliver + assert_instance_of Mail::SMTP, email.delivery_method + email = DeliverMail.welcome(:delivery_method => :test).deliver + assert_instance_of Mail::TestMailer, email.delivery_method + end + + test "delivery method can be customized in subclasses not changing the parent" do + DeliverMail.delivery_method = :test + assert_equal :smtp, ActionMailer::Base.delivery_method + $BREAK = true + email = DeliverMail.welcome.deliver + assert_instance_of Mail::TestMailer, email.delivery_method + end + + test "non registered delivery methods raises errors" do + DeliverMail.delivery_method = :unknown + assert_raise RuntimeError do + DeliverMail.welcome.deliver + end + end + + test "does not perform deliveries if requested" do + DeliverMail.perform_deliveries = false + DeliverMail.deliveries.clear + DeliverMail.expects(:delivered_email).never + DeliverMail.welcome.deliver + assert_equal(0, DeliverMail.deliveries.length) + end + + test "raise errors on bogus deliveries" do + DeliverMail.delivery_method = BogusDelivery + DeliverMail.deliveries.clear + DeliverMail.expects(:delivered_email).never + assert_raise RuntimeError do + DeliverMail.welcome.deliver + end + assert_equal(0, DeliverMail.deliveries.length) + end + + test "does not raise errors on bogus deliveries if set" do + DeliverMail.delivery_method = BogusDelivery + DeliverMail.raise_delivery_errors = false + DeliverMail.deliveries.clear + DeliverMail.expects(:delivered_email).once + DeliverMail.welcome.deliver + assert_equal(1, DeliverMail.deliveries.length) + end +end \ No newline at end of file diff --git a/actionmailer/test/mail_helper_test.rb b/actionmailer/test/mail_helper_test.rb deleted file mode 100644 index a9b3cd3ce1..0000000000 --- a/actionmailer/test/mail_helper_test.rb +++ /dev/null @@ -1,94 +0,0 @@ -require 'abstract_unit' - -module MailerHelper - def person_name - "Mr. Joe Person" - end -end - -class HelperMailer < ActionMailer::Base - helper MailerHelper - helper :example - - def use_helper - recipients 'test@localhost' - subject "using helpers" - from "tester@example.com" - end - - def use_example_helper - recipients 'test@localhost' - subject "using helpers" - from "tester@example.com" - - @text = "emphasize me!" - end - - def use_mail_helper - recipients 'test@localhost' - subject "using mailing helpers" - from "tester@example.com" - - @text = "But soft! What light through yonder window breaks? It is the east, " + - "and Juliet is the sun. Arise, fair sun, and kill the envious moon, " + - "which is sick and pale with grief that thou, her maid, art far more " + - "fair than she. Be not her maid, for she is envious! Her vestal " + - "livery is but sick and green, and none but fools do wear it. Cast " + - "it off!" - end - - def use_helper_method - recipients 'test@localhost' - subject "using helpers" - from "tester@example.com" - - @text = "emphasize me!" - end - - private - - def name_of_the_mailer_class - self.class.name - end - helper_method :name_of_the_mailer_class -end - -class MailerHelperTest < ActiveSupport::TestCase - def new_mail( charset="utf-8" ) - mail = Mail.new - mail.set_content_type "text", "plain", { "charset" => charset } if charset - mail - end - - def setup - set_delivery_method :test - ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries.clear - end - - def teardown - restore_delivery_method - end - - def test_use_helper - mail = HelperMailer.use_helper - assert_match %r{Mr. Joe Person}, mail.encoded - end - - def test_use_example_helper - mail = HelperMailer.use_example_helper - assert_match %r{emphasize me!}, mail.encoded - end - - def test_use_helper_method - mail = HelperMailer.use_helper_method - assert_match %r{HelperMailer}, mail.encoded - end - - def test_use_mail_helper - mail = HelperMailer.use_mail_helper - assert_match %r{ But soft!}, mail.encoded - assert_match %r{east, and\r\n Juliet}, mail.encoded - end -end - diff --git a/actionmailer/test/mail_layout_test.rb b/actionmailer/test/mail_layout_test.rb deleted file mode 100644 index 4038fbf339..0000000000 --- a/actionmailer/test/mail_layout_test.rb +++ /dev/null @@ -1,148 +0,0 @@ -require 'abstract_unit' - -class AutoLayoutMailer < ActionMailer::Base - - def hello - recipients 'test@localhost' - subject "You have a mail" - from "tester@example.com" - end - - def spam - recipients 'test@localhost' - subject "You have a mail" - from "tester@example.com" - - @world = "Earth" - render(:inline => "Hello, <%= @world %>", :layout => 'spam') - end - - def nolayout - recipients 'test@localhost' - subject "You have a mail" - from "tester@example.com" - - @world = "Earth" - render(:inline => "Hello, <%= @world %>", :layout => false) - end - - def multipart(type = nil) - recipients 'test@localhost' - subject "You have a mail" - from "tester@example.com" - - content_type(type) if type - end -end - -class ExplicitLayoutMailer < ActionMailer::Base - layout 'spam', :except => [:logout] - - def signup - recipients 'test@localhost' - subject "You have a mail" - from "tester@example.com" - end - - def logout - recipients 'test@localhost' - subject "You have a mail" - from "tester@example.com" - end -end - -class LayoutMailerTest < Test::Unit::TestCase - def setup - set_delivery_method :test - ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries.clear - end - - def teardown - restore_delivery_method - end - - def test_should_pickup_default_layout - mail = AutoLayoutMailer.hello - assert_equal "Hello from layout Inside", mail.body.to_s.strip - end - - def test_should_pickup_multipart_layout - mail = AutoLayoutMailer.multipart - # CHANGED: content_type returns an object - # assert_equal "multipart/alternative", mail.content_type - assert_equal "multipart/alternative", mail.mime_type - assert_equal 2, mail.parts.size - - # CHANGED: content_type returns an object - # assert_equal 'text/plain', mail.parts.first.content_type - assert_equal 'text/plain', mail.parts.first.mime_type - - # CHANGED: body returns an object - # assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body - assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body.to_s - - # CHANGED: content_type returns an object - # assert_equal 'text/html', mail.parts.last.content_type - assert_equal 'text/html', mail.parts.last.mime_type - - # CHANGED: body returns an object - # assert_equal "Hello from layout text/html multipart", mail.parts.last.body - assert_equal "Hello from layout text/html multipart", mail.parts.last.body.to_s - end - - def test_should_pickup_multipartmixed_layout - mail = AutoLayoutMailer.multipart("multipart/mixed") - # CHANGED: content_type returns an object - # assert_equal "multipart/mixed", mail.content_type - assert_equal "multipart/mixed", mail.mime_type - assert_equal 2, mail.parts.size - - # CHANGED: content_type returns an object - # assert_equal 'text/plain', mail.parts.first.content_type - assert_equal 'text/plain', mail.parts.first.mime_type - # CHANGED: body returns an object - # assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body - assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body.to_s - - # CHANGED: content_type returns an object - # assert_equal 'text/html', mail.parts.last.content_type - assert_equal 'text/html', mail.parts.last.mime_type - # CHANGED: body returns an object - # assert_equal "Hello from layout text/html multipart", mail.parts.last.body - assert_equal "Hello from layout text/html multipart", mail.parts.last.body.to_s - end - - def test_should_fix_multipart_layout - mail = AutoLayoutMailer.multipart("text/plain") - assert_equal "multipart/alternative", mail.mime_type - assert_equal 2, mail.parts.size - - assert_equal 'text/plain', mail.parts.first.mime_type - assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body.to_s - - assert_equal 'text/html', mail.parts.last.mime_type - assert_equal "Hello from layout text/html multipart", mail.parts.last.body.to_s - end - - - def test_should_pickup_layout_given_to_render - mail = AutoLayoutMailer.spam - assert_equal "Spammer layout Hello, Earth", mail.body.to_s.strip - end - - def test_should_respect_layout_false - mail = AutoLayoutMailer.nolayout - assert_equal "Hello, Earth", mail.body.to_s.strip - end - - def test_explicit_class_layout - mail = ExplicitLayoutMailer.signup - assert_equal "Spammer layout We do not spam", mail.body.to_s.strip - end - - def test_explicit_layout_exceptions - mail = ExplicitLayoutMailer.logout - assert_equal "You logged out", mail.body.to_s.strip - end -end diff --git a/actionmailer/test/mail_render_test.rb b/actionmailer/test/mail_render_test.rb deleted file mode 100644 index 804200fd36..0000000000 --- a/actionmailer/test/mail_render_test.rb +++ /dev/null @@ -1,157 +0,0 @@ -require 'abstract_unit' - -class RenderMailer < ActionMailer::Base - def inline_template - recipients 'test@localhost' - subject "using helpers" - from "tester@example.com" - - @world = "Earth" - render :inline => "Hello, <%= @world %>" - end - - def file_template - recipients 'test@localhost' - subject "using helpers" - from "tester@example.com" - - @recipient = 'test@localhost' - render :file => "templates/signed_up" - end - - def implicit_body - recipients 'test@localhost' - subject "using helpers" - from "tester@example.com" - - @recipient = 'test@localhost' - render :template => "templates/signed_up" - end - - def rxml_template - recipients 'test@localhost' - subject "rendering rxml template" - from "tester@example.com" - end - - def included_subtemplate - recipients 'test@localhost' - subject "Including another template in the one being rendered" - from "tester@example.com" - end - - def mailer_accessor - recipients 'test@localhost' - subject "Mailer Accessor" - from "tester@example.com" - - render :inline => "Look, <%= mailer.subject %>!" - end - - def no_instance_variable - recipients 'test@localhost' - subject "No Instance Variable" - from "tester@example.com" - - silence_warnings do - render :inline => "Look, subject.nil? is <%= @subject.nil? %>!" - end - end - - def initialize_defaults(method_name) - super - mailer_name "test_mailer" - end -end - -class FirstMailer < ActionMailer::Base - def share - recipients 'test@localhost' - subject "using helpers" - from "tester@example.com" - end -end - -class SecondMailer < ActionMailer::Base - def share - recipients 'test@localhost' - subject "using helpers" - from "tester@example.com" - end -end - -# CHANGED: Those tests were changed because body returns an object now -# Instead of mail.body.strip, we should mail.body.to_s.strip -class RenderHelperTest < Test::Unit::TestCase - def setup - set_delivery_method :test - ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries.clear - - @recipient = 'test@localhost' - end - - def teardown - restore_delivery_method - end - - def test_implicit_body - mail = RenderMailer.implicit_body - assert_equal "Hello there, \n\nMr. test@localhost", mail.body.to_s.strip - end - - def test_inline_template - mail = RenderMailer.inline_template - assert_equal "Hello, Earth", mail.body.to_s.strip - end - - def test_file_template - mail = RenderMailer.file_template - assert_equal "Hello there, \n\nMr. test@localhost", mail.body.to_s.strip - end - - def test_rxml_template - mail = RenderMailer.rxml_template.deliver - assert_equal "\n", mail.body.to_s.strip - end - - def test_included_subtemplate - mail = RenderMailer.included_subtemplate.deliver - assert_equal "Hey Ho, let's go!", mail.body.to_s.strip - end - - def test_mailer_accessor - mail = RenderMailer.mailer_accessor.deliver - assert_equal "Look, Mailer Accessor!", mail.body.to_s.strip - end - - def test_no_instance_variable - mail = RenderMailer.no_instance_variable.deliver - assert_equal "Look, subject.nil? is true!", mail.body.to_s.strip - end -end - -class FirstSecondHelperTest < Test::Unit::TestCase - def setup - set_delivery_method :test - ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries.clear - - @recipient = 'test@localhost' - end - - def teardown - restore_delivery_method - end - - def test_ordering - mail = FirstMailer.share - assert_equal "first mail", mail.body.to_s.strip - mail = SecondMailer.share - assert_equal "second mail", mail.body.to_s.strip - mail = FirstMailer.share - assert_equal "first mail", mail.body.to_s.strip - mail = SecondMailer.share - assert_equal "second mail", mail.body.to_s.strip - end -end diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb deleted file mode 100644 index aa31c9a803..0000000000 --- a/actionmailer/test/mail_service_test.rb +++ /dev/null @@ -1,1192 +0,0 @@ -# encoding: utf-8 -require 'abstract_unit' - -class FunkyPathMailer < ActionMailer::Base - self.template_root = "#{File.dirname(__FILE__)}/fixtures/path.with.dots" - - def multipart_with_template_path_with_dots(recipient) - recipients recipient - subject "This path has dots" - from "Chad Fowler " - attachment :content_type => "text/plain", - :data => "dots dots dots..." - end -end - -class TestMailer < ActionMailer::Base - def signed_up(recipient) - recipients recipient - subject "[Signed up] Welcome #{recipient}" - from "system@loudthinking.com" - - @recipient = recipient - end - - def cancelled_account(recipient) - recipients recipient - subject "[Cancelled] Goodbye #{recipient}" - from "system@loudthinking.com" - sent_on Time.local(2004, 12, 12) - - render :text => "Goodbye, Mr. #{recipient}" - end - - def from_with_name - from "System " - recipients "root@loudthinking.com" - render :text => "Nothing to see here." - end - - def from_without_name - from "system@loudthinking.com" - recipients "root@loudthinking.com" - render :text => "Nothing to see here." - end - - def cc_bcc(recipient) - recipients recipient - subject "testing bcc/cc" - from "system@loudthinking.com" - sent_on Time.local(2004, 12, 12) - cc "nobody@loudthinking.com" - bcc "root@loudthinking.com" - - render :text => "Nothing to see here." - end - - def different_reply_to(recipient) - recipients recipient - subject "testing reply_to" - from "system@loudthinking.com" - sent_on Time.local(2008, 5, 23) - reply_to "atraver@gmail.com" - - render :text => "Nothing to see here." - end - - def iso_charset(recipient) - recipients recipient - subject "testing isø charsets" - from "system@loudthinking.com" - sent_on Time.local(2004, 12, 12) - cc "nobody@loudthinking.com" - bcc "root@loudthinking.com" - charset "iso-8859-1" - - render :text => "Nothing to see here." - end - - def unencoded_subject(recipient) - recipients recipient - subject "testing unencoded subject" - from "system@loudthinking.com" - sent_on Time.local(2004, 12, 12) - cc "nobody@loudthinking.com" - bcc "root@loudthinking.com" - - render :text => "Nothing to see here." - end - - def extended_headers(recipient) - recipients recipient - subject "testing extended headers" - from "Grytøyr " - sent_on Time.local(2004, 12, 12) - cc "Grytøyr " - bcc "Grytøyr " - charset "iso-8859-1" - - render :text => "Nothing to see here." - end - - def utf8_body(recipient) - recipients recipient - subject "testing utf-8 body" - from "Foo áëô îü " - sent_on Time.local(2004, 12, 12) - cc "Foo áëô îü " - bcc "Foo áëô îü " - charset "utf-8" - - render :text => "åœö blah" - end - - def multipart_with_mime_version(recipient) - recipients recipient - subject "multipart with mime_version" - from "test@example.com" - sent_on Time.local(2004, 12, 12) - mime_version "1.1" - content_type "multipart/alternative" - - part "text/plain" do |p| - p.body = render(:text => "blah") - end - - part "text/html" do |p| - p.body = render(:inline => "<%= content_tag(:b, 'blah') %>") - end - end - - def multipart_with_utf8_subject(recipient) - recipients recipient - subject "Foo áëô îü" - from "test@example.com" - charset "utf-8" - - part "text/plain" do |p| - p.body = "blah" - end - - part "text/html" do |p| - p.body = "blah" - end - end - - def explicitly_multipart_example(recipient, ct=nil) - recipients recipient - subject "multipart example" - from "test@example.com" - sent_on Time.local(2004, 12, 12) - content_type ct if ct - - part "text/html" do |p| - p.charset = "iso-8859-1" - p.body = "blah" - end - - attachment :content_type => "image/jpeg", :filename => File.join(File.dirname(__FILE__), "fixtures", "attachments", "foo.jpg"), - :data => "123456789" - - render :text => "plain text default" - end - - def implicitly_multipart_example(recipient, cs = nil, order = nil) - recipients recipient - subject "multipart example" - from "test@example.com" - sent_on Time.local(2004, 12, 12) - - @charset = cs if cs - @recipient = recipient - @implicit_parts_order = order if order - end - - def implicitly_multipart_with_utf8 - recipients "no.one@nowhere.test" - subject "Foo áëô îü" - from "some.one@somewhere.test" - template "implicitly_multipart_example" - - @recipient = "no.one@nowhere.test" - end - - def html_mail(recipient) - recipients recipient - subject "html mail" - from "test@example.com" - content_type "text/html" - - render :text => "Emphasize this" - end - - def html_mail_with_underscores(recipient) - subject "html mail with underscores" - render :text => %{_Google} - end - - def custom_template(recipient) - recipients recipient - subject "[Signed up] Welcome #{recipient}" - from "system@loudthinking.com" - sent_on Time.local(2004, 12, 12) - template "signed_up" - - @recipient = recipient - end - - def custom_templating_extension(recipient) - recipients recipient - subject "[Signed up] Welcome #{recipient}" - from "system@loudthinking.com" - sent_on Time.local(2004, 12, 12) - - @recipient = recipient - end - - def various_newlines(recipient) - recipients recipient - subject "various newlines" - from "test@example.com" - - render :text => "line #1\nline #2\rline #3\r\nline #4\r\r" + - "line #5\n\nline#6\r\n\r\nline #7" - end - - def various_newlines_multipart(recipient) - recipients recipient - subject "various newlines multipart" - from "test@example.com" - content_type "multipart/alternative" - - part :content_type => "text/plain", :body => "line #1\nline #2\rline #3\r\nline #4\r\r" - part :content_type => "text/html", :body => "

line #1

\n

line #2

\r

line #3

\r\n

line #4

\r\r" - end - - def nested_multipart(recipient) - recipients recipient - subject "nested multipart" - from "test@example.com" - content_type "multipart/mixed" - - part :content_type => "multipart/alternative", :content_disposition => "inline", "foo" => "bar" do |p| - p.part :content_type => "text/plain", :body => "test text\nline #2" - p.part :content_type => "text/html", :body => "test HTML
\nline #2" - end - - attachment :content_type => "application/octet-stream", :filename => "test.txt", :data => "test abcdefghijklmnopqstuvwxyz" - end - - def nested_multipart_with_body(recipient) - recipients recipient - subject "nested multipart with body" - from "test@example.com" - content_type "multipart/mixed" - - part :content_type => "multipart/alternative", :content_disposition => "inline", :body => "Nothing to see here." do |p| - p.part :content_type => "text/html", :body => "test HTML
" - end - end - - def attachment_with_custom_header(recipient) - recipients recipient - subject "custom header in attachment" - from "test@example.com" - content_type "multipart/related" - part :content_type => "text/html", :body => 'yo' - attachment :content_type => "image/jpeg", :filename => File.join(File.dirname(__FILE__), "fixtures", "attachments", "test.jpg"), :data => "i am not a real picture", 'Content-ID' => '' - end - - def unnamed_attachment(recipient) - recipients recipient - subject "nested multipart" - from "test@example.com" - content_type "multipart/mixed" - part :content_type => "text/plain", :body => "hullo" - attachment :content_type => "application/octet-stream", :data => "test abcdefghijklmnopqstuvwxyz" - end - - def headers_with_nonalpha_chars(recipient) - recipients recipient - subject "nonalpha chars" - from "One: Two " - cc "Three: Four " - bcc "Five: Six " - render :text => "testing" - end - - def custom_content_type_attributes - recipients "no.one@nowhere.test" - subject "custom content types" - from "some.one@somewhere.test" - content_type "text/plain; format=flowed" - render :text => "testing" - end - - def return_path - recipients "no.one@nowhere.test" - subject "return path test" - from "some.one@somewhere.test" - headers["return-path"] = "another@somewhere.test" - render :text => "testing" - end - - def subject_with_i18n(recipient) - recipients recipient - from "system@loudthinking.com" - render :text => "testing" - end - - class << self - attr_accessor :received_body - end - - def receive(mail) - self.class.received_body = mail.body - end -end - -class ActionMailerTest < Test::Unit::TestCase - include ActionMailer::Quoting - - def encode( text, charset="utf-8" ) - quoted_printable( text, charset ) - end - - def new_mail( charset="utf-8" ) - mail = Mail.new - mail.mime_version = "1.0" - if charset - mail.content_type ["text", "plain", { "charset" => charset }] - end - mail - end - - # Replacing logger work around for mocha bug. Should be fixed in mocha 0.3.3 - def setup - set_delivery_method :test - ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.raise_delivery_errors = true - ActionMailer::Base.deliveries.clear - - @original_logger = TestMailer.logger - @recipient = 'test@localhost' - end - - def teardown - TestMailer.logger = @original_logger - restore_delivery_method - end - - def test_nested_parts - created = nil - assert_nothing_raised { created = TestMailer.nested_multipart(@recipient)} - assert_equal 2, created.parts.size - assert_equal 2, created.parts.first.parts.size - - assert_equal "multipart/mixed", created.mime_type - assert_equal "multipart/alternative", created.parts[0].mime_type - assert_equal "bar", created.parts[0].header['foo'].to_s - assert_nil created.parts[0].charset - assert_equal "text/plain", created.parts[0].parts[0].mime_type - assert_equal "text/html", created.parts[0].parts[1].mime_type - assert_equal "application/octet-stream", created.parts[1].mime_type - - end - - def test_nested_parts_with_body - created = nil - TestMailer.nested_multipart_with_body(@recipient) - assert_nothing_raised { created = TestMailer.nested_multipart_with_body(@recipient)} - - assert_equal 1,created.parts.size - assert_equal 2,created.parts.first.parts.size - - assert_equal "multipart/mixed", created.mime_type - assert_equal "multipart/alternative", created.parts.first.mime_type - assert_equal "text/plain", created.parts.first.parts.first.mime_type - assert_equal "Nothing to see here.", created.parts.first.parts.first.body.to_s - assert_equal "text/html", created.parts.first.parts.second.mime_type - assert_equal "test HTML
", created.parts.first.parts.second.body.to_s - end - - def test_attachment_with_custom_header - created = nil - assert_nothing_raised { created = TestMailer.attachment_with_custom_header(@recipient) } - assert created.parts.any? { |p| p.header['content-id'].to_s == "" } - end - - def test_signed_up - Time.stubs(:now => Time.now) - - expected = new_mail - expected.to = @recipient - expected.subject = "[Signed up] Welcome #{@recipient}" - expected.body = "Hello there, \n\nMr. #{@recipient}" - expected.from = "system@loudthinking.com" - expected.date = Time.now - - created = nil - assert_nothing_raised { created = TestMailer.signed_up(@recipient) } - assert_not_nil created - - expected.message_id = '<123@456>' - created.message_id = '<123@456>' - - assert_equal expected.encoded, created.encoded - - assert_nothing_raised { TestMailer.signed_up(@recipient).deliver } - - delivered = ActionMailer::Base.deliveries.first - assert_not_nil delivered - - expected.message_id = '<123@456>' - delivered.message_id = '<123@456>' - - assert_equal expected.encoded, delivered.encoded - end - - def test_custom_template - expected = new_mail - expected.to = @recipient - expected.subject = "[Signed up] Welcome #{@recipient}" - expected.body = "Hello there, \n\nMr. #{@recipient}" - expected.from = "system@loudthinking.com" - expected.date = Time.local(2004, 12, 12) - - created = nil - assert_nothing_raised { created = TestMailer.custom_template(@recipient) } - assert_not_nil created - expected.message_id = '<123@456>' - created.message_id = '<123@456>' - assert_equal expected.encoded, created.encoded - end - - def test_custom_templating_extension - assert ActionView::Template.template_handler_extensions.include?("haml"), "haml extension was not registered" - - # N.b., custom_templating_extension.text.plain.haml is expected to be in fixtures/test_mailer directory - expected = new_mail - expected.to = @recipient - expected.subject = "[Signed up] Welcome #{@recipient}" - expected.body = "Hello there, \n\nMr. #{@recipient}" - expected.from = "system@loudthinking.com" - expected.date = Time.local(2004, 12, 12) - - # Stub the render method so no alternative renderers need be present. - ActionView::Base.any_instance.stubs(:render).returns("Hello there, \n\nMr. #{@recipient}") - - # Now that the template is registered, there should be one part. The text/plain part. - created = nil - assert_nothing_raised { created = TestMailer.custom_templating_extension(@recipient) } - assert_not_nil created - assert_equal 2, created.parts.length - assert_equal 'text/plain', created.parts[0].mime_type - assert_equal 'text/html', created.parts[1].mime_type - end - - def test_cancelled_account - expected = new_mail - expected.to = @recipient - expected.subject = "[Cancelled] Goodbye #{@recipient}" - expected.body = "Goodbye, Mr. #{@recipient}" - expected.from = "system@loudthinking.com" - expected.date = Time.local(2004, 12, 12) - - created = nil - assert_nothing_raised { created = TestMailer.cancelled_account(@recipient) } - assert_not_nil created - expected.message_id = '<123@456>' - created.message_id = '<123@456>' - assert_equal expected.encoded, created.encoded - - assert_nothing_raised { TestMailer.cancelled_account(@recipient).deliver } - assert_not_nil ActionMailer::Base.deliveries.first - delivered = ActionMailer::Base.deliveries.first - expected.message_id = '<123@456>' - delivered.message_id = '<123@456>' - - assert_equal expected.encoded, delivered.encoded - end - - def test_cc_bcc - expected = new_mail - expected.to = @recipient - expected.subject = "testing bcc/cc" - expected.body = "Nothing to see here." - expected.from = "system@loudthinking.com" - expected.cc = "nobody@loudthinking.com" - expected.bcc = "root@loudthinking.com" - expected.date = Time.local 2004, 12, 12 - - created = nil - assert_nothing_raised do - created = TestMailer.cc_bcc @recipient - end - assert_not_nil created - expected.message_id = '<123@456>' - created.message_id = '<123@456>' - assert_equal expected.encoded, created.encoded - - assert_nothing_raised do - TestMailer.cc_bcc(@recipient).deliver - end - - assert_not_nil ActionMailer::Base.deliveries.first - delivered = ActionMailer::Base.deliveries.first - expected.message_id = '<123@456>' - delivered.message_id = '<123@456>' - - assert_equal expected.encoded, delivered.encoded - end - - def test_from_without_name_for_smtp - TestMailer.delivery_method = :smtp - TestMailer.from_without_name.deliver - - mail = MockSMTP.deliveries.first - assert_not_nil mail - mail, from, to = mail - - assert_equal 'system@loudthinking.com', from.to_s - end - - def test_from_with_name_for_smtp - TestMailer.delivery_method = :smtp - TestMailer.from_with_name.deliver - - mail = MockSMTP.deliveries.first - assert_not_nil mail - mail, from, to = mail - - assert_equal 'system@loudthinking.com', from - end - - def test_reply_to - expected = new_mail - - expected.to = @recipient - expected.subject = "testing reply_to" - expected.body = "Nothing to see here." - expected.from = "system@loudthinking.com" - expected.reply_to = "atraver@gmail.com" - expected.date = Time.local 2008, 5, 23 - - created = nil - assert_nothing_raised do - created = TestMailer.different_reply_to @recipient - end - assert_not_nil created - - expected.message_id = '<123@456>' - created.message_id = '<123@456>' - - assert_equal expected.encoded, created.encoded - - assert_nothing_raised do - TestMailer.different_reply_to(@recipient).deliver - end - - delivered = ActionMailer::Base.deliveries.first - assert_not_nil delivered - - expected.message_id = '<123@456>' - delivered.message_id = '<123@456>' - - assert_equal expected.encoded, delivered.encoded - end - - def test_iso_charset - expected = new_mail( "iso-8859-1" ) - expected.to = @recipient - expected.subject = encode "testing isø charsets", "iso-8859-1" - expected.body = "Nothing to see here." - expected.from = "system@loudthinking.com" - expected.cc = "nobody@loudthinking.com" - expected.bcc = "root@loudthinking.com" - expected.date = Time.local 2004, 12, 12 - - created = nil - assert_nothing_raised do - created = TestMailer.iso_charset @recipient - end - assert_not_nil created - - expected.message_id = '<123@456>' - created.message_id = '<123@456>' - - assert_equal expected.encoded, created.encoded - - assert_nothing_raised do - TestMailer.iso_charset(@recipient).deliver - end - - delivered = ActionMailer::Base.deliveries.first - assert_not_nil delivered - - expected.message_id = '<123@456>' - delivered.message_id = '<123@456>' - - assert_equal expected.encoded, delivered.encoded - end - - def test_unencoded_subject - expected = new_mail - expected.to = @recipient - expected.subject = "testing unencoded subject" - expected.body = "Nothing to see here." - expected.from = "system@loudthinking.com" - expected.cc = "nobody@loudthinking.com" - expected.bcc = "root@loudthinking.com" - expected.date = Time.local 2004, 12, 12 - - created = nil - assert_nothing_raised do - created = TestMailer.unencoded_subject @recipient - end - assert_not_nil created - - expected.message_id = '<123@456>' - created.message_id = '<123@456>' - - assert_equal expected.encoded, created.encoded - - assert_nothing_raised do - TestMailer.unencoded_subject(@recipient).deliver - end - - delivered = ActionMailer::Base.deliveries.first - assert_not_nil delivered - - expected.message_id = '<123@456>' - delivered.message_id = '<123@456>' - - assert_equal expected.encoded, delivered.encoded - end - - def test_deliveries_array - assert_not_nil ActionMailer::Base.deliveries - assert_equal 0, ActionMailer::Base.deliveries.size - TestMailer.signed_up(@recipient).deliver - assert_equal 1, ActionMailer::Base.deliveries.size - assert_not_nil ActionMailer::Base.deliveries.first - end - - def test_perform_deliveries_flag - ActionMailer::Base.perform_deliveries = false - TestMailer.signed_up(@recipient).deliver - assert_equal 0, ActionMailer::Base.deliveries.size - ActionMailer::Base.perform_deliveries = true - TestMailer.signed_up(@recipient).deliver - assert_equal 1, ActionMailer::Base.deliveries.size - end - - def test_doesnt_raise_errors_when_raise_delivery_errors_is_false - ActionMailer::Base.raise_delivery_errors = false - Mail::TestMailer.any_instance.expects(:deliver!).raises(Exception) - assert_nothing_raised { TestMailer.signed_up(@recipient).deliver } - end - - def test_performs_delivery_via_sendmail - IO.expects(:popen).once.with('/usr/sbin/sendmail -i -t -f "system@loudthinking.com" test@localhost', 'w+') - TestMailer.delivery_method = :sendmail - TestMailer.signed_up(@recipient).deliver - end - - def test_unquote_quoted_printable_subject - msg = <" - - expected = new_mail "iso-8859-1" - expected.to = quote_address_if_necessary @recipient, "iso-8859-1" - expected.subject = "testing extended headers" - expected.body = "Nothing to see here." - expected.from = quote_address_if_necessary "Grytøyr ", "iso-8859-1" - expected.cc = quote_address_if_necessary "Grytøyr ", "iso-8859-1" - expected.bcc = quote_address_if_necessary "Grytøyr ", "iso-8859-1" - expected.date = Time.local 2004, 12, 12 - - created = nil - assert_nothing_raised do - created = TestMailer.extended_headers @recipient - end - - assert_not_nil created - expected.message_id = '<123@456>' - created.message_id = '<123@456>' - - assert_equal expected.encoded, created.encoded - - assert_nothing_raised do - TestMailer.extended_headers(@recipient).deliver - end - - delivered = ActionMailer::Base.deliveries.first - assert_not_nil delivered - - expected.message_id = '<123@456>' - delivered.message_id = '<123@456>' - - assert_equal expected.encoded, delivered.encoded - end - - def test_utf8_body_is_not_quoted - @recipient = "Foo áëô îü " - expected = new_mail "utf-8" - expected.to = quote_address_if_necessary @recipient, "utf-8" - expected.subject = "testing utf-8 body" - expected.body = "åœö blah" - expected.from = quote_address_if_necessary @recipient, "utf-8" - expected.cc = quote_address_if_necessary @recipient, "utf-8" - expected.bcc = quote_address_if_necessary @recipient, "utf-8" - expected.date = Time.local 2004, 12, 12 - - created = TestMailer.utf8_body @recipient - assert_match(/åœö blah/, created.encoded) - end - - def test_multiple_utf8_recipients - @recipient = ["\"Foo áëô îü\" ", "\"Example Recipient\" "] - expected = new_mail "utf-8" - expected.to = quote_address_if_necessary @recipient, "utf-8" - expected.subject = "testing utf-8 body" - expected.body = "åœö blah" - expected.from = quote_address_if_necessary @recipient.first, "utf-8" - expected.cc = quote_address_if_necessary @recipient, "utf-8" - expected.bcc = quote_address_if_necessary @recipient, "utf-8" - expected.date = Time.local 2004, 12, 12 - - created = TestMailer.utf8_body @recipient - assert_match(/\nFrom: =\?utf-8\?Q\?Foo_.*?\?= \r/, created.encoded) - assert_match(/\nTo: =\?utf-8\?Q\?Foo_.*?\?= , \r\n\tExample Recipient _Google}, mail.body.to_s - end - - def test_various_newlines - mail = TestMailer.various_newlines(@recipient) - assert_equal("line #1\nline #2\nline #3\nline #4\n\n" + - "line #5\n\nline#6\n\nline #7", mail.body.to_s) - end - - def test_various_newlines_multipart - mail = TestMailer.various_newlines_multipart(@recipient) - assert_equal "line #1\nline #2\nline #3\nline #4\n\n", mail.parts[0].body.to_s - assert_equal "

line #1

\n

line #2

\n

line #3

\n

line #4

\n\n", mail.parts[1].body.to_s - assert_equal "line #1\r\nline #2\r\nline #3\r\nline #4\r\n\r\n", mail.parts[0].body.encoded - assert_equal "

line #1

\r\n

line #2

\r\n

line #3

\r\n

line #4

\r\n\r\n", mail.parts[1].body.encoded - end - - def test_headers_removed_on_smtp_delivery - TestMailer.delivery_method = :smtp - TestMailer.cc_bcc(@recipient).deliver - assert MockSMTP.deliveries[0][2].include?("root@loudthinking.com") - assert MockSMTP.deliveries[0][2].include?("nobody@loudthinking.com") - assert MockSMTP.deliveries[0][2].include?(@recipient) - assert_match %r{^Cc: nobody@loudthinking.com}, MockSMTP.deliveries[0][0] - assert_match %r{^To: #{@recipient}}, MockSMTP.deliveries[0][0] - assert_no_match %r{^Bcc: root@loudthinking.com}, MockSMTP.deliveries[0][0] - end - - def test_file_delivery_should_create_a_file - ActionMailer::Base.delivery_method = :file - tmp_location = ActionMailer::Base.file_settings[:location] - - TestMailer.cc_bcc(@recipient).deliver - assert File.exists?(tmp_location) - assert File.directory?(tmp_location) - assert File.exists?(File.join(tmp_location, @recipient)) - assert File.exists?(File.join(tmp_location, 'nobody@loudthinking.com')) - assert File.exists?(File.join(tmp_location, 'root@loudthinking.com')) - end - - def test_recursive_multipart_processing - fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email7") - mail = Mail.new(fixture) - assert_equal(2, mail.parts.length) - assert_equal(4, mail.parts.first.parts.length) - assert_equal("This is the first part.", mail.parts.first.parts.first.body.to_s) - assert_equal("test.rb", mail.parts.first.parts.second.filename) - assert_equal("flowed", mail.parts.first.parts.fourth.content_type_parameters[:format]) - assert_equal('smime.p7s', mail.parts.second.filename) - end - - def test_decode_encoded_attachment_filename - fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email8") - mail = Mail.new(fixture) - attachment = mail.attachments.last - - expected = "01 Quien Te Dij\212at. Pitbull.mp3" - - if expected.respond_to?(:force_encoding) - result = attachment.filename.dup - expected.force_encoding(Encoding::ASCII_8BIT) - result.force_encoding(Encoding::ASCII_8BIT) - assert_equal expected, result - else - assert_equal expected, attachment.filename - end - end - - def test_decode_message_with_unknown_charset - fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email10") - mail = Mail.new(fixture) - assert_nothing_raised { mail.body } - end - - def test_empty_header_values_omitted - result = TestMailer.unnamed_attachment(@recipient).encoded - assert_match %r{Content-Type: application/octet-stream;}, result - assert_match %r{Content-Disposition: attachment;}, result - end - - def test_headers_with_nonalpha_chars - mail = TestMailer.headers_with_nonalpha_chars(@recipient) - assert !mail.from_addrs.empty? - assert !mail.cc_addrs.empty? - assert !mail.bcc_addrs.empty? - assert_match(/:/, mail[:from].decoded) - assert_match(/:/, mail[:cc].decoded) - assert_match(/:/, mail[:bcc].decoded) - end - - def test_with_mail_object_deliver - mail = TestMailer.headers_with_nonalpha_chars(@recipient) - assert_nothing_raised { mail.deliver } - assert_equal 1, TestMailer.deliveries.length - end - - def test_multipart_with_template_path_with_dots - mail = FunkyPathMailer.multipart_with_template_path_with_dots(@recipient) - assert_equal 2, mail.parts.length - assert "text/plain", mail.parts[1].mime_type - assert "utf-8", mail.parts[1].charset - end - - def test_custom_content_type_attributes - mail = TestMailer.custom_content_type_attributes - assert_match %r{format=flowed}, mail.content_type - assert_match %r{charset=utf-8}, mail.content_type - end - - def test_return_path_with_create - mail = TestMailer.return_path - assert_equal "another@somewhere.test", mail.return_path - end - - def test_return_path_with_deliver - TestMailer.delivery_method = :smtp - TestMailer.return_path.deliver - assert_match %r{^Return-Path: }, MockSMTP.deliveries[0][0] - assert_equal "another@somewhere.test", MockSMTP.deliveries[0][1].to_s - end - - def test_starttls_is_enabled_if_supported - TestMailer.smtp_settings.merge!(:enable_starttls_auto => true) - MockSMTP.any_instance.expects(:respond_to?).with(:enable_starttls_auto).returns(true) - MockSMTP.any_instance.expects(:enable_starttls_auto) - TestMailer.delivery_method = :smtp - TestMailer.signed_up(@recipient).deliver - end - - def test_starttls_is_disabled_if_not_supported - TestMailer.smtp_settings.merge!(:enable_starttls_auto => true) - MockSMTP.any_instance.expects(:respond_to?).with(:enable_starttls_auto).returns(false) - MockSMTP.any_instance.expects(:enable_starttls_auto).never - TestMailer.delivery_method = :smtp - TestMailer.signed_up(@recipient).deliver - end - - def test_starttls_is_not_enabled - TestMailer.smtp_settings.merge!(:enable_starttls_auto => false) - MockSMTP.any_instance.expects(:respond_to?).never - TestMailer.delivery_method = :smtp - TestMailer.signed_up(@recipient).deliver - ensure - TestMailer.smtp_settings.merge!(:enable_starttls_auto => true) - end -end - -class InheritableTemplateRootTest < ActiveSupport::TestCase - def test_attr - expected = File.expand_path("#{File.dirname(__FILE__)}/fixtures/path.with.dots") - assert_equal expected, FunkyPathMailer.template_root.to_s - - sub = Class.new(FunkyPathMailer) - assert_deprecated do - sub.template_root = 'test/path' - end - - assert_equal File.expand_path('test/path'), sub.template_root.to_s - assert_equal expected, FunkyPathMailer.template_root.to_s - end -end - -class MethodNamingTest < ActiveSupport::TestCase - class TestMailer < ActionMailer::Base - def send - render :text => 'foo' - end - end - - def setup - set_delivery_method :test - ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries.clear - end - - def teardown - restore_delivery_method - end - - def test_send_method - assert_nothing_raised do - assert_emails 1 do - assert_deprecated do - TestMailer.deliver_send - end - end - end - end -end -class RespondToTest < Test::Unit::TestCase - class RespondToMailer < ActionMailer::Base; end - - def setup - set_delivery_method :test - end - - def teardown - restore_delivery_method - end - - def test_should_respond_to_new - assert RespondToMailer.respond_to?(:new) - end - - def test_should_respond_to_create_with_template_suffix - assert RespondToMailer.respond_to?(:create_any_old_template) - end - - def test_should_respond_to_deliver_with_template_suffix - assert RespondToMailer.respond_to?(:deliver_any_old_template) - end - - def test_should_not_respond_to_new_with_template_suffix - assert !RespondToMailer.respond_to?(:new_any_old_template) - end - - def test_should_not_respond_to_create_with_template_suffix_unless_it_is_separated_by_an_underscore - assert !RespondToMailer.respond_to?(:createany_old_template) - end - - def test_should_not_respond_to_deliver_with_template_suffix_unless_it_is_separated_by_an_underscore - assert !RespondToMailer.respond_to?(:deliverany_old_template) - end - - def test_should_not_respond_to_create_with_template_suffix_if_it_begins_with_a_uppercase_letter - assert !RespondToMailer.respond_to?(:create_Any_old_template) - end - - def test_should_not_respond_to_deliver_with_template_suffix_if_it_begins_with_a_uppercase_letter - assert !RespondToMailer.respond_to?(:deliver_Any_old_template) - end - - def test_should_not_respond_to_create_with_template_suffix_if_it_begins_with_a_digit - assert !RespondToMailer.respond_to?(:create_1_template) - end - - def test_should_not_respond_to_deliver_with_template_suffix_if_it_begins_with_a_digit - assert !RespondToMailer.respond_to?(:deliver_1_template) - end - - def test_should_not_respond_to_method_where_deliver_is_not_a_suffix - assert !RespondToMailer.respond_to?(:foo_deliver_template) - end - - def test_should_still_raise_exception_with_expected_message_when_calling_an_undefined_method - error = assert_raise NoMethodError do - RespondToMailer.not_a_method - end - - assert_match(/undefined method.*not_a_method/, error.message) - end -end \ No newline at end of file diff --git a/actionmailer/test/mail_test.rb b/actionmailer/test/mail_test.rb index ea6f25d157..f18dfdc156 100644 --- a/actionmailer/test/mail_test.rb +++ b/actionmailer/test/mail_test.rb @@ -8,7 +8,6 @@ class MailTest < Test::Unit::TestCase quoted_body = [expected].pack('*M') m.body = quoted_body assert_equal "something_with_underscores=\r\n", m.body.encoded - # CHANGED: body returns object, not string, Changed m.body to m.body.to_s assert_equal expected, m.body.to_s end @@ -20,5 +19,4 @@ class MailTest < Test::Unit::TestCase assert_equal 1902, mail.attachments.first.decoded.length assert_equal "application/pkcs7-signature", mail.attachments.last.mime_type end - end diff --git a/actionmailer/test/old_base/adv_attr_test.rb b/actionmailer/test/old_base/adv_attr_test.rb new file mode 100644 index 0000000000..f22d733bc5 --- /dev/null +++ b/actionmailer/test/old_base/adv_attr_test.rb @@ -0,0 +1,36 @@ +require 'abstract_unit' +require 'action_mailer/adv_attr_accessor' + +class AdvAttrTest < ActiveSupport::TestCase + class Person + cattr_reader :protected_instance_variables + @@protected_instance_variables = [] + + extend ActionMailer::AdvAttrAccessor + adv_attr_accessor :name + end + + def setup + @person = Person.new + end + + def test_adv_attr + assert_nil @person.name + @person.name 'Bob' + assert_equal 'Bob', @person.name + end + + def test_adv_attr_writer + assert_nil @person.name + @person.name = 'Bob' + assert_equal 'Bob', @person.name + end + + def test_raise_an_error_with_multiple_args + assert_raise(ArgumentError) { @person.name('x', 'y') } + end + + def test_ivar_is_added_to_protected_instnace_variables + assert Person.protected_instance_variables.include?('@name') + end +end diff --git a/actionmailer/test/old_base/asset_host_test.rb b/actionmailer/test/old_base/asset_host_test.rb new file mode 100644 index 0000000000..124032f1d9 --- /dev/null +++ b/actionmailer/test/old_base/asset_host_test.rb @@ -0,0 +1,52 @@ +require 'abstract_unit' + +class AssetHostMailer < ActionMailer::Base + def email_with_asset + recipients 'test@localhost' + subject "testing email containing asset path while asset_host is set" + from "tester@example.com" + end +end + +class AssetHostTest < Test::Unit::TestCase + def setup + set_delivery_method :test + ActionMailer::Base.perform_deliveries = true + ActionMailer::Base.deliveries.clear + end + + def teardown + restore_delivery_method + end + + def test_asset_host_as_string + ActionController::Base.asset_host = "http://www.example.com" + mail = AssetHostMailer.email_with_asset + assert_equal "\"Somelogo\"", mail.body.to_s.strip + end + + def test_asset_host_as_one_arguement_proc + ActionController::Base.asset_host = Proc.new { |source| + if source.starts_with?('/images') + "http://images.example.com" + else + "http://assets.example.com" + end + } + mail = AssetHostMailer.email_with_asset + assert_equal "\"Somelogo\"", mail.body.to_s.strip + end + + def test_asset_host_as_two_arguement_proc + ActionController::Base.asset_host = Proc.new {|source,request| + if request && request.ssl? + "https://www.example.com" + else + "http://www.example.com" + end + } + mail = nil + assert_nothing_raised { mail = AssetHostMailer.email_with_asset } + assert_equal "\"Somelogo\"", mail.body.to_s.strip + end +end \ No newline at end of file diff --git a/actionmailer/test/old_base/mail_helper_test.rb b/actionmailer/test/old_base/mail_helper_test.rb new file mode 100644 index 0000000000..a9b3cd3ce1 --- /dev/null +++ b/actionmailer/test/old_base/mail_helper_test.rb @@ -0,0 +1,94 @@ +require 'abstract_unit' + +module MailerHelper + def person_name + "Mr. Joe Person" + end +end + +class HelperMailer < ActionMailer::Base + helper MailerHelper + helper :example + + def use_helper + recipients 'test@localhost' + subject "using helpers" + from "tester@example.com" + end + + def use_example_helper + recipients 'test@localhost' + subject "using helpers" + from "tester@example.com" + + @text = "emphasize me!" + end + + def use_mail_helper + recipients 'test@localhost' + subject "using mailing helpers" + from "tester@example.com" + + @text = "But soft! What light through yonder window breaks? It is the east, " + + "and Juliet is the sun. Arise, fair sun, and kill the envious moon, " + + "which is sick and pale with grief that thou, her maid, art far more " + + "fair than she. Be not her maid, for she is envious! Her vestal " + + "livery is but sick and green, and none but fools do wear it. Cast " + + "it off!" + end + + def use_helper_method + recipients 'test@localhost' + subject "using helpers" + from "tester@example.com" + + @text = "emphasize me!" + end + + private + + def name_of_the_mailer_class + self.class.name + end + helper_method :name_of_the_mailer_class +end + +class MailerHelperTest < ActiveSupport::TestCase + def new_mail( charset="utf-8" ) + mail = Mail.new + mail.set_content_type "text", "plain", { "charset" => charset } if charset + mail + end + + def setup + set_delivery_method :test + ActionMailer::Base.perform_deliveries = true + ActionMailer::Base.deliveries.clear + end + + def teardown + restore_delivery_method + end + + def test_use_helper + mail = HelperMailer.use_helper + assert_match %r{Mr. Joe Person}, mail.encoded + end + + def test_use_example_helper + mail = HelperMailer.use_example_helper + assert_match %r{emphasize me!}, mail.encoded + end + + def test_use_helper_method + mail = HelperMailer.use_helper_method + assert_match %r{HelperMailer}, mail.encoded + end + + def test_use_mail_helper + mail = HelperMailer.use_mail_helper + assert_match %r{ But soft!}, mail.encoded + assert_match %r{east, and\r\n Juliet}, mail.encoded + end +end + diff --git a/actionmailer/test/old_base/mail_layout_test.rb b/actionmailer/test/old_base/mail_layout_test.rb new file mode 100644 index 0000000000..4038fbf339 --- /dev/null +++ b/actionmailer/test/old_base/mail_layout_test.rb @@ -0,0 +1,148 @@ +require 'abstract_unit' + +class AutoLayoutMailer < ActionMailer::Base + + def hello + recipients 'test@localhost' + subject "You have a mail" + from "tester@example.com" + end + + def spam + recipients 'test@localhost' + subject "You have a mail" + from "tester@example.com" + + @world = "Earth" + render(:inline => "Hello, <%= @world %>", :layout => 'spam') + end + + def nolayout + recipients 'test@localhost' + subject "You have a mail" + from "tester@example.com" + + @world = "Earth" + render(:inline => "Hello, <%= @world %>", :layout => false) + end + + def multipart(type = nil) + recipients 'test@localhost' + subject "You have a mail" + from "tester@example.com" + + content_type(type) if type + end +end + +class ExplicitLayoutMailer < ActionMailer::Base + layout 'spam', :except => [:logout] + + def signup + recipients 'test@localhost' + subject "You have a mail" + from "tester@example.com" + end + + def logout + recipients 'test@localhost' + subject "You have a mail" + from "tester@example.com" + end +end + +class LayoutMailerTest < Test::Unit::TestCase + def setup + set_delivery_method :test + ActionMailer::Base.perform_deliveries = true + ActionMailer::Base.deliveries.clear + end + + def teardown + restore_delivery_method + end + + def test_should_pickup_default_layout + mail = AutoLayoutMailer.hello + assert_equal "Hello from layout Inside", mail.body.to_s.strip + end + + def test_should_pickup_multipart_layout + mail = AutoLayoutMailer.multipart + # CHANGED: content_type returns an object + # assert_equal "multipart/alternative", mail.content_type + assert_equal "multipart/alternative", mail.mime_type + assert_equal 2, mail.parts.size + + # CHANGED: content_type returns an object + # assert_equal 'text/plain', mail.parts.first.content_type + assert_equal 'text/plain', mail.parts.first.mime_type + + # CHANGED: body returns an object + # assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body + assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body.to_s + + # CHANGED: content_type returns an object + # assert_equal 'text/html', mail.parts.last.content_type + assert_equal 'text/html', mail.parts.last.mime_type + + # CHANGED: body returns an object + # assert_equal "Hello from layout text/html multipart", mail.parts.last.body + assert_equal "Hello from layout text/html multipart", mail.parts.last.body.to_s + end + + def test_should_pickup_multipartmixed_layout + mail = AutoLayoutMailer.multipart("multipart/mixed") + # CHANGED: content_type returns an object + # assert_equal "multipart/mixed", mail.content_type + assert_equal "multipart/mixed", mail.mime_type + assert_equal 2, mail.parts.size + + # CHANGED: content_type returns an object + # assert_equal 'text/plain', mail.parts.first.content_type + assert_equal 'text/plain', mail.parts.first.mime_type + # CHANGED: body returns an object + # assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body + assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body.to_s + + # CHANGED: content_type returns an object + # assert_equal 'text/html', mail.parts.last.content_type + assert_equal 'text/html', mail.parts.last.mime_type + # CHANGED: body returns an object + # assert_equal "Hello from layout text/html multipart", mail.parts.last.body + assert_equal "Hello from layout text/html multipart", mail.parts.last.body.to_s + end + + def test_should_fix_multipart_layout + mail = AutoLayoutMailer.multipart("text/plain") + assert_equal "multipart/alternative", mail.mime_type + assert_equal 2, mail.parts.size + + assert_equal 'text/plain', mail.parts.first.mime_type + assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body.to_s + + assert_equal 'text/html', mail.parts.last.mime_type + assert_equal "Hello from layout text/html multipart", mail.parts.last.body.to_s + end + + + def test_should_pickup_layout_given_to_render + mail = AutoLayoutMailer.spam + assert_equal "Spammer layout Hello, Earth", mail.body.to_s.strip + end + + def test_should_respect_layout_false + mail = AutoLayoutMailer.nolayout + assert_equal "Hello, Earth", mail.body.to_s.strip + end + + def test_explicit_class_layout + mail = ExplicitLayoutMailer.signup + assert_equal "Spammer layout We do not spam", mail.body.to_s.strip + end + + def test_explicit_layout_exceptions + mail = ExplicitLayoutMailer.logout + assert_equal "You logged out", mail.body.to_s.strip + end +end diff --git a/actionmailer/test/old_base/mail_render_test.rb b/actionmailer/test/old_base/mail_render_test.rb new file mode 100644 index 0000000000..804200fd36 --- /dev/null +++ b/actionmailer/test/old_base/mail_render_test.rb @@ -0,0 +1,157 @@ +require 'abstract_unit' + +class RenderMailer < ActionMailer::Base + def inline_template + recipients 'test@localhost' + subject "using helpers" + from "tester@example.com" + + @world = "Earth" + render :inline => "Hello, <%= @world %>" + end + + def file_template + recipients 'test@localhost' + subject "using helpers" + from "tester@example.com" + + @recipient = 'test@localhost' + render :file => "templates/signed_up" + end + + def implicit_body + recipients 'test@localhost' + subject "using helpers" + from "tester@example.com" + + @recipient = 'test@localhost' + render :template => "templates/signed_up" + end + + def rxml_template + recipients 'test@localhost' + subject "rendering rxml template" + from "tester@example.com" + end + + def included_subtemplate + recipients 'test@localhost' + subject "Including another template in the one being rendered" + from "tester@example.com" + end + + def mailer_accessor + recipients 'test@localhost' + subject "Mailer Accessor" + from "tester@example.com" + + render :inline => "Look, <%= mailer.subject %>!" + end + + def no_instance_variable + recipients 'test@localhost' + subject "No Instance Variable" + from "tester@example.com" + + silence_warnings do + render :inline => "Look, subject.nil? is <%= @subject.nil? %>!" + end + end + + def initialize_defaults(method_name) + super + mailer_name "test_mailer" + end +end + +class FirstMailer < ActionMailer::Base + def share + recipients 'test@localhost' + subject "using helpers" + from "tester@example.com" + end +end + +class SecondMailer < ActionMailer::Base + def share + recipients 'test@localhost' + subject "using helpers" + from "tester@example.com" + end +end + +# CHANGED: Those tests were changed because body returns an object now +# Instead of mail.body.strip, we should mail.body.to_s.strip +class RenderHelperTest < Test::Unit::TestCase + def setup + set_delivery_method :test + ActionMailer::Base.perform_deliveries = true + ActionMailer::Base.deliveries.clear + + @recipient = 'test@localhost' + end + + def teardown + restore_delivery_method + end + + def test_implicit_body + mail = RenderMailer.implicit_body + assert_equal "Hello there, \n\nMr. test@localhost", mail.body.to_s.strip + end + + def test_inline_template + mail = RenderMailer.inline_template + assert_equal "Hello, Earth", mail.body.to_s.strip + end + + def test_file_template + mail = RenderMailer.file_template + assert_equal "Hello there, \n\nMr. test@localhost", mail.body.to_s.strip + end + + def test_rxml_template + mail = RenderMailer.rxml_template.deliver + assert_equal "\n", mail.body.to_s.strip + end + + def test_included_subtemplate + mail = RenderMailer.included_subtemplate.deliver + assert_equal "Hey Ho, let's go!", mail.body.to_s.strip + end + + def test_mailer_accessor + mail = RenderMailer.mailer_accessor.deliver + assert_equal "Look, Mailer Accessor!", mail.body.to_s.strip + end + + def test_no_instance_variable + mail = RenderMailer.no_instance_variable.deliver + assert_equal "Look, subject.nil? is true!", mail.body.to_s.strip + end +end + +class FirstSecondHelperTest < Test::Unit::TestCase + def setup + set_delivery_method :test + ActionMailer::Base.perform_deliveries = true + ActionMailer::Base.deliveries.clear + + @recipient = 'test@localhost' + end + + def teardown + restore_delivery_method + end + + def test_ordering + mail = FirstMailer.share + assert_equal "first mail", mail.body.to_s.strip + mail = SecondMailer.share + assert_equal "second mail", mail.body.to_s.strip + mail = FirstMailer.share + assert_equal "first mail", mail.body.to_s.strip + mail = SecondMailer.share + assert_equal "second mail", mail.body.to_s.strip + end +end diff --git a/actionmailer/test/old_base/mail_service_test.rb b/actionmailer/test/old_base/mail_service_test.rb new file mode 100644 index 0000000000..20b0f30b84 --- /dev/null +++ b/actionmailer/test/old_base/mail_service_test.rb @@ -0,0 +1,1192 @@ +# encoding: utf-8 +require 'abstract_unit' + +class FunkyPathMailer < ActionMailer::Base + self.view_paths = "#{File.dirname(__FILE__)}/../fixtures/path.with.dots" + + def multipart_with_template_path_with_dots(recipient) + recipients recipient + subject "This path has dots" + from "Chad Fowler " + attachment :content_type => "text/plain", + :data => "dots dots dots..." + end +end + +class TestMailer < ActionMailer::Base + def signed_up(recipient) + recipients recipient + subject "[Signed up] Welcome #{recipient}" + from "system@loudthinking.com" + + @recipient = recipient + end + + def cancelled_account(recipient) + recipients recipient + subject "[Cancelled] Goodbye #{recipient}" + from "system@loudthinking.com" + sent_on Time.local(2004, 12, 12) + + render :text => "Goodbye, Mr. #{recipient}" + end + + def from_with_name + from "System " + recipients "root@loudthinking.com" + render :text => "Nothing to see here." + end + + def from_without_name + from "system@loudthinking.com" + recipients "root@loudthinking.com" + render :text => "Nothing to see here." + end + + def cc_bcc(recipient) + recipients recipient + subject "testing bcc/cc" + from "system@loudthinking.com" + sent_on Time.local(2004, 12, 12) + cc "nobody@loudthinking.com" + bcc "root@loudthinking.com" + + render :text => "Nothing to see here." + end + + def different_reply_to(recipient) + recipients recipient + subject "testing reply_to" + from "system@loudthinking.com" + sent_on Time.local(2008, 5, 23) + reply_to "atraver@gmail.com" + + render :text => "Nothing to see here." + end + + def iso_charset(recipient) + recipients recipient + subject "testing isø charsets" + from "system@loudthinking.com" + sent_on Time.local(2004, 12, 12) + cc "nobody@loudthinking.com" + bcc "root@loudthinking.com" + charset "iso-8859-1" + + render :text => "Nothing to see here." + end + + def unencoded_subject(recipient) + recipients recipient + subject "testing unencoded subject" + from "system@loudthinking.com" + sent_on Time.local(2004, 12, 12) + cc "nobody@loudthinking.com" + bcc "root@loudthinking.com" + + render :text => "Nothing to see here." + end + + def extended_headers(recipient) + recipients recipient + subject "testing extended headers" + from "Grytøyr " + sent_on Time.local(2004, 12, 12) + cc "Grytøyr " + bcc "Grytøyr " + charset "iso-8859-1" + + render :text => "Nothing to see here." + end + + def utf8_body(recipient) + recipients recipient + subject "testing utf-8 body" + from "Foo áëô îü " + sent_on Time.local(2004, 12, 12) + cc "Foo áëô îü " + bcc "Foo áëô îü " + charset "utf-8" + + render :text => "åœö blah" + end + + def multipart_with_mime_version(recipient) + recipients recipient + subject "multipart with mime_version" + from "test@example.com" + sent_on Time.local(2004, 12, 12) + mime_version "1.1" + content_type "multipart/alternative" + + part "text/plain" do |p| + p.body = render(:text => "blah") + end + + part "text/html" do |p| + p.body = render(:inline => "<%= content_tag(:b, 'blah') %>") + end + end + + def multipart_with_utf8_subject(recipient) + recipients recipient + subject "Foo áëô îü" + from "test@example.com" + charset "utf-8" + + part "text/plain" do |p| + p.body = "blah" + end + + part "text/html" do |p| + p.body = "blah" + end + end + + def explicitly_multipart_example(recipient, ct=nil) + recipients recipient + subject "multipart example" + from "test@example.com" + sent_on Time.local(2004, 12, 12) + content_type ct if ct + + part "text/html" do |p| + p.charset = "iso-8859-1" + p.body = "blah" + end + + attachment :content_type => "image/jpeg", :filename => File.join(File.dirname(__FILE__), "fixtures", "attachments", "foo.jpg"), + :data => "123456789" + + render :text => "plain text default" + end + + def implicitly_multipart_example(recipient, cs = nil, order = nil) + recipients recipient + subject "multipart example" + from "test@example.com" + sent_on Time.local(2004, 12, 12) + + @charset = cs if cs + @recipient = recipient + @implicit_parts_order = order if order + end + + def implicitly_multipart_with_utf8 + recipients "no.one@nowhere.test" + subject "Foo áëô îü" + from "some.one@somewhere.test" + template "implicitly_multipart_example" + + @recipient = "no.one@nowhere.test" + end + + def html_mail(recipient) + recipients recipient + subject "html mail" + from "test@example.com" + content_type "text/html" + + render :text => "Emphasize this" + end + + def html_mail_with_underscores(recipient) + subject "html mail with underscores" + render :text => %{_Google} + end + + def custom_template(recipient) + recipients recipient + subject "[Signed up] Welcome #{recipient}" + from "system@loudthinking.com" + sent_on Time.local(2004, 12, 12) + template "signed_up" + + @recipient = recipient + end + + def custom_templating_extension(recipient) + recipients recipient + subject "[Signed up] Welcome #{recipient}" + from "system@loudthinking.com" + sent_on Time.local(2004, 12, 12) + + @recipient = recipient + end + + def various_newlines(recipient) + recipients recipient + subject "various newlines" + from "test@example.com" + + render :text => "line #1\nline #2\rline #3\r\nline #4\r\r" + + "line #5\n\nline#6\r\n\r\nline #7" + end + + def various_newlines_multipart(recipient) + recipients recipient + subject "various newlines multipart" + from "test@example.com" + content_type "multipart/alternative" + + part :content_type => "text/plain", :body => "line #1\nline #2\rline #3\r\nline #4\r\r" + part :content_type => "text/html", :body => "

line #1

\n

line #2

\r

line #3

\r\n

line #4

\r\r" + end + + def nested_multipart(recipient) + recipients recipient + subject "nested multipart" + from "test@example.com" + content_type "multipart/mixed" + + part :content_type => "multipart/alternative", :content_disposition => "inline", "foo" => "bar" do |p| + p.part :content_type => "text/plain", :body => "test text\nline #2" + p.part :content_type => "text/html", :body => "test HTML
\nline #2" + end + + attachment :content_type => "application/octet-stream", :filename => "test.txt", :data => "test abcdefghijklmnopqstuvwxyz" + end + + def nested_multipart_with_body(recipient) + recipients recipient + subject "nested multipart with body" + from "test@example.com" + content_type "multipart/mixed" + + part :content_type => "multipart/alternative", :content_disposition => "inline", :body => "Nothing to see here." do |p| + p.part :content_type => "text/html", :body => "test HTML
" + end + end + + def attachment_with_custom_header(recipient) + recipients recipient + subject "custom header in attachment" + from "test@example.com" + content_type "multipart/related" + part :content_type => "text/html", :body => 'yo' + attachment :content_type => "image/jpeg", :filename => File.join(File.dirname(__FILE__), "fixtures", "attachments", "test.jpg"), :data => "i am not a real picture", 'Content-ID' => '' + end + + def unnamed_attachment(recipient) + recipients recipient + subject "nested multipart" + from "test@example.com" + content_type "multipart/mixed" + part :content_type => "text/plain", :body => "hullo" + attachment :content_type => "application/octet-stream", :data => "test abcdefghijklmnopqstuvwxyz" + end + + def headers_with_nonalpha_chars(recipient) + recipients recipient + subject "nonalpha chars" + from "One: Two " + cc "Three: Four " + bcc "Five: Six " + render :text => "testing" + end + + def custom_content_type_attributes + recipients "no.one@nowhere.test" + subject "custom content types" + from "some.one@somewhere.test" + content_type "text/plain; format=flowed" + render :text => "testing" + end + + def return_path + recipients "no.one@nowhere.test" + subject "return path test" + from "some.one@somewhere.test" + headers["return-path"] = "another@somewhere.test" + render :text => "testing" + end + + def subject_with_i18n(recipient) + recipients recipient + from "system@loudthinking.com" + render :text => "testing" + end + + class << self + attr_accessor :received_body + end + + def receive(mail) + self.class.received_body = mail.body + end +end + +class ActionMailerTest < Test::Unit::TestCase + include ActionMailer::Quoting + + def encode( text, charset="utf-8" ) + quoted_printable( text, charset ) + end + + def new_mail( charset="utf-8" ) + mail = Mail.new + mail.mime_version = "1.0" + if charset + mail.content_type ["text", "plain", { "charset" => charset }] + end + mail + end + + # Replacing logger work around for mocha bug. Should be fixed in mocha 0.3.3 + def setup + set_delivery_method :test + ActionMailer::Base.perform_deliveries = true + ActionMailer::Base.raise_delivery_errors = true + ActionMailer::Base.deliveries.clear + + @original_logger = TestMailer.logger + @recipient = 'test@localhost' + end + + def teardown + TestMailer.logger = @original_logger + restore_delivery_method + end + + def test_nested_parts + created = nil + assert_nothing_raised { created = TestMailer.nested_multipart(@recipient)} + assert_equal 2, created.parts.size + assert_equal 2, created.parts.first.parts.size + + assert_equal "multipart/mixed", created.mime_type + assert_equal "multipart/alternative", created.parts[0].mime_type + assert_equal "bar", created.parts[0].header['foo'].to_s + assert_nil created.parts[0].charset + assert_equal "text/plain", created.parts[0].parts[0].mime_type + assert_equal "text/html", created.parts[0].parts[1].mime_type + assert_equal "application/octet-stream", created.parts[1].mime_type + + end + + def test_nested_parts_with_body + created = nil + TestMailer.nested_multipart_with_body(@recipient) + assert_nothing_raised { created = TestMailer.nested_multipart_with_body(@recipient)} + + assert_equal 1,created.parts.size + assert_equal 2,created.parts.first.parts.size + + assert_equal "multipart/mixed", created.mime_type + assert_equal "multipart/alternative", created.parts.first.mime_type + assert_equal "text/plain", created.parts.first.parts.first.mime_type + assert_equal "Nothing to see here.", created.parts.first.parts.first.body.to_s + assert_equal "text/html", created.parts.first.parts.second.mime_type + assert_equal "test HTML
", created.parts.first.parts.second.body.to_s + end + + def test_attachment_with_custom_header + created = nil + assert_nothing_raised { created = TestMailer.attachment_with_custom_header(@recipient) } + assert created.parts.any? { |p| p.header['content-id'].to_s == "" } + end + + def test_signed_up + Time.stubs(:now => Time.now) + + expected = new_mail + expected.to = @recipient + expected.subject = "[Signed up] Welcome #{@recipient}" + expected.body = "Hello there, \n\nMr. #{@recipient}" + expected.from = "system@loudthinking.com" + expected.date = Time.now + + created = nil + assert_nothing_raised { created = TestMailer.signed_up(@recipient) } + assert_not_nil created + + expected.message_id = '<123@456>' + created.message_id = '<123@456>' + + assert_equal expected.encoded, created.encoded + + assert_nothing_raised { TestMailer.signed_up(@recipient).deliver } + + delivered = ActionMailer::Base.deliveries.first + assert_not_nil delivered + + expected.message_id = '<123@456>' + delivered.message_id = '<123@456>' + + assert_equal expected.encoded, delivered.encoded + end + + def test_custom_template + expected = new_mail + expected.to = @recipient + expected.subject = "[Signed up] Welcome #{@recipient}" + expected.body = "Hello there, \n\nMr. #{@recipient}" + expected.from = "system@loudthinking.com" + expected.date = Time.local(2004, 12, 12) + + created = nil + assert_nothing_raised { created = TestMailer.custom_template(@recipient) } + assert_not_nil created + expected.message_id = '<123@456>' + created.message_id = '<123@456>' + assert_equal expected.encoded, created.encoded + end + + def test_custom_templating_extension + assert ActionView::Template.template_handler_extensions.include?("haml"), "haml extension was not registered" + + # N.b., custom_templating_extension.text.plain.haml is expected to be in fixtures/test_mailer directory + expected = new_mail + expected.to = @recipient + expected.subject = "[Signed up] Welcome #{@recipient}" + expected.body = "Hello there, \n\nMr. #{@recipient}" + expected.from = "system@loudthinking.com" + expected.date = Time.local(2004, 12, 12) + + # Stub the render method so no alternative renderers need be present. + ActionView::Base.any_instance.stubs(:render).returns("Hello there, \n\nMr. #{@recipient}") + + # Now that the template is registered, there should be one part. The text/plain part. + created = nil + assert_nothing_raised { created = TestMailer.custom_templating_extension(@recipient) } + assert_not_nil created + assert_equal 2, created.parts.length + assert_equal 'text/plain', created.parts[0].mime_type + assert_equal 'text/html', created.parts[1].mime_type + end + + def test_cancelled_account + expected = new_mail + expected.to = @recipient + expected.subject = "[Cancelled] Goodbye #{@recipient}" + expected.body = "Goodbye, Mr. #{@recipient}" + expected.from = "system@loudthinking.com" + expected.date = Time.local(2004, 12, 12) + + created = nil + assert_nothing_raised { created = TestMailer.cancelled_account(@recipient) } + assert_not_nil created + expected.message_id = '<123@456>' + created.message_id = '<123@456>' + assert_equal expected.encoded, created.encoded + + assert_nothing_raised { TestMailer.cancelled_account(@recipient).deliver } + assert_not_nil ActionMailer::Base.deliveries.first + delivered = ActionMailer::Base.deliveries.first + expected.message_id = '<123@456>' + delivered.message_id = '<123@456>' + + assert_equal expected.encoded, delivered.encoded + end + + def test_cc_bcc + expected = new_mail + expected.to = @recipient + expected.subject = "testing bcc/cc" + expected.body = "Nothing to see here." + expected.from = "system@loudthinking.com" + expected.cc = "nobody@loudthinking.com" + expected.bcc = "root@loudthinking.com" + expected.date = Time.local 2004, 12, 12 + + created = nil + assert_nothing_raised do + created = TestMailer.cc_bcc @recipient + end + assert_not_nil created + expected.message_id = '<123@456>' + created.message_id = '<123@456>' + assert_equal expected.encoded, created.encoded + + assert_nothing_raised do + TestMailer.cc_bcc(@recipient).deliver + end + + assert_not_nil ActionMailer::Base.deliveries.first + delivered = ActionMailer::Base.deliveries.first + expected.message_id = '<123@456>' + delivered.message_id = '<123@456>' + + assert_equal expected.encoded, delivered.encoded + end + + def test_from_without_name_for_smtp + TestMailer.delivery_method = :smtp + TestMailer.from_without_name.deliver + + mail = MockSMTP.deliveries.first + assert_not_nil mail + mail, from, to = mail + + assert_equal 'system@loudthinking.com', from.to_s + end + + def test_from_with_name_for_smtp + TestMailer.delivery_method = :smtp + TestMailer.from_with_name.deliver + + mail = MockSMTP.deliveries.first + assert_not_nil mail + mail, from, to = mail + + assert_equal 'system@loudthinking.com', from + end + + def test_reply_to + expected = new_mail + + expected.to = @recipient + expected.subject = "testing reply_to" + expected.body = "Nothing to see here." + expected.from = "system@loudthinking.com" + expected.reply_to = "atraver@gmail.com" + expected.date = Time.local 2008, 5, 23 + + created = nil + assert_nothing_raised do + created = TestMailer.different_reply_to @recipient + end + assert_not_nil created + + expected.message_id = '<123@456>' + created.message_id = '<123@456>' + + assert_equal expected.encoded, created.encoded + + assert_nothing_raised do + TestMailer.different_reply_to(@recipient).deliver + end + + delivered = ActionMailer::Base.deliveries.first + assert_not_nil delivered + + expected.message_id = '<123@456>' + delivered.message_id = '<123@456>' + + assert_equal expected.encoded, delivered.encoded + end + + def test_iso_charset + expected = new_mail( "iso-8859-1" ) + expected.to = @recipient + expected.subject = encode "testing isø charsets", "iso-8859-1" + expected.body = "Nothing to see here." + expected.from = "system@loudthinking.com" + expected.cc = "nobody@loudthinking.com" + expected.bcc = "root@loudthinking.com" + expected.date = Time.local 2004, 12, 12 + + created = nil + assert_nothing_raised do + created = TestMailer.iso_charset @recipient + end + assert_not_nil created + + expected.message_id = '<123@456>' + created.message_id = '<123@456>' + + assert_equal expected.encoded, created.encoded + + assert_nothing_raised do + TestMailer.iso_charset(@recipient).deliver + end + + delivered = ActionMailer::Base.deliveries.first + assert_not_nil delivered + + expected.message_id = '<123@456>' + delivered.message_id = '<123@456>' + + assert_equal expected.encoded, delivered.encoded + end + + def test_unencoded_subject + expected = new_mail + expected.to = @recipient + expected.subject = "testing unencoded subject" + expected.body = "Nothing to see here." + expected.from = "system@loudthinking.com" + expected.cc = "nobody@loudthinking.com" + expected.bcc = "root@loudthinking.com" + expected.date = Time.local 2004, 12, 12 + + created = nil + assert_nothing_raised do + created = TestMailer.unencoded_subject @recipient + end + assert_not_nil created + + expected.message_id = '<123@456>' + created.message_id = '<123@456>' + + assert_equal expected.encoded, created.encoded + + assert_nothing_raised do + TestMailer.unencoded_subject(@recipient).deliver + end + + delivered = ActionMailer::Base.deliveries.first + assert_not_nil delivered + + expected.message_id = '<123@456>' + delivered.message_id = '<123@456>' + + assert_equal expected.encoded, delivered.encoded + end + + def test_deliveries_array + assert_not_nil ActionMailer::Base.deliveries + assert_equal 0, ActionMailer::Base.deliveries.size + TestMailer.signed_up(@recipient).deliver + assert_equal 1, ActionMailer::Base.deliveries.size + assert_not_nil ActionMailer::Base.deliveries.first + end + + def test_perform_deliveries_flag + ActionMailer::Base.perform_deliveries = false + TestMailer.signed_up(@recipient).deliver + assert_equal 0, ActionMailer::Base.deliveries.size + ActionMailer::Base.perform_deliveries = true + TestMailer.signed_up(@recipient).deliver + assert_equal 1, ActionMailer::Base.deliveries.size + end + + def test_doesnt_raise_errors_when_raise_delivery_errors_is_false + ActionMailer::Base.raise_delivery_errors = false + Mail::TestMailer.any_instance.expects(:deliver!).raises(Exception) + assert_nothing_raised { TestMailer.signed_up(@recipient).deliver } + end + + def test_performs_delivery_via_sendmail + IO.expects(:popen).once.with('/usr/sbin/sendmail -i -t -f "system@loudthinking.com" test@localhost', 'w+') + TestMailer.delivery_method = :sendmail + TestMailer.signed_up(@recipient).deliver + end + + def test_unquote_quoted_printable_subject + msg = <" + + expected = new_mail "iso-8859-1" + expected.to = quote_address_if_necessary @recipient, "iso-8859-1" + expected.subject = "testing extended headers" + expected.body = "Nothing to see here." + expected.from = quote_address_if_necessary "Grytøyr ", "iso-8859-1" + expected.cc = quote_address_if_necessary "Grytøyr ", "iso-8859-1" + expected.bcc = quote_address_if_necessary "Grytøyr ", "iso-8859-1" + expected.date = Time.local 2004, 12, 12 + + created = nil + assert_nothing_raised do + created = TestMailer.extended_headers @recipient + end + + assert_not_nil created + expected.message_id = '<123@456>' + created.message_id = '<123@456>' + + assert_equal expected.encoded, created.encoded + + assert_nothing_raised do + TestMailer.extended_headers(@recipient).deliver + end + + delivered = ActionMailer::Base.deliveries.first + assert_not_nil delivered + + expected.message_id = '<123@456>' + delivered.message_id = '<123@456>' + + assert_equal expected.encoded, delivered.encoded + end + + def test_utf8_body_is_not_quoted + @recipient = "Foo áëô îü " + expected = new_mail "utf-8" + expected.to = quote_address_if_necessary @recipient, "utf-8" + expected.subject = "testing utf-8 body" + expected.body = "åœö blah" + expected.from = quote_address_if_necessary @recipient, "utf-8" + expected.cc = quote_address_if_necessary @recipient, "utf-8" + expected.bcc = quote_address_if_necessary @recipient, "utf-8" + expected.date = Time.local 2004, 12, 12 + + created = TestMailer.utf8_body @recipient + assert_match(/åœö blah/, created.encoded) + end + + def test_multiple_utf8_recipients + @recipient = ["\"Foo áëô îü\" ", "\"Example Recipient\" "] + expected = new_mail "utf-8" + expected.to = quote_address_if_necessary @recipient, "utf-8" + expected.subject = "testing utf-8 body" + expected.body = "åœö blah" + expected.from = quote_address_if_necessary @recipient.first, "utf-8" + expected.cc = quote_address_if_necessary @recipient, "utf-8" + expected.bcc = quote_address_if_necessary @recipient, "utf-8" + expected.date = Time.local 2004, 12, 12 + + created = TestMailer.utf8_body @recipient + assert_match(/\nFrom: =\?utf-8\?Q\?Foo_.*?\?= \r/, created.encoded) + assert_match(/\nTo: =\?utf-8\?Q\?Foo_.*?\?= , \r\n\tExample Recipient _Google}, mail.body.to_s + end + + def test_various_newlines + mail = TestMailer.various_newlines(@recipient) + assert_equal("line #1\nline #2\nline #3\nline #4\n\n" + + "line #5\n\nline#6\n\nline #7", mail.body.to_s) + end + + def test_various_newlines_multipart + mail = TestMailer.various_newlines_multipart(@recipient) + assert_equal "line #1\nline #2\nline #3\nline #4\n\n", mail.parts[0].body.to_s + assert_equal "

line #1

\n

line #2

\n

line #3

\n

line #4

\n\n", mail.parts[1].body.to_s + assert_equal "line #1\r\nline #2\r\nline #3\r\nline #4\r\n\r\n", mail.parts[0].body.encoded + assert_equal "

line #1

\r\n

line #2

\r\n

line #3

\r\n

line #4

\r\n\r\n", mail.parts[1].body.encoded + end + + def test_headers_removed_on_smtp_delivery + TestMailer.delivery_method = :smtp + TestMailer.cc_bcc(@recipient).deliver + assert MockSMTP.deliveries[0][2].include?("root@loudthinking.com") + assert MockSMTP.deliveries[0][2].include?("nobody@loudthinking.com") + assert MockSMTP.deliveries[0][2].include?(@recipient) + assert_match %r{^Cc: nobody@loudthinking.com}, MockSMTP.deliveries[0][0] + assert_match %r{^To: #{@recipient}}, MockSMTP.deliveries[0][0] + assert_no_match %r{^Bcc: root@loudthinking.com}, MockSMTP.deliveries[0][0] + end + + def test_file_delivery_should_create_a_file + ActionMailer::Base.delivery_method = :file + tmp_location = ActionMailer::Base.file_settings[:location] + + TestMailer.cc_bcc(@recipient).deliver + assert File.exists?(tmp_location) + assert File.directory?(tmp_location) + assert File.exists?(File.join(tmp_location, @recipient)) + assert File.exists?(File.join(tmp_location, 'nobody@loudthinking.com')) + assert File.exists?(File.join(tmp_location, 'root@loudthinking.com')) + end + + def test_recursive_multipart_processing + fixture = File.read(File.dirname(__FILE__) + "/../fixtures/raw_email7") + mail = Mail.new(fixture) + assert_equal(2, mail.parts.length) + assert_equal(4, mail.parts.first.parts.length) + assert_equal("This is the first part.", mail.parts.first.parts.first.body.to_s) + assert_equal("test.rb", mail.parts.first.parts.second.filename) + assert_equal("flowed", mail.parts.first.parts.fourth.content_type_parameters[:format]) + assert_equal('smime.p7s', mail.parts.second.filename) + end + + def test_decode_encoded_attachment_filename + fixture = File.read(File.dirname(__FILE__) + "/../fixtures/raw_email8") + mail = Mail.new(fixture) + attachment = mail.attachments.last + + expected = "01 Quien Te Dij\212at. Pitbull.mp3" + + if expected.respond_to?(:force_encoding) + result = attachment.filename.dup + expected.force_encoding(Encoding::ASCII_8BIT) + result.force_encoding(Encoding::ASCII_8BIT) + assert_equal expected, result + else + assert_equal expected, attachment.filename + end + end + + def test_decode_message_with_unknown_charset + fixture = File.read(File.dirname(__FILE__) + "/../fixtures/raw_email10") + mail = Mail.new(fixture) + assert_nothing_raised { mail.body } + end + + def test_empty_header_values_omitted + result = TestMailer.unnamed_attachment(@recipient).encoded + assert_match %r{Content-Type: application/octet-stream;}, result + assert_match %r{Content-Disposition: attachment;}, result + end + + def test_headers_with_nonalpha_chars + mail = TestMailer.headers_with_nonalpha_chars(@recipient) + assert !mail.from_addrs.empty? + assert !mail.cc_addrs.empty? + assert !mail.bcc_addrs.empty? + assert_match(/:/, mail[:from].decoded) + assert_match(/:/, mail[:cc].decoded) + assert_match(/:/, mail[:bcc].decoded) + end + + def test_with_mail_object_deliver + mail = TestMailer.headers_with_nonalpha_chars(@recipient) + assert_nothing_raised { mail.deliver } + assert_equal 1, TestMailer.deliveries.length + end + + def test_multipart_with_template_path_with_dots + mail = FunkyPathMailer.multipart_with_template_path_with_dots(@recipient) + assert_equal 2, mail.parts.length + assert "text/plain", mail.parts[1].mime_type + assert "utf-8", mail.parts[1].charset + end + + def test_custom_content_type_attributes + mail = TestMailer.custom_content_type_attributes + assert_match %r{format=flowed}, mail.content_type + assert_match %r{charset=utf-8}, mail.content_type + end + + def test_return_path_with_create + mail = TestMailer.return_path + assert_equal "another@somewhere.test", mail.return_path + end + + def test_return_path_with_deliver + TestMailer.delivery_method = :smtp + TestMailer.return_path.deliver + assert_match %r{^Return-Path: }, MockSMTP.deliveries[0][0] + assert_equal "another@somewhere.test", MockSMTP.deliveries[0][1].to_s + end + + def test_starttls_is_enabled_if_supported + TestMailer.smtp_settings.merge!(:enable_starttls_auto => true) + MockSMTP.any_instance.expects(:respond_to?).with(:enable_starttls_auto).returns(true) + MockSMTP.any_instance.expects(:enable_starttls_auto) + TestMailer.delivery_method = :smtp + TestMailer.signed_up(@recipient).deliver + end + + def test_starttls_is_disabled_if_not_supported + TestMailer.smtp_settings.merge!(:enable_starttls_auto => true) + MockSMTP.any_instance.expects(:respond_to?).with(:enable_starttls_auto).returns(false) + MockSMTP.any_instance.expects(:enable_starttls_auto).never + TestMailer.delivery_method = :smtp + TestMailer.signed_up(@recipient).deliver + end + + def test_starttls_is_not_enabled + TestMailer.smtp_settings.merge!(:enable_starttls_auto => false) + MockSMTP.any_instance.expects(:respond_to?).never + TestMailer.delivery_method = :smtp + TestMailer.signed_up(@recipient).deliver + ensure + TestMailer.smtp_settings.merge!(:enable_starttls_auto => true) + end +end + +class InheritableTemplateRootTest < ActiveSupport::TestCase + def test_attr + expected = File.expand_path("#{File.dirname(__FILE__)}/../fixtures/path.with.dots") + assert_equal expected, FunkyPathMailer.template_root.to_s + + sub = Class.new(FunkyPathMailer) + assert_deprecated do + sub.template_root = 'test/path' + end + + assert_equal File.expand_path('test/path'), sub.template_root.to_s + assert_equal expected, FunkyPathMailer.template_root.to_s + end +end + +class MethodNamingTest < ActiveSupport::TestCase + class TestMailer < ActionMailer::Base + def send + render :text => 'foo' + end + end + + def setup + set_delivery_method :test + ActionMailer::Base.perform_deliveries = true + ActionMailer::Base.deliveries.clear + end + + def teardown + restore_delivery_method + end + + def test_send_method + assert_nothing_raised do + assert_emails 1 do + assert_deprecated do + TestMailer.deliver_send + end + end + end + end +end +class RespondToTest < Test::Unit::TestCase + class RespondToMailer < ActionMailer::Base; end + + def setup + set_delivery_method :test + end + + def teardown + restore_delivery_method + end + + def test_should_respond_to_new + assert RespondToMailer.respond_to?(:new) + end + + def test_should_respond_to_create_with_template_suffix + assert RespondToMailer.respond_to?(:create_any_old_template) + end + + def test_should_respond_to_deliver_with_template_suffix + assert RespondToMailer.respond_to?(:deliver_any_old_template) + end + + def test_should_not_respond_to_new_with_template_suffix + assert !RespondToMailer.respond_to?(:new_any_old_template) + end + + def test_should_not_respond_to_create_with_template_suffix_unless_it_is_separated_by_an_underscore + assert !RespondToMailer.respond_to?(:createany_old_template) + end + + def test_should_not_respond_to_deliver_with_template_suffix_unless_it_is_separated_by_an_underscore + assert !RespondToMailer.respond_to?(:deliverany_old_template) + end + + def test_should_not_respond_to_create_with_template_suffix_if_it_begins_with_a_uppercase_letter + assert !RespondToMailer.respond_to?(:create_Any_old_template) + end + + def test_should_not_respond_to_deliver_with_template_suffix_if_it_begins_with_a_uppercase_letter + assert !RespondToMailer.respond_to?(:deliver_Any_old_template) + end + + def test_should_not_respond_to_create_with_template_suffix_if_it_begins_with_a_digit + assert !RespondToMailer.respond_to?(:create_1_template) + end + + def test_should_not_respond_to_deliver_with_template_suffix_if_it_begins_with_a_digit + assert !RespondToMailer.respond_to?(:deliver_1_template) + end + + def test_should_not_respond_to_method_where_deliver_is_not_a_suffix + assert !RespondToMailer.respond_to?(:foo_deliver_template) + end + + def test_should_still_raise_exception_with_expected_message_when_calling_an_undefined_method + error = assert_raise NoMethodError do + RespondToMailer.not_a_method + end + + assert_match(/undefined method.*not_a_method/, error.message) + end +end \ No newline at end of file diff --git a/actionmailer/test/old_base/tmail_compat_test.rb b/actionmailer/test/old_base/tmail_compat_test.rb new file mode 100644 index 0000000000..7c1d9a07c1 --- /dev/null +++ b/actionmailer/test/old_base/tmail_compat_test.rb @@ -0,0 +1,25 @@ +require 'abstract_unit' + +class TmailCompatTest < ActiveSupport::TestCase + + def test_set_content_type_raises_deprecation_warning + mail = Mail.new + assert_deprecated do + assert_nothing_raised do + mail.set_content_type "text/plain" + end + end + assert_equal mail.mime_type, "text/plain" + end + + def test_transfer_encoding_raises_deprecation_warning + mail = Mail.new + assert_deprecated do + assert_nothing_raised do + mail.transfer_encoding "base64" + end + end + assert_equal mail.content_transfer_encoding, "base64" + end + +end diff --git a/actionmailer/test/old_base/url_test.rb b/actionmailer/test/old_base/url_test.rb new file mode 100644 index 0000000000..10b6a36efd --- /dev/null +++ b/actionmailer/test/old_base/url_test.rb @@ -0,0 +1,84 @@ +require 'abstract_unit' + +class WelcomeController < ActionController::Base +end + +class TestMailer < ActionMailer::Base + default_url_options[:host] = 'www.basecamphq.com' + + def signed_up_with_url(recipient) + @recipients = recipient + @subject = "[Signed up] Welcome #{recipient}" + @from = "system@loudthinking.com" + @sent_on = Time.local(2004, 12, 12) + + @recipient = recipient + @welcome_url = url_for :host => "example.com", :controller => "welcome", :action => "greeting" + end + + class < charset }] + end + mail + end + + def setup + set_delivery_method :test + ActionMailer::Base.perform_deliveries = true + ActionMailer::Base.deliveries.clear + + @recipient = 'test@localhost' + end + + def teardown + restore_delivery_method + end + + def test_signed_up_with_url + ActionController::Routing::Routes.draw do |map| + map.connect ':controller/:action/:id' + map.welcome 'welcome', :controller=>"foo", :action=>"bar" + end + + expected = new_mail + expected.to = @recipient + expected.subject = "[Signed up] Welcome #{@recipient}" + expected.body = "Hello there, \n\nMr. #{@recipient}. Please see our greeting at http://example.com/welcome/greeting http://www.basecamphq.com/welcome\n\n\"Somelogo\"" + expected.from = "system@loudthinking.com" + expected.date = Time.local(2004, 12, 12) + + created = nil + assert_nothing_raised { created = TestMailer.signed_up_with_url(@recipient) } + assert_not_nil created + + expected.message_id = '<123@456>' + created.message_id = '<123@456>' + assert_equal expected.encoded, created.encoded + + assert_nothing_raised { TestMailer.signed_up_with_url(@recipient).deliver } + assert_not_nil ActionMailer::Base.deliveries.first + delivered = ActionMailer::Base.deliveries.first + + delivered.message_id = '<123@456>' + assert_equal expected.encoded, delivered.encoded + end +end diff --git a/actionmailer/test/tmail_compat_test.rb b/actionmailer/test/tmail_compat_test.rb deleted file mode 100644 index 7c1d9a07c1..0000000000 --- a/actionmailer/test/tmail_compat_test.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'abstract_unit' - -class TmailCompatTest < ActiveSupport::TestCase - - def test_set_content_type_raises_deprecation_warning - mail = Mail.new - assert_deprecated do - assert_nothing_raised do - mail.set_content_type "text/plain" - end - end - assert_equal mail.mime_type, "text/plain" - end - - def test_transfer_encoding_raises_deprecation_warning - mail = Mail.new - assert_deprecated do - assert_nothing_raised do - mail.transfer_encoding "base64" - end - end - assert_equal mail.content_transfer_encoding, "base64" - end - -end diff --git a/actionmailer/test/url_test.rb b/actionmailer/test/url_test.rb deleted file mode 100644 index 10b6a36efd..0000000000 --- a/actionmailer/test/url_test.rb +++ /dev/null @@ -1,84 +0,0 @@ -require 'abstract_unit' - -class WelcomeController < ActionController::Base -end - -class TestMailer < ActionMailer::Base - default_url_options[:host] = 'www.basecamphq.com' - - def signed_up_with_url(recipient) - @recipients = recipient - @subject = "[Signed up] Welcome #{recipient}" - @from = "system@loudthinking.com" - @sent_on = Time.local(2004, 12, 12) - - @recipient = recipient - @welcome_url = url_for :host => "example.com", :controller => "welcome", :action => "greeting" - end - - class < charset }] - end - mail - end - - def setup - set_delivery_method :test - ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries.clear - - @recipient = 'test@localhost' - end - - def teardown - restore_delivery_method - end - - def test_signed_up_with_url - ActionController::Routing::Routes.draw do |map| - map.connect ':controller/:action/:id' - map.welcome 'welcome', :controller=>"foo", :action=>"bar" - end - - expected = new_mail - expected.to = @recipient - expected.subject = "[Signed up] Welcome #{@recipient}" - expected.body = "Hello there, \n\nMr. #{@recipient}. Please see our greeting at http://example.com/welcome/greeting http://www.basecamphq.com/welcome\n\n\"Somelogo\"" - expected.from = "system@loudthinking.com" - expected.date = Time.local(2004, 12, 12) - - created = nil - assert_nothing_raised { created = TestMailer.signed_up_with_url(@recipient) } - assert_not_nil created - - expected.message_id = '<123@456>' - created.message_id = '<123@456>' - assert_equal expected.encoded, created.encoded - - assert_nothing_raised { TestMailer.signed_up_with_url(@recipient).deliver } - assert_not_nil ActionMailer::Base.deliveries.first - delivered = ActionMailer::Base.deliveries.first - - delivered.message_id = '<123@456>' - assert_equal expected.encoded, delivered.encoded - end -end -- cgit v1.2.3 From a74a655648618a6ed568b9b4ef3a17a8970e7774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sun, 24 Jan 2010 19:52:44 +0100 Subject: Add tests to mail helper. --- actionmailer/lib/action_mailer/base.rb | 1 - actionmailer/lib/action_mailer/mail_helper.rb | 4 +- actionmailer/test/abstract_unit.rb | 1 - actionmailer/test/delivery_methods_test.rb | 60 +++++++------- .../fixtures/helper_mailer/use_example_helper.erb | 1 - .../test/fixtures/helper_mailer/use_helper.erb | 1 - .../fixtures/helper_mailer/use_helper_method.erb | 1 - .../fixtures/helper_mailer/use_mail_helper.erb | 5 -- .../test/fixtures/helpers/example_helper.rb | 5 -- actionmailer/test/mail_helper_test.rb | 54 +++++++++++++ actionmailer/test/old_base/mail_helper_test.rb | 94 ---------------------- 11 files changed, 86 insertions(+), 141 deletions(-) delete mode 100644 actionmailer/test/fixtures/helper_mailer/use_example_helper.erb delete mode 100644 actionmailer/test/fixtures/helper_mailer/use_helper.erb delete mode 100644 actionmailer/test/fixtures/helper_mailer/use_helper_method.erb delete mode 100644 actionmailer/test/fixtures/helper_mailer/use_mail_helper.erb delete mode 100644 actionmailer/test/fixtures/helpers/example_helper.rb create mode 100644 actionmailer/test/mail_helper_test.rb delete mode 100644 actionmailer/test/old_base/mail_helper_test.rb diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 1b81cbf5af..7101bfbb70 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -256,7 +256,6 @@ module ActionMailer #:nodoc: include DeliveryMethods, Quoting abstract! - # TODO Add some sanity tests for the included modules include AbstractController::Logger include AbstractController::Rendering include AbstractController::LocalizedCache diff --git a/actionmailer/lib/action_mailer/mail_helper.rb b/actionmailer/lib/action_mailer/mail_helper.rb index 01da954b03..ab5c3469b2 100644 --- a/actionmailer/lib/action_mailer/mail_helper.rb +++ b/actionmailer/lib/action_mailer/mail_helper.rb @@ -17,12 +17,12 @@ module ActionMailer end # Access the mailer instance. - def mailer #:nodoc: + def mailer @_controller end # Access the message instance. - def message #:nodoc: + def message @_message end end diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index 781e49ae05..ce09bb5d61 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -19,7 +19,6 @@ ActionView::Template.register_template_handler :bak, lambda { |template| "Lame b FIXTURE_LOAD_PATH = File.expand_path('fixtures', File.dirname(__FILE__)) ActionMailer::Base.view_paths = FIXTURE_LOAD_PATH -$:.unshift File.join(FIXTURE_LOAD_PATH, 'helpers') class MockSMTP def self.deliveries diff --git a/actionmailer/test/delivery_methods_test.rb b/actionmailer/test/delivery_methods_test.rb index 5b2ce61ca9..145f8ba30d 100644 --- a/actionmailer/test/delivery_methods_test.rb +++ b/actionmailer/test/delivery_methods_test.rb @@ -71,7 +71,7 @@ class CustomDeliveryMethodsTest < ActiveSupport::TestCase end class MailDeliveryTest < ActiveSupport::TestCase - class DeliverMail < ActionMailer::Base + class DeliveryMailer < ActionMailer::Base DEFAULT_HEADERS = { :to => 'mikel@test.lindsaar.net', :from => 'jose@test.plataformatec.com' @@ -87,64 +87,64 @@ class MailDeliveryTest < ActiveSupport::TestCase end def teardown - DeliverMail.delivery_method = :smtp - DeliverMail.perform_deliveries = true - DeliverMail.raise_delivery_errors = true + DeliveryMailer.delivery_method = :smtp + DeliveryMailer.perform_deliveries = true + DeliveryMailer.raise_delivery_errors = true end test "ActionMailer should be told when Mail gets delivered" do - DeliverMail.deliveries.clear - DeliverMail.expects(:delivered_email).once - DeliverMail.welcome.deliver - assert_equal(1, DeliverMail.deliveries.length) + DeliveryMailer.deliveries.clear + DeliveryMailer.expects(:delivered_email).once + DeliveryMailer.welcome.deliver + assert_equal(1, DeliveryMailer.deliveries.length) end test "delivery method can be customized per instance" do - email = DeliverMail.welcome.deliver + email = DeliveryMailer.welcome.deliver assert_instance_of Mail::SMTP, email.delivery_method - email = DeliverMail.welcome(:delivery_method => :test).deliver + email = DeliveryMailer.welcome(:delivery_method => :test).deliver assert_instance_of Mail::TestMailer, email.delivery_method end test "delivery method can be customized in subclasses not changing the parent" do - DeliverMail.delivery_method = :test + DeliveryMailer.delivery_method = :test assert_equal :smtp, ActionMailer::Base.delivery_method $BREAK = true - email = DeliverMail.welcome.deliver + email = DeliveryMailer.welcome.deliver assert_instance_of Mail::TestMailer, email.delivery_method end test "non registered delivery methods raises errors" do - DeliverMail.delivery_method = :unknown + DeliveryMailer.delivery_method = :unknown assert_raise RuntimeError do - DeliverMail.welcome.deliver + DeliveryMailer.welcome.deliver end end test "does not perform deliveries if requested" do - DeliverMail.perform_deliveries = false - DeliverMail.deliveries.clear - DeliverMail.expects(:delivered_email).never - DeliverMail.welcome.deliver - assert_equal(0, DeliverMail.deliveries.length) + DeliveryMailer.perform_deliveries = false + DeliveryMailer.deliveries.clear + DeliveryMailer.expects(:delivered_email).never + DeliveryMailer.welcome.deliver + assert_equal(0, DeliveryMailer.deliveries.length) end test "raise errors on bogus deliveries" do - DeliverMail.delivery_method = BogusDelivery - DeliverMail.deliveries.clear - DeliverMail.expects(:delivered_email).never + DeliveryMailer.delivery_method = BogusDelivery + DeliveryMailer.deliveries.clear + DeliveryMailer.expects(:delivered_email).never assert_raise RuntimeError do - DeliverMail.welcome.deliver + DeliveryMailer.welcome.deliver end - assert_equal(0, DeliverMail.deliveries.length) + assert_equal(0, DeliveryMailer.deliveries.length) end test "does not raise errors on bogus deliveries if set" do - DeliverMail.delivery_method = BogusDelivery - DeliverMail.raise_delivery_errors = false - DeliverMail.deliveries.clear - DeliverMail.expects(:delivered_email).once - DeliverMail.welcome.deliver - assert_equal(1, DeliverMail.deliveries.length) + DeliveryMailer.delivery_method = BogusDelivery + DeliveryMailer.raise_delivery_errors = false + DeliveryMailer.deliveries.clear + DeliveryMailer.expects(:delivered_email).once + DeliveryMailer.welcome.deliver + assert_equal(1, DeliveryMailer.deliveries.length) end end \ No newline at end of file diff --git a/actionmailer/test/fixtures/helper_mailer/use_example_helper.erb b/actionmailer/test/fixtures/helper_mailer/use_example_helper.erb deleted file mode 100644 index fcff3bb1b4..0000000000 --- a/actionmailer/test/fixtures/helper_mailer/use_example_helper.erb +++ /dev/null @@ -1 +0,0 @@ -So, <%= example_format(@text) %> diff --git a/actionmailer/test/fixtures/helper_mailer/use_helper.erb b/actionmailer/test/fixtures/helper_mailer/use_helper.erb deleted file mode 100644 index 378777f8bb..0000000000 --- a/actionmailer/test/fixtures/helper_mailer/use_helper.erb +++ /dev/null @@ -1 +0,0 @@ -Hello, <%= person_name %>. Thanks for registering! diff --git a/actionmailer/test/fixtures/helper_mailer/use_helper_method.erb b/actionmailer/test/fixtures/helper_mailer/use_helper_method.erb deleted file mode 100644 index d5b8b285e7..0000000000 --- a/actionmailer/test/fixtures/helper_mailer/use_helper_method.erb +++ /dev/null @@ -1 +0,0 @@ -This message brought to you by <%= name_of_the_mailer_class %>. diff --git a/actionmailer/test/fixtures/helper_mailer/use_mail_helper.erb b/actionmailer/test/fixtures/helper_mailer/use_mail_helper.erb deleted file mode 100644 index 96ec49d18a..0000000000 --- a/actionmailer/test/fixtures/helper_mailer/use_mail_helper.erb +++ /dev/null @@ -1,5 +0,0 @@ -From "Romeo and Juliet": - -<%= block_format @text %> - -Good ol' Shakespeare. diff --git a/actionmailer/test/fixtures/helpers/example_helper.rb b/actionmailer/test/fixtures/helpers/example_helper.rb deleted file mode 100644 index f6a6a49ced..0000000000 --- a/actionmailer/test/fixtures/helpers/example_helper.rb +++ /dev/null @@ -1,5 +0,0 @@ -module ExampleHelper - def example_format(text) - "#{h(text)}".html_safe! - end -end diff --git a/actionmailer/test/mail_helper_test.rb b/actionmailer/test/mail_helper_test.rb new file mode 100644 index 0000000000..7cc0804323 --- /dev/null +++ b/actionmailer/test/mail_helper_test.rb @@ -0,0 +1,54 @@ +require 'abstract_unit' + +class HelperMailer < ActionMailer::Base + def use_mail_helper + @text = "But soft! What light through yonder window breaks? It is the east, " + + "and Juliet is the sun. Arise, fair sun, and kill the envious moon, " + + "which is sick and pale with grief that thou, her maid, art far more " + + "fair than she. Be not her maid, for she is envious! Her vestal " + + "livery is but sick and green, and none but fools do wear it. Cast " + + "it off!" + + mail_with_defaults do |format| + format.html { render(:inline => "<%= block_format @text %>") } + end + end + + def use_mailer + mail_with_defaults do |format| + format.html { render(:inline => "<%= mailer.message.subject %>") } + end + end + + def use_message + mail_with_defaults do |format| + format.html { render(:inline => "<%= message.subject %>") } + end + end + + protected + + def mail_with_defaults(&block) + mail(:to => "test@localhost", :from => "tester@example.com", + :subject => "using helpers", &block) + end +end + +class MailerHelperTest < ActionMailer::TestCase + def test_use_mail_helper + mail = HelperMailer.use_mail_helper + assert_match %r{ But soft!}, mail.body.encoded + assert_match %r{east, and\r\n Juliet}, mail.body.encoded + end + + def test_use_mailer + mail = HelperMailer.use_mailer + assert_match "using helpers", mail.body.encoded + end + + def test_use_message + mail = HelperMailer.use_message + assert_match "using helpers", mail.body.encoded + end +end + diff --git a/actionmailer/test/old_base/mail_helper_test.rb b/actionmailer/test/old_base/mail_helper_test.rb deleted file mode 100644 index a9b3cd3ce1..0000000000 --- a/actionmailer/test/old_base/mail_helper_test.rb +++ /dev/null @@ -1,94 +0,0 @@ -require 'abstract_unit' - -module MailerHelper - def person_name - "Mr. Joe Person" - end -end - -class HelperMailer < ActionMailer::Base - helper MailerHelper - helper :example - - def use_helper - recipients 'test@localhost' - subject "using helpers" - from "tester@example.com" - end - - def use_example_helper - recipients 'test@localhost' - subject "using helpers" - from "tester@example.com" - - @text = "emphasize me!" - end - - def use_mail_helper - recipients 'test@localhost' - subject "using mailing helpers" - from "tester@example.com" - - @text = "But soft! What light through yonder window breaks? It is the east, " + - "and Juliet is the sun. Arise, fair sun, and kill the envious moon, " + - "which is sick and pale with grief that thou, her maid, art far more " + - "fair than she. Be not her maid, for she is envious! Her vestal " + - "livery is but sick and green, and none but fools do wear it. Cast " + - "it off!" - end - - def use_helper_method - recipients 'test@localhost' - subject "using helpers" - from "tester@example.com" - - @text = "emphasize me!" - end - - private - - def name_of_the_mailer_class - self.class.name - end - helper_method :name_of_the_mailer_class -end - -class MailerHelperTest < ActiveSupport::TestCase - def new_mail( charset="utf-8" ) - mail = Mail.new - mail.set_content_type "text", "plain", { "charset" => charset } if charset - mail - end - - def setup - set_delivery_method :test - ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.deliveries.clear - end - - def teardown - restore_delivery_method - end - - def test_use_helper - mail = HelperMailer.use_helper - assert_match %r{Mr. Joe Person}, mail.encoded - end - - def test_use_example_helper - mail = HelperMailer.use_example_helper - assert_match %r{emphasize me!}, mail.encoded - end - - def test_use_helper_method - mail = HelperMailer.use_helper_method - assert_match %r{HelperMailer}, mail.encoded - end - - def test_use_mail_helper - mail = HelperMailer.use_mail_helper - assert_match %r{ But soft!}, mail.encoded - assert_match %r{east, and\r\n Juliet}, mail.encoded - end -end - -- cgit v1.2.3 From 6e57b88c60fa3ad1ecfa740b8cd3173c4fe72680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 24 Jan 2010 21:21:37 +0100 Subject: Fix a couple failures on 1.9.1. --- railties/lib/rails/application/finisher.rb | 2 +- railties/lib/rails/console/app.rb | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index 6461b76d3d..5cc5b4ae88 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -17,7 +17,7 @@ module Rails initializer :add_builtin_route do |app| if Rails.env.development? - RoutesReloader.paths << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') + Rails::Application::RoutesReloader.paths << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') end end diff --git a/railties/lib/rails/console/app.rb b/railties/lib/rails/console/app.rb index 98f7f774a9..7e8fd027e6 100644 --- a/railties/lib/rails/console/app.rb +++ b/railties/lib/rails/console/app.rb @@ -23,9 +23,11 @@ def new_session session end -#reloads the environment -def reload! - puts "Reloading..." - ActionDispatch::Callbacks.new(lambda {}, true).call({}) +# reloads the environment +def reload!(print=true) + puts "Reloading..." if print + ActionDispatch::Callbacks.new(lambda {}, false) true end + +reload!(false) -- cgit v1.2.3 From 396003fc48d7c0ba206ad059646c7414bee22a36 Mon Sep 17 00:00:00 2001 From: Rizwan Reza Date: Sun, 24 Jan 2010 12:29:36 +0330 Subject: Revamp of Rails documentation task Signed-off-by: Yehuda Katz --- railties/lib/rails/tasks/documentation.rake | 54 +++++++++++++++++------------ 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/railties/lib/rails/tasks/documentation.rake b/railties/lib/rails/tasks/documentation.rake index 65d0d476ba..3f49a9a720 100644 --- a/railties/lib/rails/tasks/documentation.rake +++ b/railties/lib/rails/tasks/documentation.rake @@ -11,35 +11,43 @@ namespace :doc do rdoc.rdoc_files.include('lib/**/*.rb') } - desc "Generate documentation for the Rails framework" + desc 'Generate documentation for the Rails framework. Specify path with PATH="/path/to/rails"' Rake::RDocTask.new("rails") { |rdoc| + path = ENV['RAILS_PATH'] || 'vendor/gems/gems' + version = '-3.0.pre' unless ENV['RAILS_PATH'] rdoc.rdoc_dir = 'doc/api' rdoc.template = "#{ENV['template']}.rb" if ENV['template'] rdoc.title = "Rails Framework Documentation" rdoc.options << '--line-numbers' << '--inline-source' rdoc.rdoc_files.include('README') - rdoc.rdoc_files.include('vendor/rails/railties/CHANGELOG') - rdoc.rdoc_files.include('vendor/rails/railties/MIT-LICENSE') - rdoc.rdoc_files.include('vendor/rails/railties/README') - rdoc.rdoc_files.include('vendor/rails/railties/lib/{*.rb,commands/*.rb,generators/*.rb}') - rdoc.rdoc_files.include('vendor/rails/activerecord/README') - rdoc.rdoc_files.include('vendor/rails/activerecord/CHANGELOG') - rdoc.rdoc_files.include('vendor/rails/activerecord/lib/active_record/**/*.rb') - rdoc.rdoc_files.exclude('vendor/rails/activerecord/lib/active_record/vendor/*') - rdoc.rdoc_files.include('vendor/rails/activeresource/README') - rdoc.rdoc_files.include('vendor/rails/activeresource/CHANGELOG') - rdoc.rdoc_files.include('vendor/rails/activeresource/lib/active_resource.rb') - rdoc.rdoc_files.include('vendor/rails/activeresource/lib/active_resource/*') - rdoc.rdoc_files.include('vendor/rails/actionpack/README') - rdoc.rdoc_files.include('vendor/rails/actionpack/CHANGELOG') - rdoc.rdoc_files.include('vendor/rails/actionpack/lib/action_controller/**/*.rb') - rdoc.rdoc_files.include('vendor/rails/actionpack/lib/action_view/**/*.rb') - rdoc.rdoc_files.include('vendor/rails/actionmailer/README') - rdoc.rdoc_files.include('vendor/rails/actionmailer/CHANGELOG') - rdoc.rdoc_files.include('vendor/rails/actionmailer/lib/action_mailer/base.rb') - rdoc.rdoc_files.include('vendor/rails/activesupport/README') - rdoc.rdoc_files.include('vendor/rails/activesupport/CHANGELOG') - rdoc.rdoc_files.include('vendor/rails/activesupport/lib/active_support/**/*.rb') + + %w(README CHANGELOG lib/action_mailer/base.rb).each do |file| + rdoc.rdoc_files.include("#{path}/actionmailer#{version}/#{file}") + end + + %w(README CHANGELOG lib/action_controller/**/*.rb lib/action_view/**/*.rb).each do |file| + rdoc.rdoc_files.include("#{path}/actionpack#{version}/#{file}") + end + + %w(README CHANGELOG lib/active_model/**/*.rb).each do |file| + rdoc.rdoc_files.include("#{path}/activemodel#{version}/#{file}") + end + + %w(README CHANGELOG lib/active_record/**/*.rb).each do |file| + rdoc.rdoc_files.include("#{path}/activerecord#{version}/#{file}") + end + + %w(README CHANGELOG lib/active_resource.rb lib/active_resource/*).each do |file| + rdoc.rdoc_files.include("#{path}/activeresource#{version}/#{file}") + end + + %w(README CHANGELOG lib/active_support/**/*.rb).each do |file| + rdoc.rdoc_files.include("#{path}/activesupport#{version}/#{file}") + end + + %w(README CHANGELOG MIT-LICENSE lib/{*.rb,commands/*.rb,generators/*.rb}).each do |file| + rdoc.rdoc_files.include("#{path}/railties#{version}/#{file}") + end } plugins = FileList['vendor/plugins/**'].collect { |plugin| File.basename(plugin) } -- cgit v1.2.3 From 0361414ae328c10de8ed778e826d8244ba0aa63a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sun, 24 Jan 2010 23:28:52 +0100 Subject: Add uniq_by and uniq_by! to Array. --- activesupport/lib/active_support/core_ext/array.rb | 1 + .../lib/active_support/core_ext/array/uniq_by.rb | 17 ++++++++++++++ activesupport/test/core_ext/array_ext_test.rb | 26 +++++++++++++++++++--- 3 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 activesupport/lib/active_support/core_ext/array/uniq_by.rb diff --git a/activesupport/lib/active_support/core_ext/array.rb b/activesupport/lib/active_support/core_ext/array.rb index b583c7533e..4688468a8f 100644 --- a/activesupport/lib/active_support/core_ext/array.rb +++ b/activesupport/lib/active_support/core_ext/array.rb @@ -1,5 +1,6 @@ require 'active_support/core_ext/array/wrap' require 'active_support/core_ext/array/access' +require 'active_support/core_ext/array/uniq_by' require 'active_support/core_ext/array/conversions' require 'active_support/core_ext/array/extract_options' require 'active_support/core_ext/array/grouping' diff --git a/activesupport/lib/active_support/core_ext/array/uniq_by.rb b/activesupport/lib/active_support/core_ext/array/uniq_by.rb new file mode 100644 index 0000000000..a09b2302fd --- /dev/null +++ b/activesupport/lib/active_support/core_ext/array/uniq_by.rb @@ -0,0 +1,17 @@ +class Array + # Return an unique array based on the criteria given as a proc. + # + # [1, 2, 3, 4].uniq_by { |i| i.odd? } + # #=> [1, 2] + # + def uniq_by + hash, array = {}, [] + each { |i| hash[yield(i)] ||= (array << i) } + array + end + + # Same as uniq_by, but modifies self. + def uniq_by! + replace(uniq_by{ |i| yield(i) }) + end +end diff --git a/activesupport/test/core_ext/array_ext_test.rb b/activesupport/test/core_ext/array_ext_test.rb index f5f91ddd80..6f3b28682a 100644 --- a/activesupport/test/core_ext/array_ext_test.rb +++ b/activesupport/test/core_ext/array_ext_test.rb @@ -51,9 +51,7 @@ class ArrayExtToParamTests < Test::Unit::TestCase end end -class ArrayExtToSentenceTests < Test::Unit::TestCase - include ActiveSupport::Testing::Deprecation - +class ArrayExtToSentenceTests < ActiveSupport::TestCase def test_plain_array_to_sentence assert_equal "", [].to_sentence assert_equal "one", ['one'].to_sentence @@ -320,6 +318,28 @@ class ArrayExtractOptionsTests < Test::Unit::TestCase end end +class ArrayUniqByTests < Test::Unit::TestCase + def test_uniq_by + assert_equal [1,2], [1,2,3,4].uniq_by { |i| i.odd? } + assert_equal [1,2], [1,2,3,4].uniq_by(&:even?) + assert_equal (-5..0).to_a, (-5..5).to_a.uniq_by{ |i| i**2 } + end + + def test_uniq_by! + a = [1,2,3,4] + a.uniq_by! { |i| i.odd? } + assert_equal [1,2], a + + a = [1,2,3,4] + a.uniq_by! { |i| i.even? } + assert_equal [1,2], a + + a = (-5..5).to_a + a.uniq_by! { |i| i**2 } + assert_equal (-5..0).to_a, a + end +end + class ArrayExtRandomTests < Test::Unit::TestCase def test_random_element_from_array assert_nil [].rand -- cgit v1.2.3 From 328b0b1268596347975349c6df5ce713ad377bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sun, 24 Jan 2010 23:32:09 +0100 Subject: Remove deprecated behavior since 2.3. --- .../lib/active_support/core_ext/array/conversions.rb | 13 ------------- activesupport/test/core_ext/array_ext_test.rb | 18 +----------------- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/array/conversions.rb b/activesupport/lib/active_support/core_ext/array/conversions.rb index 7fcef38372..814567a5a6 100644 --- a/activesupport/lib/active_support/core_ext/array/conversions.rb +++ b/activesupport/lib/active_support/core_ext/array/conversions.rb @@ -13,19 +13,6 @@ class Array default_two_words_connector = I18n.translate(:'support.array.two_words_connector', :locale => options[:locale]) default_last_word_connector = I18n.translate(:'support.array.last_word_connector', :locale => options[:locale]) - # Try to emulate to_sentences previous to 2.3 - if options.has_key?(:connector) || options.has_key?(:skip_last_comma) - ::ActiveSupport::Deprecation.warn(":connector has been deprecated. Use :words_connector instead", caller) if options.has_key? :connector - ::ActiveSupport::Deprecation.warn(":skip_last_comma has been deprecated. Use :last_word_connector instead", caller) if options.has_key? :skip_last_comma - - skip_last_comma = options.delete :skip_last_comma - if connector = options.delete(:connector) - options[:last_word_connector] ||= skip_last_comma ? connector : ", #{connector}" - else - options[:last_word_connector] ||= skip_last_comma ? default_two_words_connector : default_last_word_connector - end - end - options.assert_valid_keys(:words_connector, :two_words_connector, :last_word_connector, :locale) options.reverse_merge! :words_connector => default_words_connector, :two_words_connector => default_two_words_connector, :last_word_connector => default_last_word_connector diff --git a/activesupport/test/core_ext/array_ext_test.rb b/activesupport/test/core_ext/array_ext_test.rb index 6f3b28682a..d4cd5ddbde 100644 --- a/activesupport/test/core_ext/array_ext_test.rb +++ b/activesupport/test/core_ext/array_ext_test.rb @@ -51,7 +51,7 @@ class ArrayExtToParamTests < Test::Unit::TestCase end end -class ArrayExtToSentenceTests < ActiveSupport::TestCase +class ArrayExtToSentenceTests < Test::Unit::TestCase def test_plain_array_to_sentence assert_equal "", [].to_sentence assert_equal "one", ['one'].to_sentence @@ -60,28 +60,12 @@ class ArrayExtToSentenceTests < ActiveSupport::TestCase end def test_to_sentence_with_words_connector - assert_deprecated(":connector has been deprecated. Use :words_connector instead") do - assert_equal "one, two, three", ['one', 'two', 'three'].to_sentence(:connector => '') - end - - assert_deprecated(":connector has been deprecated. Use :words_connector instead") do - assert_equal "one, two, and three", ['one', 'two', 'three'].to_sentence(:connector => 'and ') - end - assert_equal "one two, and three", ['one', 'two', 'three'].to_sentence(:words_connector => ' ') assert_equal "one & two, and three", ['one', 'two', 'three'].to_sentence(:words_connector => ' & ') assert_equal "onetwo, and three", ['one', 'two', 'three'].to_sentence(:words_connector => nil) end def test_to_sentence_with_last_word_connector - assert_deprecated(":skip_last_comma has been deprecated. Use :last_word_connector instead") do - assert_equal "one, two and three", ['one', 'two', 'three'].to_sentence(:skip_last_comma => true) - end - - assert_deprecated(":skip_last_comma has been deprecated. Use :last_word_connector instead") do - assert_equal "one, two, and three", ['one', 'two', 'three'].to_sentence(:skip_last_comma => false) - end - assert_equal "one, two, and also three", ['one', 'two', 'three'].to_sentence(:last_word_connector => ', and also ') assert_equal "one, twothree", ['one', 'two', 'three'].to_sentence(:last_word_connector => nil) assert_equal "one, two three", ['one', 'two', 'three'].to_sentence(:last_word_connector => ' ') -- cgit v1.2.3 From c0262827cacc1baf16668af65c35a09138166394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sun, 24 Jan 2010 23:40:45 +0100 Subject: Speed up some Hash core extensions. --- .../lib/active_support/core_ext/hash/deep_merge.rb | 13 ++++++------- activesupport/lib/active_support/core_ext/hash/keys.rb | 15 ++++++--------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/hash/deep_merge.rb b/activesupport/lib/active_support/core_ext/hash/deep_merge.rb index 24d0a2a481..af771c86ff 100644 --- a/activesupport/lib/active_support/core_ext/hash/deep_merge.rb +++ b/activesupport/lib/active_support/core_ext/hash/deep_merge.rb @@ -1,17 +1,16 @@ class Hash # Returns a new hash with +self+ and +other_hash+ merged recursively. def deep_merge(other_hash) - target = dup - other_hash.each_pair do |k,v| - tv = target[k] - target[k] = tv.is_a?(Hash) && v.is_a?(Hash) ? tv.deep_merge(v) : v - end - target + dup.deep_merge!(other_hash) end # Returns a new hash with +self+ and +other_hash+ merged recursively. # Modifies the receiver in place. def deep_merge!(other_hash) - replace(deep_merge(other_hash)) + other_hash.each_pair do |k,v| + tv = self[k] + self[k] = tv.is_a?(Hash) && v.is_a?(Hash) ? tv.deep_merge(v) : v + end + self end end diff --git a/activesupport/lib/active_support/core_ext/hash/keys.rb b/activesupport/lib/active_support/core_ext/hash/keys.rb index ecd63293b4..045a6944fa 100644 --- a/activesupport/lib/active_support/core_ext/hash/keys.rb +++ b/activesupport/lib/active_support/core_ext/hash/keys.rb @@ -1,10 +1,7 @@ class Hash # Return a new hash with all keys converted to strings. def stringify_keys - inject({}) do |options, (key, value)| - options[key.to_s] = value - options - end + dup.stringify_keys! end # Destructively convert all keys to strings. @@ -18,16 +15,16 @@ class Hash # Return a new hash with all keys converted to symbols, as long as # they respond to +to_sym+. def symbolize_keys - inject({}) do |options, (key, value)| - options[(key.to_sym rescue key) || key] = value - options - end + dup.symbolize_keys! end # Destructively convert all keys to symbols, as long as they respond # to +to_sym+. def symbolize_keys! - self.replace(self.symbolize_keys) + keys.each do |key| + self[(key.to_sym rescue key) || key] = delete(key) + end + self end alias_method :to_options, :symbolize_keys -- cgit v1.2.3 From 0ece244feec236f57fb2f55ea564409f25475923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Sun, 24 Jan 2010 23:59:12 +0100 Subject: Ensure implicit multipart templates with locale works as expected. --- actionmailer/lib/action_mailer/base.rb | 5 ++++ actionmailer/test/base_test.rb | 27 ++++++++++++++++++++++ .../base_mailer/implicit_with_locale.en.html.erb | 1 + .../base_mailer/implicit_with_locale.html.erb | 1 + .../base_mailer/implicit_with_locale.pl.text.erb | 1 + .../base_mailer/implicit_with_locale.text.erb | 1 + 6 files changed, 36 insertions(+) create mode 100644 actionmailer/test/fixtures/base_mailer/implicit_with_locale.en.html.erb create mode 100644 actionmailer/test/fixtures/base_mailer/implicit_with_locale.html.erb create mode 100644 actionmailer/test/fixtures/base_mailer/implicit_with_locale.pl.text.erb create mode 100644 actionmailer/test/fixtures/base_mailer/implicit_with_locale.text.erb diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 7101bfbb70..84d50fa1f4 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -1,5 +1,8 @@ require 'active_support/core_ext/class' +require 'active_support/core_ext/object/blank' +require 'active_support/core_ext/array/uniq_by' require 'active_support/core_ext/module/delegation' +require 'active_support/core_ext/string/inflections' require 'mail' require 'action_mailer/tmail_compat' require 'action_mailer/collector' @@ -455,6 +458,8 @@ module ActionMailer #:nodoc: def each_template(&block) #:nodoc: self.class.view_paths.each do |load_paths| templates = load_paths.find_all(action_name, {}, self.class.mailer_name) + templates = templates.uniq_by { |t| t.details[:formats] } + unless templates.empty? templates.each(&block) return diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index dd17bf868b..71845d4c42 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -34,6 +34,10 @@ class BaseTest < ActiveSupport::TestCase mail(DEFAULT_HEADERS.merge(hash)) end + def implicit_with_locale(hash = {}) + mail(DEFAULT_HEADERS.merge(hash)) + end + def explicit_multipart(hash = {}) attachments['invoice.pdf'] = 'This is test File content' if hash.delete(:attachments) mail(DEFAULT_HEADERS.merge(hash)) do |format| @@ -310,6 +314,29 @@ class BaseTest < ActiveSupport::TestCase assert_equal(1, BaseMailer.deliveries.length) end + test "implicit multipart with default locale" do + email = BaseMailer.implicit_with_locale.deliver + assert_equal(2, email.parts.size) + assert_equal("multipart/alternate", email.mime_type) + assert_equal("text/plain", email.parts[0].mime_type) + assert_equal("Implicit with locale TEXT", email.parts[0].body.encoded) + assert_equal("text/html", email.parts[1].mime_type) + assert_equal("Implicit with locale EN HTML", email.parts[1].body.encoded) + end + + test "implicit multipart with other locale" do + swap I18n, :locale => :pl do + email = BaseMailer.implicit_with_locale.deliver + assert_equal(2, email.parts.size) + assert_equal("multipart/alternate", email.mime_type) + assert_equal("text/plain", email.parts[0].mime_type) + assert_equal("Implicit with locale PL TEXT", email.parts[0].body.encoded) + assert_equal("text/html", email.parts[1].mime_type) + assert_equal("Implicit with locale HTML", email.parts[1].body.encoded) + end + end + + protected # Execute the block setting the given values and restoring old values after diff --git a/actionmailer/test/fixtures/base_mailer/implicit_with_locale.en.html.erb b/actionmailer/test/fixtures/base_mailer/implicit_with_locale.en.html.erb new file mode 100644 index 0000000000..34e39c8fdb --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/implicit_with_locale.en.html.erb @@ -0,0 +1 @@ +Implicit with locale EN HTML \ No newline at end of file diff --git a/actionmailer/test/fixtures/base_mailer/implicit_with_locale.html.erb b/actionmailer/test/fixtures/base_mailer/implicit_with_locale.html.erb new file mode 100644 index 0000000000..5ce283f221 --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/implicit_with_locale.html.erb @@ -0,0 +1 @@ +Implicit with locale HTML \ No newline at end of file diff --git a/actionmailer/test/fixtures/base_mailer/implicit_with_locale.pl.text.erb b/actionmailer/test/fixtures/base_mailer/implicit_with_locale.pl.text.erb new file mode 100644 index 0000000000..c49cbae60a --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/implicit_with_locale.pl.text.erb @@ -0,0 +1 @@ +Implicit with locale PL TEXT \ No newline at end of file diff --git a/actionmailer/test/fixtures/base_mailer/implicit_with_locale.text.erb b/actionmailer/test/fixtures/base_mailer/implicit_with_locale.text.erb new file mode 100644 index 0000000000..5a18ff62cd --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/implicit_with_locale.text.erb @@ -0,0 +1 @@ +Implicit with locale TEXT \ No newline at end of file -- cgit v1.2.3 From 48faf53be19c569e85f43a4dbfa63fe81618b09f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Mon, 25 Jan 2010 00:20:38 +0100 Subject: Add some view paths tests. --- actionmailer/test/base_test.rb | 65 ++++++++++++++-------- .../fixtures/another.path/base_mailer/welcome.erb | 1 + 2 files changed, 43 insertions(+), 23 deletions(-) create mode 100644 actionmailer/test/fixtures/another.path/base_mailer/welcome.erb diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 71845d4c42..b8d21132de 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -238,6 +238,48 @@ class BaseTest < ActiveSupport::TestCase end end + test "implicit multipart with default locale" do + email = BaseMailer.implicit_with_locale.deliver + assert_equal(2, email.parts.size) + assert_equal("multipart/alternate", email.mime_type) + assert_equal("text/plain", email.parts[0].mime_type) + assert_equal("Implicit with locale TEXT", email.parts[0].body.encoded) + assert_equal("text/html", email.parts[1].mime_type) + assert_equal("Implicit with locale EN HTML", email.parts[1].body.encoded) + end + + test "implicit multipart with other locale" do + swap I18n, :locale => :pl do + email = BaseMailer.implicit_with_locale.deliver + assert_equal(2, email.parts.size) + assert_equal("multipart/alternate", email.mime_type) + assert_equal("text/plain", email.parts[0].mime_type) + assert_equal("Implicit with locale PL TEXT", email.parts[0].body.encoded) + assert_equal("text/html", email.parts[1].mime_type) + assert_equal("Implicit with locale HTML", email.parts[1].body.encoded) + end + end + + test "implicit multipart with several view paths uses the first one with template" do + begin + BaseMailer.view_paths.unshift(File.join(FIXTURE_LOAD_PATH, "another.path")) + email = BaseMailer.welcome.deliver + assert_equal("Welcome from another path", email.body.encoded) + ensure + BaseMailer.view_paths.shift + end + end + + test "implicit multipart with inexistent templates uses the next view path" do + begin + BaseMailer.view_paths.unshift(File.join(FIXTURE_LOAD_PATH, "unknown")) + email = BaseMailer.welcome.deliver + assert_equal("Welcome", email.body.encoded) + ensure + BaseMailer.view_paths.shift + end + end + # Explicit multipart test "explicit multipart" do email = BaseMailer.explicit_multipart.deliver @@ -314,29 +356,6 @@ class BaseTest < ActiveSupport::TestCase assert_equal(1, BaseMailer.deliveries.length) end - test "implicit multipart with default locale" do - email = BaseMailer.implicit_with_locale.deliver - assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) - assert_equal("text/plain", email.parts[0].mime_type) - assert_equal("Implicit with locale TEXT", email.parts[0].body.encoded) - assert_equal("text/html", email.parts[1].mime_type) - assert_equal("Implicit with locale EN HTML", email.parts[1].body.encoded) - end - - test "implicit multipart with other locale" do - swap I18n, :locale => :pl do - email = BaseMailer.implicit_with_locale.deliver - assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) - assert_equal("text/plain", email.parts[0].mime_type) - assert_equal("Implicit with locale PL TEXT", email.parts[0].body.encoded) - assert_equal("text/html", email.parts[1].mime_type) - assert_equal("Implicit with locale HTML", email.parts[1].body.encoded) - end - end - - protected # Execute the block setting the given values and restoring old values after diff --git a/actionmailer/test/fixtures/another.path/base_mailer/welcome.erb b/actionmailer/test/fixtures/another.path/base_mailer/welcome.erb new file mode 100644 index 0000000000..ef451298e2 --- /dev/null +++ b/actionmailer/test/fixtures/another.path/base_mailer/welcome.erb @@ -0,0 +1 @@ +Welcome from another path \ No newline at end of file -- cgit v1.2.3 From e1c131863897390d04bd5515765236590747f2c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Mon, 25 Jan 2010 00:37:12 +0100 Subject: Added delivers_from. --- actionmailer/lib/action_mailer/base.rb | 14 ++++++++++++-- actionmailer/test/base_test.rb | 9 ++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 84d50fa1f4..552fd7ccb8 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -273,6 +273,9 @@ module ActionMailer #:nodoc: private_class_method :new #:nodoc: + extlib_inheritable_accessor :default_from + self.default_from = nil + extlib_inheritable_accessor :default_charset self.default_charset = "utf-8" @@ -298,6 +301,12 @@ module ActionMailer #:nodoc: attr_writer :mailer_name alias :controller_path :mailer_name + # Sets who is the default sender for the e-mail + def delivers_from(value = nil) + self.default_from = value if value + self.default_from + end + # Receives a raw email, parses it into an email object, decodes it, # instantiates a new mailer, and passes the email object to the mailer # object's +receive+ method. If you want your mailer to be able to @@ -318,7 +327,7 @@ module ActionMailer #:nodoc: end # TODO The delivery should happen inside the instrument block - def delivered_email(mail) + def delivered_email(mail) #:nodoc: ActiveSupport::Notifications.instrument("action_mailer.deliver") do |payload| self.set_payload_for_mail(payload, mail) end @@ -387,8 +396,9 @@ module ActionMailer #:nodoc: charset = headers[:charset] || m.charset || self.class.default_charset.dup mime_version = headers[:mime_version] || m.mime_version || self.class.default_mime_version.dup - # Set subjects and fields quotings + # Set fields quotings headers[:subject] ||= default_subject + headers[:from] ||= self.class.default_from.dup quote_fields!(headers, charset) # Render the templates and blocks diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index b8d21132de..d8616ee3be 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -1,16 +1,14 @@ # encoding: utf-8 require 'abstract_unit' -# class Notifier < ActionMailer::Base -# delivers_from 'notifications@example.com' class BaseTest < ActiveSupport::TestCase DEFAULT_HEADERS = { :to => 'mikel@test.lindsaar.net', - :from => 'jose@test.plataformatec.com', :subject => 'The first email on new API!' } class BaseMailer < ActionMailer::Base + delivers_from 'jose@test.plataformatec.com' self.mailer_name = "base_mailer" def welcome(hash = {}) @@ -72,6 +70,11 @@ class BaseTest < ActiveSupport::TestCase assert_equal(email.subject, 'The first email on new API!') end + test "mail() with from overwrites the class level default" do + email = BaseMailer.welcome(:from => 'someone@else.com').deliver + assert_equal(email.from, ['someone@else.com']) + end + test "mail() with bcc, cc, content_type, charset, mime_version, reply_to and date" do @time = Time.now email = BaseMailer.welcome(:bcc => 'bcc@test.lindsaar.net', -- cgit v1.2.3 From 3b6f659fb6b1ffd323c0bbad36630cc97b96bd5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 25 Jan 2010 01:06:12 +0100 Subject: Add active_model/railtie back to generated boot.rb, add models back to paths, load active_support/railtie since we need it and ensure default logger is set before config. --- actionmailer/lib/action_mailer/railtie.rb | 9 ++-- actionpack/lib/action_controller/deprecated.rb | 1 + actionpack/lib/action_controller/railtie.rb | 9 ++-- activerecord/lib/active_record/railtie.rb | 9 ++-- activesupport/lib/active_support/railtie.rb | 54 +++++++++++----------- .../generators/rails/app/templates/config/boot.rb | 2 + railties/lib/rails.rb | 1 + railties/lib/rails/engine/configuration.rb | 1 + railties/test/initializer/path_test.rb | 1 + 9 files changed, 45 insertions(+), 42 deletions(-) diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb index fbbcf98854..7ed1519e36 100644 --- a/actionmailer/lib/action_mailer/railtie.rb +++ b/actionmailer/lib/action_mailer/railtie.rb @@ -8,15 +8,14 @@ module ActionMailer require "action_mailer/railties/subscriber" subscriber ActionMailer::Railties::Subscriber.new + initializer "action_mailer.logger" do + ActionMailer::Base.logger ||= Rails.logger + end + initializer "action_mailer.set_configs" do |app| app.config.action_mailer.each do |k,v| ActionMailer::Base.send "#{k}=", v end end - - # TODO: ActionController::Base.logger should delegate to its own config.logger - initializer "action_mailer.logger" do - ActionMailer::Base.logger ||= Rails.logger - end end end \ No newline at end of file diff --git a/actionpack/lib/action_controller/deprecated.rb b/actionpack/lib/action_controller/deprecated.rb index 589061e77c..edc0e5b3fe 100644 --- a/actionpack/lib/action_controller/deprecated.rb +++ b/actionpack/lib/action_controller/deprecated.rb @@ -2,3 +2,4 @@ ActionController::AbstractRequest = ActionController::Request = ActionDispatch:: ActionController::AbstractResponse = ActionController::Response = ActionDispatch::Response ActionController::Routing = ActionDispatch::Routing ActionController::Routing::Routes = ActionDispatch::Routing::RouteSet.new +ActionController::UrlWriter = AbstractController::UrlFor diff --git a/actionpack/lib/action_controller/railtie.rb b/actionpack/lib/action_controller/railtie.rb index f15c012471..29a0a346ec 100644 --- a/actionpack/lib/action_controller/railtie.rb +++ b/actionpack/lib/action_controller/railtie.rb @@ -8,17 +8,16 @@ module ActionController require "action_controller/railties/subscriber" subscriber ActionController::Railties::Subscriber.new + initializer "action_controller.logger" do + ActionController::Base.logger ||= Rails.logger + end + initializer "action_controller.set_configs" do |app| app.config.action_controller.each do |k,v| ActionController::Base.send "#{k}=", v end end - # TODO: ActionController::Base.logger should delegate to its own config.logger - initializer "action_controller.logger" do - ActionController::Base.logger ||= Rails.logger - end - initializer "action_controller.initialize_framework_caches" do ActionController::Base.cache_store ||= RAILS_CACHE end diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index 7b6d792931..18d7cc0187 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -23,6 +23,10 @@ module ActiveRecord ActiveRecord::Base.default_timezone = :utc end + initializer "active_record.logger" do + ActiveRecord::Base.logger ||= ::Rails.logger + end + initializer "active_record.set_configs" do |app| app.config.active_record.each do |k,v| ActiveRecord::Base.send "#{k}=", v @@ -71,11 +75,6 @@ module ActiveRecord end end - # TODO: ActiveRecord::Base.logger should delegate to its own config.logger - initializer "active_record.logger" do - ActiveRecord::Base.logger ||= ::Rails.logger - end - initializer "active_record.i18n_deprecation" do require 'active_support/i18n' diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index 55608ac1c5..bc0f99869c 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -1,6 +1,33 @@ require "active_support" require "rails" +module ActiveSupport + class Railtie < Rails::Railtie + railtie_name :active_support + + # Loads support for "whiny nil" (noisy warnings when methods are invoked + # on +nil+ values) if Configuration#whiny_nils is true. + initializer :initialize_whiny_nils do |app| + require 'active_support/whiny_nil' if app.config.whiny_nils + end + + # Sets the default value for Time.zone + # If assigned value cannot be matched to a TimeZone, an exception will be raised. + initializer :initialize_time_zone do |app| + require 'active_support/core_ext/time/zones' + zone_default = Time.__send__(:get_zone, app.config.time_zone) + + unless zone_default + raise \ + 'Value assigned to config.time_zone not recognized.' + + 'Run "rake -D time" for a list of tasks for finding appropriate time zone names.' + end + + Time.zone_default = zone_default + end + end +end + module I18n class Railtie < Rails::Railtie railtie_name :i18n @@ -30,31 +57,4 @@ module I18n I18n.reload! end end -end - -module ActiveSupport - class Railtie < Rails::Railtie - railtie_name :active_support - - # Loads support for "whiny nil" (noisy warnings when methods are invoked - # on +nil+ values) if Configuration#whiny_nils is true. - initializer :initialize_whiny_nils do |app| - require 'active_support/whiny_nil' if app.config.whiny_nils - end - - # Sets the default value for Time.zone - # If assigned value cannot be matched to a TimeZone, an exception will be raised. - initializer :initialize_time_zone do |app| - require 'active_support/core_ext/time/zones' - zone_default = Time.__send__(:get_zone, app.config.time_zone) - - unless zone_default - raise \ - 'Value assigned to config.time_zone not recognized.' + - 'Run "rake -D time" for a list of tasks for finding appropriate time zone names.' - end - - Time.zone_default = zone_default - end - end end \ No newline at end of file diff --git a/railties/lib/generators/rails/app/templates/config/boot.rb b/railties/lib/generators/rails/app/templates/config/boot.rb index cbfa5ca3e9..e91304451b 100644 --- a/railties/lib/generators/rails/app/templates/config/boot.rb +++ b/railties/lib/generators/rails/app/templates/config/boot.rb @@ -20,6 +20,7 @@ require 'rails/all' # and list the framework railties that you want: # # require "active_support/railtie" +# require "active_model/railtie" # require "active_record/railtie" # require "action_controller/railtie" # require "action_view/railtie" @@ -27,6 +28,7 @@ require 'rails/all' # require "active_resource/railtie" <% else -%> # Pick the frameworks you want: +# require "active_model/railtie" # require "active_record/railtie" require "active_support/railtie" require "action_controller/railtie" diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index 623555e7c1..b7a39fd5a7 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -10,6 +10,7 @@ require 'rails/deprecation' require 'rails/subscriber' require 'rails/ruby_version_check' +require 'active_support/railtie' require 'action_dispatch/railtie' # For Ruby 1.8, this initialization sets $KCODE to 'u' to enable the diff --git a/railties/lib/rails/engine/configuration.rb b/railties/lib/rails/engine/configuration.rb index a328e14170..c4e34b11b8 100644 --- a/railties/lib/rails/engine/configuration.rb +++ b/railties/lib/rails/engine/configuration.rb @@ -16,6 +16,7 @@ module Rails paths.app "app", :eager_load => true, :glob => "*" paths.app.controllers "app/controllers", :eager_load => true paths.app.helpers "app/helpers", :eager_load => true + paths.app.models "app/models", :eager_load => true paths.app.metals "app/metal" paths.app.views "app/views" paths.lib "lib", :load_path => true diff --git a/railties/test/initializer/path_test.rb b/railties/test/initializer/path_test.rb index 7a40d7fa6e..2048dc57bb 100644 --- a/railties/test/initializer/path_test.rb +++ b/railties/test/initializer/path_test.rb @@ -37,6 +37,7 @@ module InitializerTests end test "booting up Rails yields a valid paths object" do + assert_path @paths.app.models, "app", "models" assert_path @paths.app.metals, "app", "metal" assert_path @paths.app.helpers, "app", "helpers" assert_path @paths.app.views, "app", "views" -- cgit v1.2.3 From e4a989e9d99b9860859ad14b5a6fca62a4009cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Mon, 25 Jan 2010 13:39:48 +1100 Subject: Added delivery_handler method to mail and implemented in ActionMailer to deliver inside of instrumentation --- actionmailer/lib/action_mailer/base.rb | 13 ++++++++-- actionmailer/lib/action_mailer/delivery_methods.rb | 2 +- actionmailer/test/base_test.rb | 7 ++++- actionmailer/test/delivery_methods_test.rb | 30 ++++++++++++++++++---- 4 files changed, 43 insertions(+), 9 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 552fd7ccb8..4e5e1bbb29 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -326,10 +326,19 @@ module ActionMailer #:nodoc: end end - # TODO The delivery should happen inside the instrument block - def delivered_email(mail) #:nodoc: + def deliver_mail(mail) #:nodoc: ActiveSupport::Notifications.instrument("action_mailer.deliver") do |payload| self.set_payload_for_mail(payload, mail) + + if mail.perform_deliveries + begin + mail.deliver! + rescue Exception => e + raise e if mail.raise_delivery_errors + end + Mail.deliveries << mail + end + end end diff --git a/actionmailer/lib/action_mailer/delivery_methods.rb b/actionmailer/lib/action_mailer/delivery_methods.rb index 21909d5d57..7a6b410932 100644 --- a/actionmailer/lib/action_mailer/delivery_methods.rb +++ b/actionmailer/lib/action_mailer/delivery_methods.rb @@ -63,7 +63,7 @@ module ActionMailer def wrap_delivery_behavior(mail, method=nil) #:nodoc: method ||= self.delivery_method - mail.register_for_delivery_notification(self) + mail.delivery_handler = self if method.is_a?(Symbol) if klass = delivery_methods[method.to_sym] diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index d8616ee3be..81e1df3911 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -354,7 +354,12 @@ class BaseTest < ActiveSupport::TestCase test "calling deliver on the action should deliver the mail object" do BaseMailer.deliveries.clear - BaseMailer.expects(:delivered_email).once + BaseMailer.expects(:deliver_mail).once + BaseMailer.welcome.deliver + end + + test "calling deliver on the action should increment the deliveries collection" do + BaseMailer.deliveries.clear BaseMailer.welcome.deliver assert_equal(1, BaseMailer.deliveries.length) end diff --git a/actionmailer/test/delivery_methods_test.rb b/actionmailer/test/delivery_methods_test.rb index 145f8ba30d..e70e8acd9b 100644 --- a/actionmailer/test/delivery_methods_test.rb +++ b/actionmailer/test/delivery_methods_test.rb @@ -94,9 +94,8 @@ class MailDeliveryTest < ActiveSupport::TestCase test "ActionMailer should be told when Mail gets delivered" do DeliveryMailer.deliveries.clear - DeliveryMailer.expects(:delivered_email).once + DeliveryMailer.expects(:deliver_mail).once DeliveryMailer.welcome.deliver - assert_equal(1, DeliveryMailer.deliveries.length) end test "delivery method can be customized per instance" do @@ -124,7 +123,13 @@ class MailDeliveryTest < ActiveSupport::TestCase test "does not perform deliveries if requested" do DeliveryMailer.perform_deliveries = false DeliveryMailer.deliveries.clear - DeliveryMailer.expects(:delivered_email).never + Mail::Message.any_instance.expects(:deliver!).never + DeliveryMailer.welcome.deliver + end + + test "does not append the deliveries collection if told not to perform the delivery" do + DeliveryMailer.perform_deliveries = false + DeliveryMailer.deliveries.clear DeliveryMailer.welcome.deliver assert_equal(0, DeliveryMailer.deliveries.length) end @@ -132,7 +137,14 @@ class MailDeliveryTest < ActiveSupport::TestCase test "raise errors on bogus deliveries" do DeliveryMailer.delivery_method = BogusDelivery DeliveryMailer.deliveries.clear - DeliveryMailer.expects(:delivered_email).never + assert_raise RuntimeError do + DeliveryMailer.welcome.deliver + end + end + + test "does not increment the deliveries collection on error" do + DeliveryMailer.delivery_method = BogusDelivery + DeliveryMailer.deliveries.clear assert_raise RuntimeError do DeliveryMailer.welcome.deliver end @@ -140,11 +152,19 @@ class MailDeliveryTest < ActiveSupport::TestCase end test "does not raise errors on bogus deliveries if set" do + DeliveryMailer.delivery_method = BogusDelivery + DeliveryMailer.raise_delivery_errors = false + assert_nothing_raised do + DeliveryMailer.welcome.deliver + end + end + + test "increments the deliveries collection on bogus deliveries if set to ignore" do DeliveryMailer.delivery_method = BogusDelivery DeliveryMailer.raise_delivery_errors = false DeliveryMailer.deliveries.clear - DeliveryMailer.expects(:delivered_email).once DeliveryMailer.welcome.deliver assert_equal(1, DeliveryMailer.deliveries.length) end + end \ No newline at end of file -- cgit v1.2.3 From 4240369a4399b944a0652807c545ffe99d7fb0cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Mon, 25 Jan 2010 13:46:44 +1100 Subject: changed test to get TestMailer to use :file delivery method directly (as setup action was resetting delivery_method to :test on init --- actionmailer/test/old_base/mail_service_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/actionmailer/test/old_base/mail_service_test.rb b/actionmailer/test/old_base/mail_service_test.rb index 20b0f30b84..2e33abf9d6 100644 --- a/actionmailer/test/old_base/mail_service_test.rb +++ b/actionmailer/test/old_base/mail_service_test.rb @@ -967,10 +967,10 @@ EOF end def test_file_delivery_should_create_a_file - ActionMailer::Base.delivery_method = :file - tmp_location = ActionMailer::Base.file_settings[:location] + TestMailer.delivery_method = :file + tmp_location = TestMailer.file_settings[:location] - TestMailer.cc_bcc(@recipient).deliver + result = TestMailer.cc_bcc(@recipient).deliver assert File.exists?(tmp_location) assert File.directory?(tmp_location) assert File.exists?(File.join(tmp_location, @recipient)) -- cgit v1.2.3 From ace74974cf3575bbd3bf7ff4d8a83c3100fd22a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Mon, 25 Jan 2010 21:47:03 +1100 Subject: Got AM working with Mail yield on delivery_handler and updated tests --- actionmailer/actionmailer.gemspec | 2 +- actionmailer/lib/action_mailer/base.rb | 9 +-------- actionmailer/lib/action_mailer/delivery_methods.rb | 4 ++-- actionmailer/test/base_test.rb | 7 +++++++ actionmailer/test/delivery_methods_test.rb | 4 ++-- actionmailer/test/old_base/mail_service_test.rb | 8 ++++++++ actionmailer/test/old_base/url_test.rb | 2 ++ 7 files changed, 23 insertions(+), 13 deletions(-) diff --git a/actionmailer/actionmailer.gemspec b/actionmailer/actionmailer.gemspec index 4f53c709c4..a3d466c986 100644 --- a/actionmailer/actionmailer.gemspec +++ b/actionmailer/actionmailer.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |s| s.homepage = "http://www.rubyonrails.org" s.add_dependency('actionpack', '= 3.0.pre') - s.add_dependency('mail', '~> 2.0.5') + s.add_dependency('mail', '~> 2.0.6') s.files = Dir['CHANGELOG', 'README', 'MIT-LICENSE', 'lib/**/*'] s.has_rdoc = true diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 4e5e1bbb29..47d0ffaf68 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -330,14 +330,7 @@ module ActionMailer #:nodoc: ActiveSupport::Notifications.instrument("action_mailer.deliver") do |payload| self.set_payload_for_mail(payload, mail) - if mail.perform_deliveries - begin - mail.deliver! - rescue Exception => e - raise e if mail.raise_delivery_errors - end - Mail.deliveries << mail - end + yield # Let Mail do the delivery actions end end diff --git a/actionmailer/lib/action_mailer/delivery_methods.rb b/actionmailer/lib/action_mailer/delivery_methods.rb index 7a6b410932..34bfe6000a 100644 --- a/actionmailer/lib/action_mailer/delivery_methods.rb +++ b/actionmailer/lib/action_mailer/delivery_methods.rb @@ -40,8 +40,8 @@ module ActionMailer end module ClassMethods - # Provides a list of emails that have been delivered by Mail - delegate :deliveries, :deliveries=, :to => Mail + # Provides a list of emails that have been delivered by Mail::TestMailer + delegate :deliveries, :deliveries=, :to => Mail::TestMailer # Adds a new delivery method through the given class using the given symbol # as alias and the default options supplied: diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 81e1df3911..0705f22df8 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -363,6 +363,13 @@ class BaseTest < ActiveSupport::TestCase BaseMailer.welcome.deliver assert_equal(1, BaseMailer.deliveries.length) end + + test "calling deliver, ActionMailer should yield back to mail to let it call :do_delivery on itself" do + mail = Mail::Message.new + mail.expects(:do_delivery).once + BaseMailer.expects(:welcome).returns(mail) + BaseMailer.welcome.deliver + end protected diff --git a/actionmailer/test/delivery_methods_test.rb b/actionmailer/test/delivery_methods_test.rb index e70e8acd9b..4907ca0903 100644 --- a/actionmailer/test/delivery_methods_test.rb +++ b/actionmailer/test/delivery_methods_test.rb @@ -159,12 +159,12 @@ class MailDeliveryTest < ActiveSupport::TestCase end end - test "increments the deliveries collection on bogus deliveries if set to ignore" do + test "does not increment the deliveries collection on bogus deliveries" do DeliveryMailer.delivery_method = BogusDelivery DeliveryMailer.raise_delivery_errors = false DeliveryMailer.deliveries.clear DeliveryMailer.welcome.deliver - assert_equal(1, DeliveryMailer.deliveries.length) + assert_equal(0, DeliveryMailer.deliveries.length) end end \ No newline at end of file diff --git a/actionmailer/test/old_base/mail_service_test.rb b/actionmailer/test/old_base/mail_service_test.rb index 2e33abf9d6..fb784328bc 100644 --- a/actionmailer/test/old_base/mail_service_test.rb +++ b/actionmailer/test/old_base/mail_service_test.rb @@ -387,6 +387,8 @@ class ActionMailerTest < Test::Unit::TestCase end def test_signed_up + TestMailer.delivery_method = :test + Time.stubs(:now => Time.now) expected = new_mail @@ -533,6 +535,8 @@ class ActionMailerTest < Test::Unit::TestCase end def test_reply_to + TestMailer.delivery_method = :test + expected = new_mail expected.to = @recipient @@ -567,6 +571,8 @@ class ActionMailerTest < Test::Unit::TestCase end def test_iso_charset + TestMailer.delivery_method = :test + expected = new_mail( "iso-8859-1" ) expected.to = @recipient expected.subject = encode "testing isø charsets", "iso-8859-1" @@ -601,6 +607,7 @@ class ActionMailerTest < Test::Unit::TestCase end def test_unencoded_subject + TestMailer.delivery_method = :test expected = new_mail expected.to = @recipient expected.subject = "testing unencoded subject" @@ -1029,6 +1036,7 @@ EOF end def test_with_mail_object_deliver + TestMailer.delivery_method = :test mail = TestMailer.headers_with_nonalpha_chars(@recipient) assert_nothing_raised { mail.deliver } assert_equal 1, TestMailer.deliveries.length diff --git a/actionmailer/test/old_base/url_test.rb b/actionmailer/test/old_base/url_test.rb index 10b6a36efd..5affb47997 100644 --- a/actionmailer/test/old_base/url_test.rb +++ b/actionmailer/test/old_base/url_test.rb @@ -54,6 +54,8 @@ class ActionMailerUrlTest < Test::Unit::TestCase end def test_signed_up_with_url + TestMailer.delivery_method = :test + ActionController::Routing::Routes.draw do |map| map.connect ':controller/:action/:id' map.welcome 'welcome', :controller=>"foo", :action=>"bar" -- cgit v1.2.3 From d5e4e9185ba09e7f461f3b62243e7b5db4d4b277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Mon, 25 Jan 2010 21:47:24 +1100 Subject: Updated gemspec for Mail --- actionmailer/actionmailer.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionmailer/actionmailer.gemspec b/actionmailer/actionmailer.gemspec index a3d466c986..e348871c25 100644 --- a/actionmailer/actionmailer.gemspec +++ b/actionmailer/actionmailer.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |s| s.homepage = "http://www.rubyonrails.org" s.add_dependency('actionpack', '= 3.0.pre') - s.add_dependency('mail', '~> 2.0.6') + s.add_dependency('mail', '~> 2.1.0') s.files = Dir['CHANGELOG', 'README', 'MIT-LICENSE', 'lib/**/*'] s.has_rdoc = true -- cgit v1.2.3 From ad8f5d4106c77ed1d054bf3b29bec94df557a7cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Mon, 25 Jan 2010 23:15:16 +1100 Subject: Updated to mail 2.1.1 --- actionmailer/actionmailer.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionmailer/actionmailer.gemspec b/actionmailer/actionmailer.gemspec index e348871c25..d73f86cd65 100644 --- a/actionmailer/actionmailer.gemspec +++ b/actionmailer/actionmailer.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |s| s.homepage = "http://www.rubyonrails.org" s.add_dependency('actionpack', '= 3.0.pre') - s.add_dependency('mail', '~> 2.1.0') + s.add_dependency('mail', '~> 2.1.1') s.files = Dir['CHANGELOG', 'README', 'MIT-LICENSE', 'lib/**/*'] s.has_rdoc = true -- cgit v1.2.3 From 9cb3ca1d29eb770c1a7adac3798666847fceee2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Mon, 25 Jan 2010 13:13:29 +0100 Subject: Change mailer generator templates and refactor the whole naming schema. --- .../lib/generators/erb/mailer/templates/view.erb | 2 +- .../generators/rails/mailer/templates/mailer.rb | 19 +++--- .../rails/resource/resource_generator.rb | 4 +- .../scaffold_controller_generator.rb | 6 +- .../generators/test_unit/mailer/templates/fixture | 2 +- .../test_unit/mailer/templates/functional_test.rb | 12 +++- railties/lib/rails/generators/named_base.rb | 79 ++++++++++------------ railties/lib/rails/generators/resource_helpers.rb | 43 ++++++------ railties/test/generators/mailer_generator_test.rb | 40 +++++++++-- railties/test/generators/named_base_test.rb | 62 +++++++++++++---- 10 files changed, 165 insertions(+), 104 deletions(-) diff --git a/railties/lib/generators/erb/mailer/templates/view.erb b/railties/lib/generators/erb/mailer/templates/view.erb index fcce7bd805..6d597256a6 100644 --- a/railties/lib/generators/erb/mailer/templates/view.erb +++ b/railties/lib/generators/erb/mailer/templates/view.erb @@ -1,3 +1,3 @@ <%= class_name %>#<%= @action %> -Find me in app/views/<%= @path %> +<%%= @greeting %>, find me in app/views/<%= @path %> diff --git a/railties/lib/generators/rails/mailer/templates/mailer.rb b/railties/lib/generators/rails/mailer/templates/mailer.rb index 90e0b712d6..5e7ef42370 100644 --- a/railties/lib/generators/rails/mailer/templates/mailer.rb +++ b/railties/lib/generators/rails/mailer/templates/mailer.rb @@ -1,14 +1,15 @@ class <%= class_name %> < ActionMailer::Base + delivers_from "mail@<%= application_name %>.com" <% for action in actions -%> - def <%= action %>(sent_at = Time.now) - subject '<%= class_name %>#<%= action %>' - recipients '' - from '' - sent_on sent_at - - body :greeting => 'Hi,' + # Subject can be set in your I18n file at config/locales/en.yml + # with the following lookup: + # + # en.actionmailer.<%= file_name %>.<%= action %>.subject + # + def <%= action %> + @greeting = "Hi" + mail(:to => "") end - <% end -%> -end +end \ No newline at end of file diff --git a/railties/lib/generators/rails/resource/resource_generator.rb b/railties/lib/generators/rails/resource/resource_generator.rb index 43c7cc85f4..5acb839f39 100644 --- a/railties/lib/generators/rails/resource/resource_generator.rb +++ b/railties/lib/generators/rails/resource/resource_generator.rb @@ -6,8 +6,8 @@ module Rails class ResourceGenerator < ModelGenerator #metagenerator include ResourceHelpers - hook_for :resource_controller, :required => true do |base, controller| - base.invoke controller, [ base.controller_name, base.options[:actions] ] + hook_for :resource_controller, :required => true do |controller| + invoke controller, [ controller_name, options[:actions] ] end class_option :actions, :type => :array, :banner => "ACTION ACTION", :default => [], diff --git a/railties/lib/generators/rails/scaffold_controller/scaffold_controller_generator.rb b/railties/lib/generators/rails/scaffold_controller/scaffold_controller_generator.rb index e544e29892..49af2974cd 100644 --- a/railties/lib/generators/rails/scaffold_controller/scaffold_controller_generator.rb +++ b/railties/lib/generators/rails/scaffold_controller/scaffold_controller_generator.rb @@ -18,9 +18,9 @@ module Rails hook_for :template_engine, :test_framework, :as => :scaffold - # Invoke the helper using the controller (pluralized) name. - hook_for :helper, :as => :scaffold do |base, invoked| - base.invoke invoked, [ base.controller_name ] + # Invoke the helper using the controller name (pluralized) + hook_for :helper, :as => :scaffold do |invoked| + invoke invoked, [ controller_name ] end end end diff --git a/railties/lib/generators/test_unit/mailer/templates/fixture b/railties/lib/generators/test_unit/mailer/templates/fixture index fcce7bd805..171648d6fd 100644 --- a/railties/lib/generators/test_unit/mailer/templates/fixture +++ b/railties/lib/generators/test_unit/mailer/templates/fixture @@ -1,3 +1,3 @@ <%= class_name %>#<%= @action %> -Find me in app/views/<%= @path %> +Hi, find me in app/views/<%= @path %> diff --git a/railties/lib/generators/test_unit/mailer/templates/functional_test.rb b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb index d7366fea5f..2f694e431c 100644 --- a/railties/lib/generators/test_unit/mailer/templates/functional_test.rb +++ b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb @@ -3,11 +3,17 @@ require 'test_helper' class <%= class_name %>Test < ActionMailer::TestCase <% for action in actions -%> test "<%= action %>" do - @expected.subject = '<%= class_name %>#<%= action %>' - @expected.body = read_fixture('<%= action %>') + @actual = <%= class_name %>.<%= action %> + + @expected.subject = <%= action.to_s.humanize.inspect %> + @expected.body = read_fixture("<%= action %>") @expected.date = Time.now - assert_equal @expected, <%= class_name %>.create_<%= action %>(@expected.date) + assert_difference "<%= class_name %>.deliveries.size" do + @actual.deliver + end + + assert_equal @expected.encoded, @actual.encoded end <% end -%> diff --git a/railties/lib/rails/generators/named_base.rb b/railties/lib/rails/generators/named_base.rb index 3e851bf888..12e918731e 100644 --- a/railties/lib/rails/generators/named_base.rb +++ b/railties/lib/rails/generators/named_base.rb @@ -6,17 +6,9 @@ module Rails class NamedBase < Base argument :name, :type => :string - no_tasks { - attr_reader :class_name, :singular_name, :plural_name, :table_name, - :class_path, :file_path, :class_nesting_depth - - alias :file_name :singular_name - } - def initialize(args, *options) #:nodoc: # Unfreeze name in case it's given as a frozen string args[0] = args[0].dup if args[0].is_a?(String) && args[0].frozen? - super assign_names!(self.name) parse_attributes! if respond_to?(:attributes) @@ -24,28 +16,48 @@ module Rails protected - def assign_names!(given_name) #:nodoc: - base_name, @class_path, @file_path, class_nesting, @class_nesting_depth = extract_modules(given_name) - class_name_without_nesting, @singular_name, @plural_name = inflect_names(base_name) + attr_reader :class_path, :file_name + alias :singular_name :file_name - @table_name = if pluralize_table_names? - plural_name - else - singular_name + def file_path + @file_path ||= (class_path + [file_name]).join('/') + end + + def class_name + @class_name ||= (class_path + [file_name]).map!{ |m| m.camelize }.join('::') + end + + def plural_name + @plural_name ||= singular_name.pluralize + end + + def i18n_scope + @i18n_scope ||= file_path.gsub('/', '.') + end + + def table_name + @table_name ||= begin + base = pluralize_table_names? ? plural_name : singular_name + (class_path + [base]).join('_') end + end - if class_nesting.empty? - @class_name = class_name_without_nesting + # Tries to retrieve the application name or simple return application. + def application_name + if defined?(Rails) && Rails.application + Rails.application.class.name.split('::').first.underscore else - @table_name = class_nesting.underscore << "_" << @table_name - @class_name = "#{class_nesting}::#{class_name_without_nesting}" + "application" end + end - @table_name.gsub!('/', '_') + def assign_names!(name) #:nodoc: + @class_path = name.include?('/') ? name.split('/') : name.split('::') + @class_path.map! { |m| m.underscore } + @file_name = @class_path.pop end - # Convert attributes hash into an array with GeneratedAttribute objects. - # + # Convert attributes array into GeneratedAttribute objects. def parse_attributes! #:nodoc: self.attributes = (attributes || []).map do |key_value| name, type = key_value.split(':') @@ -53,29 +65,6 @@ module Rails end end - # Extract modules from filesystem-style or ruby-style path. Both - # good/fun/stuff and Good::Fun::Stuff produce the same results. - # - def extract_modules(name) #:nodoc: - modules = name.include?('/') ? name.split('/') : name.split('::') - name = modules.pop - path = modules.map { |m| m.underscore } - - file_path = (path + [name.underscore]).join('/') - nesting = modules.map { |m| m.camelize }.join('::') - - [name, path, file_path, nesting, modules.size] - end - - # Receives name and return camelized, underscored and pluralized names. - # - def inflect_names(name) #:nodoc: - camel = name.camelize - under = camel.underscore - plural = under.pluralize - [camel, under, plural] - end - def pluralize_table_names? !defined?(ActiveRecord::Base) || ActiveRecord::Base.pluralize_table_names end diff --git a/railties/lib/rails/generators/resource_helpers.rb b/railties/lib/rails/generators/resource_helpers.rb index 7e00a222ed..3a98a8f9c1 100644 --- a/railties/lib/rails/generators/resource_helpers.rb +++ b/railties/lib/rails/generators/resource_helpers.rb @@ -9,14 +9,7 @@ module Rails mattr_accessor :skip_warn def self.included(base) #:nodoc: - base.class_eval do - class_option :force_plural, :type => :boolean, :desc => "Forces the use of a plural ModelName" - - no_tasks { - attr_reader :controller_name, :controller_class_name, :controller_file_name, - :controller_class_path, :controller_file_path - } - end + base.class_option :force_plural, :type => :boolean, :desc => "Forces the use of a plural ModelName" end # Set controller variables on initialization. @@ -29,29 +22,40 @@ module Rails say "Plural version of the model detected, using singularized version. Override with --force-plural." ResourceHelpers.skip_warn = true end - name.replace name.singularize - assign_names!(self.name) + assign_names!(name) end @controller_name = name.pluralize + end - base_name, @controller_class_path, @controller_file_path, class_nesting, class_nesting_depth = extract_modules(@controller_name) - class_name_without_nesting, @controller_file_name, controller_plural_name = inflect_names(base_name) + protected + + attr_reader :controller_name - @controller_class_name = if class_nesting.empty? - class_name_without_nesting - else - "#{class_nesting}::#{class_name_without_nesting}" + def controller_class_path + @class_path end - end - protected + def controller_file_name + @controller_file_name ||= file_name.pluralize + end + + def controller_file_path + @controller_file_path ||= (controller_class_path + [controller_file_name]).join('/') + end + + def controller_class_name + @controller_class_name ||= (controller_class_path + [controller_file_name]).map!{ |m| m.camelize }.join('::') + end + + def controller_i18n_scope + @controller_i18n_scope ||= controller_file_path.gsub('/', '.') + end # Loads the ORM::Generators::ActiveModel class. This class is responsable # to tell scaffold entities how to generate an specific method for the # ORM. Check Rails::Generators::ActiveModel for more information. - # def orm_class @orm_class ||= begin # Raise an error if the class_option :orm was not defined. @@ -68,7 +72,6 @@ module Rails end # Initialize ORM::Generators::ActiveModel to access instance methods. - # def orm_instance(name=file_name) @orm_instance ||= @orm_class.new(name) end diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb index dfc3130f77..0203eb314c 100644 --- a/railties/test/generators/mailer_generator_test.rb +++ b/railties/test/generators/mailer_generator_test.rb @@ -6,8 +6,20 @@ class MailerGeneratorTest < Rails::Generators::TestCase arguments %w(notifier foo bar) def test_mailer_skeleton_is_created + Rails.stubs(:application).returns(Object.new) run_generator - assert_file "app/mailers/notifier.rb", /class Notifier < ActionMailer::Base/ + assert_file "app/mailers/notifier.rb" do |mailer| + assert_match /class Notifier < ActionMailer::Base/, mailer + assert_match /delivers_from "mail@object.com"/, mailer + end + end + + def test_mailer_with_i18n_helper + run_generator + assert_file "app/mailers/notifier.rb" do |mailer| + assert_match /en\.actionmailer\.notifier\.foo\.subject/, mailer + assert_match /en\.actionmailer\.notifier\.bar\.subject/, mailer + end end def test_check_class_collision @@ -24,8 +36,15 @@ class MailerGeneratorTest < Rails::Generators::TestCase def test_invokes_default_template_engine run_generator - assert_file "app/views/notifier/foo.erb", /app\/views\/notifier\/foo/ - assert_file "app/views/notifier/bar.erb", /app\/views\/notifier\/bar/ + assert_file "app/views/notifier/foo.erb" do |view| + assert_match /app\/views\/notifier\/foo/, view + assert_match /<%= @greeting %>/, view + end + + assert_file "app/views/notifier/bar.erb" do |view| + assert_match /app\/views\/notifier\/bar/, view + assert_match /<%= @greeting %>/, view + end end def test_invokes_default_template_engine_even_with_no_action @@ -40,7 +59,18 @@ class MailerGeneratorTest < Rails::Generators::TestCase def test_actions_are_turned_into_methods run_generator - assert_file "app/mailers/notifier.rb", /def foo/ - assert_file "app/mailers/notifier.rb", /def bar/ + + assert_file "app/mailers/notifier.rb" do |mailer| + assert_instance_method :foo, mailer do |foo| + assert_match /mail\(:to => ""\)/, foo + assert_match /@greeting = "Hi"/, foo + end + + assert_instance_method :bar, mailer do |bar| + assert_match /mail\(:to => ""\)/, bar + assert_match /@greeting = "Hi"/, bar + end + end + end end diff --git a/railties/test/generators/named_base_test.rb b/railties/test/generators/named_base_test.rb index 99eb431a49..7514bc32bd 100644 --- a/railties/test/generators/named_base_test.rb +++ b/railties/test/generators/named_base_test.rb @@ -16,28 +16,60 @@ class NamedBaseTest < Rails::Generators::TestCase tests Rails::Generators::ScaffoldControllerGenerator def test_named_generator_attributes - g = generator ["admin/foo"] - assert_equal 'admin/foo', g.name - assert_equal %w(admin), g.class_path - assert_equal 1, g.class_nesting_depth - assert_equal 'Admin::Foo', g.class_name - assert_equal 'foo', g.singular_name - assert_equal 'foos', g.plural_name - assert_equal g.singular_name, g.file_name - assert_equal "admin_#{g.plural_name}", g.table_name + g = generator ['admin/foo'] + assert_name g, 'admin/foo', :name + assert_name g, %w(admin), :class_path + assert_name g, 'Admin::Foo', :class_name + assert_name g, 'admin/foo', :file_path + assert_name g, 'foo', :file_name + assert_name g, 'foo', :singular_name + assert_name g, 'foos', :plural_name + assert_name g, 'admin.foo', :i18n_scope + assert_name g, 'admin_foos', :table_name + end + + def test_named_generator_attributes_as_ruby + g = generator ['Admin::Foo'] + assert_name g, 'Admin::Foo', :name + assert_name g, %w(admin), :class_path + assert_name g, 'Admin::Foo', :class_name + assert_name g, 'admin/foo', :file_path + assert_name g, 'foo', :file_name + assert_name g, 'foo', :singular_name + assert_name g, 'foos', :plural_name + assert_name g, 'admin.foo', :i18n_scope + assert_name g, 'admin_foos', :table_name end def test_named_generator_attributes_without_pluralized ActiveRecord::Base.pluralize_table_names = false - g = generator ["admin/foo"] - assert_equal "admin_#{g.singular_name}", g.table_name + g = generator ['admin/foo'] + assert_name g, 'admin_foo', :table_name end def test_scaffold_plural_names - g = generator ["ProductLine"] - assert_equal "ProductLines", g.controller_name - assert_equal "ProductLines", g.controller_class_name - assert_equal "product_lines", g.controller_file_name + g = generator ['admin/foo'] + assert_name g, 'admin/foos', :controller_name + assert_name g, %w(admin), :controller_class_path + assert_name g, 'Admin::Foos', :controller_class_name + assert_name g, 'admin/foos', :controller_file_path + assert_name g, 'foos', :controller_file_name + assert_name g, 'admin.foos', :controller_i18n_scope + end + + def test_scaffold_plural_names_as_ruby + g = generator ['Admin::Foo'] + assert_name g, 'Admin::Foos', :controller_name + assert_name g, %w(admin), :controller_class_path + assert_name g, 'Admin::Foos', :controller_class_name + assert_name g, 'admin/foos', :controller_file_path + assert_name g, 'foos', :controller_file_name + assert_name g, 'admin.foos', :controller_i18n_scope end + protected + + def assert_name(generator, value, method) + assert_equal value, generator.send(method) + end end -- cgit v1.2.3 From 4a6eba3232fec13892f36fc4730bb2deef342fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Mon, 25 Jan 2010 23:46:09 +1100 Subject: Added initial documentation for the new API --- actionmailer/CHANGELOG | 2 + actionmailer/README | 62 +++++--- actionmailer/lib/action_mailer/base.rb | 257 ++++++++++++++++++++------------- 3 files changed, 202 insertions(+), 119 deletions(-) diff --git a/actionmailer/CHANGELOG b/actionmailer/CHANGELOG index 785bf98c55..0018a2ed5d 100644 --- a/actionmailer/CHANGELOG +++ b/actionmailer/CHANGELOG @@ -1,5 +1,7 @@ *Rails 3.0 (pending)* +* Whole new API added with tests. See base.rb for full details. Old API is deprecated. + * The Mail::Message class has helped methods for all the field types that return 'common' defaults for the common use case, so to get the subject, mail.subject will give you a string, mail.date will give you a DateTime object, mail.from will give you an array of address specs (mikel@test.lindsaar.net) etc. If you want to access the field object itself, call mail[:field_name] which will return the field object you want, which you can then chain, like mail[:from].formatted * Mail#content_type now returns the content_type field as a string. If you want the mime type of a mail, then you call Mail#mime_type (eg, text/plain), if you want the parameters of the content type field, you call Mail#content_type_parameters which gives you a hash, eg {'format' => 'flowed', 'charset' => 'utf-8'} diff --git a/actionmailer/README b/actionmailer/README index 0e16ea6ec6..542996f87b 100644 --- a/actionmailer/README +++ b/actionmailer/README @@ -5,51 +5,74 @@ are used to consolidate code for sending out forgotten passwords, welcome wishes on signup, invoices for billing, and any other use case that requires a written notification to either a person or another system. +Action Mailer is in essence a wrapper around Action Controller and the +Mail gem. It provides a way to make emails using templates in the same +way that Action Controller renders views using templates. + Additionally, an Action Mailer class can be used to process incoming email, such as allowing a weblog to accept new posts from an email (which could even have been sent from a phone). == Sending emails -The framework works by setting up all the email details, except the body, -in methods on the service layer. Subject, recipients, sender, and timestamp -are all set up this way. An example of such a method: +The framework works by initializing any instance variables you want to be +available in the email template, followed by a call to +mail+ to deliver +the email. + +This can be as simple as: + + class Notifier < ActionMailer::Base + + delivers_from 'system@loudthinking.com' + + def welcome(recipient) + @recipient = recipient + mail(:to => recipient, + :subject => "[Signed up] Welcome #{recipient}") + end - def signed_up(recipient) - recipients recipient - subject "[Signed up] Welcome #{recipient}" - from "system@loudthinking.com" - body :recipient => recipient end The body of the email is created by using an Action View template (regular -ERb) that has the content of the body hash parameter available as instance variables. +ERb) that has the instance variables that are declared in the mailer action. + So the corresponding body template for the method above could look like this: Hello there, Mr. <%= @recipient %> + + Thank you for signing up! And if the recipient was given as "david@loudthinking.com", the email generated would look like this: - Date: Sun, 12 Dec 2004 00:00:00 +0100 + Date: Mon, 25 Jan 2010 22:48:09 +1100 From: system@loudthinking.com To: david@loudthinking.com + Message-ID: <4b5d84f9dd6a5_7380800b81ac29578@void.loudthinking.com.mail> Subject: [Signed up] Welcome david@loudthinking.com + Mime-Version: 1.0 + Content-Type: text/plain; + charset="US-ASCII"; + Content-Transfer-Encoding: 7bit Hello there, Mr. david@loudthinking.com -You never actually call the instance methods like signed_up directly. Instead, -you call class methods like deliver_* and create_* that are automatically -created for each instance method. So if the signed_up method sat on -ApplicationMailer, it would look like this: +In previous version of rails you would call create_method_name and +deliver_method_name. Rails 3.0 has a much simpler interface, you +simply call the method and optionally call +deliver+ on the return value. + +Calling the method returns a Mail Message object: + + message = Notifier.welcome #=> Returns a Mail::Message object + message.deliver #=> delivers the email - ApplicationMailer.create_signed_up("david@loudthinking.com") # => tmail object for testing - ApplicationMailer.deliver_signed_up("david@loudthinking.com") # sends the email - ApplicationMailer.new.signed_up("david@loudthinking.com") # won't work! +Or you can just chain the methods together like: + + Notifier.welcome.deliver # Creates the email and sends it immediately == Receiving emails @@ -103,16 +126,13 @@ The Base class has the full list of configuration options. Here's an example: Action Mailer requires that the Action Pack is either available to be required immediately or is accessible as a GEM. +Additionally, Action Mailer requires the Mail gem, http://github.com/mikel/mail == Bundled software -* tmail 0.10.8 by Minero Aoki released under LGPL - Read more on http://i.loveruby.net/en/prog/tmail.html - * Text::Format 0.63 by Austin Ziegler released under OpenSource Read more on http://www.halostatue.ca/ruby/Text__Format.html - == Download The latest version of Action Mailer can be found at diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 47d0ffaf68..51a8c07a28 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -16,46 +16,57 @@ module ActionMailer #:nodoc: # # $ script/generate mailer Notifier # - # The generated model inherits from ActionMailer::Base. Emails are defined by creating methods within the model which are then - # used to set variables to be used in the mail template, to change options on the mail, or - # to add attachments. + # The generated model inherits from ActionMailer::Base. Emails are defined by creating methods + # within the model which are then used to set variables to be used in the mail template, to + # change options on the mail, or to add attachments. # # Examples: # # class Notifier < ActionMailer::Base - # def signup_notification(recipient) - # recipients recipient.email_address_with_name - # bcc ["bcc@example.com", "Order Watcher "] - # from "system@example.com" - # subject "New account information" - # body :account => recipient + # delivers_from 'system@example.com' + # + # def welcome(recipient) + # @account = recipient + # mail { :to => recipient.email_address_with_name, + # :bcc => ["bcc@example.com", "Order Watcher "], + # :subject => "New account information" } + # end # end - # end - # - # Mailer methods have the following configuration methods available. - # - # * recipients - Takes one or more email addresses. These addresses are where your email will be delivered to. Sets the To: header. - # * subject - The subject of your email. Sets the Subject: header. - # * from - Who the email you are sending is from. Sets the From: header. - # * cc - Takes one or more email addresses. These addresses will receive a carbon copy of your email. Sets the Cc: header. - # * bcc - Takes one or more email addresses. These addresses will receive a blind carbon copy of your email. Sets the Bcc: header. - # * reply_to - Takes one or more email addresses. These addresses will be listed as the default recipients when replying to your email. Sets the Reply-To: header. - # * sent_on - The date on which the message was sent. If not set, the header will be set by the delivery agent. - # * content_type - Specify the content type of the message. Defaults to text/plain. - # * headers - Specify additional headers to be set for the message, e.g. headers 'X-Mail-Count' => 107370. - # - # When a headers 'return-path' is specified, that value will be used as the 'envelope from' - # address. Setting this is useful when you want delivery notifications sent to a different address than - # the one in from. - # + # + # Within the mailer method, you have access to the following methods: + # + # * attachments[]= - Allows you to add attachments to your email in an intuitive + # manner; attachments['filename.png'] = File.read('path/to/filename.png') + # * headers[]= - Allows you to specify non standard headers in your email such + # as headers['X-No-Spam'] = 'True' + # * mail - Allows you to specify your email to send. + # + # The hash passed to the mail method allows you to specify the most used headers in an email + # message, such as Subject, To, From, Cc, Bcc, + # Reply-To and Date. See the ActionMailer#mail method for more details. + # + # If you need other headers not listed above, use the headers['name'] = value method. + # + # The mail method, if not passed a block, will inspect your views and send all the views with + # the same name as the method, so the above action would send the +welcome.plain.erb+ view file + # as well as the +welcome.html.erb+ view file in a +multipart/alternate+ email. + # + # If you want to explicitly render only certain templates, pass a block: + # + # mail(:to => user.emai) do |format| + # format.text + # format.enriched, {:content_type => 'text/rtf'} + # format.html + # end # # = Mailer views # - # Like Action Controller, each mailer class has a corresponding view directory - # in which each method of the class looks for a template with its name. - # To define a template to be used with a mailing, create an .erb file with the same name as the method - # in your mailer model. For example, in the mailer defined above, the template at - # app/views/notifier/signup_notification.erb would be used to generate the email. + # Like Action Controller, each mailer class has a corresponding view directory in which each + # method of the class looks for a template with its name. + # + # To define a template to be used with a mailing, create an .erb file with the same + # name as the method in your mailer model. For example, in the mailer defined above, the template at + # app/views/notifier/signup_notification.text.erb would be used to generate the email. # # Variables defined in the model are accessible as instance variables in the view. # @@ -111,54 +122,13 @@ module ActionMailer #:nodoc: # Once a mailer action and template are defined, you can deliver your message or create it and save it # for delivery later: # - # Notifier.deliver_signup_notification(david) # sends the email - # mail = Notifier.create_signup_notification(david) # => a tmail object - # Notifier.deliver(mail) - # - # You never instantiate your mailer class. Rather, your delivery instance - # methods are automatically wrapped in class methods that start with the word - # deliver_ followed by the name of the mailer method that you would - # like to deliver. The signup_notification method defined above is - # delivered by invoking Notifier.deliver_signup_notification. + # Notifier.welcome(david).deliver # sends the email + # mail = Notifier.welcome(david) # => a Mail::Message object + # mail.deliver # sends the email # + # You never instantiate your mailer class. Rather, you just call the method on the class itself. # - # = HTML email - # - # To send mail as HTML, make sure your view (the .erb file) generates HTML and - # set the content type to html. - # - # class MyMailer < ActionMailer::Base - # def signup_notification(recipient) - # recipients recipient.email_address_with_name - # subject "New account information" - # from "system@example.com" - # body :account => recipient - # content_type "text/html" - # end - # end - # - # - # = Multipart email - # - # You can explicitly specify multipart messages: - # - # class ApplicationMailer < ActionMailer::Base - # def signup_notification(recipient) - # recipients recipient.email_address_with_name - # subject "New account information" - # from "system@example.com" - # content_type "multipart/alternative" - # body :account => recipient - # - # part :content_type => "text/html", - # :data => render_message("signup-as-html") - # - # part "text/plain" do |p| - # p.body = render_message("signup-as-plain") - # p.content_transfer_encoding = "base64" - # end - # end - # end + # = Multipart Emails # # Multipart messages can also be used implicitly because Action Mailer will automatically # detect and use multipart templates, where each template is named after the name of the action, followed @@ -170,11 +140,10 @@ module ActionMailer #:nodoc: # * signup_notification.text.xml.builder # * signup_notification.text.x-yaml.erb # - # Each would be rendered and added as a separate part to the message, - # with the corresponding content type. The content type for the entire - # message is automatically set to multipart/alternative, which indicates - # that the email contains multiple different representations of the same email - # body. The same body hash is passed to each template. + # Each would be rendered and added as a separate part to the message, with the corresponding content + # type. The content type for the entire message is automatically set to multipart/alternative, + # which indicates that the email contains multiple different representations of the same email + # body. The same instance variables defined in the action are passed to all email templates. # # Implicit template rendering is not performed if any attachments or parts have been added to the email. # This means that you'll have to manually add each part to the email and set the content type of the email @@ -182,31 +151,31 @@ module ActionMailer #:nodoc: # # = Attachments # - # Attachments can be added by using the +attachment+ method. - # - # Example: + # You can see above how to make a multipart HTML / Text email, to send attachments is just + # as easy: # # class ApplicationMailer < ActionMailer::Base - # # attachments - # def signup_notification(recipient) - # recipients recipient.email_address_with_name - # subject "New account information" - # from "system@example.com" - # - # attachment :content_type => "image/jpeg", - # :body => File.read("an-image.jpg") - # - # attachment "application/pdf" do |a| - # a.body = generate_your_pdf_here() - # end + # def welcome(recipient) + # attachments['free_book.pdf'] = { :data => File.read('path/to/file.pdf') } + # mail(:to => recipient, :subject => "New account information") # end # end + # + # Which will (if it had both a .text.erb and .html.erb tempalte in the view + # directory), send a complete multipart/mixed email with two parts, the first part being + # a multipart/alternate with the text and HTML email parts inside, and the second being + # a application/pdf with a Base64 encoded copy of the file.pdf book with the filename + # +free_book.pdf+. # # # = Configuration options # # These options are specified on the class level, like ActionMailer::Base.template_root = "/my/templates" # + # * delivers_from - Pass this the address that then defaults as the +from+ address on all the + # emails sent. Can be overridden on a per mail basis by passing :from => 'another@address' in + # the +mail+ method. + # # * template_root - Determines the base from which template references will be made. # # * logger - the logger is used for generating information on the mailing run if available. @@ -326,6 +295,9 @@ module ActionMailer #:nodoc: end end + # Delivers a mail object. This is actually called by the Mail::Message object + # itself through a call back when you call :deliver on the Mail::Message, + # calling +deliver_mail+ directly and passing an Mail::Message will do nothing. def deliver_mail(mail) #:nodoc: ActiveSupport::Notifications.instrument("action_mailer.deliver") do |payload| self.set_payload_for_mail(payload, mail) @@ -374,6 +346,14 @@ module ActionMailer #:nodoc: process(method_name, *args) if method_name end + # Allows you to pass random and unusual headers to the new +Mail::Message+ object + # which will add them to itself. + # + # headers['X-Special-Domain-Specific-Header'] = "SecretValue" + # + # The resulting Mail::Message will have the following in it's header: + # + # X-Special-Domain-Specific-Header: SecretValue def headers(args=nil) if args ActiveSupport::Deprecation.warn "headers(Hash) is deprecated, please do headers[key] = value instead", caller[0,2] @@ -383,10 +363,91 @@ module ActionMailer #:nodoc: end end + # Allows you to add attachments to an email, like so: + # + # mail.attachments['filename.jpg'] = File.read('/path/to/filename.jpg') + # + # If you do this, then Mail will take the file name and work out the mime type + # set the Content-Type, Content-Disposition, Content-Transfer-Encoding and + # base64 encode the contents of the attachment all for you. + # + # You can also specify overrides if you want by passing a hash instead of a string: + # + # mail.attachments['filename.jpg'] = {:mime_type => 'application/x-gzip', + # :content => File.read('/path/to/filename.jpg')} + # + # If you want to use a different encoding than Base64, you can pass an encoding in, + # but then it is up to you to pass in the content pre-encoded, and don't expect + # Mail to know how to decode this data: + # + # file_content = SpecialEncode(File.read('/path/to/filename.jpg')) + # mail.attachments['filename.jpg'] = {:mime_type => 'application/x-gzip', + # :encoding => 'SpecialEncoding', + # :content => file_content } + # + # You can also search for specific attachments: + # + # # By Filename + # mail.attachments['filename.jpg'] #=> Mail::Part object or nil + # + # # or by index + # mail.attachments[0] #=> Mail::Part (first attachment) + # def attachments @_message.attachments end + # The main method that creates the message and renders the email templates. There are + # two ways to call this method, with a block, or without a block. + # + # Both methods accept a headers hash. This hash allows you to specify the most used headers + # in an email message, these are: + # + # * :subject - The subject of the message, if this is omitted, ActionMailer will + # ask the Rails I18n class for a translated :subject in the scope of + # [:actionmailer, mailer_scope, action_name] or if this is missing, will translate the + # humanized version of the action_name + # * :to - Who the message is destined for, can be a string of addresses, or an array + # of addresses. + # * :from - Who the message is from, if missing, will use the :delivers_from + # value in the class (if it exists) + # * :cc - Who you would like to Carbon-Copy on this email, can be a string of addresses, + # or an array of addresses. + # * :bcc - Who you would like to Blind-Carbon-Copy on this email, can be a string of + # addresses, or an array of addresses. + # * :reply_to - Who to set the Reply-To header of the email to. + # * :date - The date to say the email was sent on. + # + # If you need other headers not listed above, use the headers['name'] = value method. + # + # When a :return_path is specified, that value will be used as the 'envelope from' + # address for the Mail message. Setting this is useful when you want delivery notifications + # sent to a different address than the one in :from. Mail will actually use the + # :return_path in preference to the :sender in preference to the :from + # field for the 'envelope from' value. + # + # If you do not pass a block to the +mail+ method, it will find all templates in the + # template path that match the method name that it is being called from, it will then + # create parts for each of these templates intelligently, making educated guesses + # on correct content type and sequence, and return a fully prepared Mail::Message + # ready to call :deliver on to send. + # + # If you do pass a block, you can render specific templates of your choice: + # + # mail(:to => 'mikel@test.lindsaar.net') do |format| + # format.text + # format.html + # end + # + # You can even render text directly without using a template: + # + # mail(:to => 'mikel@test.lindsaar.net') do |format| + # format.text { render :text => "Hello Mikel!" } + # format.html { render :text => "

Hello Mikel!

" } + # end + # + # Which will render a multipart/alternate email with text/plain and + # text/html parts. def mail(headers={}, &block) # Guard flag to prevent both the old and the new API from firing # Should be removed when old API is removed -- cgit v1.2.3 From f14390091c40149dcd0982ada097be5bcbb37003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Tue, 26 Jan 2010 00:09:18 +1100 Subject: We don't support enriched yet --- actionmailer/lib/action_mailer/base.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 51a8c07a28..6c70ce8998 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -55,7 +55,6 @@ module ActionMailer #:nodoc: # # mail(:to => user.emai) do |format| # format.text - # format.enriched, {:content_type => 'text/rtf'} # format.html # end # -- cgit v1.2.3 From 2d1f9fb98f6b4f7afa469eba57eac4041c8ee539 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 25 Jan 2010 11:06:39 -0600 Subject: Plugins need to load before app initializers --- railties/lib/rails/application.rb | 2 +- railties/test/plugins/vendored_test.rb | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index ab66d1e90b..6633c36a21 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -91,8 +91,8 @@ module Rails def initializers initializers = Bootstrap.initializers - initializers += super railties.all { |r| initializers += r.initializers } + initializers += super initializers += Finisher.initializers initializers end diff --git a/railties/test/plugins/vendored_test.rb b/railties/test/plugins/vendored_test.rb index 05c01846e1..3977099184 100644 --- a/railties/test/plugins/vendored_test.rb +++ b/railties/test/plugins/vendored_test.rb @@ -37,6 +37,19 @@ module PluginsTest assert_equal "Bukkits", Bukkits.name end + test "plugin init is ran before application initializers" do + plugin "foo", "$foo = true" do |plugin| + plugin.write "lib/foo.rb", "module Foo; end" + end + + app_file 'config/initializers/foo.rb', <<-RUBY + raise "no $foo" unless $foo + raise "no Foo" unless Foo + RUBY + + boot_rails + end + test "plugin paths get added to the AS::Dependency list" do boot_rails assert_equal "Bukkits", Bukkits.name -- cgit v1.2.3 From c6104e6514d7e0af8dca92fcb40a6adb72e16611 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 25 Jan 2010 12:55:30 -0600 Subject: Failing test for using plugin middleware in application config --- railties/test/plugins/vendored_test.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/railties/test/plugins/vendored_test.rb b/railties/test/plugins/vendored_test.rb index 3977099184..41073d33a2 100644 --- a/railties/test/plugins/vendored_test.rb +++ b/railties/test/plugins/vendored_test.rb @@ -252,6 +252,26 @@ YAML assert_equal "FooMetal", last_response.body end + test "use plugin middleware in application config" do + plugin "foo" do |plugin| + plugin.write "lib/foo.rb", <<-RUBY + class Foo + def initialize(app) + @app = app + end + + def call(env) + @app.call(env) + end + end + RUBY + end + + add_to_config "config.middleware.use :Foo" + + boot_rails + end + test "namespaced controllers with namespaced routes" do @plugin.write "config/routes.rb", <<-RUBY ActionController::Routing::Routes.draw do -- cgit v1.2.3 From 1177a40e68b6661d6d2cb4aefdd9a805459cd936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 25 Jan 2010 22:00:07 +0100 Subject: Fix i18n locales order test. --- activesupport/lib/active_support/railtie.rb | 6 +++++- railties/lib/rails/engine.rb | 16 +++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index bc0f99869c..a80fa77e1e 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -33,6 +33,7 @@ module I18n railtie_name :i18n # Initialize I18n load paths to an array + config.i18n.engines_load_path = [] config.i18n.load_path = [] initializer :initialize_i18n do @@ -47,7 +48,10 @@ module I18n # the load_path which should be appended to what's already set instead of overwritten. config.after_initialize do |app| app.config.i18n.each do |setting, value| - if setting == :load_path + case setting + when :engines_load_path + app.config.i18n.load_path.unshift(*value) + when :load_path I18n.load_path += value else I18n.send("#{setting}=", value) diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index e40052e0f1..a9c94bc020 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -57,12 +57,12 @@ module Rails # Set the paths from which Rails will automatically load source files, # and the load_once paths. initializer :set_autoload_paths do |app| - ActiveSupport::Dependencies.load_paths.concat(config.load_paths) + ActiveSupport::Dependencies.load_paths.unshift(*config.load_paths) if reloadable?(app) - ActiveSupport::Dependencies.load_once_paths.concat(config.load_once_paths) + ActiveSupport::Dependencies.load_once_paths.unshift(*config.load_once_paths) else - ActiveSupport::Dependencies.load_once_paths.concat(config.load_paths) + ActiveSupport::Dependencies.load_once_paths.unshift(*config.load_paths) end # Freeze so future modifications will fail rather than do nothing mysteriously @@ -86,18 +86,20 @@ module Rails end end + # I18n load paths are a special case since the ones added + # later have higher priority. initializer :add_locales do - config.i18n.load_path.unshift(*paths.config.locales.to_a) + config.i18n.engines_load_path.concat(paths.config.locales.to_a) end initializer :add_view_paths do views = paths.app.views.to_a - ActionController::Base.view_paths.concat(views) if defined?(ActionController) - ActionMailer::Base.view_paths.concat(views) if defined?(ActionMailer) + ActionController::Base.view_paths.unshift(*views) if defined?(ActionController) + ActionMailer::Base.view_paths.unshift(*views) if defined?(ActionMailer) end initializer :add_metals do - Rails::Rack::Metal.paths.concat(paths.app.metals.to_a) + Rails::Rack::Metal.paths.unshift(*paths.app.metals.to_a) end initializer :load_application_initializers do -- cgit v1.2.3 From 02908e11425069e5b91cbf8ec3c8344a58493ef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 25 Jan 2010 22:59:08 +0100 Subject: As first step setup the load path and lazy compare middlewares. --- actionpack/lib/action_dispatch/middleware/stack.rb | 14 +++++++- actionpack/test/dispatch/middleware_stack_test.rb | 6 ++++ activerecord/lib/active_record/railtie.rb | 6 ++-- railties/lib/rails/application/bootstrap.rb | 4 +++ railties/lib/rails/engine.rb | 4 +-- railties/test/plugins/vendored_test.rb | 38 ++++++++++------------ 6 files changed, 46 insertions(+), 26 deletions(-) diff --git a/actionpack/lib/action_dispatch/middleware/stack.rb b/actionpack/lib/action_dispatch/middleware/stack.rb index 0dc1d70e37..18a2922fa7 100644 --- a/actionpack/lib/action_dispatch/middleware/stack.rb +++ b/actionpack/lib/action_dispatch/middleware/stack.rb @@ -55,7 +55,11 @@ module ActionDispatch when Class klass == middleware else - klass == ActiveSupport::Inflector.constantize(middleware.to_s) + if lazy_compare?(@klass) && lazy_compare?(middleware) + normalize(@klass) == normalize(middleware) + else + klass == ActiveSupport::Inflector.constantize(middleware.to_s) + end end end @@ -72,6 +76,14 @@ module ActionDispatch end private + def lazy_compare?(object) + object.is_a?(String) || object.is_a?(Symbol) + end + + def normalize(object) + object.to_s.strip.sub(/^::/, '') + end + def build_args Array(args).map { |arg| arg.respond_to?(:call) ? arg.call : arg } end diff --git a/actionpack/test/dispatch/middleware_stack_test.rb b/actionpack/test/dispatch/middleware_stack_test.rb index f4e18308ae..7cf6365af3 100644 --- a/actionpack/test/dispatch/middleware_stack_test.rb +++ b/actionpack/test/dispatch/middleware_stack_test.rb @@ -87,4 +87,10 @@ class MiddlewareStackTest < ActiveSupport::TestCase end assert_equal [:foo], @stack.last.send(:build_args) end + + test "lazy compares so unloaded constants can be loaded" do + @stack.use "UnknownMiddleware" + @stack.use :"MiddlewareStackTest::BazMiddleware" + assert @stack.include?("::MiddlewareStackTest::BazMiddleware") + end end diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index 18d7cc0187..5e4ce34934 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -49,9 +49,9 @@ module ActiveRecord # Setup database middleware after initializers have run initializer "active_record.initialize_database_middleware" do |app| middleware = app.config.middleware - if middleware.include?(ActiveRecord::SessionStore) - middleware.insert_before ActiveRecord::SessionStore, ActiveRecord::ConnectionAdapters::ConnectionManagement - middleware.insert_before ActiveRecord::SessionStore, ActiveRecord::QueryCache + if middleware.include?("ActiveRecord::SessionStore") + middleware.insert_before "ActiveRecord::SessionStore", ActiveRecord::ConnectionAdapters::ConnectionManagement + middleware.insert_before "ActiveRecord::SessionStore", ActiveRecord::QueryCache else middleware.use ActiveRecord::ConnectionAdapters::ConnectionManagement middleware.use ActiveRecord::QueryCache diff --git a/railties/lib/rails/application/bootstrap.rb b/railties/lib/rails/application/bootstrap.rb index 3c339ffc57..f038027c97 100644 --- a/railties/lib/rails/application/bootstrap.rb +++ b/railties/lib/rails/application/bootstrap.rb @@ -76,6 +76,10 @@ module Rails initializer :initialize_dependency_mechanism do |app| ActiveSupport::Dependencies.mechanism = app.config.cache_classes ? :require : :load end + + initializer :bootstrap_load_path do + # This is just an initializer used as hook so all load paths are loaded together + end end end end \ No newline at end of file diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index a9c94bc020..8cb938c2b9 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -47,7 +47,7 @@ module Rails end # Add configured load paths to ruby load paths and remove duplicates. - initializer :set_load_path do + initializer :set_load_path, :before => :bootstrap_load_path do config.load_paths.reverse_each do |path| $LOAD_PATH.unshift(path) if File.directory?(path) end @@ -56,7 +56,7 @@ module Rails # Set the paths from which Rails will automatically load source files, # and the load_once paths. - initializer :set_autoload_paths do |app| + initializer :set_autoload_paths, :before => :bootstrap_load_path do |app| ActiveSupport::Dependencies.load_paths.unshift(*config.load_paths) if reloadable?(app) diff --git a/railties/test/plugins/vendored_test.rb b/railties/test/plugins/vendored_test.rb index 41073d33a2..c14178ec66 100644 --- a/railties/test/plugins/vendored_test.rb +++ b/railties/test/plugins/vendored_test.rb @@ -48,6 +48,7 @@ module PluginsTest RUBY boot_rails + assert $foo end test "plugin paths get added to the AS::Dependency list" do @@ -252,26 +253,6 @@ YAML assert_equal "FooMetal", last_response.body end - test "use plugin middleware in application config" do - plugin "foo" do |plugin| - plugin.write "lib/foo.rb", <<-RUBY - class Foo - def initialize(app) - @app = app - end - - def call(env) - @app.call(env) - end - end - RUBY - end - - add_to_config "config.middleware.use :Foo" - - boot_rails - end - test "namespaced controllers with namespaced routes" do @plugin.write "config/routes.rb", <<-RUBY ActionController::Routing::Routes.draw do @@ -332,6 +313,23 @@ YAML assert rescued, "Expected boot rails to fail" end + + test "use plugin middleware in application config" do + @plugin.write "lib/bukkits.rb", <<-RUBY + class Bukkits + def initialize(app) + @app = app + end + + def call(env) + @app.call(env) + end + end + RUBY + + add_to_config "config.middleware.use \"Bukkits\"" + boot_rails + end end class VendoredOrderingTest < Test::Unit::TestCase -- cgit v1.2.3 From cc1bb8590e6021e0c86b345857358704fa68c9eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 25 Jan 2010 23:17:39 +0100 Subject: Refactor some railties tests structure. --- railties/test/plugins/configuration_test.rb | 45 --- railties/test/plugins/framework_extension_test.rb | 68 ---- railties/test/plugins/vendored_test.rb | 386 --------------------- railties/test/railties/configuration_test.rb | 45 +++ railties/test/railties/framework_extension_test.rb | 68 ++++ railties/test/railties/plugin_ordering_test.rb | 55 +++ railties/test/railties/plugin_test.rb | 334 ++++++++++++++++++ 7 files changed, 502 insertions(+), 499 deletions(-) delete mode 100644 railties/test/plugins/configuration_test.rb delete mode 100644 railties/test/plugins/framework_extension_test.rb delete mode 100644 railties/test/plugins/vendored_test.rb create mode 100644 railties/test/railties/configuration_test.rb create mode 100644 railties/test/railties/framework_extension_test.rb create mode 100644 railties/test/railties/plugin_ordering_test.rb create mode 100644 railties/test/railties/plugin_test.rb diff --git a/railties/test/plugins/configuration_test.rb b/railties/test/plugins/configuration_test.rb deleted file mode 100644 index c59040c712..0000000000 --- a/railties/test/plugins/configuration_test.rb +++ /dev/null @@ -1,45 +0,0 @@ -require "isolation/abstract_unit" - -module PluginsTest - class ConfigurationTest < Test::Unit::TestCase - def setup - build_app - boot_rails - require "rails/all" - end - - test "config is available to plugins" do - class Foo < Rails::Railtie ; end - assert_nil Foo.config.action_controller.foo - end - - test "a config name is available for the plugin" do - class Foo < Rails::Railtie ; config.foo.greetings = "hello" ; end - assert_equal "hello", Foo.config.foo.greetings - end - - test "plugin configurations are available in the application" do - class Foo < Rails::Railtie ; config.foo.greetings = "hello" ; end - require "#{app_path}/config/application" - assert_equal "hello", AppTemplate::Application.config.foo.greetings - end - - test "plugin config merges are deep" do - class Foo < Rails::Railtie ; config.foo.greetings = 'hello' ; end - class Bar < Rails::Railtie - config.foo.bar = "bar" - end - assert_equal "hello", Bar.config.foo.greetings - assert_equal "bar", Bar.config.foo.bar - end - - test "plugin can add subscribers" do - begin - class Foo < Rails::Railtie; subscriber(Rails::Subscriber.new); end - assert_kind_of Rails::Subscriber, Rails::Subscriber.subscribers[:foo] - ensure - Rails::Subscriber.subscribers.clear - end - end - end -end diff --git a/railties/test/plugins/framework_extension_test.rb b/railties/test/plugins/framework_extension_test.rb deleted file mode 100644 index d57fd4e635..0000000000 --- a/railties/test/plugins/framework_extension_test.rb +++ /dev/null @@ -1,68 +0,0 @@ -require "isolation/abstract_unit" - -module PluginsTest - class FrameworkExtensionTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - build_app - boot_rails - FileUtils.rm_rf("#{app_path}/config/environments") - require "rails/all" - end - - test "rake_tasks block is executed when MyApp.load_tasks is called" do - $ran_block = false - - class MyTie < Rails::Railtie - rake_tasks do - $ran_block = true - end - end - - require "#{app_path}/config/environment" - - assert !$ran_block - require 'rake' - require 'rake/testtask' - require 'rake/rdoctask' - - AppTemplate::Application.load_tasks - assert $ran_block - end - - test "generators block is executed when MyApp.load_generators is called" do - $ran_block = false - - class MyTie < Rails::Railtie - generators do - $ran_block = true - end - end - - require "#{app_path}/config/environment" - - assert !$ran_block - AppTemplate::Application.load_generators - assert $ran_block - end - end - - class ActiveRecordExtensionTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - build_app - boot_rails - FileUtils.rm_rf("#{app_path}/config/environments") - end - - test "active_record extensions are applied to ActiveRecord" do - add_to_config "config.active_record.table_name_prefix = 'tbl_'" - - require "#{app_path}/config/environment" - - assert_equal 'tbl_', ActiveRecord::Base.table_name_prefix - end - end -end \ No newline at end of file diff --git a/railties/test/plugins/vendored_test.rb b/railties/test/plugins/vendored_test.rb deleted file mode 100644 index c14178ec66..0000000000 --- a/railties/test/plugins/vendored_test.rb +++ /dev/null @@ -1,386 +0,0 @@ -require "isolation/abstract_unit" - -module PluginsTest - class VendoredTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - build_app - - @plugin = plugin "bukkits", "::LEVEL = config.log_level" do |plugin| - plugin.write "lib/bukkits.rb", "class Bukkits; end" - end - end - - def boot_rails - super - require "#{app_path}/config/environment" - end - - def app - @app ||= Rails.application - end - - test "it loads the plugin's init.rb file" do - boot_rails - assert_equal "loaded", BUKKITS - end - - test "the init.rb file has access to the config object" do - boot_rails - assert_equal :debug, LEVEL - end - - test "the plugin puts its lib directory on the load path" do - boot_rails - require "bukkits" - assert_equal "Bukkits", Bukkits.name - end - - test "plugin init is ran before application initializers" do - plugin "foo", "$foo = true" do |plugin| - plugin.write "lib/foo.rb", "module Foo; end" - end - - app_file 'config/initializers/foo.rb', <<-RUBY - raise "no $foo" unless $foo - raise "no Foo" unless Foo - RUBY - - boot_rails - assert $foo - end - - test "plugin paths get added to the AS::Dependency list" do - boot_rails - assert_equal "Bukkits", Bukkits.name - end - - test "plugin constants do not get reloaded by default" do - boot_rails - assert_equal "Bukkits", Bukkits.name - ActiveSupport::Dependencies.clear - @plugin.delete("lib/bukkits.rb") - assert_nothing_raised { Bukkits } - end - - test "plugin constants get reloaded if config.reload_plugins is set" do - add_to_config <<-RUBY - config.reload_plugins = true - RUBY - - boot_rails - - assert_equal "Bukkits", Bukkits.name - ActiveSupport::Dependencies.clear - @plugin.delete("lib/bukkits.rb") - assert_raises(NameError) { Bukkits } - end - - test "plugin should work without init.rb" do - @plugin.delete("init.rb") - - boot_rails - - require "bukkits" - assert_nothing_raised { Bukkits } - end - - test "the plugin puts its models directory on the load path" do - @plugin.write "app/models/my_bukkit.rb", "class MyBukkit ; end" - - boot_rails - - assert_nothing_raised { MyBukkit } - end - - test "the plugin puts is controllers directory on the load path" do - @plugin.write "app/controllers/bukkit_controller.rb", "class BukkitController ; end" - - boot_rails - - assert_nothing_raised { BukkitController } - end - - test "the plugin adds its view to the load path" do - @plugin.write "app/controllers/bukkit_controller.rb", <<-RUBY - class BukkitController < ActionController::Base - def index - end - end - RUBY - - @plugin.write "app/views/bukkit/index.html.erb", "Hello bukkits" - - boot_rails - - require "action_controller" - require "rack/mock" - response = BukkitController.action(:index).call(Rack::MockRequest.env_for("/")) - assert_equal "Hello bukkits\n", response[2].body - end - - test "the plugin adds helpers to the controller's views" do - @plugin.write "app/controllers/bukkit_controller.rb", <<-RUBY - class BukkitController < ActionController::Base - def index - end - end - RUBY - - @plugin.write "app/helpers/bukkit_helper.rb", <<-RUBY - module BukkitHelper - def bukkits - "bukkits" - end - end - RUBY - - @plugin.write "app/views/bukkit/index.html.erb", "Hello <%= bukkits %>" - - boot_rails - - require "rack/mock" - response = BukkitController.action(:index).call(Rack::MockRequest.env_for("/")) - assert_equal "Hello bukkits\n", response[2].body - end - - test "routes.rb are added to the router" do - @plugin.write "config/routes.rb", <<-RUBY - class Sprokkit - def self.call(env) - [200, {'Content-Type' => 'text/html'}, ["I am a Sprokkit"]] - end - end - - ActionController::Routing::Routes.draw do - match "/sprokkit", :to => Sprokkit - end - RUBY - - boot_rails - require "rack/mock" - response = Rails.application.call(Rack::MockRequest.env_for("/sprokkit")) - assert_equal "I am a Sprokkit", response[2].join - end - - test "tasks are loaded by default" do - $executed = false - @plugin.write "lib/tasks/foo.rake", <<-RUBY - task :foo do - $executed = true - end - RUBY - - boot_rails - require 'rake' - require 'rake/rdoctask' - require 'rake/testtask' - Rails.application.load_tasks - Rake::Task[:foo].invoke - assert $executed - end - - test "deprecated tasks are also loaded" do - $executed = false - @plugin.write "tasks/foo.rake", <<-RUBY - task :foo do - $executed = true - end - RUBY - - boot_rails - require 'rake' - require 'rake/rdoctask' - require 'rake/testtask' - Rails.application.load_tasks - Rake::Task[:foo].invoke - assert $executed - end - - test "i18n files are added with lower priority than application ones" do - add_to_config <<-RUBY - config.i18n.load_path << "#{app_path}/app/locales/en.yml" - RUBY - - app_file 'app/locales/en.yml', <<-YAML -en: - bar: "1" -YAML - - app_file 'config/locales/en.yml', <<-YAML -en: - foo: "2" - bar: "2" -YAML - - @plugin.write 'config/locales/en.yml', <<-YAML -en: - foo: "3" -YAML - - boot_rails - - assert_equal %W( - #{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/locale/en.yml - #{RAILS_FRAMEWORK_ROOT}/activemodel/lib/active_model/locale/en.yml - #{RAILS_FRAMEWORK_ROOT}/activerecord/lib/active_record/locale/en.yml - #{RAILS_FRAMEWORK_ROOT}/actionpack/lib/action_view/locale/en.yml - #{app_path}/vendor/plugins/bukkits/config/locales/en.yml - #{app_path}/config/locales/en.yml - #{app_path}/app/locales/en.yml - ).map { |path| File.expand_path(path) }, I18n.load_path.map { |path| File.expand_path(path) } - - assert_equal "2", I18n.t(:foo) - assert_equal "1", I18n.t(:bar) - end - - test "plugin metals are added to the middleware stack" do - @plugin.write 'app/metal/foo_metal.rb', <<-RUBY - class FooMetal - def self.call(env) - [200, { "Content-Type" => "text/html"}, ["FooMetal"]] - end - end - RUBY - - boot_rails - require 'rack/test' - extend Rack::Test::Methods - - get "/" - assert_equal 200, last_response.status - assert_equal "FooMetal", last_response.body - end - - test "namespaced controllers with namespaced routes" do - @plugin.write "config/routes.rb", <<-RUBY - ActionController::Routing::Routes.draw do - namespace :admin do - match "index", :to => "admin/foo#index" - end - end - RUBY - - @plugin.write "app/controllers/admin/foo_controller.rb", <<-RUBY - class Admin::FooController < ApplicationController - def index - render :text => "Rendered from namespace" - end - end - RUBY - - boot_rails - - require 'rack/test' - extend Rack::Test::Methods - - get "/admin/index" - assert_equal 200, last_response.status - assert_equal "Rendered from namespace", last_response.body - end - - test "plugin with initializers" do - $plugin_initializer = false - @plugin.write "config/initializers/foo.rb", <<-RUBY - $plugin_initializer = true - RUBY - - boot_rails - assert $plugin_initializer - end - - test "plugin cannot declare an engine for it" do - @plugin.write "lib/bukkits.rb", <<-RUBY - class Bukkits - class Engine < Rails::Engine - end - end - RUBY - - @plugin.write "init.rb", <<-RUBY - require "bukkits" - RUBY - - rescued = false - - begin - boot_rails - rescue Exception => e - rescued = true - assert_equal '"bukkits" is a Railtie/Engine and cannot be installed as plugin', e.message - end - - assert rescued, "Expected boot rails to fail" - end - - test "use plugin middleware in application config" do - @plugin.write "lib/bukkits.rb", <<-RUBY - class Bukkits - def initialize(app) - @app = app - end - - def call(env) - @app.call(env) - end - end - RUBY - - add_to_config "config.middleware.use \"Bukkits\"" - boot_rails - end - end - - class VendoredOrderingTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - build_app - $arr = [] - plugin "a_plugin", "$arr << :a" - plugin "b_plugin", "$arr << :b" - plugin "c_plugin", "$arr << :c" - end - - def boot_rails - super - require "#{app_path}/config/environment" - end - - test "plugins are loaded alphabetically by default" do - boot_rails - assert_equal [:a, :b, :c], $arr - end - - test "if specified, only those plugins are loaded" do - add_to_config "config.plugins = [:b_plugin]" - boot_rails - assert_equal [:b], $arr - end - - test "the plugins are initialized in the order they are specified" do - add_to_config "config.plugins = [:b_plugin, :a_plugin]" - boot_rails - assert_equal [:b, :a], $arr - end - - test "if :all is specified, the remaining plugins are loaded in alphabetical order" do - add_to_config "config.plugins = [:c_plugin, :all]" - boot_rails - assert_equal [:c, :a, :b], $arr - end - - test "if :all is at the beginning, it represents the plugins not otherwise specified" do - add_to_config "config.plugins = [:all, :b_plugin]" - boot_rails - assert_equal [:a, :c, :b], $arr - end - - test "plugin order array is strings" do - add_to_config "config.plugins = %w( c_plugin all )" - boot_rails - assert_equal [:c, :a, :b], $arr - end - end -end diff --git a/railties/test/railties/configuration_test.rb b/railties/test/railties/configuration_test.rb new file mode 100644 index 0000000000..c5ff6dad9c --- /dev/null +++ b/railties/test/railties/configuration_test.rb @@ -0,0 +1,45 @@ +require "isolation/abstract_unit" + +module RailtiesTest + class ConfigurationTest < Test::Unit::TestCase + def setup + build_app + boot_rails + require "rails/all" + end + + test "config is available to plugins" do + class Foo < Rails::Railtie ; end + assert_nil Foo.config.action_controller.foo + end + + test "a config name is available for the plugin" do + class Foo < Rails::Railtie ; config.foo.greetings = "hello" ; end + assert_equal "hello", Foo.config.foo.greetings + end + + test "plugin configurations are available in the application" do + class Foo < Rails::Railtie ; config.foo.greetings = "hello" ; end + require "#{app_path}/config/application" + assert_equal "hello", AppTemplate::Application.config.foo.greetings + end + + test "plugin config merges are deep" do + class Foo < Rails::Railtie ; config.foo.greetings = 'hello' ; end + class Bar < Rails::Railtie + config.foo.bar = "bar" + end + assert_equal "hello", Bar.config.foo.greetings + assert_equal "bar", Bar.config.foo.bar + end + + test "plugin can add subscribers" do + begin + class Foo < Rails::Railtie; subscriber(Rails::Subscriber.new); end + assert_kind_of Rails::Subscriber, Rails::Subscriber.subscribers[:foo] + ensure + Rails::Subscriber.subscribers.clear + end + end + end +end diff --git a/railties/test/railties/framework_extension_test.rb b/railties/test/railties/framework_extension_test.rb new file mode 100644 index 0000000000..84bd6ed16b --- /dev/null +++ b/railties/test/railties/framework_extension_test.rb @@ -0,0 +1,68 @@ +require "isolation/abstract_unit" + +module RailtiesTest + class FrameworkExtensionTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + boot_rails + FileUtils.rm_rf("#{app_path}/config/environments") + require "rails/all" + end + + test "rake_tasks block is executed when MyApp.load_tasks is called" do + $ran_block = false + + class MyTie < Rails::Railtie + rake_tasks do + $ran_block = true + end + end + + require "#{app_path}/config/environment" + + assert !$ran_block + require 'rake' + require 'rake/testtask' + require 'rake/rdoctask' + + AppTemplate::Application.load_tasks + assert $ran_block + end + + test "generators block is executed when MyApp.load_generators is called" do + $ran_block = false + + class MyTie < Rails::Railtie + generators do + $ran_block = true + end + end + + require "#{app_path}/config/environment" + + assert !$ran_block + AppTemplate::Application.load_generators + assert $ran_block + end + end + + class ActiveRecordExtensionTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + boot_rails + FileUtils.rm_rf("#{app_path}/config/environments") + end + + test "active_record extensions are applied to ActiveRecord" do + add_to_config "config.active_record.table_name_prefix = 'tbl_'" + + require "#{app_path}/config/environment" + + assert_equal 'tbl_', ActiveRecord::Base.table_name_prefix + end + end +end \ No newline at end of file diff --git a/railties/test/railties/plugin_ordering_test.rb b/railties/test/railties/plugin_ordering_test.rb new file mode 100644 index 0000000000..a72e59952e --- /dev/null +++ b/railties/test/railties/plugin_ordering_test.rb @@ -0,0 +1,55 @@ +require "isolation/abstract_unit" + +module RailtiesTest + class PluginOrderingTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + $arr = [] + plugin "a_plugin", "$arr << :a" + plugin "b_plugin", "$arr << :b" + plugin "c_plugin", "$arr << :c" + end + + def boot_rails + super + require "#{app_path}/config/environment" + end + + test "plugins are loaded alphabetically by default" do + boot_rails + assert_equal [:a, :b, :c], $arr + end + + test "if specified, only those plugins are loaded" do + add_to_config "config.plugins = [:b_plugin]" + boot_rails + assert_equal [:b], $arr + end + + test "the plugins are initialized in the order they are specified" do + add_to_config "config.plugins = [:b_plugin, :a_plugin]" + boot_rails + assert_equal [:b, :a], $arr + end + + test "if :all is specified, the remaining plugins are loaded in alphabetical order" do + add_to_config "config.plugins = [:c_plugin, :all]" + boot_rails + assert_equal [:c, :a, :b], $arr + end + + test "if :all is at the beginning, it represents the plugins not otherwise specified" do + add_to_config "config.plugins = [:all, :b_plugin]" + boot_rails + assert_equal [:a, :c, :b], $arr + end + + test "plugin order array is strings" do + add_to_config "config.plugins = %w( c_plugin all )" + boot_rails + assert_equal [:c, :a, :b], $arr + end + end +end \ No newline at end of file diff --git a/railties/test/railties/plugin_test.rb b/railties/test/railties/plugin_test.rb new file mode 100644 index 0000000000..65d057383c --- /dev/null +++ b/railties/test/railties/plugin_test.rb @@ -0,0 +1,334 @@ +require "isolation/abstract_unit" + +module RailtiesTest + class PluginTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + + @plugin = plugin "bukkits", "::LEVEL = config.log_level" do |plugin| + plugin.write "lib/bukkits.rb", "class Bukkits; end" + end + end + + def boot_rails + super + require "#{app_path}/config/environment" + end + + def app + @app ||= Rails.application + end + + test "it loads the plugin's init.rb file" do + boot_rails + assert_equal "loaded", BUKKITS + end + + test "the init.rb file has access to the config object" do + boot_rails + assert_equal :debug, LEVEL + end + + test "the plugin puts its lib directory on the load path" do + boot_rails + require "bukkits" + assert_equal "Bukkits", Bukkits.name + end + + test "plugin init is ran before application initializers" do + plugin "foo", "$foo = true" do |plugin| + plugin.write "lib/foo.rb", "module Foo; end" + end + + app_file 'config/initializers/foo.rb', <<-RUBY + raise "no $foo" unless $foo + raise "no Foo" unless Foo + RUBY + + boot_rails + assert $foo + end + + test "plugin paths get added to the AS::Dependency list" do + boot_rails + assert_equal "Bukkits", Bukkits.name + end + + test "plugin constants do not get reloaded by default" do + boot_rails + assert_equal "Bukkits", Bukkits.name + ActiveSupport::Dependencies.clear + @plugin.delete("lib/bukkits.rb") + assert_nothing_raised { Bukkits } + end + + test "plugin constants get reloaded if config.reload_plugins is set" do + add_to_config <<-RUBY + config.reload_plugins = true + RUBY + + boot_rails + + assert_equal "Bukkits", Bukkits.name + ActiveSupport::Dependencies.clear + @plugin.delete("lib/bukkits.rb") + assert_raises(NameError) { Bukkits } + end + + test "plugin should work without init.rb" do + @plugin.delete("init.rb") + + boot_rails + + require "bukkits" + assert_nothing_raised { Bukkits } + end + + test "the plugin puts its models directory on the load path" do + @plugin.write "app/models/my_bukkit.rb", "class MyBukkit ; end" + + boot_rails + + assert_nothing_raised { MyBukkit } + end + + test "the plugin puts is controllers directory on the load path" do + @plugin.write "app/controllers/bukkit_controller.rb", "class BukkitController ; end" + + boot_rails + + assert_nothing_raised { BukkitController } + end + + test "the plugin adds its view to the load path" do + @plugin.write "app/controllers/bukkit_controller.rb", <<-RUBY + class BukkitController < ActionController::Base + def index + end + end + RUBY + + @plugin.write "app/views/bukkit/index.html.erb", "Hello bukkits" + + boot_rails + + require "action_controller" + require "rack/mock" + response = BukkitController.action(:index).call(Rack::MockRequest.env_for("/")) + assert_equal "Hello bukkits\n", response[2].body + end + + test "the plugin adds helpers to the controller's views" do + @plugin.write "app/controllers/bukkit_controller.rb", <<-RUBY + class BukkitController < ActionController::Base + def index + end + end + RUBY + + @plugin.write "app/helpers/bukkit_helper.rb", <<-RUBY + module BukkitHelper + def bukkits + "bukkits" + end + end + RUBY + + @plugin.write "app/views/bukkit/index.html.erb", "Hello <%= bukkits %>" + + boot_rails + + require "rack/mock" + response = BukkitController.action(:index).call(Rack::MockRequest.env_for("/")) + assert_equal "Hello bukkits\n", response[2].body + end + + test "routes.rb are added to the router" do + @plugin.write "config/routes.rb", <<-RUBY + class Sprokkit + def self.call(env) + [200, {'Content-Type' => 'text/html'}, ["I am a Sprokkit"]] + end + end + + ActionController::Routing::Routes.draw do + match "/sprokkit", :to => Sprokkit + end + RUBY + + boot_rails + require "rack/mock" + response = Rails.application.call(Rack::MockRequest.env_for("/sprokkit")) + assert_equal "I am a Sprokkit", response[2].join + end + + test "tasks are loaded by default" do + $executed = false + @plugin.write "lib/tasks/foo.rake", <<-RUBY + task :foo do + $executed = true + end + RUBY + + boot_rails + require 'rake' + require 'rake/rdoctask' + require 'rake/testtask' + Rails.application.load_tasks + Rake::Task[:foo].invoke + assert $executed + end + + test "deprecated tasks are also loaded" do + $executed = false + @plugin.write "tasks/foo.rake", <<-RUBY + task :foo do + $executed = true + end + RUBY + + boot_rails + require 'rake' + require 'rake/rdoctask' + require 'rake/testtask' + Rails.application.load_tasks + Rake::Task[:foo].invoke + assert $executed + end + + test "i18n files are added with lower priority than application ones" do + add_to_config <<-RUBY + config.i18n.load_path << "#{app_path}/app/locales/en.yml" + RUBY + + app_file 'app/locales/en.yml', <<-YAML +en: + bar: "1" +YAML + + app_file 'config/locales/en.yml', <<-YAML +en: + foo: "2" + bar: "2" +YAML + + @plugin.write 'config/locales/en.yml', <<-YAML +en: + foo: "3" +YAML + + boot_rails + + assert_equal %W( + #{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/locale/en.yml + #{RAILS_FRAMEWORK_ROOT}/activemodel/lib/active_model/locale/en.yml + #{RAILS_FRAMEWORK_ROOT}/activerecord/lib/active_record/locale/en.yml + #{RAILS_FRAMEWORK_ROOT}/actionpack/lib/action_view/locale/en.yml + #{app_path}/vendor/plugins/bukkits/config/locales/en.yml + #{app_path}/config/locales/en.yml + #{app_path}/app/locales/en.yml + ).map { |path| File.expand_path(path) }, I18n.load_path.map { |path| File.expand_path(path) } + + assert_equal "2", I18n.t(:foo) + assert_equal "1", I18n.t(:bar) + end + + test "plugin metals are added to the middleware stack" do + @plugin.write 'app/metal/foo_metal.rb', <<-RUBY + class FooMetal + def self.call(env) + [200, { "Content-Type" => "text/html"}, ["FooMetal"]] + end + end + RUBY + + boot_rails + require 'rack/test' + extend Rack::Test::Methods + + get "/" + assert_equal 200, last_response.status + assert_equal "FooMetal", last_response.body + end + + test "namespaced controllers with namespaced routes" do + @plugin.write "config/routes.rb", <<-RUBY + ActionController::Routing::Routes.draw do + namespace :admin do + match "index", :to => "admin/foo#index" + end + end + RUBY + + @plugin.write "app/controllers/admin/foo_controller.rb", <<-RUBY + class Admin::FooController < ApplicationController + def index + render :text => "Rendered from namespace" + end + end + RUBY + + boot_rails + + require 'rack/test' + extend Rack::Test::Methods + + get "/admin/index" + assert_equal 200, last_response.status + assert_equal "Rendered from namespace", last_response.body + end + + test "plugin with initializers" do + $plugin_initializer = false + @plugin.write "config/initializers/foo.rb", <<-RUBY + $plugin_initializer = true + RUBY + + boot_rails + assert $plugin_initializer + end + + test "plugin cannot declare an engine for it" do + @plugin.write "lib/bukkits.rb", <<-RUBY + class Bukkits + class Engine < Rails::Engine + end + end + RUBY + + @plugin.write "init.rb", <<-RUBY + require "bukkits" + RUBY + + rescued = false + + begin + boot_rails + rescue Exception => e + rescued = true + assert_equal '"bukkits" is a Railtie/Engine and cannot be installed as plugin', e.message + end + + assert rescued, "Expected boot rails to fail" + end + + test "use plugin middleware in application config" do + @plugin.write "lib/bukkits.rb", <<-RUBY + class Bukkits + def initialize(app) + @app = app + end + + def call(env) + @app.call(env) + end + end + RUBY + + add_to_config "config.middleware.use \"Bukkits\"" + boot_rails + end + end +end -- cgit v1.2.3 From 3086dbd8d0705bc8e5e45cb04d9f8191f85a2685 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 25 Jan 2010 16:33:29 -0600 Subject: Failing test for plugin init requiring another plugin lib file --- railties/test/plugins/vendored_test.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/railties/test/plugins/vendored_test.rb b/railties/test/plugins/vendored_test.rb index c14178ec66..940648a0b6 100644 --- a/railties/test/plugins/vendored_test.rb +++ b/railties/test/plugins/vendored_test.rb @@ -382,5 +382,22 @@ YAML boot_rails assert_equal [:c, :a, :b], $arr end + + test "can require lib file from a different plugin" do + plugin "foo", "require 'bar'" do |plugin| + plugin.write "lib/foo.rb", "$foo = true" + end + + plugin "bar", "require 'foo'" do |plugin| + plugin.write "lib/bar.rb", "$bar = true" + end + + add_to_config "config.plugins = [:foo, :bar]" + + boot_rails + + assert $foo + assert $bar + end end end -- cgit v1.2.3 From 49be3316c21ae1b779fc26a5eb51890deff56915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 25 Jan 2010 23:38:47 +0100 Subject: Add a deprecation for helpers_dir. --- actionpack/lib/action_controller/metal/helpers.rb | 12 ++++++++++++ actionpack/test/controller/helper_test.rb | 15 +++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/action_controller/metal/helpers.rb b/actionpack/lib/action_controller/metal/helpers.rb index 0e3db86861..ef3b89db14 100644 --- a/actionpack/lib/action_controller/metal/helpers.rb +++ b/actionpack/lib/action_controller/metal/helpers.rb @@ -56,6 +56,18 @@ module ActionController end module ClassMethods + def helpers_dir + ActiveSupport::Deprecation.warn "ActionController::Base.helpers_dir is deprecated. " << + "Please use ActionController::Base.helpers_path (which returns an array)" + self.helpers_path + end + + def helpers_dir=(value) + ActiveSupport::Deprecation.warn "ActionController::Base.helpers_dir= is deprecated. " << + "Please use ActionController::Base.helpers_path= (which is an array)" + self.helpers_path = Array(value) + end + def inherited(klass) klass.class_eval { default_helper_module! unless name.blank? } super diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb index fe0961e575..75a96d6497 100644 --- a/actionpack/test/controller/helper_test.rb +++ b/actionpack/test/controller/helper_test.rb @@ -31,7 +31,7 @@ module LocalAbcHelper def c() end end -class HelperTest < Test::Unit::TestCase +class HelperTest < ActiveSupport::TestCase class TestController < ActionController::Base attr_accessor :delegate_attr def delegate_method() end @@ -135,6 +135,17 @@ class HelperTest < Test::Unit::TestCase assert methods.include?('foobar') end + def test_deprecation + assert_deprecated do + ActionController::Base.helpers_dir = "some/foo/bar" + end + assert_deprecated do + assert_equal ["some/foo/bar"], ActionController::Base.helpers_dir + end + ensure + ActionController::Base.helpers_path = [File.dirname(__FILE__) + '/../fixtures/helpers'] + end + private def expected_helper_methods TestHelper.instance_methods.map {|m| m.to_s } @@ -154,7 +165,7 @@ class HelperTest < Test::Unit::TestCase end -class IsolatedHelpersTest < Test::Unit::TestCase +class IsolatedHelpersTest < ActiveSupport::TestCase class A < ActionController::Base def index render :inline => '<%= shout %>' -- cgit v1.2.3 From 5d078692453c454289823700b67e64bcd4c8de7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 00:08:08 +0100 Subject: Ensure all initializers are collections. --- railties/lib/rails/application.rb | 4 +-- railties/lib/rails/application/bootstrap.rb | 42 ++++++++++++++--------------- railties/lib/rails/application/finisher.rb | 16 +++++------ railties/lib/rails/initializable.rb | 9 ++++--- 4 files changed, 36 insertions(+), 35 deletions(-) diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 6633c36a21..b7e5eb7a1d 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -90,10 +90,10 @@ module Rails end def initializers - initializers = Bootstrap.initializers + initializers = Bootstrap.initializers_for(self) railties.all { |r| initializers += r.initializers } initializers += super - initializers += Finisher.initializers + initializers += Finisher.initializers_for(self) initializers end diff --git a/railties/lib/rails/application/bootstrap.rb b/railties/lib/rails/application/bootstrap.rb index f038027c97..b20e53f2de 100644 --- a/railties/lib/rails/application/bootstrap.rb +++ b/railties/lib/rails/application/bootstrap.rb @@ -3,28 +3,28 @@ module Rails module Bootstrap include Initializable - initializer :load_environment_config do |app| - app.require_environment! + initializer :load_environment_config do + require_environment! end - initializer :load_all_active_support do |app| - require "active_support/all" unless app.config.active_support.bare + initializer :load_all_active_support do + require "active_support/all" unless config.active_support.bare end # Preload all frameworks specified by the Configuration#frameworks. # Used by Passenger to ensure everything's loaded before forking and # to avoid autoload race conditions in JRuby. - initializer :preload_frameworks do |app| + initializer :preload_frameworks do require 'active_support/dependencies' - ActiveSupport::Autoload.eager_autoload! if app.config.preload_frameworks + ActiveSupport::Autoload.eager_autoload! if config.preload_frameworks end # Initialize the logger early in the stack in case we need to log some deprecation. - initializer :initialize_logger do |app| - Rails.logger ||= app.config.logger || begin - path = app.config.paths.log.to_a.first + initializer :initialize_logger do + Rails.logger ||= config.logger || begin + path = config.paths.log.to_a.first logger = ActiveSupport::BufferedLogger.new(path) - logger.level = ActiveSupport::BufferedLogger.const_get(app.config.log_level.to_s.upcase) + logger.level = ActiveSupport::BufferedLogger.const_get(config.log_level.to_s.upcase) logger.auto_flushing = false if Rails.env.production? logger rescue StandardError => e @@ -39,23 +39,23 @@ module Rails end # Initialize cache early in the stack so railties can make use of it. - initializer :initialize_cache do |app| + initializer :initialize_cache do unless defined?(RAILS_CACHE) - silence_warnings { Object.const_set "RAILS_CACHE", ActiveSupport::Cache.lookup_store(app.config.cache_store) } + silence_warnings { Object.const_set "RAILS_CACHE", ActiveSupport::Cache.lookup_store(config.cache_store) } if RAILS_CACHE.respond_to?(:middleware) - app.config.middleware.insert_after(:"Rack::Lock", RAILS_CACHE.middleware) + config.middleware.insert_after(:"Rack::Lock", RAILS_CACHE.middleware) end end end # Initialize rails subscriber on top of notifications. - initializer :initialize_subscriber do |app| + initializer :initialize_subscriber do require 'active_support/notifications' - if app.config.colorize_logging == false - Rails::Subscriber.colorize_logging = false - app.config.generators.colorize_logging = false + if config.colorize_logging == false + Rails::Subscriber.colorize_logging = false + config.generators.colorize_logging = false end ActiveSupport::Notifications.subscribe do |*args| @@ -63,8 +63,8 @@ module Rails end end - initializer :set_clear_dependencies_hook do |app| - unless app.config.cache_classes + initializer :set_clear_dependencies_hook do + unless config.cache_classes ActionDispatch::Callbacks.after do ActiveSupport::Dependencies.clear end @@ -73,8 +73,8 @@ module Rails # Sets the dependency loading mechanism. # TODO: Remove files from the $" and always use require. - initializer :initialize_dependency_mechanism do |app| - ActiveSupport::Dependencies.mechanism = app.config.cache_classes ? :require : :load + initializer :initialize_dependency_mechanism do + ActiveSupport::Dependencies.mechanism = config.cache_classes ? :require : :load end initializer :bootstrap_load_path do diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index 5cc5b4ae88..d67420938a 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -15,26 +15,26 @@ module Rails end end - initializer :add_builtin_route do |app| + initializer :add_builtin_route do if Rails.env.development? Rails::Application::RoutesReloader.paths << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') end end - initializer :build_middleware_stack do |app| - app.app + initializer :build_middleware_stack do + app end # Fires the user-supplied after_initialize block (config#after_initialize) - initializer :after_initialize do |app| - app.config.after_initialize_blocks.each do |block| - block.call(app) + initializer :after_initialize do + config.after_initialize_blocks.each do |block| + block.call(self) end end # Disable dependency loading during request cycle - initializer :disable_dependency_loading do |app| - if app.config.cache_classes && !app.config.dependency_loading + initializer :disable_dependency_loading do + if config.cache_classes && !config.dependency_loading ActiveSupport::Dependencies.unhook! end end diff --git a/railties/lib/rails/initializable.rb b/railties/lib/rails/initializable.rb index cea4a0fdf7..d91f67823f 100644 --- a/railties/lib/rails/initializable.rb +++ b/railties/lib/rails/initializable.rb @@ -64,10 +64,7 @@ module Rails end def initializers - @initializers ||= begin - initializers = self.class.initializers_chain - Collection.new(initializers.map { |i| i.bind(self) }) - end + @initializers ||= self.class.initializers_for(self) end module ClassMethods @@ -84,6 +81,10 @@ module Rails initializers end + def initializers_for(binding) + Collection.new(initializers_chain.map { |i| i.bind(binding) }) + end + def initializer(name, opts = {}, &blk) raise ArgumentError, "A block must be passed when defining an initializer" unless blk initializers << Initializer.new(name, nil, opts, &blk) -- cgit v1.2.3 From 8974dac92e05dcab8ee552a5f40108c6ac25dc36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 00:55:26 +0100 Subject: Ensure root routes inside optional scopes works as expected. --- actionpack/lib/action_dispatch/routing/mapper.rb | 5 +++-- actionpack/test/dispatch/routing_test.rb | 21 ++++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index fcbb70749f..5199984814 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -157,10 +157,11 @@ module ActionDispatch end # Invokes Rack::Mount::Utils.normalize path and ensure that - # (:locale) becomes (/:locale) instead of /(:locale). + # (:locale) becomes (/:locale) instead of /(:locale). Except + # for root cases, where the latter is the correct one. def self.normalize_path(path) path = Rack::Mount::Utils.normalize_path(path) - path.sub!(%r{/\(+/?:}, '(/:') + path.sub!(%r{/(\(+)/?:}, '\1/:') unless path =~ %r{^/\(+:.*\)$} path end diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 6dccabdb3f..dfe824fd70 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -141,19 +141,18 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest resources :rooms end - scope '(:locale)', :locale => /en|pl/ do - resources :descriptions - end + match '/info' => 'projects#info', :as => 'info' namespace :admin do - scope '(/:locale)', :locale => /en|pl/ do + scope '(:locale)', :locale => /en|pl/ do resources :descriptions end end - match '/info' => 'projects#info', :as => 'info' - - root :to => 'projects#index' + scope '(:locale)', :locale => /en|pl/ do + resources :descriptions + root :to => 'projects#index' + end end end @@ -660,6 +659,14 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest end end + def test_optional_scoped_root + with_test_routes do + assert_equal '/en', root_path("en") + get '/en' + assert_equal 'projects#index', @response.body + end + end + def test_optional_scoped_path with_test_routes do assert_equal '/en/descriptions', descriptions_path("en") -- cgit v1.2.3 From 1b3cb54ebae685d4db9eefc99ce68b36d5641751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Tue, 26 Jan 2010 01:06:48 +0100 Subject: More work on generated mailer templates. --- railties/lib/generators/erb/mailer/mailer_generator.rb | 2 +- railties/lib/generators/erb/mailer/templates/view.erb | 3 --- railties/lib/generators/erb/mailer/templates/view.text.erb | 3 +++ railties/lib/generators/rails/mailer/templates/mailer.rb | 4 ++-- .../generators/test_unit/mailer/templates/functional_test.rb | 10 +++------- railties/test/generators/mailer_generator_test.rb | 11 +++++------ railties/test/generators/named_base_test.rb | 8 ++++++++ 7 files changed, 22 insertions(+), 19 deletions(-) delete mode 100644 railties/lib/generators/erb/mailer/templates/view.erb create mode 100644 railties/lib/generators/erb/mailer/templates/view.text.erb diff --git a/railties/lib/generators/erb/mailer/mailer_generator.rb b/railties/lib/generators/erb/mailer/mailer_generator.rb index 4ec2f4c9f4..408c942cef 100644 --- a/railties/lib/generators/erb/mailer/mailer_generator.rb +++ b/railties/lib/generators/erb/mailer/mailer_generator.rb @@ -12,7 +12,7 @@ module Erb def create_view_files actions.each do |action| @action, @path = action, File.join(file_path, action) - template "view.erb", File.join("app/views", "#{@path}.erb") + template "view.text.erb", File.join("app/views", "#{@path}.text.erb") end end end diff --git a/railties/lib/generators/erb/mailer/templates/view.erb b/railties/lib/generators/erb/mailer/templates/view.erb deleted file mode 100644 index 6d597256a6..0000000000 --- a/railties/lib/generators/erb/mailer/templates/view.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= class_name %>#<%= @action %> - -<%%= @greeting %>, find me in app/views/<%= @path %> diff --git a/railties/lib/generators/erb/mailer/templates/view.text.erb b/railties/lib/generators/erb/mailer/templates/view.text.erb new file mode 100644 index 0000000000..6d597256a6 --- /dev/null +++ b/railties/lib/generators/erb/mailer/templates/view.text.erb @@ -0,0 +1,3 @@ +<%= class_name %>#<%= @action %> + +<%%= @greeting %>, find me in app/views/<%= @path %> diff --git a/railties/lib/generators/rails/mailer/templates/mailer.rb b/railties/lib/generators/rails/mailer/templates/mailer.rb index 5e7ef42370..1685b73633 100644 --- a/railties/lib/generators/rails/mailer/templates/mailer.rb +++ b/railties/lib/generators/rails/mailer/templates/mailer.rb @@ -1,5 +1,5 @@ class <%= class_name %> < ActionMailer::Base - delivers_from "mail@<%= application_name %>.com" + delivers_from "from@example.com" <% for action in actions -%> # Subject can be set in your I18n file at config/locales/en.yml @@ -9,7 +9,7 @@ class <%= class_name %> < ActionMailer::Base # def <%= action %> @greeting = "Hi" - mail(:to => "") + mail(:to => "to@example.com") end <% end -%> end \ No newline at end of file diff --git a/railties/lib/generators/test_unit/mailer/templates/functional_test.rb b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb index 2f694e431c..fcebb40135 100644 --- a/railties/lib/generators/test_unit/mailer/templates/functional_test.rb +++ b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb @@ -3,17 +3,13 @@ require 'test_helper' class <%= class_name %>Test < ActionMailer::TestCase <% for action in actions -%> test "<%= action %>" do - @actual = <%= class_name %>.<%= action %> - @expected.subject = <%= action.to_s.humanize.inspect %> + @expected.to = "to@example.com" + @expected.from = "from@example.com" @expected.body = read_fixture("<%= action %>") @expected.date = Time.now - assert_difference "<%= class_name %>.deliveries.size" do - @actual.deliver - end - - assert_equal @expected.encoded, @actual.encoded + assert_equal @expected, <%= class_name %>.<%= action %> end <% end -%> diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb index 0203eb314c..99ce53323e 100644 --- a/railties/test/generators/mailer_generator_test.rb +++ b/railties/test/generators/mailer_generator_test.rb @@ -6,11 +6,10 @@ class MailerGeneratorTest < Rails::Generators::TestCase arguments %w(notifier foo bar) def test_mailer_skeleton_is_created - Rails.stubs(:application).returns(Object.new) run_generator assert_file "app/mailers/notifier.rb" do |mailer| assert_match /class Notifier < ActionMailer::Base/, mailer - assert_match /delivers_from "mail@object.com"/, mailer + assert_match /delivers_from "from@example.com"/, mailer end end @@ -36,12 +35,12 @@ class MailerGeneratorTest < Rails::Generators::TestCase def test_invokes_default_template_engine run_generator - assert_file "app/views/notifier/foo.erb" do |view| + assert_file "app/views/notifier/foo.text.erb" do |view| assert_match /app\/views\/notifier\/foo/, view assert_match /<%= @greeting %>/, view end - assert_file "app/views/notifier/bar.erb" do |view| + assert_file "app/views/notifier/bar.text.erb" do |view| assert_match /app\/views\/notifier\/bar/, view assert_match /<%= @greeting %>/, view end @@ -62,12 +61,12 @@ class MailerGeneratorTest < Rails::Generators::TestCase assert_file "app/mailers/notifier.rb" do |mailer| assert_instance_method :foo, mailer do |foo| - assert_match /mail\(:to => ""\)/, foo + assert_match /mail\(:to => "to@example.com"\)/, foo assert_match /@greeting = "Hi"/, foo end assert_instance_method :bar, mailer do |bar| - assert_match /mail\(:to => ""\)/, bar + assert_match /mail\(:to => "to@example.com"\)/, bar assert_match /@greeting = "Hi"/, bar end end diff --git a/railties/test/generators/named_base_test.rb b/railties/test/generators/named_base_test.rb index 7514bc32bd..f327fb1282 100644 --- a/railties/test/generators/named_base_test.rb +++ b/railties/test/generators/named_base_test.rb @@ -67,6 +67,14 @@ class NamedBaseTest < Rails::Generators::TestCase assert_name g, 'admin.foos', :controller_i18n_scope end + def test_application_name + g = generator ['Admin::Foo'] + Rails.stubs(:application).returns(Object.new) + assert_name g, "object", :application_name + Rails.stubs(:application).returns(nil) + assert_name g, "application", :application_name + end + protected def assert_name(generator, value, method) -- cgit v1.2.3 From 6589976533b7a6850390ed5d6526ca719e56c5ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Tue, 26 Jan 2010 01:43:41 +0100 Subject: Remove old files, add some information to docs and improve test suite. --- actionmailer/README | 2 -- actionmailer/lib/action_mailer/base.rb | 48 ++++++++++++++++++++++++---------- actionmailer/test/base_test.rb | 24 +++++++++++++++++ actionmailer/test/mail_test.rb | 22 ---------------- 4 files changed, 58 insertions(+), 38 deletions(-) delete mode 100644 actionmailer/test/mail_test.rb diff --git a/actionmailer/README b/actionmailer/README index 542996f87b..e0e2ee436a 100644 --- a/actionmailer/README +++ b/actionmailer/README @@ -22,7 +22,6 @@ the email. This can be as simple as: class Notifier < ActionMailer::Base - delivers_from 'system@loudthinking.com' def welcome(recipient) @@ -30,7 +29,6 @@ This can be as simple as: mail(:to => recipient, :subject => "[Signed up] Welcome #{recipient}") end - end The body of the email is created by using an Action View template (regular diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 6c70ce8998..65d1ba47d9 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -27,9 +27,8 @@ module ActionMailer #:nodoc: # # def welcome(recipient) # @account = recipient - # mail { :to => recipient.email_address_with_name, - # :bcc => ["bcc@example.com", "Order Watcher "], - # :subject => "New account information" } + # mail(:to => recipient.email_address_with_name, + # :bcc => ["bcc@example.com", "Order Watcher "]) # end # end # @@ -37,13 +36,15 @@ module ActionMailer #:nodoc: # # * attachments[]= - Allows you to add attachments to your email in an intuitive # manner; attachments['filename.png'] = File.read('path/to/filename.png') + # # * headers[]= - Allows you to specify non standard headers in your email such # as headers['X-No-Spam'] = 'True' + # # * mail - Allows you to specify your email to send. # # The hash passed to the mail method allows you to specify the most used headers in an email # message, such as Subject, To, From, Cc, Bcc, - # Reply-To and Date. See the ActionMailer#mail method for more details. + # Reply-To and Date. See the ActionMailer#mail method for more details. # # If you need other headers not listed above, use the headers['name'] = value method. # @@ -58,6 +59,20 @@ module ActionMailer #:nodoc: # format.html # end # + # The block syntax is useful if also need to specify information specific to a part: + # + # mail(:to => user.emai) do |format| + # format.text(:content_transfer_encoding => "base64") + # format.html + # end + # + # Or even to renderize a special view: + # + # mail(:to => user.emai) do |format| + # format.text + # format.html { render "some_other_template" } + # end + # # = Mailer views # # Like Action Controller, each mailer class has a corresponding view directory in which each @@ -79,9 +94,9 @@ module ActionMailer #:nodoc: # You got a new note! # <%= truncate(@note.body, 25) %> # - # If you need to access the subject, from or the recipients in the view, you can do that through mailer object: + # If you need to access the subject, from or the recipients in the view, you can do that through message object: # - # You got a new note from <%= mailer.from %>! + # You got a new note from <%= message.from %>! # <%= truncate(@note.body, 25) %> # # @@ -137,7 +152,7 @@ module ActionMailer #:nodoc: # * signup_notification.text.plain.erb # * signup_notification.text.html.erb # * signup_notification.text.xml.builder - # * signup_notification.text.x-yaml.erb + # * signup_notification.text.yaml.erb # # Each would be rendered and added as a separate part to the message, with the corresponding content # type. The content type for the entire message is automatically set to multipart/alternative, @@ -174,8 +189,6 @@ module ActionMailer #:nodoc: # * delivers_from - Pass this the address that then defaults as the +from+ address on all the # emails sent. Can be overridden on a per mail basis by passing :from => 'another@address' in # the +mail+ method. - # - # * template_root - Determines the base from which template references will be made. # # * logger - the logger is used for generating information on the mailing run if available. # Can be set to nil for no logging. Compatible with both Ruby's own Logger and Log4r loggers. @@ -300,9 +313,7 @@ module ActionMailer #:nodoc: def deliver_mail(mail) #:nodoc: ActiveSupport::Notifications.instrument("action_mailer.deliver") do |payload| self.set_payload_for_mail(payload, mail) - yield # Let Mail do the delivery actions - end end @@ -399,7 +410,7 @@ module ActionMailer #:nodoc: # The main method that creates the message and renders the email templates. There are # two ways to call this method, with a block, or without a block. # - # Both methods accept a headers hash. This hash allows you to specify the most used headers + # Both methods accept a headers hash. This hash allows you to specify the most used headers # in an email message, these are: # # * :subject - The subject of the message, if this is omitted, ActionMailer will @@ -419,7 +430,7 @@ module ActionMailer #:nodoc: # # If you need other headers not listed above, use the headers['name'] = value method. # - # When a :return_path is specified, that value will be used as the 'envelope from' + # When a :return_path is specified as header, that value will be used as the 'envelope from' # address for the Mail message. Setting this is useful when you want delivery notifications # sent to a different address than the one in :from. Mail will actually use the # :return_path in preference to the :sender in preference to the :from @@ -447,6 +458,14 @@ module ActionMailer #:nodoc: # # Which will render a multipart/alternate email with text/plain and # text/html parts. + # + # The block syntax also allows you to customize the part headers if desired: + # + # mail(:to => 'mikel@test.lindsaar.net') do |format| + # format.text(:content_transfer_encoding => "base64") + # format.html + # end + # def mail(headers={}, &block) # Guard flag to prevent both the old and the new API from firing # Should be removed when old API is removed @@ -541,7 +560,8 @@ module ActionMailer #:nodoc: def create_parts_from_responses(m, responses, charset) #:nodoc: if responses.size == 1 && !m.has_attachments? - m.body = responses[0][:body] + headers = responses[0] + headers.each { |k,v| m[k] = v } return responses[0][:content_type] elsif responses.size > 1 && m.has_attachments? container = Mail::Part.new diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 0705f22df8..856b5b2d3c 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -56,6 +56,13 @@ class BaseTest < ActiveSupport::TestCase format.any(:text, :html){ render :text => "Format with any!" } end end + + def custom_block(include_html=false) + mail(DEFAULT_HEADERS) do |format| + format.text(:content_transfer_encoding => "base64"){ render "welcome" } + format.html{ render "welcome" } if include_html + end + end end test "method call to mail does not raise error" do @@ -337,6 +344,23 @@ class BaseTest < ActiveSupport::TestCase assert_equal("Format with any!", email.parts[1].body.encoded) end + test "explicit multipart with options" do + email = BaseMailer.custom_block(true).deliver + assert_equal(2, email.parts.size) + assert_equal("multipart/alternate", email.mime_type) + assert_equal("text/plain", email.parts[0].mime_type) + assert_equal("base64", email.parts[0].content_transfer_encoding) + assert_equal("text/html", email.parts[1].mime_type) + assert_equal("7bit", email.parts[1].content_transfer_encoding) + end + + test "explicit multipart with one part is rendered as body" do + email = BaseMailer.custom_block.deliver + assert_equal(0, email.parts.size) + assert_equal("text/plain", email.mime_type) + assert_equal("base64", email.content_transfer_encoding) + end + # Class level API with method missing test "should respond to action methods" do assert BaseMailer.respond_to?(:welcome) diff --git a/actionmailer/test/mail_test.rb b/actionmailer/test/mail_test.rb deleted file mode 100644 index f18dfdc156..0000000000 --- a/actionmailer/test/mail_test.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'abstract_unit' - -class MailTest < Test::Unit::TestCase - def test_body - m = Mail.new - expected = 'something_with_underscores' - m.content_transfer_encoding = 'quoted-printable' - quoted_body = [expected].pack('*M') - m.body = quoted_body - assert_equal "something_with_underscores=\r\n", m.body.encoded - assert_equal expected, m.body.to_s - end - - def test_nested_attachments_are_recognized_correctly - fixture = File.read("#{File.dirname(__FILE__)}/fixtures/raw_email_with_nested_attachment") - mail = Mail.new(fixture) - assert_equal 2, mail.attachments.length - assert_equal "image/png", mail.attachments.first.mime_type - assert_equal 1902, mail.attachments.first.decoded.length - assert_equal "application/pkcs7-signature", mail.attachments.last.mime_type - end -end -- cgit v1.2.3 From 74a5889abef1212d373ea994f1c93daedee8932c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Tue, 26 Jan 2010 11:49:32 +1100 Subject: Refactor content type setting, added tests to ensure boundary exists on multipart and fixed typo --- actionmailer/lib/action_mailer/base.rb | 31 ++++++++++++++++++++++--------- actionmailer/test/base_test.rb | 23 ++++++++++++++--------- 2 files changed, 36 insertions(+), 18 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 6c70ce8998..782e9d2c46 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -49,7 +49,7 @@ module ActionMailer #:nodoc: # # The mail method, if not passed a block, will inspect your views and send all the views with # the same name as the method, so the above action would send the +welcome.plain.erb+ view file - # as well as the +welcome.html.erb+ view file in a +multipart/alternate+ email. + # as well as the +welcome.html.erb+ view file in a +multipart/alternative+ email. # # If you want to explicitly render only certain templates, pass a block: # @@ -162,7 +162,7 @@ module ActionMailer #:nodoc: # # Which will (if it had both a .text.erb and .html.erb tempalte in the view # directory), send a complete multipart/mixed email with two parts, the first part being - # a multipart/alternate with the text and HTML email parts inside, and the second being + # a multipart/alternative with the text and HTML email parts inside, and the second being # a application/pdf with a Base64 encoded copy of the file.pdf book with the filename # +free_book.pdf+. # @@ -445,7 +445,7 @@ module ActionMailer #:nodoc: # format.html { render :text => "

Hello Mikel!

" } # end # - # Which will render a multipart/alternate email with text/plain and + # Which will render a multipart/alternative email with text/plain and # text/html parts. def mail(headers={}, &block) # Guard flag to prevent both the old and the new API from firing @@ -465,10 +465,11 @@ module ActionMailer #:nodoc: # Render the templates and blocks responses, sort_order = collect_responses_and_sort_order(headers, &block) - content_type ||= create_parts_from_responses(m, responses, charset) + + create_parts_from_responses(m, responses, charset) # Tidy up content type, charset, mime version and sort order - m.content_type = content_type + m.content_type = set_content_type(m, content_type) m.charset = charset m.mime_version = mime_version sort_order = headers[:parts_order] || sort_order || self.class.default_implicit_parts_order.dup @@ -485,6 +486,20 @@ module ActionMailer #:nodoc: protected + def set_content_type(m, user_content_type) + params = m.content_type_parameters || {} + case + when user_content_type.present? + user_content_type + when m.has_attachments? + ["multipart", "mixed", params] + when m.multipart? + ["multipart", "alternative", params] + else + self.class.default_content_type.dup + end + end + def default_subject #:nodoc: mailer_scope = self.class.mailer_name.gsub('/', '.') I18n.t(:subject, :scope => [:actionmailer, mailer_scope, action_name], :default => action_name.humanize) @@ -543,16 +558,14 @@ module ActionMailer #:nodoc: if responses.size == 1 && !m.has_attachments? m.body = responses[0][:body] return responses[0][:content_type] - elsif responses.size > 1 && m.has_attachments? + elsif responses.size > 1 && m.has_attachments? container = Mail::Part.new - container.content_type = "multipart/alternate" + container.content_type = "multipart/alternative" responses.each { |r| insert_part(container, r, charset) } m.add_part(container) else responses.each { |r| insert_part(m, r, charset) } end - - m.has_attachments? ? "multipart/mixed" : "multipart/alternate" end def insert_part(container, response, charset) #:nodoc: diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 0705f22df8..14feef5a00 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -200,7 +200,7 @@ class BaseTest < ActiveSupport::TestCase test "implicit multipart" do email = BaseMailer.implicit_multipart.deliver assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) + assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) assert_equal("TEXT Implicit Multipart", email.parts[0].body.encoded) assert_equal("text/html", email.parts[1].mime_type) @@ -223,7 +223,7 @@ class BaseTest < ActiveSupport::TestCase test "implicit multipart with attachments creates nested parts" do email = BaseMailer.implicit_multipart(:attachments => true).deliver assert_equal("application/pdf", email.parts[0].mime_type) - assert_equal("multipart/alternate", email.parts[1].mime_type) + assert_equal("multipart/alternative", email.parts[1].mime_type) assert_equal("text/plain", email.parts[1].parts[0].mime_type) assert_equal("TEXT Implicit Multipart", email.parts[1].parts[0].body.encoded) assert_equal("text/html", email.parts[1].parts[1].mime_type) @@ -235,7 +235,7 @@ class BaseTest < ActiveSupport::TestCase swap BaseMailer, :default_implicit_parts_order => order do email = BaseMailer.implicit_multipart(:attachments => true).deliver assert_equal("application/pdf", email.parts[0].mime_type) - assert_equal("multipart/alternate", email.parts[1].mime_type) + assert_equal("multipart/alternative", email.parts[1].mime_type) assert_equal("text/plain", email.parts[1].parts[1].mime_type) assert_equal("text/html", email.parts[1].parts[0].mime_type) end @@ -244,7 +244,7 @@ class BaseTest < ActiveSupport::TestCase test "implicit multipart with default locale" do email = BaseMailer.implicit_with_locale.deliver assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) + assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) assert_equal("Implicit with locale TEXT", email.parts[0].body.encoded) assert_equal("text/html", email.parts[1].mime_type) @@ -255,7 +255,7 @@ class BaseTest < ActiveSupport::TestCase swap I18n, :locale => :pl do email = BaseMailer.implicit_with_locale.deliver assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) + assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) assert_equal("Implicit with locale PL TEXT", email.parts[0].body.encoded) assert_equal("text/html", email.parts[1].mime_type) @@ -287,7 +287,7 @@ class BaseTest < ActiveSupport::TestCase test "explicit multipart" do email = BaseMailer.explicit_multipart.deliver assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) + assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) assert_equal("TEXT Explicit Multipart", email.parts[0].body.encoded) assert_equal("text/html", email.parts[1].mime_type) @@ -310,7 +310,7 @@ class BaseTest < ActiveSupport::TestCase test "explicit multipart with attachments creates nested parts" do email = BaseMailer.explicit_multipart(:attachments => true).deliver assert_equal("application/pdf", email.parts[0].mime_type) - assert_equal("multipart/alternate", email.parts[1].mime_type) + assert_equal("multipart/alternative", email.parts[1].mime_type) assert_equal("text/plain", email.parts[1].parts[0].mime_type) assert_equal("TEXT Explicit Multipart", email.parts[1].parts[0].body.encoded) assert_equal("text/html", email.parts[1].parts[1].mime_type) @@ -320,7 +320,7 @@ class BaseTest < ActiveSupport::TestCase test "explicit multipart with templates" do email = BaseMailer.explicit_multipart_templates.deliver assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) + assert_equal("multipart/alternative", email.mime_type) assert_equal("text/html", email.parts[0].mime_type) assert_equal("HTML Explicit Multipart Templates", email.parts[0].body.encoded) assert_equal("text/plain", email.parts[1].mime_type) @@ -330,7 +330,7 @@ class BaseTest < ActiveSupport::TestCase test "explicit multipart with any" do email = BaseMailer.explicit_multipart_with_any.deliver assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) + assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) assert_equal("Format with any!", email.parts[0].body.encoded) assert_equal("text/html", email.parts[1].mime_type) @@ -370,6 +370,11 @@ class BaseTest < ActiveSupport::TestCase BaseMailer.expects(:welcome).returns(mail) BaseMailer.welcome.deliver end + + test "explicit multipart should be multipart" do + mail = BaseMailer.explicit_multipart + assert_not_nil(mail.content_type_parameters[:boundary]) + end protected -- cgit v1.2.3 From c02391f8f97182e818d22a0f0ec4a5589d2fff15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Tue, 26 Jan 2010 01:54:23 +0100 Subject: Fix small typo. --- actionmailer/test/base_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 83707137e1..4b8427fb92 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -347,7 +347,7 @@ class BaseTest < ActiveSupport::TestCase test "explicit multipart with options" do email = BaseMailer.custom_block(true).deliver assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) + assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) assert_equal("base64", email.parts[0].content_transfer_encoding) assert_equal("text/html", email.parts[1].mime_type) -- cgit v1.2.3 From 64f8c87b1dab9bc9b6324fd6a3d77945f4b62821 Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Mon, 25 Jan 2010 17:55:54 -0800 Subject: Fix AR's rake tasks to work with the Rails::Application refactor --- activerecord/lib/active_record/railties/databases.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 88974dd786..2ef8676f39 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -1,7 +1,7 @@ namespace :db do task :load_config => :rails_env do require 'active_record' - ActiveRecord::Base.configurations = Rails::Configuration.new.database_configuration + ActiveRecord::Base.configurations = Rails::Application.config.database_configuration end namespace :create do -- cgit v1.2.3 From c5b652f3d25ef92ae0f67551464fb03bda6aeb4f Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Sat, 23 Jan 2010 20:16:29 -0600 Subject: PostgreSQLAdapter: set time_zone to UTC when Base.default_timezone == :utc so that Postgres doesn't incorrectly offset-adjust values inserted into TIMESTAMP WITH TIME ZONE columns [#3777 state:resolved] --- activerecord/CHANGELOG | 2 ++ .../connection_adapters/postgresql_adapter.rb | 6 +++- .../test/cases/datatype_test_postgresql.rb | 39 ++++++++++++++++++++++ .../test/schema/postgresql_specific_schema.rb | 9 ++++- 4 files changed, 54 insertions(+), 2 deletions(-) diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index ffff0b7e09..a4fa000964 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *Edge* +* PostgreSQLAdapter: set time_zone to UTC when Base.default_timezone == :utc so that Postgres doesn't incorrectly offset-adjust values inserted into TIMESTAMP WITH TIME ZONE columns. #3777 [Jack Christensen] + * Allow relations to be used as scope. class Item diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 1d52c5ec14..b3ce8c79dd 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -998,7 +998,7 @@ module ActiveRecord configure_connection end - # Configures the encoding, verbosity, and schema search path of the connection. + # Configures the encoding, verbosity, schema search path, and time zone of the connection. # This is called by #connect and should not be called manually. def configure_connection if @config[:encoding] @@ -1010,6 +1010,10 @@ module ActiveRecord end self.client_min_messages = @config[:min_messages] if @config[:min_messages] self.schema_search_path = @config[:schema_search_path] || @config[:schema_order] + + # If using ActiveRecord's time zone support configure the connection to return + # TIMESTAMP WITH ZONE types in UTC. + execute("SET time zone 'UTC'") if ActiveRecord::Base.default_timezone == :utc end # Returns the current ID of a table's sequence. diff --git a/activerecord/test/cases/datatype_test_postgresql.rb b/activerecord/test/cases/datatype_test_postgresql.rb index 88fb6f7384..9454b6e059 100644 --- a/activerecord/test/cases/datatype_test_postgresql.rb +++ b/activerecord/test/cases/datatype_test_postgresql.rb @@ -21,6 +21,9 @@ end class PostgresqlOid < ActiveRecord::Base end +class PostgresqlTimestampWithZone < ActiveRecord::Base +end + class PostgresqlDataTypeTest < ActiveRecord::TestCase self.use_transactional_fixtures = false @@ -50,6 +53,8 @@ class PostgresqlDataTypeTest < ActiveRecord::TestCase @connection.execute("INSERT INTO postgresql_oids (obj_id) VALUES (1234)") @first_oid = PostgresqlOid.find(1) + + @connection.execute("INSERT INTO postgresql_timestamp_with_zones (time) VALUES ('2010-01-01 10:00:00-1')") end def test_data_type_of_array_types @@ -201,4 +206,38 @@ class PostgresqlDataTypeTest < ActiveRecord::TestCase assert @first_oid.reload assert_equal @first_oid.obj_id, new_value end + + def test_timestamp_with_zone_values_with_rails_time_zone_support + old_tz = ActiveRecord::Base.time_zone_aware_attributes + old_default_tz = ActiveRecord::Base.default_timezone + + ActiveRecord::Base.time_zone_aware_attributes = true + ActiveRecord::Base.default_timezone = :utc + + @connection.reconnect! + + @first_timestamp_with_zone = PostgresqlTimestampWithZone.find(1) + assert_equal Time.utc(2010,1,1, 11,0,0), @first_timestamp_with_zone.time + ensure + ActiveRecord::Base.default_timezone = old_default_tz + ActiveRecord::Base.time_zone_aware_attributes = old_tz + @connection.reconnect! + end + + def test_timestamp_with_zone_values_without_rails_time_zone_support + old_tz = ActiveRecord::Base.time_zone_aware_attributes + old_default_tz = ActiveRecord::Base.default_timezone + + ActiveRecord::Base.time_zone_aware_attributes = false + ActiveRecord::Base.default_timezone = :local + + @connection.reconnect! + + @first_timestamp_with_zone = PostgresqlTimestampWithZone.find(1) + assert_equal Time.utc(2010,1,1, 11,0,0), @first_timestamp_with_zone.time + ensure + ActiveRecord::Base.default_timezone = old_default_tz + ActiveRecord::Base.time_zone_aware_attributes = old_tz + @connection.reconnect! + end end diff --git a/activerecord/test/schema/postgresql_specific_schema.rb b/activerecord/test/schema/postgresql_specific_schema.rb index 3d8911bfe9..065d8cfe98 100644 --- a/activerecord/test/schema/postgresql_specific_schema.rb +++ b/activerecord/test/schema/postgresql_specific_schema.rb @@ -1,7 +1,7 @@ ActiveRecord::Schema.define do %w(postgresql_arrays postgresql_moneys postgresql_numbers postgresql_times postgresql_network_addresses postgresql_bit_strings - postgresql_oids postgresql_xml_data_type defaults geometrics).each do |table_name| + postgresql_oids postgresql_xml_data_type defaults geometrics postgresql_timestamp_with_zones).each do |table_name| execute "DROP TABLE IF EXISTS #{quote_table_name table_name}" end @@ -100,6 +100,13 @@ _SQL obj_id OID ); _SQL + + execute <<_SQL + CREATE TABLE postgresql_timestamp_with_zones ( + id SERIAL PRIMARY KEY, + time TIMESTAMP WITH TIME ZONE + ); +_SQL begin execute <<_SQL -- cgit v1.2.3 From 0b05acd42439b197f71e168354020393cbf42b4f Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Tue, 26 Jan 2010 17:08:55 +1100 Subject: Implementing class level :defaults hash, instead of delivers_from et al --- actionmailer/lib/action_mailer/base.rb | 39 ++++++++++++++++++++++------------ actionmailer/test/base_test.rb | 26 ++++++++++++++++++++--- 2 files changed, 49 insertions(+), 16 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 44df30b1ba..5adf4973b5 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -254,8 +254,8 @@ module ActionMailer #:nodoc: private_class_method :new #:nodoc: - extlib_inheritable_accessor :default_from - self.default_from = nil + extlib_inheritable_accessor :defaults + self.defaults = {} extlib_inheritable_accessor :default_charset self.default_charset = "utf-8" @@ -276,18 +276,13 @@ module ActionMailer #:nodoc: self.default_implicit_parts_order = [ "text/plain", "text/enriched", "text/html" ] class << self + def mailer_name @mailer_name ||= name.underscore end attr_writer :mailer_name alias :controller_path :mailer_name - # Sets who is the default sender for the e-mail - def delivers_from(value = nil) - self.default_from = value if value - self.default_from - end - # Receives a raw email, parses it into an email object, decodes it, # instantiates a new mailer, and passes the email object to the mailer # object's +receive+ method. If you want your mailer to be able to @@ -419,8 +414,7 @@ module ActionMailer #:nodoc: # humanized version of the action_name # * :to - Who the message is destined for, can be a string of addresses, or an array # of addresses. - # * :from - Who the message is from, if missing, will use the :delivers_from - # value in the class (if it exists) + # * :from - Who the message is from # * :cc - Who you would like to Carbon-Copy on this email, can be a string of addresses, # or an array of addresses. # * :bcc - Who you would like to Blind-Carbon-Copy on this email, can be a string of @@ -428,6 +422,15 @@ module ActionMailer #:nodoc: # * :reply_to - Who to set the Reply-To header of the email to. # * :date - The date to say the email was sent on. # + # You can set default values for any of the above headers (except :date) by using the defaults + # class method: + # + # class Notifier + # self.defaults = {:from => 'no-reply@test.lindsaar.net', + # :bcc => 'email_logger@test.lindsaar.net', + # :reply_to => 'bounces@test.lindsaar.net' } + # end + # # If you need other headers not listed above, use the headers['name'] = value method. # # When a :return_path is specified as header, that value will be used as the 'envelope from' @@ -478,8 +481,8 @@ module ActionMailer #:nodoc: mime_version = headers[:mime_version] || m.mime_version || self.class.default_mime_version.dup # Set fields quotings - headers[:subject] ||= default_subject - headers[:from] ||= self.class.default_from.dup + headers = set_defaults(headers) + quote_fields!(headers, charset) # Render the templates and blocks @@ -519,9 +522,19 @@ module ActionMailer #:nodoc: end end + def set_defaults(headers) + headers[:subject] ||= default_subject + headers[:to] ||= self.class.defaults[:to].to_s.dup + headers[:from] ||= self.class.defaults[:from].to_s.dup + headers[:cc] ||= self.class.defaults[:cc].to_s.dup + headers[:bcc] ||= self.class.defaults[:bcc].to_s.dup + headers[:reply_to] ||= self.class.defaults[:reply_to].to_s.dup + headers + end + def default_subject #:nodoc: mailer_scope = self.class.mailer_name.gsub('/', '.') - I18n.t(:subject, :scope => [:actionmailer, mailer_scope, action_name], :default => action_name.humanize) + self.class.defaults[:subject] || I18n.t(:subject, :scope => [:actionmailer, mailer_scope, action_name], :default => action_name.humanize) end # TODO: Move this into Mail diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 4b8427fb92..8a54455633 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -8,9 +8,18 @@ class BaseTest < ActiveSupport::TestCase } class BaseMailer < ActionMailer::Base - delivers_from 'jose@test.plataformatec.com' + + self.defaults = {:to => 'system@test.lindsaar.net', + :from => 'jose@test.plataformatec.com', + :reply_to => 'mikel@test.lindsaar.net', + :subject => 'Default Subject!'} + self.mailer_name = "base_mailer" + def empty(hash = {}) + mail(hash) + end + def welcome(hash = {}) headers['X-SPAM'] = "Not SPAM" mail(DEFAULT_HEADERS.merge(hash)) @@ -77,9 +86,19 @@ class BaseTest < ActiveSupport::TestCase assert_equal(email.subject, 'The first email on new API!') end + test "mail() should pull the defaults from the class if nothing is specified" do + email = BaseMailer.empty.deliver + assert_equal(['system@test.lindsaar.net'], email.to) + assert_equal(['jose@test.plataformatec.com'], email.from) + assert_equal(['mikel@test.lindsaar.net'], email.reply_to) + assert_equal('Default Subject!', email.subject) + end + test "mail() with from overwrites the class level default" do - email = BaseMailer.welcome(:from => 'someone@else.com').deliver - assert_equal(email.from, ['someone@else.com']) + email = BaseMailer.welcome(:from => 'someone@example.com', + :to => 'another@example.org').deliver + assert_equal(['someone@example.com'], email.from) + assert_equal(['another@example.org'], email.to) end test "mail() with bcc, cc, content_type, charset, mime_version, reply_to and date" do @@ -195,6 +214,7 @@ class BaseTest < ActiveSupport::TestCase end test "subject gets default from I18n" do + BaseMailer.defaults[:subject] = nil email = BaseMailer.welcome(:subject => nil).deliver assert_equal "Welcome", email.subject -- cgit v1.2.3 From e297eed4f21a57234ea28fe3dc9265ed8793dba1 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Tue, 26 Jan 2010 17:11:36 +1100 Subject: Fixing up expectations in base_test.rb --- actionmailer/test/base_test.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 8a54455633..20a35ddc73 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -81,9 +81,9 @@ class BaseTest < ActiveSupport::TestCase # Basic mail usage without block test "mail() should set the headers of the mail message" do email = BaseMailer.welcome.deliver - assert_equal(email.to, ['mikel@test.lindsaar.net']) - assert_equal(email.from, ['jose@test.plataformatec.com']) - assert_equal(email.subject, 'The first email on new API!') + assert_equal(['mikel@test.lindsaar.net'], email.to) + assert_equal(['jose@test.plataformatec.com'], email.from) + assert_equal('The first email on new API!', email.subject) end test "mail() should pull the defaults from the class if nothing is specified" do @@ -110,13 +110,13 @@ class BaseTest < ActiveSupport::TestCase :mime_version => '2.0', :reply_to => 'reply-to@test.lindsaar.net', :date => @time).deliver - assert_equal(email.bcc, ['bcc@test.lindsaar.net']) - assert_equal(email.cc, ['cc@test.lindsaar.net']) - assert_equal(email.content_type, 'multipart/mixed') - assert_equal(email.charset, 'iso-8559-1') - assert_equal(email.mime_version, '2.0') - assert_equal(email.reply_to, ['reply-to@test.lindsaar.net']) - assert_equal(email.date, @time) + assert_equal(['bcc@test.lindsaar.net'], email.bcc) + assert_equal(['cc@test.lindsaar.net'], email.cc) + assert_equal('multipart/mixed', email.content_type) + assert_equal('iso-8559-1', email.charset) + assert_equal('2.0', email.mime_version) + assert_equal(['reply-to@test.lindsaar.net'], email.reply_to) + assert_equal(@time, email.date) end test "mail() renders the template using the method being processed" do -- cgit v1.2.3 From b8c82edc1f5b95bceea3d40de778ec0cd5a37d15 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Tue, 26 Jan 2010 18:59:52 +1100 Subject: Updating generators for mailer to reflect changes in API --- railties/lib/generators/rails/mailer/templates/mailer.rb | 4 ++-- railties/test/generators/mailer_generator_test.rb | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/railties/lib/generators/rails/mailer/templates/mailer.rb b/railties/lib/generators/rails/mailer/templates/mailer.rb index 1685b73633..df9d0a0923 100644 --- a/railties/lib/generators/rails/mailer/templates/mailer.rb +++ b/railties/lib/generators/rails/mailer/templates/mailer.rb @@ -1,5 +1,5 @@ class <%= class_name %> < ActionMailer::Base - delivers_from "from@example.com" + self.defaults = { :from => "from@example.com" } <% for action in actions -%> # Subject can be set in your I18n file at config/locales/en.yml @@ -9,7 +9,7 @@ class <%= class_name %> < ActionMailer::Base # def <%= action %> @greeting = "Hi" - mail(:to => "to@example.com") + mail(:to => "to@example.org") end <% end -%> end \ No newline at end of file diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb index 99ce53323e..e585298a93 100644 --- a/railties/test/generators/mailer_generator_test.rb +++ b/railties/test/generators/mailer_generator_test.rb @@ -9,7 +9,7 @@ class MailerGeneratorTest < Rails::Generators::TestCase run_generator assert_file "app/mailers/notifier.rb" do |mailer| assert_match /class Notifier < ActionMailer::Base/, mailer - assert_match /delivers_from "from@example.com"/, mailer + assert_match /self\.defaults\ =\ \{\ :from\ =>\ "from@example\.com"\ \}/, mailer end end @@ -61,12 +61,12 @@ class MailerGeneratorTest < Rails::Generators::TestCase assert_file "app/mailers/notifier.rb" do |mailer| assert_instance_method :foo, mailer do |foo| - assert_match /mail\(:to => "to@example.com"\)/, foo + assert_match /mail\(:to => "to@example.org"\)/, foo assert_match /@greeting = "Hi"/, foo end assert_instance_method :bar, mailer do |bar| - assert_match /mail\(:to => "to@example.com"\)/, bar + assert_match /mail\(:to => "to@example.org"\)/, bar assert_match /@greeting = "Hi"/, bar end end -- cgit v1.2.3 From 9dd65c368b40093cfc686956a48c18b78abacf7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Tue, 26 Jan 2010 11:21:20 +0100 Subject: Make defaults accept a hash. --- actionmailer/lib/action_mailer/base.rb | 78 ++++++++++++++++--------------- actionmailer/test/base_test.rb | 85 +++++++++++++++++----------------- 2 files changed, 84 insertions(+), 79 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 5adf4973b5..dbaf1424ed 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -254,8 +254,13 @@ module ActionMailer #:nodoc: private_class_method :new #:nodoc: - extlib_inheritable_accessor :defaults - self.defaults = {} + extlib_inheritable_accessor :default_params + self.default_params = { + :mime_version => "1.0", + :charset => "utf-8", + :content_type => "text/plain", + :parts_order => [ "text/plain", "text/enriched", "text/html" ] + } extlib_inheritable_accessor :default_charset self.default_charset = "utf-8" @@ -283,6 +288,11 @@ module ActionMailer #:nodoc: attr_writer :mailer_name alias :controller_path :mailer_name + def defaults(value=nil) + self.default_params.merge!(value) if value + self.default_params + end + # Receives a raw email, parses it into an email object, decodes it, # instantiates a new mailer, and passes the email object to the mailer # object's +receive+ method. If you want your mailer to be able to @@ -425,10 +435,10 @@ module ActionMailer #:nodoc: # You can set default values for any of the above headers (except :date) by using the defaults # class method: # - # class Notifier - # self.defaults = {:from => 'no-reply@test.lindsaar.net', - # :bcc => 'email_logger@test.lindsaar.net', - # :reply_to => 'bounces@test.lindsaar.net' } + # class Notifier < ActionMailer::Base + # self.defaults :from => 'no-reply@test.lindsaar.net', + # :bcc => 'email_logger@test.lindsaar.net', + # :reply_to => 'bounces@test.lindsaar.net' # end # # If you need other headers not listed above, use the headers['name'] = value method. @@ -475,40 +485,46 @@ module ActionMailer #:nodoc: @mail_was_called = true m = @_message - # Give preference to headers and fallback to the ones set in mail - content_type = headers[:content_type] || m.content_type - charset = headers[:charset] || m.charset || self.class.default_charset.dup - mime_version = headers[:mime_version] || m.mime_version || self.class.default_mime_version.dup + # At the beginning, do not consider class default for parts order neither content_type + content_type = headers[:content_type] + parts_order = headers[:parts_order] - # Set fields quotings - headers = set_defaults(headers) + # Merge defaults from class + headers = headers.reverse_merge(self.class.defaults) + charset = headers[:charset] + # Quote fields + headers[:subject] ||= default_i18n_subject quote_fields!(headers, charset) # Render the templates and blocks - responses, sort_order = collect_responses_and_sort_order(headers, &block) - + responses, explicit_order = collect_responses_and_sort_order(headers, &block) create_parts_from_responses(m, responses, charset) - # Tidy up content type, charset, mime version and sort order - m.content_type = set_content_type(m, content_type) + # Finally setup content type and parts order + m.content_type = set_content_type(m, content_type, headers[:content_type]) m.charset = charset - m.mime_version = mime_version - sort_order = headers[:parts_order] || sort_order || self.class.default_implicit_parts_order.dup if m.multipart? - m.body.set_sort_order(sort_order) + parts_order ||= explicit_order || headers[:parts_order] + m.body.set_sort_order(parts_order) m.body.sort_parts! end - # Finaly set delivery behavior configured in class + # Set configure delivery behavior wrap_delivery_behavior!(headers[:delivery_method]) + + # Remove headers already treated and assign all others + headers.except!(:subject, :to, :from, :cc, :bcc, :reply_to) + headers.except!(:body, :parts_order, :content_type, :charset, :delivery_method) + headers.each { |k, v| m[k] = v } + m end protected - def set_content_type(m, user_content_type) + def set_content_type(m, user_content_type, class_default) params = m.content_type_parameters || {} case when user_content_type.present? @@ -518,23 +534,13 @@ module ActionMailer #:nodoc: when m.multipart? ["multipart", "alternative", params] else - self.class.default_content_type.dup + class_default end end - def set_defaults(headers) - headers[:subject] ||= default_subject - headers[:to] ||= self.class.defaults[:to].to_s.dup - headers[:from] ||= self.class.defaults[:from].to_s.dup - headers[:cc] ||= self.class.defaults[:cc].to_s.dup - headers[:bcc] ||= self.class.defaults[:bcc].to_s.dup - headers[:reply_to] ||= self.class.defaults[:reply_to].to_s.dup - headers - end - - def default_subject #:nodoc: + def default_i18n_subject #:nodoc: mailer_scope = self.class.mailer_name.gsub('/', '.') - self.class.defaults[:subject] || I18n.t(:subject, :scope => [:actionmailer, mailer_scope, action_name], :default => action_name.humanize) + I18n.t(:subject, :scope => [:actionmailer, mailer_scope, action_name], :default => action_name.humanize) end # TODO: Move this into Mail @@ -546,7 +552,6 @@ module ActionMailer #:nodoc: m.cc ||= quote_address_if_necessary(headers[:cc], charset) if headers[:cc] m.bcc ||= quote_address_if_necessary(headers[:bcc], charset) if headers[:bcc] m.reply_to ||= quote_address_if_necessary(headers[:reply_to], charset) if headers[:reply_to] - m.date ||= headers[:date] if headers[:date] end def collect_responses_and_sort_order(headers) #:nodoc: @@ -588,8 +593,7 @@ module ActionMailer #:nodoc: def create_parts_from_responses(m, responses, charset) #:nodoc: if responses.size == 1 && !m.has_attachments? - headers = responses[0] - headers.each { |k,v| m[k] = v } + responses[0].each { |k,v| m[k] = v } return responses[0][:content_type] elsif responses.size > 1 && m.has_attachments? container = Mail::Part.new diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 20a35ddc73..7abdf7f4f8 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -2,72 +2,61 @@ require 'abstract_unit' class BaseTest < ActiveSupport::TestCase - DEFAULT_HEADERS = { - :to => 'mikel@test.lindsaar.net', - :subject => 'The first email on new API!' - } - class BaseMailer < ActionMailer::Base - - self.defaults = {:to => 'system@test.lindsaar.net', - :from => 'jose@test.plataformatec.com', - :reply_to => 'mikel@test.lindsaar.net', - :subject => 'Default Subject!'} - self.mailer_name = "base_mailer" - def empty(hash = {}) - mail(hash) - end + self.defaults :to => 'system@test.lindsaar.net', + :from => 'jose@test.plataformatec.com', + :reply_to => 'mikel@test.lindsaar.net' def welcome(hash = {}) headers['X-SPAM'] = "Not SPAM" - mail(DEFAULT_HEADERS.merge(hash)) + mail({:subject => "The first email on new API!"}.merge!(hash)) end def attachment_with_content(hash = {}) attachments['invoice.pdf'] = 'This is test File content' - mail(DEFAULT_HEADERS.merge(hash)) + mail(hash) end def attachment_with_hash attachments['invoice.jpg'] = { :data => "you smiling", :mime_type => "image/x-jpg", :transfer_encoding => "base64" } - mail(DEFAULT_HEADERS) + mail end def implicit_multipart(hash = {}) attachments['invoice.pdf'] = 'This is test File content' if hash.delete(:attachments) - mail(DEFAULT_HEADERS.merge(hash)) + mail(hash) end def implicit_with_locale(hash = {}) - mail(DEFAULT_HEADERS.merge(hash)) + mail(hash) end def explicit_multipart(hash = {}) attachments['invoice.pdf'] = 'This is test File content' if hash.delete(:attachments) - mail(DEFAULT_HEADERS.merge(hash)) do |format| + mail(hash) do |format| format.text { render :text => "TEXT Explicit Multipart" } format.html { render :text => "HTML Explicit Multipart" } end end def explicit_multipart_templates(hash = {}) - mail(DEFAULT_HEADERS.merge(hash)) do |format| + mail(hash) do |format| format.html format.text end end def explicit_multipart_with_any(hash = {}) - mail(DEFAULT_HEADERS.merge(hash)) do |format| + mail(hash) do |format| format.any(:text, :html){ render :text => "Format with any!" } end end def custom_block(include_html=false) - mail(DEFAULT_HEADERS) do |format| + mail do |format| format.text(:content_transfer_encoding => "base64"){ render "welcome" } format.html{ render "welcome" } if include_html end @@ -81,19 +70,11 @@ class BaseTest < ActiveSupport::TestCase # Basic mail usage without block test "mail() should set the headers of the mail message" do email = BaseMailer.welcome.deliver - assert_equal(['mikel@test.lindsaar.net'], email.to) + assert_equal(['system@test.lindsaar.net'], email.to) assert_equal(['jose@test.plataformatec.com'], email.from) assert_equal('The first email on new API!', email.subject) end - test "mail() should pull the defaults from the class if nothing is specified" do - email = BaseMailer.empty.deliver - assert_equal(['system@test.lindsaar.net'], email.to) - assert_equal(['jose@test.plataformatec.com'], email.from) - assert_equal(['mikel@test.lindsaar.net'], email.reply_to) - assert_equal('Default Subject!', email.subject) - end - test "mail() with from overwrites the class level default" do email = BaseMailer.welcome(:from => 'someone@example.com', :to => 'another@example.org').deliver @@ -184,7 +165,7 @@ class BaseTest < ActiveSupport::TestCase # Defaults values test "uses default charset from class" do - swap BaseMailer, :default_charset => "US-ASCII" do + with_default BaseMailer, :charset => "US-ASCII" do email = BaseMailer.welcome.deliver assert_equal("US-ASCII", email.charset) @@ -194,7 +175,7 @@ class BaseTest < ActiveSupport::TestCase end test "uses default content type from class" do - swap BaseMailer, :default_content_type => "text/html" do + with_default BaseMailer, :content_type => "text/html" do email = BaseMailer.welcome.deliver assert_equal("text/html", email.mime_type) @@ -204,7 +185,7 @@ class BaseTest < ActiveSupport::TestCase end test "uses default mime version from class" do - swap BaseMailer, :default_mime_version => "2.0" do + with_default BaseMailer, :mime_version => "2.0" do email = BaseMailer.welcome.deliver assert_equal("2.0", email.mime_version) @@ -213,6 +194,13 @@ class BaseTest < ActiveSupport::TestCase end end + test "uses default headers from class" do + with_default BaseMailer, "X-SPAM" => "Not spam" do + email = BaseMailer.welcome.deliver + assert_equal("Not spam", email["X-SPAM"].decoded) + end + end + test "subject gets default from I18n" do BaseMailer.defaults[:subject] = nil email = BaseMailer.welcome(:subject => nil).deliver @@ -236,7 +224,7 @@ class BaseTest < ActiveSupport::TestCase test "implicit multipart with sort order" do order = ["text/html", "text/plain"] - swap BaseMailer, :default_implicit_parts_order => order do + with_default BaseMailer, :parts_order => order do email = BaseMailer.implicit_multipart.deliver assert_equal("text/html", email.parts[0].mime_type) assert_equal("text/plain", email.parts[1].mime_type) @@ -259,7 +247,7 @@ class BaseTest < ActiveSupport::TestCase test "implicit multipart with attachments and sort order" do order = ["text/html", "text/plain"] - swap BaseMailer, :default_implicit_parts_order => order do + with_default BaseMailer, :parts_order => order do email = BaseMailer.implicit_multipart(:attachments => true).deliver assert_equal("application/pdf", email.parts[0].mime_type) assert_equal("multipart/alternative", email.parts[1].mime_type) @@ -323,7 +311,7 @@ class BaseTest < ActiveSupport::TestCase test "explicit multipart does not sort order" do order = ["text/html", "text/plain"] - swap BaseMailer, :default_implicit_parts_order => order do + with_default BaseMailer, :parts_order => order do email = BaseMailer.explicit_multipart.deliver assert_equal("text/plain", email.parts[0].mime_type) assert_equal("text/html", email.parts[1].mime_type) @@ -424,17 +412,30 @@ class BaseTest < ActiveSupport::TestCase # Execute the block setting the given values and restoring old values after # the block is executed. - def swap(object, new_values) + def swap(klass, new_values) old_values = {} new_values.each do |key, value| - old_values[key] = object.send key - object.send :"#{key}=", value + old_values[key] = klass.send key + klass.send :"#{key}=", value end yield ensure old_values.each do |key, value| - object.send :"#{key}=", value + klass.send :"#{key}=", value end end + def with_default(klass, new_values) + hash = klass.defaults + old_values = {} + new_values.each do |key, value| + old_values[key] = hash[key] + hash[key] = value + end + yield + ensure + old_values.each do |key, value| + hash[key] = value + end + end end \ No newline at end of file -- cgit v1.2.3 From 39a1b06f13221e00ab38dff960155cb5fe9eaabb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Tue, 26 Jan 2010 11:46:42 +0100 Subject: Deprecate old defaults API. --- actionmailer/lib/action_mailer/base.rb | 31 +++++----------------- actionmailer/lib/action_mailer/delivery_methods.rb | 5 +++- actionmailer/lib/action_mailer/deprecated_api.rb | 29 ++++++++++++++++++-- actionmailer/lib/action_mailer/old_api.rb | 10 ++++--- 4 files changed, 43 insertions(+), 32 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index dbaf1424ed..95c45ec54b 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -262,24 +262,6 @@ module ActionMailer #:nodoc: :parts_order => [ "text/plain", "text/enriched", "text/html" ] } - extlib_inheritable_accessor :default_charset - self.default_charset = "utf-8" - - extlib_inheritable_accessor :default_content_type - self.default_content_type = "text/plain" - - extlib_inheritable_accessor :default_mime_version - self.default_mime_version = "1.0" - - # This specifies the order that the parts of a multipart email will be. Usually you put - # text/plain at the top so someone without a MIME capable email reader can read the plain - # text of your email first. - # - # Any content type that is not listed here will be inserted in the order you add them to - # the email after the content types you list here. - extlib_inheritable_accessor :default_implicit_parts_order - self.default_implicit_parts_order = [ "text/plain", "text/enriched", "text/html" ] - class << self def mailer_name @@ -498,7 +480,7 @@ module ActionMailer #:nodoc: quote_fields!(headers, charset) # Render the templates and blocks - responses, explicit_order = collect_responses_and_sort_order(headers, &block) + responses, explicit_order = collect_responses_and_parts_order(headers, &block) create_parts_from_responses(m, responses, charset) # Finally setup content type and parts order @@ -554,18 +536,18 @@ module ActionMailer #:nodoc: m.reply_to ||= quote_address_if_necessary(headers[:reply_to], charset) if headers[:reply_to] end - def collect_responses_and_sort_order(headers) #:nodoc: - responses, sort_order = [], nil + def collect_responses_and_parts_order(headers) #:nodoc: + responses, parts_order = [], nil if block_given? collector = ActionMailer::Collector.new(self) { render(action_name) } yield(collector) - sort_order = collector.responses.map { |r| r[:content_type] } + parts_order = collector.responses.map { |r| r[:content_type] } responses = collector.responses elsif headers[:body] responses << { :body => headers[:body], - :content_type => self.class.default_content_type.dup + :content_type => self.class.defaults[:content_type] || "text/plain" } else each_template do |template| @@ -576,7 +558,7 @@ module ActionMailer #:nodoc: end end - [responses, sort_order] + [responses, parts_order] end def each_template(&block) #:nodoc: @@ -594,7 +576,6 @@ module ActionMailer #:nodoc: def create_parts_from_responses(m, responses, charset) #:nodoc: if responses.size == 1 && !m.has_attachments? responses[0].each { |k,v| m[k] = v } - return responses[0][:content_type] elsif responses.size > 1 && m.has_attachments? container = Mail::Part.new container.content_type = "multipart/alternative" diff --git a/actionmailer/lib/action_mailer/delivery_methods.rb b/actionmailer/lib/action_mailer/delivery_methods.rb index 34bfe6000a..f6321a240c 100644 --- a/actionmailer/lib/action_mailer/delivery_methods.rb +++ b/actionmailer/lib/action_mailer/delivery_methods.rb @@ -65,7 +65,10 @@ module ActionMailer method ||= self.delivery_method mail.delivery_handler = self - if method.is_a?(Symbol) + case method + when NilClass + raise "Delivery method cannot be nil" + when Symbol if klass = delivery_methods[method.to_sym] mail.delivery_method(klass, send(:"#{method}_settings")) else diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index 0eb8d85676..61101c26a1 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -5,8 +5,25 @@ module ActionMailer module DeprecatedApi #:nodoc: extend ActiveSupport::Concern - module ClassMethods + included do + [:charset, :content_type, :mime_version, :implicit_parts_order].each do |method| + class_eval <<-FILE, __FILE__, __LINE__ + 1 + def self.default_#{method} + @@default_#{method} + end + + def self.default_#{method}=(value) + ActiveSupport::Deprecation.warn "ActionMailer::Base.default_#{method}=value is deprecated, " << + "use defaults :#{method} => value instead" + @@default_#{method} = value + end + + @@default_#{method} = nil + FILE + end + end + module ClassMethods # Deliver the given mail object directly. This can be used to deliver # a preconstructed mail object, like: # @@ -99,7 +116,15 @@ module ActionMailer end private - + + def initialize_defaults(*) + @charset ||= self.class.default_charset.try(:dup) + @content_type ||= self.class.default_content_type.try(:dup) + @implicit_parts_order ||= self.class.default_implicit_parts_order.try(:dup) + @mime_version ||= self.class.default_mime_version.try(:dup) + super + end + def create_parts if @body.is_a?(Hash) && !@body.empty? ActiveSupport::Deprecation.warn "Giving a hash to body is deprecated, please use instance variables instead", caller[0,2] diff --git a/actionmailer/lib/action_mailer/old_api.rb b/actionmailer/lib/action_mailer/old_api.rb index f5b077ab98..22c3c518b1 100644 --- a/actionmailer/lib/action_mailer/old_api.rb +++ b/actionmailer/lib/action_mailer/old_api.rb @@ -1,3 +1,5 @@ +require 'active_support/core_ext/object/try' + module ActionMailer module OldApi #:nodoc: extend ActiveSupport::Concern @@ -185,10 +187,10 @@ module ActionMailer # mailer. Subclasses may override this method to provide different # defaults. def initialize_defaults(method_name) - @charset ||= self.class.default_charset.dup - @content_type ||= self.class.default_content_type.dup - @implicit_parts_order ||= self.class.default_implicit_parts_order.dup - @mime_version ||= self.class.default_mime_version.dup if self.class.default_mime_version + @charset ||= self.class.defaults[:charset].try(:dup) + @content_type ||= self.class.defaults[:content_type].try(:dup) + @implicit_parts_order ||= self.class.defaults[:parts_order].try(:dup) + @mime_version ||= self.class.defaults[:mime_version].try(:dup) @mailer_name ||= self.class.mailer_name.dup @template ||= method_name -- cgit v1.2.3 From 8fabcb2eca03150b1c0c3dbc88dd13123f76894f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Tue, 26 Jan 2010 11:48:25 +0100 Subject: Update generators to use new defaults. --- railties/lib/generators/rails/mailer/templates/mailer.rb | 2 +- railties/test/generators/mailer_generator_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/railties/lib/generators/rails/mailer/templates/mailer.rb b/railties/lib/generators/rails/mailer/templates/mailer.rb index df9d0a0923..cdc6e41266 100644 --- a/railties/lib/generators/rails/mailer/templates/mailer.rb +++ b/railties/lib/generators/rails/mailer/templates/mailer.rb @@ -1,5 +1,5 @@ class <%= class_name %> < ActionMailer::Base - self.defaults = { :from => "from@example.com" } + self.defaults :from => "from@example.com" <% for action in actions -%> # Subject can be set in your I18n file at config/locales/en.yml diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb index e585298a93..0b7f5c6817 100644 --- a/railties/test/generators/mailer_generator_test.rb +++ b/railties/test/generators/mailer_generator_test.rb @@ -9,7 +9,7 @@ class MailerGeneratorTest < Rails::Generators::TestCase run_generator assert_file "app/mailers/notifier.rb" do |mailer| assert_match /class Notifier < ActionMailer::Base/, mailer - assert_match /self\.defaults\ =\ \{\ :from\ =>\ "from@example\.com"\ \}/, mailer + assert_match /self\.defaults :from => "from@example.com"/, mailer end end -- cgit v1.2.3 From db99324a89a2a681c6f6b0957dac7a309bfca574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 12:14:48 +0100 Subject: Ensure calling a method in Rails::Application does not instantiate a void application. --- railties/lib/rails/application.rb | 6 +++--- railties/test/application/configuration_test.rb | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index b7e5eb7a1d..eba49e1520 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -16,10 +16,10 @@ module Rails alias :configure :class_eval def instance - if instance_of?(Rails::Application) - Rails.application.instance + if self == Rails::Application + Rails.application else - @instance ||= new + @@instance ||= new end end diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 6968e87986..d3ba54a668 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -19,6 +19,13 @@ module ApplicationTests FileUtils.rm_rf("#{app_path}/config/environments") end + test "Rails::Application.instance is nil until app is initialized" do + require 'rails' + assert_nil Rails::Application.instance + require "#{app_path}/config/environment" + assert_equal AppTemplate::Application.instance, Rails::Application.instance + end + test "the application root is set correctly" do require "#{app_path}/config/environment" assert_equal Pathname.new(app_path), Rails.application.root -- cgit v1.2.3 From 007c0bb3b0e678f685fb82c1eb6c20e73f601b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 12:16:37 +0100 Subject: Ensure proper class is shown on rake middleware. --- railties/lib/rails/tasks/middleware.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/lib/rails/tasks/middleware.rake b/railties/lib/rails/tasks/middleware.rake index c3aaddb153..62e10e2beb 100644 --- a/railties/lib/rails/tasks/middleware.rake +++ b/railties/lib/rails/tasks/middleware.rake @@ -3,5 +3,5 @@ task :middleware => :environment do Rails.configuration.middleware.active.each do |middleware| puts "use #{middleware.inspect}" end - puts "run #{Rails::Application.class.name}" + puts "run #{Rails::Application.instance.class.name}" end -- cgit v1.2.3 From e6da2f651ffc24e5be3842051df73493d158a6b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 12:23:02 +0100 Subject: Ensure app does not show up in generators. --- railties/lib/rails/generators.rb | 1 + railties/test/generators_test.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 83b8c74966..2281746b00 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -200,6 +200,7 @@ module Rails # Print Rails defaults first. rails = groups.delete("rails") rails.map! { |n| n.sub(/^rails:/, '') } + rails.delete("app") print_list("rails", rails) groups.sort.each { |b, n| print_list(b, n) } diff --git a/railties/test/generators_test.rb b/railties/test/generators_test.rb index f37b684f73..33cc27bd84 100644 --- a/railties/test/generators_test.rb +++ b/railties/test/generators_test.rb @@ -99,6 +99,7 @@ class GeneratorsTest < Rails::Generators::TestCase assert_match /Rails:/, output assert_match /^ model$/, output assert_match /^ scaffold_controller$/, output + assert_no_match /^ app$/, output end def test_rails_generators_with_others_information -- cgit v1.2.3 From 1dca7ebc93ebf067a73d23ddc33d97229a0b482f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 13:57:11 +0100 Subject: Refactor railties test, break huge files in smaller chunks and move initializers to application folder. --- railties/test/application/configuration_test.rb | 23 +- railties/test/application/generators_test.rb | 13 - railties/test/application/initializer_test.rb | 196 ------------- .../test/application/initializers/boot_test.rb | 16 ++ .../initializers/check_ruby_version_test.rb | 33 +++ .../application/initializers/frameworks_test.rb | 80 ++++++ .../test/application/initializers/i18n_test.rb | 55 ++++ .../application/initializers/initializers_test.rb | 55 ++++ .../application/initializers/load_path_test.rb | 62 ++++ .../application/initializers/notifications_test.rb | 48 ++++ railties/test/application/load_test.rb | 46 --- railties/test/application/notifications_test.rb | 48 ---- railties/test/application/paths_test.rb | 99 +++++++ railties/test/application/rackup_test.rb | 46 +++ railties/test/application/routing_test.rb | 78 +++-- railties/test/initializer/boot_test.rb | 16 -- .../test/initializer/check_ruby_version_test.rb | 33 --- railties/test/initializer/path_test.rb | 99 ------- railties/test/railties/framework_extension_test.rb | 14 + railties/test/railties/plugin_test.rb | 280 +----------------- railties/test/railties/shared_tests.rb | 318 +++++++++++++++++++++ 21 files changed, 869 insertions(+), 789 deletions(-) delete mode 100644 railties/test/application/initializer_test.rb create mode 100644 railties/test/application/initializers/boot_test.rb create mode 100644 railties/test/application/initializers/check_ruby_version_test.rb create mode 100644 railties/test/application/initializers/frameworks_test.rb create mode 100644 railties/test/application/initializers/i18n_test.rb create mode 100644 railties/test/application/initializers/initializers_test.rb create mode 100644 railties/test/application/initializers/load_path_test.rb create mode 100644 railties/test/application/initializers/notifications_test.rb delete mode 100644 railties/test/application/load_test.rb delete mode 100644 railties/test/application/notifications_test.rb create mode 100644 railties/test/application/paths_test.rb create mode 100644 railties/test/application/rackup_test.rb delete mode 100644 railties/test/initializer/boot_test.rb delete mode 100644 railties/test/initializer/check_ruby_version_test.rb delete mode 100644 railties/test/initializer/path_test.rb create mode 100644 railties/test/railties/shared_tests.rb diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index d3ba54a668..666c47af67 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -1,7 +1,7 @@ require "isolation/abstract_unit" module ApplicationTests - class InitializerTest < Test::Unit::TestCase + class ConfigurationTest < Test::Unit::TestCase include ActiveSupport::Testing::Isolation def new_app @@ -59,21 +59,12 @@ module ApplicationTests end end - test "if there's no config.active_support.bare, all of ActiveSupport is required" do - use_frameworks [] + test "Rails.root should be a Pathname" do + add_to_config <<-RUBY + config.root = "#{app_path}" + RUBY require "#{app_path}/config/environment" - assert_nothing_raised { [1,2,3].rand } - end - - test "config.active_support.bare does not require all of ActiveSupport" do - add_to_config "config.active_support.bare = true" - - use_frameworks [] - - Dir.chdir("#{app_path}/app") do - require "#{app_path}/config/environment" - assert_raises(NoMethodError) { [1,2,3].rand } - end + assert_instance_of Pathname, Rails.root end test "marking the application as threadsafe sets the correct config variables" do @@ -136,7 +127,7 @@ module ApplicationTests value = value.reverse if key =~ /baz/ }] RUBY - + assert_nothing_raised do require "#{app_path}/config/application" end diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb index e1e51c318c..1e6e30e9c3 100644 --- a/railties/test/application/generators_test.rb +++ b/railties/test/application/generators_test.rb @@ -92,18 +92,5 @@ module ApplicationTests assert_equal({ :plugin => { :generator => "-g" } }, c.generators.aliases) end end - - test "generators with hashes are deep merged" do - with_config do |c| - c.generators do |g| - g.orm :datamapper, :migration => false - g.plugin :aliases => { :generator => "-g" }, - :generator => true - end - end - - assert Rails::Generators.aliases.size >= 1 - assert Rails::Generators.options.size >= 1 - end end end diff --git a/railties/test/application/initializer_test.rb b/railties/test/application/initializer_test.rb deleted file mode 100644 index 053757979b..0000000000 --- a/railties/test/application/initializer_test.rb +++ /dev/null @@ -1,196 +0,0 @@ -require "isolation/abstract_unit" - -module ApplicationTests - class InitializerTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - build_app - boot_rails - FileUtils.rm_rf "#{app_path}/config/environments" - end - - test "initializing an application adds the application paths to the load path" do - add_to_config <<-RUBY - config.root = "#{app_path}" - RUBY - - require "#{app_path}/config/environment" - assert $:.include?("#{app_path}/app/models") - end - - test "eager loading loads parent classes before children" do - app_file "lib/zoo.rb", <<-ZOO - class Zoo ; include ReptileHouse ; end - ZOO - app_file "lib/zoo/reptile_house.rb", <<-ZOO - module Zoo::ReptileHouse ; end - ZOO - - add_to_config <<-RUBY - config.root = "#{app_path}" - config.eager_load_paths << "#{app_path}/lib" - RUBY - - require "#{app_path}/config/environment" - - assert Zoo - end - - test "load environment with global" do - app_file "config/environments/development.rb", <<-RUBY - $initialize_test_set_from_env = 'success' - AppTemplate::Application.configure do - config.cache_classes = true - config.time_zone = "Brasilia" - end - RUBY - - assert_nil $initialize_test_set_from_env - add_to_config <<-RUBY - config.root = "#{app_path}" - config.time_zone = "UTC" - RUBY - - require "#{app_path}/config/environment" - assert_equal "success", $initialize_test_set_from_env - assert AppTemplate::Application.config.cache_classes - assert_equal "Brasilia", AppTemplate::Application.config.time_zone - end - - test "action_controller load paths set only if action controller in use" do - assert_nothing_raised NameError do - add_to_config <<-RUBY - config.root = "#{app_path}" - RUBY - - use_frameworks [] - require "#{app_path}/config/environment" - end - end - - test "after_initialize block works correctly" do - add_to_config <<-RUBY - config.root = "#{app_path}" - config.after_initialize { $test_after_initialize_block1 = "success" } - config.after_initialize { $test_after_initialize_block2 = "congratulations" } - RUBY - require "#{app_path}/config/environment" - - assert_equal "success", $test_after_initialize_block1 - assert_equal "congratulations", $test_after_initialize_block2 - end - - test "after_initialize block works correctly when no block is passed" do - add_to_config <<-RUBY - config.root = "#{app_path}" - config.after_initialize { $test_after_initialize_block1 = "success" } - config.after_initialize # don't pass a block, this is what we're testing! - config.after_initialize { $test_after_initialize_block2 = "congratulations" } - RUBY - require "#{app_path}/config/environment" - - assert_equal "success", $test_after_initialize_block1 - assert_equal "congratulations", $test_after_initialize_block2 - end - - test "after_initialize runs after frameworks have been initialized" do - $activerecord_configurations = nil - add_to_config <<-RUBY - config.after_initialize { $activerecord_configurations = ActiveRecord::Base.configurations } - RUBY - - require "#{app_path}/config/environment" - assert $activerecord_configurations - assert $activerecord_configurations['development'] - end - - # i18n - test "setting another default locale" do - add_to_config <<-RUBY - config.root = "#{app_path}" - config.i18n.default_locale = :de - RUBY - require "#{app_path}/config/environment" - - assert_equal :de, I18n.default_locale - end - - test "no config locales dir present should return empty load path" do - FileUtils.rm_rf "#{app_path}/config/locales" - add_to_config <<-RUBY - config.root = "#{app_path}" - RUBY - require "#{app_path}/config/environment" - - assert_equal [], Rails.application.config.i18n.load_path - end - - test "config locales dir present should be added to load path" do - add_to_config <<-RUBY - config.root = "#{app_path}" - RUBY - - require "#{app_path}/config/environment" - assert_equal ["#{app_path}/config/locales/en.yml"], Rails.application.config.i18n.load_path - end - - test "config defaults should be added with config settings" do - add_to_config <<-RUBY - config.root = "#{app_path}" - config.i18n.load_path << "my/other/locale.yml" - RUBY - require "#{app_path}/config/environment" - - assert_equal [ - "#{app_path}/config/locales/en.yml", "my/other/locale.yml" - ], Rails.application.config.i18n.load_path - end - - # DB middleware - test "database middleware doesn't initialize when session store is not active_record" do - add_to_config <<-RUBY - config.root = "#{app_path}" - config.action_controller.session_store = :cookie_store - RUBY - require "#{app_path}/config/environment" - - assert !Rails.application.config.middleware.include?(ActiveRecord::SessionStore) - end - - test "database middleware initializes when session store is active record" do - add_to_config "config.action_controller.session_store = :active_record_store" - - require "#{app_path}/config/environment" - - expects = [ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActiveRecord::SessionStore] - middleware = Rails.application.config.middleware.map { |m| m.klass } - assert_equal expects, middleware & expects - end - - test "Rails.root should be a Pathname" do - add_to_config <<-RUBY - config.root = "#{app_path}" - RUBY - require "#{app_path}/config/environment" - assert_instance_of Pathname, Rails.root - end - end - - class InitializerCustomFrameworkExtensionsTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - build_app - boot_rails - FileUtils.rm_rf "#{app_path}/config/environments" - end - - test "database middleware doesn't initialize when activerecord is not in frameworks" do - use_frameworks [] - require "#{app_path}/config/environment" - - assert_nil defined?(ActiveRecord) - end - end -end diff --git a/railties/test/application/initializers/boot_test.rb b/railties/test/application/initializers/boot_test.rb new file mode 100644 index 0000000000..5ec562f12f --- /dev/null +++ b/railties/test/application/initializers/boot_test.rb @@ -0,0 +1,16 @@ +require "isolation/abstract_unit" + +module ApplicationTests + class GemBooting < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + # build_app + # boot_rails + end + + test "booting rails sets the load paths correctly" do + # This test is pending reworking the boot process + end + end +end \ No newline at end of file diff --git a/railties/test/application/initializers/check_ruby_version_test.rb b/railties/test/application/initializers/check_ruby_version_test.rb new file mode 100644 index 0000000000..58782b2511 --- /dev/null +++ b/railties/test/application/initializers/check_ruby_version_test.rb @@ -0,0 +1,33 @@ +require "isolation/abstract_unit" + +module ApplicationTests + class CheckRubyVersionTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + boot_rails + end + + test "rails initializes with ruby 1.8.7 or later" do + if RUBY_VERSION < '1.8.7' + assert_rails_does_not_boot + else + assert_rails_boots + end + end + + def assert_rails_boots + assert_nothing_raised "It appears that rails does not boot" do + require "rails/all" + end + end + + def assert_rails_does_not_boot + $stderr = File.open("/dev/null", "w") + assert_raises(SystemExit) do + require "rails/all" + end + end + end +end diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb new file mode 100644 index 0000000000..ea052320ef --- /dev/null +++ b/railties/test/application/initializers/frameworks_test.rb @@ -0,0 +1,80 @@ +require "isolation/abstract_unit" + +module ApplicationTests + class FrameworlsTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + boot_rails + FileUtils.rm_rf "#{app_path}/config/environments" + end + + # AC & AM + test "set load paths set only if action controller or action mailer are in use" do + assert_nothing_raised NameError do + add_to_config <<-RUBY + config.root = "#{app_path}" + RUBY + + use_frameworks [] + require "#{app_path}/config/environment" + end + end + + test "sets action_controller and action_mailer load paths" do + add_to_config <<-RUBY + config.root = "#{app_path}" + RUBY + + require "#{app_path}/config/environment" + ActionController::Base.view_paths.include?(File.expand_path("app/views", app_path)) + ActionMailer::Base.view_paths.include?(File.expand_path("app/views", app_path)) + end + + # AS + test "if there's no config.active_support.bare, all of ActiveSupport is required" do + use_frameworks [] + require "#{app_path}/config/environment" + assert_nothing_raised { [1,2,3].rand } + end + + test "config.active_support.bare does not require all of ActiveSupport" do + add_to_config "config.active_support.bare = true" + + use_frameworks [] + + Dir.chdir("#{app_path}/app") do + require "#{app_path}/config/environment" + assert_raises(NoMethodError) { [1,2,3].rand } + end + end + + # AR + test "database middleware doesn't initialize when session store is not active_record" do + add_to_config <<-RUBY + config.root = "#{app_path}" + config.action_controller.session_store = :cookie_store + RUBY + require "#{app_path}/config/environment" + + assert !Rails.application.config.middleware.include?(ActiveRecord::SessionStore) + end + + test "database middleware initializes when session store is active record" do + add_to_config "config.action_controller.session_store = :active_record_store" + + require "#{app_path}/config/environment" + + expects = [ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActiveRecord::SessionStore] + middleware = Rails.application.config.middleware.map { |m| m.klass } + assert_equal expects, middleware & expects + end + + test "database middleware doesn't initialize when activerecord is not in frameworks" do + use_frameworks [] + require "#{app_path}/config/environment" + assert_nil defined?(ActiveRecord) + end + end +end diff --git a/railties/test/application/initializers/i18n_test.rb b/railties/test/application/initializers/i18n_test.rb new file mode 100644 index 0000000000..99b2d86013 --- /dev/null +++ b/railties/test/application/initializers/i18n_test.rb @@ -0,0 +1,55 @@ +require "isolation/abstract_unit" + +module ApplicationTests + class I18nTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + boot_rails + FileUtils.rm_rf "#{app_path}/config/environments" + end + + # i18n + test "setting another default locale" do + add_to_config <<-RUBY + config.root = "#{app_path}" + config.i18n.default_locale = :de + RUBY + require "#{app_path}/config/environment" + + assert_equal :de, I18n.default_locale + end + + test "no config locales dir present should return empty load path" do + FileUtils.rm_rf "#{app_path}/config/locales" + add_to_config <<-RUBY + config.root = "#{app_path}" + RUBY + require "#{app_path}/config/environment" + + assert_equal [], Rails.application.config.i18n.load_path + end + + test "config locales dir present should be added to load path" do + add_to_config <<-RUBY + config.root = "#{app_path}" + RUBY + + require "#{app_path}/config/environment" + assert_equal ["#{app_path}/config/locales/en.yml"], Rails.application.config.i18n.load_path + end + + test "config defaults should be added with config settings" do + add_to_config <<-RUBY + config.root = "#{app_path}" + config.i18n.load_path << "my/other/locale.yml" + RUBY + require "#{app_path}/config/environment" + + assert_equal [ + "#{app_path}/config/locales/en.yml", "my/other/locale.yml" + ], Rails.application.config.i18n.load_path + end + end +end \ No newline at end of file diff --git a/railties/test/application/initializers/initializers_test.rb b/railties/test/application/initializers/initializers_test.rb new file mode 100644 index 0000000000..0c3de7ce33 --- /dev/null +++ b/railties/test/application/initializers/initializers_test.rb @@ -0,0 +1,55 @@ +require "isolation/abstract_unit" + +module ApplicationTests + class InitializersTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + boot_rails + FileUtils.rm_rf "#{app_path}/config/environments" + end + + test "load initializers" do + app_file "config/initializers/foo.rb", "$foo = true" + require "#{app_path}/config/environment" + assert $foo + end + + test "after_initialize block works correctly" do + add_to_config <<-RUBY + config.root = "#{app_path}" + config.after_initialize { $test_after_initialize_block1 = "success" } + config.after_initialize { $test_after_initialize_block2 = "congratulations" } + RUBY + require "#{app_path}/config/environment" + + assert_equal "success", $test_after_initialize_block1 + assert_equal "congratulations", $test_after_initialize_block2 + end + + test "after_initialize block works correctly when no block is passed" do + add_to_config <<-RUBY + config.root = "#{app_path}" + config.after_initialize { $test_after_initialize_block1 = "success" } + config.after_initialize # don't pass a block, this is what we're testing! + config.after_initialize { $test_after_initialize_block2 = "congratulations" } + RUBY + require "#{app_path}/config/environment" + + assert_equal "success", $test_after_initialize_block1 + assert_equal "congratulations", $test_after_initialize_block2 + end + + test "after_initialize runs after frameworks have been initialized" do + $activerecord_configurations = nil + add_to_config <<-RUBY + config.after_initialize { $activerecord_configurations = ActiveRecord::Base.configurations } + RUBY + + require "#{app_path}/config/environment" + assert $activerecord_configurations + assert $activerecord_configurations['development'] + end + end +end diff --git a/railties/test/application/initializers/load_path_test.rb b/railties/test/application/initializers/load_path_test.rb new file mode 100644 index 0000000000..714b6114a2 --- /dev/null +++ b/railties/test/application/initializers/load_path_test.rb @@ -0,0 +1,62 @@ +require "isolation/abstract_unit" + +module ApplicationTests + class LoadPathTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + boot_rails + FileUtils.rm_rf "#{app_path}/config/environments" + end + + # General + test "initializing an application adds the application paths to the load path" do + add_to_config <<-RUBY + config.root = "#{app_path}" + RUBY + + require "#{app_path}/config/environment" + assert $:.include?("#{app_path}/app/models") + end + + test "eager loading loads parent classes before children" do + app_file "lib/zoo.rb", <<-ZOO + class Zoo ; include ReptileHouse ; end + ZOO + app_file "lib/zoo/reptile_house.rb", <<-ZOO + module Zoo::ReptileHouse ; end + ZOO + + add_to_config <<-RUBY + config.root = "#{app_path}" + config.eager_load_paths << "#{app_path}/lib" + RUBY + + require "#{app_path}/config/environment" + + assert Zoo + end + + test "load environment with global" do + app_file "config/environments/development.rb", <<-RUBY + $initialize_test_set_from_env = 'success' + AppTemplate::Application.configure do + config.cache_classes = true + config.time_zone = "Brasilia" + end + RUBY + + assert_nil $initialize_test_set_from_env + add_to_config <<-RUBY + config.root = "#{app_path}" + config.time_zone = "UTC" + RUBY + + require "#{app_path}/config/environment" + assert_equal "success", $initialize_test_set_from_env + assert AppTemplate::Application.config.cache_classes + assert_equal "Brasilia", AppTemplate::Application.config.time_zone + end + end +end diff --git a/railties/test/application/initializers/notifications_test.rb b/railties/test/application/initializers/notifications_test.rb new file mode 100644 index 0000000000..061bb34c19 --- /dev/null +++ b/railties/test/application/initializers/notifications_test.rb @@ -0,0 +1,48 @@ +require "isolation/abstract_unit" + +module ApplicationTests + class MockLogger + def method_missing(*args) + @logged ||= [] + @logged << args.last + end + + def logged + @logged.compact.map { |l| l.to_s.strip } + end + end + + class NotificationsTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + boot_rails + end + + def instrument(*args, &block) + ActiveSupport::Notifications.instrument(*args, &block) + end + + def wait + ActiveSupport::Notifications.notifier.wait + end + + test "rails subscribers are added" do + add_to_config <<-RUBY + config.colorize_logging = false + RUBY + + require "#{app_path}/config/environment" + + ActiveRecord::Base.logger = logger = MockLogger.new + + # Mimic ActiveRecord notifications + instrument "active_record.sql", :name => "SQL", :sql => "SHOW tables" + wait + + assert_equal 1, logger.logged.size + assert_match /SHOW tables/, logger.logged.last + end + end +end diff --git a/railties/test/application/load_test.rb b/railties/test/application/load_test.rb deleted file mode 100644 index 1c5811b07a..0000000000 --- a/railties/test/application/load_test.rb +++ /dev/null @@ -1,46 +0,0 @@ -require "isolation/abstract_unit" - -module ApplicationTests - class LoadTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def rackup - require "rack" - app, options = Rack::Builder.parse_file("#{app_path}/config.ru") - app - end - - def setup - build_app - boot_rails - end - - test "rails app is present" do - assert File.exist?(app_path("config")) - end - - test "config.ru can be racked up" do - Dir.chdir app_path do - @app = rackup - assert_welcome get("/") - end - end - - test "Rails.application is available after config.ru has been racked up" do - rackup - assert Rails.application.is_a?(Rails::Application) - end - - # Passenger still uses AC::Dispatcher, so we need to - # keep it working for now - test "deprecated ActionController::Dispatcher still works" do - rackup - assert ActionController::Dispatcher.new.is_a?(Rails::Application) - end - - test "the config object is available on the application object" do - rackup - assert_equal 'UTC', Rails.application.config.time_zone - end - end -end diff --git a/railties/test/application/notifications_test.rb b/railties/test/application/notifications_test.rb deleted file mode 100644 index 061bb34c19..0000000000 --- a/railties/test/application/notifications_test.rb +++ /dev/null @@ -1,48 +0,0 @@ -require "isolation/abstract_unit" - -module ApplicationTests - class MockLogger - def method_missing(*args) - @logged ||= [] - @logged << args.last - end - - def logged - @logged.compact.map { |l| l.to_s.strip } - end - end - - class NotificationsTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - build_app - boot_rails - end - - def instrument(*args, &block) - ActiveSupport::Notifications.instrument(*args, &block) - end - - def wait - ActiveSupport::Notifications.notifier.wait - end - - test "rails subscribers are added" do - add_to_config <<-RUBY - config.colorize_logging = false - RUBY - - require "#{app_path}/config/environment" - - ActiveRecord::Base.logger = logger = MockLogger.new - - # Mimic ActiveRecord notifications - instrument "active_record.sql", :name => "SQL", :sql => "SHOW tables" - wait - - assert_equal 1, logger.logged.size - assert_match /SHOW tables/, logger.logged.last - end - end -end diff --git a/railties/test/application/paths_test.rb b/railties/test/application/paths_test.rb new file mode 100644 index 0000000000..ac0aa27c64 --- /dev/null +++ b/railties/test/application/paths_test.rb @@ -0,0 +1,99 @@ +require "isolation/abstract_unit" + +module ApplicationTests + class PathsTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + boot_rails + FileUtils.rm_rf("#{app_path}/config/environments") + app_file "config/environments/development.rb", "" + add_to_config <<-RUBY + config.root = "#{app_path}" + config.after_initialize do + ActionController::Base.session_store = nil + end + RUBY + use_frameworks [:action_controller, :action_view, :action_mailer, :active_record] + require "#{app_path}/config/environment" + @paths = Rails.application.config.paths + end + + def root(*path) + app_path(*path).to_s + end + + def assert_path(paths, *dir) + assert_equal [root(*dir)], paths.paths + end + + def assert_in_load_path(*path) + assert $:.any? { |p| File.expand_path(p) == root(*path) }, "Load path does not include '#{root(*path)}'. They are:\n-----\n #{$:.join("\n")}\n-----" + end + + def assert_not_in_load_path(*path) + assert !$:.any? { |p| File.expand_path(p) == root(*path) }, "Load path includes '#{root(*path)}'. They are:\n-----\n #{$:.join("\n")}\n-----" + end + + test "booting up Rails yields a valid paths object" do + assert_path @paths.app.models, "app", "models" + assert_path @paths.app.metals, "app", "metal" + assert_path @paths.app.helpers, "app", "helpers" + assert_path @paths.app.views, "app", "views" + assert_path @paths.lib, "lib" + assert_path @paths.vendor, "vendor" + assert_path @paths.vendor.plugins, "vendor", "plugins" + assert_path @paths.tmp, "tmp" + assert_path @paths.tmp.cache, "tmp", "cache" + assert_path @paths.config, "config" + assert_path @paths.config.locales, "config", "locales", "en.yml" + assert_path @paths.config.environment, "config", "environments", "development.rb" + + assert_equal root("app", "controllers"), @paths.app.controllers.to_a.first + assert_equal Pathname.new(File.dirname(__FILE__)).join("..", "..", "builtin", "rails_info").expand_path, + Pathname.new(@paths.app.controllers.to_a[1]).expand_path + end + + test "booting up Rails yields a list of paths that are eager" do + assert @paths.app.eager_load? + assert @paths.app.controllers.eager_load? + assert @paths.app.helpers.eager_load? + end + + test "environments has a glob equal to the current environment" do + assert_equal "#{Rails.env}.rb", @paths.config.environment.glob + end + + test "load path includes each of the paths in config.paths as long as the directories exist" do + assert_in_load_path "app", "controllers" + assert_in_load_path "app", "models" + assert_in_load_path "app", "helpers" + assert_in_load_path "lib" + assert_in_load_path "vendor" + + assert_not_in_load_path "app", "metal" + assert_not_in_load_path "config" + assert_not_in_load_path "config", "locales" + assert_not_in_load_path "config", "environments" + assert_not_in_load_path "tmp" + assert_not_in_load_path "tmp", "cache" + end + + test "controller paths include builtin in development mode" do + Rails.env.replace "development" + assert Rails::Application::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } + end + + test "controller paths does not have builtin_directories in test mode" do + Rails.env.replace "test" + assert !Rails::Application::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } + end + + test "controller paths does not have builtin_directories in production mode" do + Rails.env.replace "production" + assert !Rails::Application::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } + end + + end +end diff --git a/railties/test/application/rackup_test.rb b/railties/test/application/rackup_test.rb new file mode 100644 index 0000000000..f909c1b282 --- /dev/null +++ b/railties/test/application/rackup_test.rb @@ -0,0 +1,46 @@ +require "isolation/abstract_unit" + +module ApplicationTests + class RackupTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def rackup + require "rack" + app, options = Rack::Builder.parse_file("#{app_path}/config.ru") + app + end + + def setup + build_app + boot_rails + end + + test "rails app is present" do + assert File.exist?(app_path("config")) + end + + test "config.ru can be racked up" do + Dir.chdir app_path do + @app = rackup + assert_welcome get("/") + end + end + + test "Rails.application is available after config.ru has been racked up" do + rackup + assert Rails.application.is_a?(Rails::Application) + end + + # Passenger still uses AC::Dispatcher, so we need to + # keep it working for now + test "deprecated ActionController::Dispatcher still works" do + rackup + assert ActionController::Dispatcher.new.is_a?(Rails::Application) + end + + test "the config object is available on the application object" do + rackup + assert_equal 'UTC', Rails.application.config.time_zone + end + end +end diff --git a/railties/test/application/routing_test.rb b/railties/test/application/routing_test.rb index 50cb9e3acc..b93e349a46 100644 --- a/railties/test/application/routing_test.rb +++ b/railties/test/application/routing_test.rb @@ -14,7 +14,6 @@ module ApplicationTests def app @app ||= begin require "#{app_path}/config/environment" - Rails.application end end @@ -26,7 +25,7 @@ module ApplicationTests test "simple controller" do controller :foo, <<-RUBY - class FooController < ActionController::Base + class FooController < ApplicationController def index render :text => "foo" end @@ -43,9 +42,36 @@ module ApplicationTests assert_equal 'foo', last_response.body end + test "simple controller with helper" do + controller :foo, <<-RUBY + class FooController < ApplicationController + def index + render :inline => "<%= foo_or_bar? %>" + end + end + RUBY + + app_file 'app/helpers/bar_helper.rb', <<-RUBY + module BarHelper + def foo_or_bar? + "bar" + end + end + RUBY + + app_file 'config/routes.rb', <<-RUBY + AppTemplate::Application.routes.draw do |map| + match ':controller(/:action)' + end + RUBY + + get '/foo' + assert_equal 'bar', last_response.body + end + test "multiple controllers" do controller :foo, <<-RUBY - class FooController < ActionController::Base + class FooController < ApplicationController def index render :text => "foo" end @@ -75,7 +101,7 @@ module ApplicationTests test "nested controller" do controller 'foo', <<-RUBY - class FooController < ActionController::Base + class FooController < ApplicationController def index render :text => "foo" end @@ -84,7 +110,7 @@ module ApplicationTests controller 'admin/foo', <<-RUBY module Admin - class FooController < ActionController::Base + class FooController < ApplicationController def index render :text => "admin::foo" end @@ -105,47 +131,9 @@ module ApplicationTests assert_equal 'admin::foo', last_response.body end - test "merges with plugin routes" do - controller 'foo', <<-RUBY - class FooController < ActionController::Base - def index - render :text => "foo" - end - end - RUBY - - app_file 'config/routes.rb', <<-RUBY - AppTemplate::Application.routes.draw do |map| - match 'foo', :to => 'foo#index' - end - RUBY - - plugin 'bar', 'require File.dirname(__FILE__) + "/app/controllers/bar"' do |plugin| - plugin.write 'app/controllers/bar.rb', <<-RUBY - class BarController < ActionController::Base - def index - render :text => "bar" - end - end - RUBY - - plugin.write 'config/routes.rb', <<-RUBY - AppTemplate::Application.routes.draw do |map| - match 'bar', :to => 'bar#index' - end - RUBY - end - - get '/foo' - assert_equal 'foo', last_response.body - - get '/bar' - assert_equal 'bar', last_response.body - end - test "reloads routes when configuration is changed" do controller :foo, <<-RUBY - class FooController < ActionController::Base + class FooController < ApplicationController def bar render :text => "bar" end @@ -191,7 +179,7 @@ module ApplicationTests RUBY controller 'yazilar', <<-RUBY - class YazilarController < ActionController::Base + class YazilarController < ApplicationController def index render :text => 'yazilar#index' end diff --git a/railties/test/initializer/boot_test.rb b/railties/test/initializer/boot_test.rb deleted file mode 100644 index 5ee3c45b21..0000000000 --- a/railties/test/initializer/boot_test.rb +++ /dev/null @@ -1,16 +0,0 @@ -require "isolation/abstract_unit" - -module BootTests - class GemBooting < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - # build_app - # boot_rails - end - - test "booting rails sets the load paths correctly" do - # This test is pending reworking the boot process - end - end -end \ No newline at end of file diff --git a/railties/test/initializer/check_ruby_version_test.rb b/railties/test/initializer/check_ruby_version_test.rb deleted file mode 100644 index 311f19a28a..0000000000 --- a/railties/test/initializer/check_ruby_version_test.rb +++ /dev/null @@ -1,33 +0,0 @@ -require "isolation/abstract_unit" - -module InitializerTests - class CheckRubyVersionTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - build_app - boot_rails - end - - test "rails initializes with ruby 1.8.7 or later" do - if RUBY_VERSION < '1.8.7' - assert_rails_does_not_boot - else - assert_rails_boots - end - end - - def assert_rails_boots - assert_nothing_raised "It appears that rails does not boot" do - require "rails/all" - end - end - - def assert_rails_does_not_boot - $stderr = File.open("/dev/null", "w") - assert_raises(SystemExit) do - require "rails/all" - end - end - end -end diff --git a/railties/test/initializer/path_test.rb b/railties/test/initializer/path_test.rb deleted file mode 100644 index 2048dc57bb..0000000000 --- a/railties/test/initializer/path_test.rb +++ /dev/null @@ -1,99 +0,0 @@ -require "isolation/abstract_unit" - -module InitializerTests - class PathTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - build_app - boot_rails - FileUtils.rm_rf("#{app_path}/config/environments") - app_file "config/environments/development.rb", "" - add_to_config <<-RUBY - config.root = "#{app_path}" - config.after_initialize do - ActionController::Base.session_store = nil - end - RUBY - use_frameworks [:action_controller, :action_view, :action_mailer, :active_record] - require "#{app_path}/config/environment" - @paths = Rails.application.config.paths - end - - def root(*path) - app_path(*path).to_s - end - - def assert_path(paths, *dir) - assert_equal [root(*dir)], paths.paths - end - - def assert_in_load_path(*path) - assert $:.any? { |p| File.expand_path(p) == root(*path) }, "Load path does not include '#{root(*path)}'. They are:\n-----\n #{$:.join("\n")}\n-----" - end - - def assert_not_in_load_path(*path) - assert !$:.any? { |p| File.expand_path(p) == root(*path) }, "Load path includes '#{root(*path)}'. They are:\n-----\n #{$:.join("\n")}\n-----" - end - - test "booting up Rails yields a valid paths object" do - assert_path @paths.app.models, "app", "models" - assert_path @paths.app.metals, "app", "metal" - assert_path @paths.app.helpers, "app", "helpers" - assert_path @paths.app.views, "app", "views" - assert_path @paths.lib, "lib" - assert_path @paths.vendor, "vendor" - assert_path @paths.vendor.plugins, "vendor", "plugins" - assert_path @paths.tmp, "tmp" - assert_path @paths.tmp.cache, "tmp", "cache" - assert_path @paths.config, "config" - assert_path @paths.config.locales, "config", "locales", "en.yml" - assert_path @paths.config.environment, "config", "environments", "development.rb" - - assert_equal root("app", "controllers"), @paths.app.controllers.to_a.first - assert_equal Pathname.new(File.dirname(__FILE__)).join("..", "..", "builtin", "rails_info").expand_path, - Pathname.new(@paths.app.controllers.to_a[1]).expand_path - end - - test "booting up Rails yields a list of paths that are eager" do - assert @paths.app.eager_load? - assert @paths.app.controllers.eager_load? - assert @paths.app.helpers.eager_load? - end - - test "environments has a glob equal to the current environment" do - assert_equal "#{Rails.env}.rb", @paths.config.environment.glob - end - - test "load path includes each of the paths in config.paths as long as the directories exist" do - assert_in_load_path "app", "controllers" - assert_in_load_path "app", "models" - assert_in_load_path "app", "helpers" - assert_in_load_path "lib" - assert_in_load_path "vendor" - - assert_not_in_load_path "app", "metal" - assert_not_in_load_path "config" - assert_not_in_load_path "config", "locales" - assert_not_in_load_path "config", "environments" - assert_not_in_load_path "tmp" - assert_not_in_load_path "tmp", "cache" - end - - test "controller paths include builtin in development mode" do - Rails.env.replace "development" - assert Rails::Application::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } - end - - test "controller paths does not have builtin_directories in test mode" do - Rails.env.replace "test" - assert !Rails::Application::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } - end - - test "controller paths does not have builtin_directories in production mode" do - Rails.env.replace "production" - assert !Rails::Application::Configuration.new("/").paths.app.controllers.paths.any? { |p| p =~ /builtin/ } - end - - end -end diff --git a/railties/test/railties/framework_extension_test.rb b/railties/test/railties/framework_extension_test.rb index 84bd6ed16b..48e513cf01 100644 --- a/railties/test/railties/framework_extension_test.rb +++ b/railties/test/railties/framework_extension_test.rb @@ -46,6 +46,20 @@ module RailtiesTest AppTemplate::Application.load_generators assert $ran_block end + + test "railtie initializer" do + $ran_block = false + + class MyTie < Rails::Railtie + initializer :something_nice do + $ran_block = true + end + end + + assert !$ran_block + require "#{app_path}/config/environment" + assert $ran_block + end end class ActiveRecordExtensionTest < Test::Unit::TestCase diff --git a/railties/test/railties/plugin_test.rb b/railties/test/railties/plugin_test.rb index 65d057383c..adcc5431f6 100644 --- a/railties/test/railties/plugin_test.rb +++ b/railties/test/railties/plugin_test.rb @@ -1,8 +1,10 @@ require "isolation/abstract_unit" +require "railties/shared_tests" module RailtiesTest - class PluginTest < Test::Unit::TestCase + class PluginSpecificTest < Test::Unit::TestCase include ActiveSupport::Testing::Isolation + include SharedTests def setup build_app @@ -12,15 +14,6 @@ module RailtiesTest end end - def boot_rails - super - require "#{app_path}/config/environment" - end - - def app - @app ||= Rails.application - end - test "it loads the plugin's init.rb file" do boot_rails assert_equal "loaded", BUKKITS @@ -31,52 +24,6 @@ module RailtiesTest assert_equal :debug, LEVEL end - test "the plugin puts its lib directory on the load path" do - boot_rails - require "bukkits" - assert_equal "Bukkits", Bukkits.name - end - - test "plugin init is ran before application initializers" do - plugin "foo", "$foo = true" do |plugin| - plugin.write "lib/foo.rb", "module Foo; end" - end - - app_file 'config/initializers/foo.rb', <<-RUBY - raise "no $foo" unless $foo - raise "no Foo" unless Foo - RUBY - - boot_rails - assert $foo - end - - test "plugin paths get added to the AS::Dependency list" do - boot_rails - assert_equal "Bukkits", Bukkits.name - end - - test "plugin constants do not get reloaded by default" do - boot_rails - assert_equal "Bukkits", Bukkits.name - ActiveSupport::Dependencies.clear - @plugin.delete("lib/bukkits.rb") - assert_nothing_raised { Bukkits } - end - - test "plugin constants get reloaded if config.reload_plugins is set" do - add_to_config <<-RUBY - config.reload_plugins = true - RUBY - - boot_rails - - assert_equal "Bukkits", Bukkits.name - ActiveSupport::Dependencies.clear - @plugin.delete("lib/bukkits.rb") - assert_raises(NameError) { Bukkits } - end - test "plugin should work without init.rb" do @plugin.delete("init.rb") @@ -86,210 +33,6 @@ module RailtiesTest assert_nothing_raised { Bukkits } end - test "the plugin puts its models directory on the load path" do - @plugin.write "app/models/my_bukkit.rb", "class MyBukkit ; end" - - boot_rails - - assert_nothing_raised { MyBukkit } - end - - test "the plugin puts is controllers directory on the load path" do - @plugin.write "app/controllers/bukkit_controller.rb", "class BukkitController ; end" - - boot_rails - - assert_nothing_raised { BukkitController } - end - - test "the plugin adds its view to the load path" do - @plugin.write "app/controllers/bukkit_controller.rb", <<-RUBY - class BukkitController < ActionController::Base - def index - end - end - RUBY - - @plugin.write "app/views/bukkit/index.html.erb", "Hello bukkits" - - boot_rails - - require "action_controller" - require "rack/mock" - response = BukkitController.action(:index).call(Rack::MockRequest.env_for("/")) - assert_equal "Hello bukkits\n", response[2].body - end - - test "the plugin adds helpers to the controller's views" do - @plugin.write "app/controllers/bukkit_controller.rb", <<-RUBY - class BukkitController < ActionController::Base - def index - end - end - RUBY - - @plugin.write "app/helpers/bukkit_helper.rb", <<-RUBY - module BukkitHelper - def bukkits - "bukkits" - end - end - RUBY - - @plugin.write "app/views/bukkit/index.html.erb", "Hello <%= bukkits %>" - - boot_rails - - require "rack/mock" - response = BukkitController.action(:index).call(Rack::MockRequest.env_for("/")) - assert_equal "Hello bukkits\n", response[2].body - end - - test "routes.rb are added to the router" do - @plugin.write "config/routes.rb", <<-RUBY - class Sprokkit - def self.call(env) - [200, {'Content-Type' => 'text/html'}, ["I am a Sprokkit"]] - end - end - - ActionController::Routing::Routes.draw do - match "/sprokkit", :to => Sprokkit - end - RUBY - - boot_rails - require "rack/mock" - response = Rails.application.call(Rack::MockRequest.env_for("/sprokkit")) - assert_equal "I am a Sprokkit", response[2].join - end - - test "tasks are loaded by default" do - $executed = false - @plugin.write "lib/tasks/foo.rake", <<-RUBY - task :foo do - $executed = true - end - RUBY - - boot_rails - require 'rake' - require 'rake/rdoctask' - require 'rake/testtask' - Rails.application.load_tasks - Rake::Task[:foo].invoke - assert $executed - end - - test "deprecated tasks are also loaded" do - $executed = false - @plugin.write "tasks/foo.rake", <<-RUBY - task :foo do - $executed = true - end - RUBY - - boot_rails - require 'rake' - require 'rake/rdoctask' - require 'rake/testtask' - Rails.application.load_tasks - Rake::Task[:foo].invoke - assert $executed - end - - test "i18n files are added with lower priority than application ones" do - add_to_config <<-RUBY - config.i18n.load_path << "#{app_path}/app/locales/en.yml" - RUBY - - app_file 'app/locales/en.yml', <<-YAML -en: - bar: "1" -YAML - - app_file 'config/locales/en.yml', <<-YAML -en: - foo: "2" - bar: "2" -YAML - - @plugin.write 'config/locales/en.yml', <<-YAML -en: - foo: "3" -YAML - - boot_rails - - assert_equal %W( - #{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/locale/en.yml - #{RAILS_FRAMEWORK_ROOT}/activemodel/lib/active_model/locale/en.yml - #{RAILS_FRAMEWORK_ROOT}/activerecord/lib/active_record/locale/en.yml - #{RAILS_FRAMEWORK_ROOT}/actionpack/lib/action_view/locale/en.yml - #{app_path}/vendor/plugins/bukkits/config/locales/en.yml - #{app_path}/config/locales/en.yml - #{app_path}/app/locales/en.yml - ).map { |path| File.expand_path(path) }, I18n.load_path.map { |path| File.expand_path(path) } - - assert_equal "2", I18n.t(:foo) - assert_equal "1", I18n.t(:bar) - end - - test "plugin metals are added to the middleware stack" do - @plugin.write 'app/metal/foo_metal.rb', <<-RUBY - class FooMetal - def self.call(env) - [200, { "Content-Type" => "text/html"}, ["FooMetal"]] - end - end - RUBY - - boot_rails - require 'rack/test' - extend Rack::Test::Methods - - get "/" - assert_equal 200, last_response.status - assert_equal "FooMetal", last_response.body - end - - test "namespaced controllers with namespaced routes" do - @plugin.write "config/routes.rb", <<-RUBY - ActionController::Routing::Routes.draw do - namespace :admin do - match "index", :to => "admin/foo#index" - end - end - RUBY - - @plugin.write "app/controllers/admin/foo_controller.rb", <<-RUBY - class Admin::FooController < ApplicationController - def index - render :text => "Rendered from namespace" - end - end - RUBY - - boot_rails - - require 'rack/test' - extend Rack::Test::Methods - - get "/admin/index" - assert_equal 200, last_response.status - assert_equal "Rendered from namespace", last_response.body - end - - test "plugin with initializers" do - $plugin_initializer = false - @plugin.write "config/initializers/foo.rb", <<-RUBY - $plugin_initializer = true - RUBY - - boot_rails - assert $plugin_initializer - end - test "plugin cannot declare an engine for it" do @plugin.write "lib/bukkits.rb", <<-RUBY class Bukkits @@ -313,22 +56,5 @@ YAML assert rescued, "Expected boot rails to fail" end - - test "use plugin middleware in application config" do - @plugin.write "lib/bukkits.rb", <<-RUBY - class Bukkits - def initialize(app) - @app = app - end - - def call(env) - @app.call(env) - end - end - RUBY - - add_to_config "config.middleware.use \"Bukkits\"" - boot_rails - end end end diff --git a/railties/test/railties/shared_tests.rb b/railties/test/railties/shared_tests.rb new file mode 100644 index 0000000000..ab6ab0a215 --- /dev/null +++ b/railties/test/railties/shared_tests.rb @@ -0,0 +1,318 @@ +module RailtiesTest + # Holds tests shared between plugin and engines + module SharedTests + def boot_rails + super + require "#{app_path}/config/environment" + end + + def app + @app ||= Rails.application + end + + def test_plugin_puts_its_lib_directory_on_load_path + boot_rails + require "bukkits" + assert_equal "Bukkits", Bukkits.name + end + + def test_plugin_init_is_ran_before_application_ones + plugin "foo", "$foo = true" do |plugin| + plugin.write "lib/foo.rb", "module Foo; end" + end + + app_file 'config/initializers/foo.rb', <<-RUBY + raise "no $foo" unless $foo + raise "no Foo" unless Foo + RUBY + + boot_rails + assert $foo + end + + def test_plugin_paths_get_added_to_as_dependency_list + boot_rails + assert_equal "Bukkits", Bukkits.name + end + + def test_plugins_constants_are_not_reloaded_by_default + boot_rails + assert_equal "Bukkits", Bukkits.name + ActiveSupport::Dependencies.clear + @plugin.delete("lib/bukkits.rb") + assert_nothing_raised { Bukkits } + end + + def test_plugin_constants_get_reloaded_if_config_reload_plugins + add_to_config <<-RUBY + config.reload_plugins = true + RUBY + + boot_rails + + assert_equal "Bukkits", Bukkits.name + ActiveSupport::Dependencies.clear + @plugin.delete("lib/bukkits.rb") + assert_raises(NameError) { Bukkits } + end + + def test_plugin_puts_its_models_directory_on_load_path + @plugin.write "app/models/my_bukkit.rb", "class MyBukkit ; end" + boot_rails + assert_nothing_raised { MyBukkit } + end + + def test_plugin_puts_its_controllers_directory_on_the_load_path + @plugin.write "app/controllers/bukkit_controller.rb", "class BukkitController ; end" + boot_rails + assert_nothing_raised { BukkitController } + end + + def test_plugin_adds_its_views_to_view_paths + @plugin.write "app/controllers/bukkit_controller.rb", <<-RUBY + class BukkitController < ActionController::Base + def index + end + end + RUBY + + @plugin.write "app/views/bukkit/index.html.erb", "Hello bukkits" + + boot_rails + + require "action_controller" + require "rack/mock" + response = BukkitController.action(:index).call(Rack::MockRequest.env_for("/")) + assert_equal "Hello bukkits\n", response[2].body + end + + def test_plugin_adds_helpers_to_controller_views + @plugin.write "app/controllers/bukkit_controller.rb", <<-RUBY + class BukkitController < ActionController::Base + def index + end + end + RUBY + + @plugin.write "app/helpers/bukkit_helper.rb", <<-RUBY + module BukkitHelper + def bukkits + "bukkits" + end + end + RUBY + + @plugin.write "app/views/bukkit/index.html.erb", "Hello <%= bukkits %>" + + boot_rails + + require "rack/mock" + response = BukkitController.action(:index).call(Rack::MockRequest.env_for("/")) + assert_equal "Hello bukkits\n", response[2].body + end + + def test_routes_are_added_to_router + @plugin.write "config/routes.rb", <<-RUBY + class Sprokkit + def self.call(env) + [200, {'Content-Type' => 'text/html'}, ["I am a Sprokkit"]] + end + end + + ActionController::Routing::Routes.draw do + match "/sprokkit", :to => Sprokkit + end + RUBY + + boot_rails + require 'rack/test' + extend Rack::Test::Methods + + get "/sprokkit" + assert_equal "I am a Sprokkit", last_response.body + end + + def test_routes_in_plugins_have_lower_priority_than_application_ones + controller "foo", <<-RUBY + class FooController < ActionController::Base + def index + render :text => "foo" + end + end + RUBY + + app_file "config/routes.rb", <<-RUBY + AppTemplate::Application.routes.draw do |map| + match 'foo', :to => 'foo#index' + end + RUBY + + @plugin.write "app/controllers/bar_controller.rb", <<-RUBY + class BarController < ActionController::Base + def index + render :text => "bar" + end + end + RUBY + + @plugin.write "config/routes.rb", <<-RUBY + ActionController::Routing::Routes.draw do |map| + match 'foo', :to => 'bar#index' + match 'bar', :to => 'bar#index' + end + RUBY + + boot_rails + require 'rack/test' + extend Rack::Test::Methods + + get '/foo' + assert_equal 'foo', last_response.body + + get '/bar' + assert_equal 'bar', last_response.body + end + + def test_rake_tasks_lib_tasks_are_loaded + $executed = false + @plugin.write "lib/tasks/foo.rake", <<-RUBY + task :foo do + $executed = true + end + RUBY + + boot_rails + require 'rake' + require 'rake/rdoctask' + require 'rake/testtask' + Rails.application.load_tasks + Rake::Task[:foo].invoke + assert $executed + end + + def test_deprecated_tasks_are_also_loaded + $executed = false + @plugin.write "tasks/foo.rake", <<-RUBY + task :foo do + $executed = true + end + RUBY + + boot_rails + require 'rake' + require 'rake/rdoctask' + require 'rake/testtask' + Rails.application.load_tasks + Rake::Task[:foo].invoke + assert $executed + end + + def test_i18n_files_have_lower_priority_than_application_ones + add_to_config <<-RUBY + config.i18n.load_path << "#{app_path}/app/locales/en.yml" + RUBY + + app_file 'app/locales/en.yml', <<-YAML +en: + bar: "1" +YAML + + app_file 'config/locales/en.yml', <<-YAML +en: + foo: "2" + bar: "2" +YAML + + @plugin.write 'config/locales/en.yml', <<-YAML +en: + foo: "3" +YAML + + boot_rails + + assert_equal %W( + #{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/locale/en.yml + #{RAILS_FRAMEWORK_ROOT}/activemodel/lib/active_model/locale/en.yml + #{RAILS_FRAMEWORK_ROOT}/activerecord/lib/active_record/locale/en.yml + #{RAILS_FRAMEWORK_ROOT}/actionpack/lib/action_view/locale/en.yml + #{app_path}/vendor/plugins/bukkits/config/locales/en.yml + #{app_path}/config/locales/en.yml + #{app_path}/app/locales/en.yml + ).map { |path| File.expand_path(path) }, I18n.load_path.map { |path| File.expand_path(path) } + + assert_equal "2", I18n.t(:foo) + assert_equal "1", I18n.t(:bar) + end + + def test_plugin_metals_added_to_middleware_stack + @plugin.write 'app/metal/foo_metal.rb', <<-RUBY + class FooMetal + def self.call(env) + [200, { "Content-Type" => "text/html"}, ["FooMetal"]] + end + end + RUBY + + boot_rails + require 'rack/test' + extend Rack::Test::Methods + + get "/" + assert_equal 200, last_response.status + assert_equal "FooMetal", last_response.body + end + + def test_namespaced_controllers_with_namespaced_routes + @plugin.write "config/routes.rb", <<-RUBY + ActionController::Routing::Routes.draw do + namespace :admin do + match "index", :to => "admin/foo#index" + end + end + RUBY + + @plugin.write "app/controllers/admin/foo_controller.rb", <<-RUBY + class Admin::FooController < ApplicationController + def index + render :text => "Rendered from namespace" + end + end + RUBY + + boot_rails + require 'rack/test' + extend Rack::Test::Methods + + get "/admin/index" + assert_equal 200, last_response.status + assert_equal "Rendered from namespace", last_response.body + end + + def test_plugin_initializers + $plugin_initializer = false + @plugin.write "config/initializers/foo.rb", <<-RUBY + $plugin_initializer = true + RUBY + + boot_rails + assert $plugin_initializer + end + + def test_plugin_midleware_referenced_in_configuration + @plugin.write "lib/bukkits.rb", <<-RUBY + class Bukkits + def initialize(app) + @app = app + end + + def call(env) + @app.call(env) + end + end + RUBY + + add_to_config "config.middleware.use \"Bukkits\"" + boot_rails + end + end +end \ No newline at end of file -- cgit v1.2.3 From 9520166f70b84dd56640b7dbe8e3737c91e04bd9 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Wed, 27 Jan 2010 00:06:19 +1100 Subject: Fixed up being able to pass random headers in with headers, or mail. Also, undeprecated headers(hash) as this works now too --- actionmailer/lib/action_mailer/base.rb | 31 +++++++++++++++++++----------- actionmailer/test/base_test.rb | 35 +++++++++++++++++++++++++++++----- 2 files changed, 50 insertions(+), 16 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index dbaf1424ed..c01ca876dc 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -40,13 +40,17 @@ module ActionMailer #:nodoc: # * headers[]= - Allows you to specify non standard headers in your email such # as headers['X-No-Spam'] = 'True' # + # * headers(hash) - Allows you to specify multiple headers in your email such + # as headers({'X-No-Spam' => 'True', 'In-Reply-To' => '1234@message.id'}) + # # * mail - Allows you to specify your email to send. # - # The hash passed to the mail method allows you to specify the most used headers in an email - # message, such as Subject, To, From, Cc, Bcc, - # Reply-To and Date. See the ActionMailer#mail method for more details. - # - # If you need other headers not listed above, use the headers['name'] = value method. + # The hash passed to the mail method allows you to specify any header that a Mail::Message + # will accept (any valid Email header including optional fields). Obviously if you specify + # the same header in the headers method and then again in the mail method, the last one + # will over write the first, unless you are specifying a header field that can appear more + # than once per RFC, in which case, both will be inserted (X-value headers for example can + # appear multiple times.) # # The mail method, if not passed a block, will inspect your views and send all the views with # the same name as the method, so the above action would send the +welcome.plain.erb+ view file @@ -263,13 +267,13 @@ module ActionMailer #:nodoc: } extlib_inheritable_accessor :default_charset - self.default_charset = "utf-8" + self.default_charset = self.default_params[:charset] extlib_inheritable_accessor :default_content_type - self.default_content_type = "text/plain" + self.default_content_type = self.default_params[:content_type] extlib_inheritable_accessor :default_mime_version - self.default_mime_version = "1.0" + self.default_mime_version = self.default_params[:mime_version] # This specifies the order that the parts of a multipart email will be. Usually you put # text/plain at the top so someone without a MIME capable email reader can read the plain @@ -278,7 +282,7 @@ module ActionMailer #:nodoc: # Any content type that is not listed here will be inserted in the order you add them to # the email after the content types you list here. extlib_inheritable_accessor :default_implicit_parts_order - self.default_implicit_parts_order = [ "text/plain", "text/enriched", "text/html" ] + self.default_implicit_parts_order = self.default_params[:parts_order] class << self @@ -366,13 +370,18 @@ module ActionMailer #:nodoc: # # headers['X-Special-Domain-Specific-Header'] = "SecretValue" # + # You can also pass a hash into headers of header field names and values, which + # will then be set on the Mail::Message object: + # + # headers {'X-Special-Domain-Specific-Header' => "SecretValue", + # 'In-Reply-To' => incoming.message_id } + # # The resulting Mail::Message will have the following in it's header: # # X-Special-Domain-Specific-Header: SecretValue def headers(args=nil) if args - ActiveSupport::Deprecation.warn "headers(Hash) is deprecated, please do headers[key] = value instead", caller[0,2] - @headers = args + @_message.headers(args) else @_message end diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 7abdf7f4f8..9a39204998 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -5,15 +5,24 @@ class BaseTest < ActiveSupport::TestCase class BaseMailer < ActionMailer::Base self.mailer_name = "base_mailer" - self.defaults :to => 'system@test.lindsaar.net', - :from => 'jose@test.plataformatec.com', - :reply_to => 'mikel@test.lindsaar.net' + defaults({:to => 'system@test.lindsaar.net', + :from => 'jose@test.plataformatec.com', + :reply_to => 'mikel@test.lindsaar.net'}) def welcome(hash = {}) headers['X-SPAM'] = "Not SPAM" mail({:subject => "The first email on new API!"}.merge!(hash)) end + def simple(hash = {}) + mail(hash) + end + + def simple_with_headers(hash = {}) + headers hash + mail + end + def attachment_with_content(hash = {}) attachments['invoice.pdf'] = 'This is test File content' mail(hash) @@ -194,9 +203,9 @@ class BaseTest < ActiveSupport::TestCase end end - test "uses default headers from class" do + test "uses random default headers from class" do with_default BaseMailer, "X-SPAM" => "Not spam" do - email = BaseMailer.welcome.deliver + email = BaseMailer.simple assert_equal("Not spam", email["X-SPAM"].decoded) end end @@ -407,6 +416,22 @@ class BaseTest < ActiveSupport::TestCase mail = BaseMailer.explicit_multipart assert_not_nil(mail.content_type_parameters[:boundary]) end + + test "can pass random headers in as a hash" do + hash = {'X-Special-Domain-Specific-Header' => "SecretValue", + 'In-Reply-To' => '1234@mikel.me.com' } + mail = BaseMailer.simple_with_headers(hash) + assert_equal('SecretValue', mail['X-Special-Domain-Specific-Header'].decoded) + assert_equal('1234@mikel.me.com', mail['In-Reply-To'].decoded) + end + + test "can pass random headers in as a hash to mail" do + hash = {'X-Special-Domain-Specific-Header' => "SecretValue", + 'In-Reply-To' => '1234@mikel.me.com' } + mail = BaseMailer.simple(hash) + assert_equal('SecretValue', mail['X-Special-Domain-Specific-Header'].decoded) + assert_equal('1234@mikel.me.com', mail['In-Reply-To'].decoded) + end protected -- cgit v1.2.3 From 7adb1ffc038e06a1c95030856859e183b181f94a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 14:09:48 +0100 Subject: Remove old fixtures files. --- railties/test/fixtures/eager/zoo.rb | 3 -- railties/test/fixtures/eager/zoo/reptile_house.rb | 2 - .../test/fixtures/environment_with_constant.rb | 1 - .../a/generators/a_generator/a_generator.rb | 4 -- .../fixtures/plugins/alternate/a/lib/.gitignore | 0 .../acts/acts_as_chunky_bacon/lib/.gitignore | 0 .../test/fixtures/plugins/default/empty/.gitignore | 0 .../test/fixtures/plugins/default/gemlike/init.rb | 1 - .../plugins/default/gemlike/lib/gemlike.rb | 2 - .../fixtures/plugins/default/gemlike/rails/init.rb | 7 ---- .../plugins/default/plugin_with_no_lib_dir/init.rb | 0 .../test/fixtures/plugins/default/stubby/about.yml | 2 - .../test/fixtures/plugins/default/stubby/init.rb | 7 ---- .../plugins/default/stubby/lib/stubby_mixin.rb | 2 - .../engine/app/controllers/engine_controller.rb | 2 - .../engines/engine/app/metal/engine_metal.rb | 10 ----- .../engines/engine/app/models/engine_model.rb | 2 - .../plugins/engines/engine/config/locales/en.yml | 2 - .../plugins/engines/engine/config/routes.rb | 3 -- .../test/fixtures/plugins/engines/engine/init.rb | 3 -- railties/test/mocks/routes.rb | 6 --- .../vendor/gems/dummy-gem-a-0.4.0/.specification | 28 ------------- .../gems/dummy-gem-a-0.4.0/lib/dummy-gem-a.rb | 1 - .../vendor/gems/dummy-gem-b-0.4.0/.specification | 28 ------------- .../gems/dummy-gem-b-0.4.0/lib/dummy-gem-b.rb | 1 - .../vendor/gems/dummy-gem-b-0.6.0/.specification | 28 ------------- .../gems/dummy-gem-b-0.6.0/lib/dummy-gem-b.rb | 1 - .../vendor/gems/dummy-gem-c-0.4.0/.specification | 28 ------------- .../gems/dummy-gem-c-0.4.0/lib/dummy-gem-c.rb | 1 - .../vendor/gems/dummy-gem-c-0.6.0/.specification | 28 ------------- .../gems/dummy-gem-c-0.6.0/lib/dummy-gem-c.rb | 1 - .../gems/dummy-gem-d-1.0.0/lib/dummy-gem-d.rb | 1 - .../vendor/gems/dummy-gem-e-1.0.0/.specification | 28 ------------- .../gems/dummy-gem-e-1.0.0/lib/dummy-gem-e.rb | 1 - .../vendor/gems/dummy-gem-f-1.0.0/.specification | 39 ----------------- .../gems/dummy-gem-f-1.0.0/lib/dummy-gem-f.rb | 1 - .../vendor/gems/dummy-gem-g-1.0.0/.specification | 39 ----------------- .../gems/dummy-gem-g-1.0.0/lib/dummy-gem-g.rb | 1 - .../vendor/gems/dummy-gem-h-1.0.0/.specification | 29 ------------- .../gems/dummy-gem-h-1.0.0/lib/dummy-gem-h.rb | 1 - .../vendor/gems/dummy-gem-i-1.0.0/.specification | 41 ------------------ .../dummy-gem-i-1.0.0/ext/dummy-gem-i/Makefile | 0 .../gems/dummy-gem-i-1.0.0/lib/dummy-gem-i.rb | 1 - .../vendor/gems/dummy-gem-j-1.0.0/.specification | 41 ------------------ .../gems/dummy-gem-j-1.0.0/lib/dummy-gem-j.rb | 1 - .../vendor/gems/dummy-gem-k-1.0.0/.specification | 49 ---------------------- .../gems/dummy-gem-k-1.0.0/lib/dummy-gem-k.rb | 1 - 47 files changed, 478 deletions(-) delete mode 100644 railties/test/fixtures/eager/zoo.rb delete mode 100644 railties/test/fixtures/eager/zoo/reptile_house.rb delete mode 100644 railties/test/fixtures/environment_with_constant.rb delete mode 100644 railties/test/fixtures/plugins/alternate/a/generators/a_generator/a_generator.rb delete mode 100644 railties/test/fixtures/plugins/alternate/a/lib/.gitignore delete mode 100644 railties/test/fixtures/plugins/default/acts/acts_as_chunky_bacon/lib/.gitignore delete mode 100644 railties/test/fixtures/plugins/default/empty/.gitignore delete mode 100644 railties/test/fixtures/plugins/default/gemlike/init.rb delete mode 100644 railties/test/fixtures/plugins/default/gemlike/lib/gemlike.rb delete mode 100644 railties/test/fixtures/plugins/default/gemlike/rails/init.rb delete mode 100644 railties/test/fixtures/plugins/default/plugin_with_no_lib_dir/init.rb delete mode 100644 railties/test/fixtures/plugins/default/stubby/about.yml delete mode 100644 railties/test/fixtures/plugins/default/stubby/init.rb delete mode 100644 railties/test/fixtures/plugins/default/stubby/lib/stubby_mixin.rb delete mode 100644 railties/test/fixtures/plugins/engines/engine/app/controllers/engine_controller.rb delete mode 100644 railties/test/fixtures/plugins/engines/engine/app/metal/engine_metal.rb delete mode 100644 railties/test/fixtures/plugins/engines/engine/app/models/engine_model.rb delete mode 100644 railties/test/fixtures/plugins/engines/engine/config/locales/en.yml delete mode 100644 railties/test/fixtures/plugins/engines/engine/config/routes.rb delete mode 100644 railties/test/fixtures/plugins/engines/engine/init.rb delete mode 100644 railties/test/mocks/routes.rb delete mode 100644 railties/test/vendor/gems/dummy-gem-a-0.4.0/.specification delete mode 100644 railties/test/vendor/gems/dummy-gem-a-0.4.0/lib/dummy-gem-a.rb delete mode 100644 railties/test/vendor/gems/dummy-gem-b-0.4.0/.specification delete mode 100644 railties/test/vendor/gems/dummy-gem-b-0.4.0/lib/dummy-gem-b.rb delete mode 100644 railties/test/vendor/gems/dummy-gem-b-0.6.0/.specification delete mode 100644 railties/test/vendor/gems/dummy-gem-b-0.6.0/lib/dummy-gem-b.rb delete mode 100644 railties/test/vendor/gems/dummy-gem-c-0.4.0/.specification delete mode 100644 railties/test/vendor/gems/dummy-gem-c-0.4.0/lib/dummy-gem-c.rb delete mode 100644 railties/test/vendor/gems/dummy-gem-c-0.6.0/.specification delete mode 100644 railties/test/vendor/gems/dummy-gem-c-0.6.0/lib/dummy-gem-c.rb delete mode 100644 railties/test/vendor/gems/dummy-gem-d-1.0.0/lib/dummy-gem-d.rb delete mode 100644 railties/test/vendor/gems/dummy-gem-e-1.0.0/.specification delete mode 100644 railties/test/vendor/gems/dummy-gem-e-1.0.0/lib/dummy-gem-e.rb delete mode 100644 railties/test/vendor/gems/dummy-gem-f-1.0.0/.specification delete mode 100644 railties/test/vendor/gems/dummy-gem-f-1.0.0/lib/dummy-gem-f.rb delete mode 100644 railties/test/vendor/gems/dummy-gem-g-1.0.0/.specification delete mode 100644 railties/test/vendor/gems/dummy-gem-g-1.0.0/lib/dummy-gem-g.rb delete mode 100644 railties/test/vendor/gems/dummy-gem-h-1.0.0/.specification delete mode 100644 railties/test/vendor/gems/dummy-gem-h-1.0.0/lib/dummy-gem-h.rb delete mode 100644 railties/test/vendor/gems/dummy-gem-i-1.0.0/.specification delete mode 100644 railties/test/vendor/gems/dummy-gem-i-1.0.0/ext/dummy-gem-i/Makefile delete mode 100644 railties/test/vendor/gems/dummy-gem-i-1.0.0/lib/dummy-gem-i.rb delete mode 100644 railties/test/vendor/gems/dummy-gem-j-1.0.0/.specification delete mode 100644 railties/test/vendor/gems/dummy-gem-j-1.0.0/lib/dummy-gem-j.rb delete mode 100644 railties/test/vendor/gems/dummy-gem-k-1.0.0/.specification delete mode 100644 railties/test/vendor/gems/dummy-gem-k-1.0.0/lib/dummy-gem-k.rb diff --git a/railties/test/fixtures/eager/zoo.rb b/railties/test/fixtures/eager/zoo.rb deleted file mode 100644 index 8b10ef984b..0000000000 --- a/railties/test/fixtures/eager/zoo.rb +++ /dev/null @@ -1,3 +0,0 @@ -class Zoo - include ReptileHouse -end \ No newline at end of file diff --git a/railties/test/fixtures/eager/zoo/reptile_house.rb b/railties/test/fixtures/eager/zoo/reptile_house.rb deleted file mode 100644 index 82bbafce79..0000000000 --- a/railties/test/fixtures/eager/zoo/reptile_house.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Zoo::ReptileHouse -end \ No newline at end of file diff --git a/railties/test/fixtures/environment_with_constant.rb b/railties/test/fixtures/environment_with_constant.rb deleted file mode 100644 index 23e1f7afd9..0000000000 --- a/railties/test/fixtures/environment_with_constant.rb +++ /dev/null @@ -1 +0,0 @@ -$initialize_test_set_from_env = 'success' diff --git a/railties/test/fixtures/plugins/alternate/a/generators/a_generator/a_generator.rb b/railties/test/fixtures/plugins/alternate/a/generators/a_generator/a_generator.rb deleted file mode 100644 index b33f2dad18..0000000000 --- a/railties/test/fixtures/plugins/alternate/a/generators/a_generator/a_generator.rb +++ /dev/null @@ -1,4 +0,0 @@ -class AGenerator < Rails::Generator::Base - def manifest - end -end diff --git a/railties/test/fixtures/plugins/alternate/a/lib/.gitignore b/railties/test/fixtures/plugins/alternate/a/lib/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/railties/test/fixtures/plugins/default/acts/acts_as_chunky_bacon/lib/.gitignore b/railties/test/fixtures/plugins/default/acts/acts_as_chunky_bacon/lib/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/railties/test/fixtures/plugins/default/empty/.gitignore b/railties/test/fixtures/plugins/default/empty/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/railties/test/fixtures/plugins/default/gemlike/init.rb b/railties/test/fixtures/plugins/default/gemlike/init.rb deleted file mode 100644 index 6a771b5b68..0000000000 --- a/railties/test/fixtures/plugins/default/gemlike/init.rb +++ /dev/null @@ -1 +0,0 @@ -raise 'This init.rb should not be evaluated because rails/init.rb exists' diff --git a/railties/test/fixtures/plugins/default/gemlike/lib/gemlike.rb b/railties/test/fixtures/plugins/default/gemlike/lib/gemlike.rb deleted file mode 100644 index 2088103e45..0000000000 --- a/railties/test/fixtures/plugins/default/gemlike/lib/gemlike.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Gemlike -end \ No newline at end of file diff --git a/railties/test/fixtures/plugins/default/gemlike/rails/init.rb b/railties/test/fixtures/plugins/default/gemlike/rails/init.rb deleted file mode 100644 index 171a293eb3..0000000000 --- a/railties/test/fixtures/plugins/default/gemlike/rails/init.rb +++ /dev/null @@ -1,7 +0,0 @@ -# I have access to my directory and the Rails config. -raise 'directory expected but undefined in init.rb' unless defined? directory -raise 'config expected but undefined in init.rb' unless defined? config - -# My lib/ dir must be in the load path. -require 'gemlike' -raise 'missing mixin from my lib/ dir' unless defined? Gemlike diff --git a/railties/test/fixtures/plugins/default/plugin_with_no_lib_dir/init.rb b/railties/test/fixtures/plugins/default/plugin_with_no_lib_dir/init.rb deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/railties/test/fixtures/plugins/default/stubby/about.yml b/railties/test/fixtures/plugins/default/stubby/about.yml deleted file mode 100644 index d85a7cc0e3..0000000000 --- a/railties/test/fixtures/plugins/default/stubby/about.yml +++ /dev/null @@ -1,2 +0,0 @@ -author: Plugin Author -version: 1.0.0 \ No newline at end of file diff --git a/railties/test/fixtures/plugins/default/stubby/init.rb b/railties/test/fixtures/plugins/default/stubby/init.rb deleted file mode 100644 index 81beeb0d32..0000000000 --- a/railties/test/fixtures/plugins/default/stubby/init.rb +++ /dev/null @@ -1,7 +0,0 @@ -# I have access to my directory and the Rails config. -raise 'directory expected but undefined in init.rb' unless defined? directory -raise 'config expected but undefined in init.rb' unless defined? config - -# My lib/ dir must be in the load path. -require 'stubby_mixin' -raise 'missing mixin from my lib/ dir' unless defined? StubbyMixin diff --git a/railties/test/fixtures/plugins/default/stubby/lib/stubby_mixin.rb b/railties/test/fixtures/plugins/default/stubby/lib/stubby_mixin.rb deleted file mode 100644 index 2d569e5002..0000000000 --- a/railties/test/fixtures/plugins/default/stubby/lib/stubby_mixin.rb +++ /dev/null @@ -1,2 +0,0 @@ -module StubbyMixin -end diff --git a/railties/test/fixtures/plugins/engines/engine/app/controllers/engine_controller.rb b/railties/test/fixtures/plugins/engines/engine/app/controllers/engine_controller.rb deleted file mode 100644 index 323ee1c4dc..0000000000 --- a/railties/test/fixtures/plugins/engines/engine/app/controllers/engine_controller.rb +++ /dev/null @@ -1,2 +0,0 @@ -class EngineController -end \ No newline at end of file diff --git a/railties/test/fixtures/plugins/engines/engine/app/metal/engine_metal.rb b/railties/test/fixtures/plugins/engines/engine/app/metal/engine_metal.rb deleted file mode 100644 index d67a127ca7..0000000000 --- a/railties/test/fixtures/plugins/engines/engine/app/metal/engine_metal.rb +++ /dev/null @@ -1,10 +0,0 @@ -class EngineMetal - def self.call(env) - if env["PATH_INFO"] =~ /^\/metal/ - [200, {"Content-Type" => "text/html"}, ["Engine metal"]] - else - [404, {"Content-Type" => "text/html"}, ["Not Found"]] - end - end -end - diff --git a/railties/test/fixtures/plugins/engines/engine/app/models/engine_model.rb b/railties/test/fixtures/plugins/engines/engine/app/models/engine_model.rb deleted file mode 100644 index e265712185..0000000000 --- a/railties/test/fixtures/plugins/engines/engine/app/models/engine_model.rb +++ /dev/null @@ -1,2 +0,0 @@ -class EngineModel -end \ No newline at end of file diff --git a/railties/test/fixtures/plugins/engines/engine/config/locales/en.yml b/railties/test/fixtures/plugins/engines/engine/config/locales/en.yml deleted file mode 100644 index 641a7e035c..0000000000 --- a/railties/test/fixtures/plugins/engines/engine/config/locales/en.yml +++ /dev/null @@ -1,2 +0,0 @@ -en: - hello: "Hello from Engine" diff --git a/railties/test/fixtures/plugins/engines/engine/config/routes.rb b/railties/test/fixtures/plugins/engines/engine/config/routes.rb deleted file mode 100644 index da44595693..0000000000 --- a/railties/test/fixtures/plugins/engines/engine/config/routes.rb +++ /dev/null @@ -1,3 +0,0 @@ -ActionController::Routing::Routes.draw do |map| - match '/engine', :to => "engine" -end diff --git a/railties/test/fixtures/plugins/engines/engine/init.rb b/railties/test/fixtures/plugins/engines/engine/init.rb deleted file mode 100644 index 64e9ae6c30..0000000000 --- a/railties/test/fixtures/plugins/engines/engine/init.rb +++ /dev/null @@ -1,3 +0,0 @@ -# My app/models dir must be in the load path. -require 'engine_model' -raise LoadError, 'missing model from my app/models dir' unless defined?(EngineModel) diff --git a/railties/test/mocks/routes.rb b/railties/test/mocks/routes.rb deleted file mode 100644 index ea12863683..0000000000 --- a/railties/test/mocks/routes.rb +++ /dev/null @@ -1,6 +0,0 @@ -module ActionController - module Routing - class Routes - end - end -end diff --git a/railties/test/vendor/gems/dummy-gem-a-0.4.0/.specification b/railties/test/vendor/gems/dummy-gem-a-0.4.0/.specification deleted file mode 100644 index 86dba2092c..0000000000 --- a/railties/test/vendor/gems/dummy-gem-a-0.4.0/.specification +++ /dev/null @@ -1,28 +0,0 @@ ---- !ruby/object:Gem::Specification -name: dummy-gem-a -version: !ruby/object:Gem::Version - version: 0.4.0 -platform: ruby -authors: -- "Nobody" -date: 2008-10-03 00:00:00 -04:00 -files: -- lib -- lib/dummy-gem-a.rb -require_paths: -- lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -requirements: [] -specification_version: 2 -summary: Dummy Gem A diff --git a/railties/test/vendor/gems/dummy-gem-a-0.4.0/lib/dummy-gem-a.rb b/railties/test/vendor/gems/dummy-gem-a-0.4.0/lib/dummy-gem-a.rb deleted file mode 100644 index 0453b38ab8..0000000000 --- a/railties/test/vendor/gems/dummy-gem-a-0.4.0/lib/dummy-gem-a.rb +++ /dev/null @@ -1 +0,0 @@ -DUMMY_GEM_A_VERSION="0.4.0" diff --git a/railties/test/vendor/gems/dummy-gem-b-0.4.0/.specification b/railties/test/vendor/gems/dummy-gem-b-0.4.0/.specification deleted file mode 100644 index 5ea692d7a1..0000000000 --- a/railties/test/vendor/gems/dummy-gem-b-0.4.0/.specification +++ /dev/null @@ -1,28 +0,0 @@ ---- !ruby/object:Gem::Specification -name: dummy-gem-b -version: !ruby/object:Gem::Version - version: 0.4.0 -platform: ruby -authors: -- "Nobody" -date: 2008-10-03 00:00:00 -04:00 -files: -- lib -- lib/dummy-gem-b.rb -require_paths: -- lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -requirements: [] -specification_version: 2 -summary: Dummy Gem B diff --git a/railties/test/vendor/gems/dummy-gem-b-0.4.0/lib/dummy-gem-b.rb b/railties/test/vendor/gems/dummy-gem-b-0.4.0/lib/dummy-gem-b.rb deleted file mode 100644 index 850b5dda83..0000000000 --- a/railties/test/vendor/gems/dummy-gem-b-0.4.0/lib/dummy-gem-b.rb +++ /dev/null @@ -1 +0,0 @@ -DUMMY_GEM_B_VERSION="0.4.0" diff --git a/railties/test/vendor/gems/dummy-gem-b-0.6.0/.specification b/railties/test/vendor/gems/dummy-gem-b-0.6.0/.specification deleted file mode 100644 index ab4707124a..0000000000 --- a/railties/test/vendor/gems/dummy-gem-b-0.6.0/.specification +++ /dev/null @@ -1,28 +0,0 @@ ---- !ruby/object:Gem::Specification -name: dummy-gem-b -version: !ruby/object:Gem::Version - version: 0.6.0 -platform: ruby -authors: -- "Nobody" -date: 2008-10-03 00:00:00 -04:00 -files: -- lib -- lib/dummy-gem-b.rb -require_paths: -- lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -requirements: [] -specification_version: 2 -summary: Dummy Gem B diff --git a/railties/test/vendor/gems/dummy-gem-b-0.6.0/lib/dummy-gem-b.rb b/railties/test/vendor/gems/dummy-gem-b-0.6.0/lib/dummy-gem-b.rb deleted file mode 100644 index 7d6d01cd48..0000000000 --- a/railties/test/vendor/gems/dummy-gem-b-0.6.0/lib/dummy-gem-b.rb +++ /dev/null @@ -1 +0,0 @@ -DUMMY_GEM_B_VERSION="0.6.0" diff --git a/railties/test/vendor/gems/dummy-gem-c-0.4.0/.specification b/railties/test/vendor/gems/dummy-gem-c-0.4.0/.specification deleted file mode 100644 index f90f60424c..0000000000 --- a/railties/test/vendor/gems/dummy-gem-c-0.4.0/.specification +++ /dev/null @@ -1,28 +0,0 @@ ---- !ruby/object:Gem::Specification -name: dummy-gem-c -version: !ruby/object:Gem::Version - version: 0.4.0 -platform: ruby -authors: -- "Nobody" -date: 2008-10-03 00:00:00 -04:00 -files: -- lib -- lib/dummy-gem-c.rb -require_paths: -- lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -requirements: [] -specification_version: 2 -summary: Dummy Gem C diff --git a/railties/test/vendor/gems/dummy-gem-c-0.4.0/lib/dummy-gem-c.rb b/railties/test/vendor/gems/dummy-gem-c-0.4.0/lib/dummy-gem-c.rb deleted file mode 100644 index 1a416bef82..0000000000 --- a/railties/test/vendor/gems/dummy-gem-c-0.4.0/lib/dummy-gem-c.rb +++ /dev/null @@ -1 +0,0 @@ -DUMMY_GEM_C_VERSION="0.4.0" diff --git a/railties/test/vendor/gems/dummy-gem-c-0.6.0/.specification b/railties/test/vendor/gems/dummy-gem-c-0.6.0/.specification deleted file mode 100644 index e75c0aa66a..0000000000 --- a/railties/test/vendor/gems/dummy-gem-c-0.6.0/.specification +++ /dev/null @@ -1,28 +0,0 @@ ---- !ruby/object:Gem::Specification -name: dummy-gem-c -version: !ruby/object:Gem::Version - version: 0.6.0 -platform: ruby -authors: -- "Nobody" -date: 2008-10-03 00:00:00 -04:00 -files: -- lib -- lib/dummy-gem-c.rb -require_paths: -- lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -requirements: [] -specification_version: 2 -summary: Dummy Gem C diff --git a/railties/test/vendor/gems/dummy-gem-c-0.6.0/lib/dummy-gem-c.rb b/railties/test/vendor/gems/dummy-gem-c-0.6.0/lib/dummy-gem-c.rb deleted file mode 100644 index 9ba2ca8bb5..0000000000 --- a/railties/test/vendor/gems/dummy-gem-c-0.6.0/lib/dummy-gem-c.rb +++ /dev/null @@ -1 +0,0 @@ -DUMMY_GEM_C_VERSION="0.6.0" diff --git a/railties/test/vendor/gems/dummy-gem-d-1.0.0/lib/dummy-gem-d.rb b/railties/test/vendor/gems/dummy-gem-d-1.0.0/lib/dummy-gem-d.rb deleted file mode 100644 index e5cb007e5f..0000000000 --- a/railties/test/vendor/gems/dummy-gem-d-1.0.0/lib/dummy-gem-d.rb +++ /dev/null @@ -1 +0,0 @@ -DUMMY_GEM_D_VERSION="1.0.0" diff --git a/railties/test/vendor/gems/dummy-gem-e-1.0.0/.specification b/railties/test/vendor/gems/dummy-gem-e-1.0.0/.specification deleted file mode 100644 index ce4443c8be..0000000000 --- a/railties/test/vendor/gems/dummy-gem-e-1.0.0/.specification +++ /dev/null @@ -1,28 +0,0 @@ ---- !ruby/object:Gem::Specification -name: dummy-gem-e -version: !ruby/object:Gem::Version - version: 1.3.0 -platform: ruby -authors: -- "Nobody" -date: 2008-10-03 00:00:00 -04:00 -files: -- lib -- lib/dummy-gem-e.rb -require_paths: -- lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -requirements: [] -specification_version: 2 -summary: Dummy Gem E diff --git a/railties/test/vendor/gems/dummy-gem-e-1.0.0/lib/dummy-gem-e.rb b/railties/test/vendor/gems/dummy-gem-e-1.0.0/lib/dummy-gem-e.rb deleted file mode 100644 index 48bf91a701..0000000000 --- a/railties/test/vendor/gems/dummy-gem-e-1.0.0/lib/dummy-gem-e.rb +++ /dev/null @@ -1 +0,0 @@ -DUMMY_GEM_E_VERSION="1.0.0" diff --git a/railties/test/vendor/gems/dummy-gem-f-1.0.0/.specification b/railties/test/vendor/gems/dummy-gem-f-1.0.0/.specification deleted file mode 100644 index 70a36b9a8c..0000000000 --- a/railties/test/vendor/gems/dummy-gem-f-1.0.0/.specification +++ /dev/null @@ -1,39 +0,0 @@ ---- !ruby/object:Gem::Specification -name: dummy-gem-f -version: !ruby/object:Gem::Version - version: 1.3.0 -platform: ruby -authors: -- "Nobody" -date: 2008-10-03 00:00:00 -04:00 -dependencies: -- !ruby/object:Gem::Dependency - name: absolutely-no-such-gem - type: :runtime - version_requirement: - version_requirements: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: 1.0.0 - version: -files: -- lib -- lib/dummy-gem-f.rb -require_paths: -- lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -requirements: [] -specification_version: 2 -summary: Dummy Gem F diff --git a/railties/test/vendor/gems/dummy-gem-f-1.0.0/lib/dummy-gem-f.rb b/railties/test/vendor/gems/dummy-gem-f-1.0.0/lib/dummy-gem-f.rb deleted file mode 100644 index 0271c8c48a..0000000000 --- a/railties/test/vendor/gems/dummy-gem-f-1.0.0/lib/dummy-gem-f.rb +++ /dev/null @@ -1 +0,0 @@ -DUMMY_GEM_F_VERSION="1.0.0" diff --git a/railties/test/vendor/gems/dummy-gem-g-1.0.0/.specification b/railties/test/vendor/gems/dummy-gem-g-1.0.0/.specification deleted file mode 100644 index 27e29912a6..0000000000 --- a/railties/test/vendor/gems/dummy-gem-g-1.0.0/.specification +++ /dev/null @@ -1,39 +0,0 @@ ---- !ruby/object:Gem::Specification -name: dummy-gem-g -version: !ruby/object:Gem::Version - version: 1.3.0 -platform: ruby -authors: -- "Nobody" -date: 2008-10-03 00:00:00 -04:00 -dependencies: -- !ruby/object:Gem::Dependency - name: dummy-gem-f - type: :runtime - version_requirement: - version_requirements: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: 1.0.0 - version: -files: -- lib -- lib/dummy-gem-g.rb -require_paths: -- lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -requirements: [] -specification_version: 2 -summary: Dummy Gem G diff --git a/railties/test/vendor/gems/dummy-gem-g-1.0.0/lib/dummy-gem-g.rb b/railties/test/vendor/gems/dummy-gem-g-1.0.0/lib/dummy-gem-g.rb deleted file mode 100644 index 8fc056586c..0000000000 --- a/railties/test/vendor/gems/dummy-gem-g-1.0.0/lib/dummy-gem-g.rb +++ /dev/null @@ -1 +0,0 @@ -DUMMY_GEM_G_VERSION="1.0.0" diff --git a/railties/test/vendor/gems/dummy-gem-h-1.0.0/.specification b/railties/test/vendor/gems/dummy-gem-h-1.0.0/.specification deleted file mode 100644 index b3f7930948..0000000000 --- a/railties/test/vendor/gems/dummy-gem-h-1.0.0/.specification +++ /dev/null @@ -1,29 +0,0 @@ ---- !ruby/object:Gem::Specification -name: dummy-gem-h -version: !ruby/object:Gem::Version - version: 1.3.0 -platform: ruby -authors: -- "Nobody" -date: 2008-10-03 00:00:00 -04:00 -dependencies: -files: -- lib -- lib/dummy-gem-h.rb -require_paths: -- lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -requirements: [] -specification_version: 2 -summary: Dummy Gem H diff --git a/railties/test/vendor/gems/dummy-gem-h-1.0.0/lib/dummy-gem-h.rb b/railties/test/vendor/gems/dummy-gem-h-1.0.0/lib/dummy-gem-h.rb deleted file mode 100644 index 0f91234936..0000000000 --- a/railties/test/vendor/gems/dummy-gem-h-1.0.0/lib/dummy-gem-h.rb +++ /dev/null @@ -1 +0,0 @@ -DUMMY_GEM_H_VERSION="1.0.0" diff --git a/railties/test/vendor/gems/dummy-gem-i-1.0.0/.specification b/railties/test/vendor/gems/dummy-gem-i-1.0.0/.specification deleted file mode 100644 index 50b4969da5..0000000000 --- a/railties/test/vendor/gems/dummy-gem-i-1.0.0/.specification +++ /dev/null @@ -1,41 +0,0 @@ ---- !ruby/object:Gem::Specification -name: dummy-gem-i -version: !ruby/object:Gem::Version - version: 1.3.0 -platform: ruby -authors: -- "Nobody" -date: 2008-10-03 00:00:00 -04:00 -dependencies: -- !ruby/object:Gem::Dependency - name: dummy-gem-i - type: :runtime - version_requirement: - version_requirements: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: 1.0.0 - version: -extensions: -- ext/dummy-gem-i/extconf.rb -files: -- lib -- lib/dummy-gem-i.rb -require_paths: -- lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -requirements: [] -specification_version: 2 -summary: Dummy Gem G diff --git a/railties/test/vendor/gems/dummy-gem-i-1.0.0/ext/dummy-gem-i/Makefile b/railties/test/vendor/gems/dummy-gem-i-1.0.0/ext/dummy-gem-i/Makefile deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/railties/test/vendor/gems/dummy-gem-i-1.0.0/lib/dummy-gem-i.rb b/railties/test/vendor/gems/dummy-gem-i-1.0.0/lib/dummy-gem-i.rb deleted file mode 100644 index 2f9a376c2c..0000000000 --- a/railties/test/vendor/gems/dummy-gem-i-1.0.0/lib/dummy-gem-i.rb +++ /dev/null @@ -1 +0,0 @@ -DUMMY_GEM_I_VERSION="1.0.0" diff --git a/railties/test/vendor/gems/dummy-gem-j-1.0.0/.specification b/railties/test/vendor/gems/dummy-gem-j-1.0.0/.specification deleted file mode 100644 index 2c456546fc..0000000000 --- a/railties/test/vendor/gems/dummy-gem-j-1.0.0/.specification +++ /dev/null @@ -1,41 +0,0 @@ ---- !ruby/object:Gem::Specification -name: dummy-gem-j -version: !ruby/object:Gem::Version - version: 1.3.0 -platform: ruby -authors: -- "Nobody" -date: 2008-10-03 00:00:00 -04:00 -dependencies: -- !ruby/object:Gem::Dependency - name: dummy-gem-j - type: :runtime - version_requirement: - version_requirements: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: 1.0.0 - version: -extensions: -- ext/dummy-gem-j/extconf.rb -files: -- lib -- lib/dummy-gem-j.rb -require_paths: -- lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -requirements: [] -specification_version: 2 -summary: Dummy Gem G diff --git a/railties/test/vendor/gems/dummy-gem-j-1.0.0/lib/dummy-gem-j.rb b/railties/test/vendor/gems/dummy-gem-j-1.0.0/lib/dummy-gem-j.rb deleted file mode 100644 index 8ecd363ff8..0000000000 --- a/railties/test/vendor/gems/dummy-gem-j-1.0.0/lib/dummy-gem-j.rb +++ /dev/null @@ -1 +0,0 @@ -DUMMY_GEM_J_VERSION="1.0.0" diff --git a/railties/test/vendor/gems/dummy-gem-k-1.0.0/.specification b/railties/test/vendor/gems/dummy-gem-k-1.0.0/.specification deleted file mode 100644 index 20edd0f856..0000000000 --- a/railties/test/vendor/gems/dummy-gem-k-1.0.0/.specification +++ /dev/null @@ -1,49 +0,0 @@ ---- !ruby/object:Gem::Specification -name: dummy-gem-k -version: !ruby/object:Gem::Version - version: 1.3.0 -platform: ruby -authors: -- "Nobody" -date: 2008-10-03 00:00:00 -04:00 -dependencies: -- !ruby/object:Gem::Dependency - name: dummy-gem-k - type: :runtime - version_requirement: - version_requirements: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: 1.0.0 - version: -- !ruby/object:Gem::Dependency - name: dummy-gem-h - type: :development - version_requirement: - version_requirements: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: 1.0.0 - version: -files: -- lib -- lib/dummy-gem-k.rb -require_paths: -- lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: "0" - version: -requirements: [] -specification_version: 2 -summary: Dummy Gem I diff --git a/railties/test/vendor/gems/dummy-gem-k-1.0.0/lib/dummy-gem-k.rb b/railties/test/vendor/gems/dummy-gem-k-1.0.0/lib/dummy-gem-k.rb deleted file mode 100644 index 97fb1d69ce..0000000000 --- a/railties/test/vendor/gems/dummy-gem-k-1.0.0/lib/dummy-gem-k.rb +++ /dev/null @@ -1 +0,0 @@ -DUMMY_GEM_K_VERSION="1.0.0" -- cgit v1.2.3 From 21dcc20ed29053c8ffd4d3a5a68a40f6e225512b Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Wed, 27 Jan 2010 00:18:40 +1100 Subject: Fixed up documentation to reflect code change and cleaned up tests of spurious #deliver calls --- actionmailer/lib/action_mailer/base.rb | 40 +++++++++--------- actionmailer/test/base_test.rb | 77 +++++++++++++++++----------------- 2 files changed, 58 insertions(+), 59 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index c01ca876dc..868d785129 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -23,7 +23,7 @@ module ActionMailer #:nodoc: # Examples: # # class Notifier < ActionMailer::Base - # delivers_from 'system@example.com' + # defaults({:from => 'system@example.com'}) # # def welcome(recipient) # @account = recipient @@ -190,9 +190,14 @@ module ActionMailer #:nodoc: # # These options are specified on the class level, like ActionMailer::Base.template_root = "/my/templates" # - # * delivers_from - Pass this the address that then defaults as the +from+ address on all the - # emails sent. Can be overridden on a per mail basis by passing :from => 'another@address' in - # the +mail+ method. + # * defaults - This is a class wide hash of :key => value pairs containing + # default values for the specified header fields of the Mail::Message. You can + # specify a default for any valid header for Mail::Message and it will be used if + # you do not override it. The defaults set by Action Mailer are: + # * :mime_version => "1.0" + # * :charset => "utf-8", + # * :content_type => "text/plain", + # * :parts_order => [ "text/plain", "text/enriched", "text/html" ] # # * logger - the logger is used for generating information on the mailing run if available. # Can be set to nil for no logging. Compatible with both Ruby's own Logger and Log4r loggers. @@ -226,20 +231,19 @@ module ActionMailer #:nodoc: # * deliveries - Keeps an array of all the emails sent out through the Action Mailer with delivery_method :test. Most useful # for unit and functional testing. # - # * default_charset - The default charset used for the body and to encode the subject. Defaults to UTF-8. You can also - # pick a different charset from inside a method with +charset+. + # * default_charset - This is now deprecated, use the +defaults+ method above to + # set the default +:charset+. # - # * default_content_type - The default content type used for the main part of the message. Defaults to "text/plain". You - # can also pick a different content type from inside a method with +content_type+. + # * default_content_type - This is now deprecated, use the +defaults+ method above + # to set the default +:content_type+. # - # * default_mime_version - The default mime version used for the message. Defaults to 1.0. You - # can also pick a different value from inside a method with +mime_version+. + # * default_mime_version - This is now deprecated, use the +defaults+ method above + # to set the default +:mime_version+. # - # * default_implicit_parts_order - When a message is built implicitly (i.e. multiple parts are assembled from templates - # which specify the content type in their filenames) this variable controls how the parts are ordered. Defaults to - # ["text/html", "text/enriched", "text/plain"]. Items that appear first in the array have higher priority in the mail client - # and appear last in the mime encoded message. You can also pick a different order from inside a method with - # +implicit_parts_order+. + # * default_implicit_parts_order - This is now deprecated, use the +defaults+ method above + # to set the default +:parts_order+. Parts Order is used when a message is built implicitly + # (i.e. multiple parts are assembled from templates which specify the content type in their + # filenames) this variable controls how the parts are ordered. class Base < AbstractController::Base include DeliveryMethods, Quoting abstract! @@ -275,12 +279,6 @@ module ActionMailer #:nodoc: extlib_inheritable_accessor :default_mime_version self.default_mime_version = self.default_params[:mime_version] - # This specifies the order that the parts of a multipart email will be. Usually you put - # text/plain at the top so someone without a MIME capable email reader can read the plain - # text of your email first. - # - # Any content type that is not listed here will be inserted in the order you add them to - # the email after the content types you list here. extlib_inheritable_accessor :default_implicit_parts_order self.default_implicit_parts_order = self.default_params[:parts_order] diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 9a39204998..6900e77178 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -73,12 +73,12 @@ class BaseTest < ActiveSupport::TestCase end test "method call to mail does not raise error" do - assert_nothing_raised { BaseMailer.welcome.deliver } + assert_nothing_raised { BaseMailer.welcome } end # Basic mail usage without block test "mail() should set the headers of the mail message" do - email = BaseMailer.welcome.deliver + email = BaseMailer.welcome assert_equal(['system@test.lindsaar.net'], email.to) assert_equal(['jose@test.plataformatec.com'], email.from) assert_equal('The first email on new API!', email.subject) @@ -86,7 +86,7 @@ class BaseTest < ActiveSupport::TestCase test "mail() with from overwrites the class level default" do email = BaseMailer.welcome(:from => 'someone@example.com', - :to => 'another@example.org').deliver + :to => 'another@example.org') assert_equal(['someone@example.com'], email.from) assert_equal(['another@example.org'], email.to) end @@ -99,7 +99,7 @@ class BaseTest < ActiveSupport::TestCase :charset => 'iso-8559-1', :mime_version => '2.0', :reply_to => 'reply-to@test.lindsaar.net', - :date => @time).deliver + :date => @time) assert_equal(['bcc@test.lindsaar.net'], email.bcc) assert_equal(['cc@test.lindsaar.net'], email.cc) assert_equal('multipart/mixed', email.content_type) @@ -110,50 +110,50 @@ class BaseTest < ActiveSupport::TestCase end test "mail() renders the template using the method being processed" do - email = BaseMailer.welcome.deliver + email = BaseMailer.welcome assert_equal("Welcome", email.body.encoded) end test "can pass in :body to the mail method hash" do - email = BaseMailer.welcome(:body => "Hello there").deliver + email = BaseMailer.welcome(:body => "Hello there") assert_equal("text/plain", email.mime_type) assert_equal("Hello there", email.body.encoded) end # Custom headers test "custom headers" do - email = BaseMailer.welcome.deliver + email = BaseMailer.welcome assert_equal("Not SPAM", email['X-SPAM'].decoded) end # Attachments test "attachment with content" do - email = BaseMailer.attachment_with_content.deliver + email = BaseMailer.attachment_with_content assert_equal(1, email.attachments.length) assert_equal('invoice.pdf', email.attachments[0].filename) assert_equal('This is test File content', email.attachments['invoice.pdf'].decoded) end test "attachment gets content type from filename" do - email = BaseMailer.attachment_with_content.deliver + email = BaseMailer.attachment_with_content assert_equal('invoice.pdf', email.attachments[0].filename) end test "attachment with hash" do - email = BaseMailer.attachment_with_hash.deliver + email = BaseMailer.attachment_with_hash assert_equal(1, email.attachments.length) assert_equal('invoice.jpg', email.attachments[0].filename) assert_equal("\312\213\254\232)b", email.attachments['invoice.jpg'].decoded) end test "sets mime type to multipart/mixed when attachment is included" do - email = BaseMailer.attachment_with_content.deliver + email = BaseMailer.attachment_with_content assert_equal(1, email.attachments.length) assert_equal("multipart/mixed", email.mime_type) end test "adds the rendered template as part" do - email = BaseMailer.attachment_with_content.deliver + email = BaseMailer.attachment_with_content assert_equal(2, email.parts.length) assert_equal("multipart/mixed", email.mime_type) assert_equal("text/html", email.parts[0].mime_type) @@ -163,7 +163,7 @@ class BaseTest < ActiveSupport::TestCase end test "adds the given :body as part" do - email = BaseMailer.attachment_with_content(:body => "I'm the eggman").deliver + email = BaseMailer.attachment_with_content(:body => "I'm the eggman") assert_equal(2, email.parts.length) assert_equal("multipart/mixed", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) @@ -175,30 +175,30 @@ class BaseTest < ActiveSupport::TestCase # Defaults values test "uses default charset from class" do with_default BaseMailer, :charset => "US-ASCII" do - email = BaseMailer.welcome.deliver + email = BaseMailer.welcome assert_equal("US-ASCII", email.charset) - email = BaseMailer.welcome(:charset => "iso-8559-1").deliver + email = BaseMailer.welcome(:charset => "iso-8559-1") assert_equal("iso-8559-1", email.charset) end end test "uses default content type from class" do with_default BaseMailer, :content_type => "text/html" do - email = BaseMailer.welcome.deliver + email = BaseMailer.welcome assert_equal("text/html", email.mime_type) - email = BaseMailer.welcome(:content_type => "text/plain").deliver + email = BaseMailer.welcome(:content_type => "text/plain") assert_equal("text/plain", email.mime_type) end end test "uses default mime version from class" do with_default BaseMailer, :mime_version => "2.0" do - email = BaseMailer.welcome.deliver + email = BaseMailer.welcome assert_equal("2.0", email.mime_version) - email = BaseMailer.welcome(:mime_version => "1.0").deliver + email = BaseMailer.welcome(:mime_version => "1.0") assert_equal("1.0", email.mime_version) end end @@ -212,17 +212,17 @@ class BaseTest < ActiveSupport::TestCase test "subject gets default from I18n" do BaseMailer.defaults[:subject] = nil - email = BaseMailer.welcome(:subject => nil).deliver + email = BaseMailer.welcome(:subject => nil) assert_equal "Welcome", email.subject I18n.backend.store_translations('en', :actionmailer => {:base_mailer => {:welcome => {:subject => "New Subject!"}}}) - email = BaseMailer.welcome(:subject => nil).deliver + email = BaseMailer.welcome(:subject => nil) assert_equal "New Subject!", email.subject end # Implicit multipart test "implicit multipart" do - email = BaseMailer.implicit_multipart.deliver + email = BaseMailer.implicit_multipart assert_equal(2, email.parts.size) assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) @@ -234,18 +234,18 @@ class BaseTest < ActiveSupport::TestCase test "implicit multipart with sort order" do order = ["text/html", "text/plain"] with_default BaseMailer, :parts_order => order do - email = BaseMailer.implicit_multipart.deliver + email = BaseMailer.implicit_multipart assert_equal("text/html", email.parts[0].mime_type) assert_equal("text/plain", email.parts[1].mime_type) - email = BaseMailer.implicit_multipart(:parts_order => order.reverse).deliver + email = BaseMailer.implicit_multipart(:parts_order => order.reverse) assert_equal("text/plain", email.parts[0].mime_type) assert_equal("text/html", email.parts[1].mime_type) end end test "implicit multipart with attachments creates nested parts" do - email = BaseMailer.implicit_multipart(:attachments => true).deliver + email = BaseMailer.implicit_multipart(:attachments => true) assert_equal("application/pdf", email.parts[0].mime_type) assert_equal("multipart/alternative", email.parts[1].mime_type) assert_equal("text/plain", email.parts[1].parts[0].mime_type) @@ -257,7 +257,7 @@ class BaseTest < ActiveSupport::TestCase test "implicit multipart with attachments and sort order" do order = ["text/html", "text/plain"] with_default BaseMailer, :parts_order => order do - email = BaseMailer.implicit_multipart(:attachments => true).deliver + email = BaseMailer.implicit_multipart(:attachments => true) assert_equal("application/pdf", email.parts[0].mime_type) assert_equal("multipart/alternative", email.parts[1].mime_type) assert_equal("text/plain", email.parts[1].parts[1].mime_type) @@ -266,7 +266,7 @@ class BaseTest < ActiveSupport::TestCase end test "implicit multipart with default locale" do - email = BaseMailer.implicit_with_locale.deliver + email = BaseMailer.implicit_with_locale assert_equal(2, email.parts.size) assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) @@ -277,7 +277,7 @@ class BaseTest < ActiveSupport::TestCase test "implicit multipart with other locale" do swap I18n, :locale => :pl do - email = BaseMailer.implicit_with_locale.deliver + email = BaseMailer.implicit_with_locale assert_equal(2, email.parts.size) assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) @@ -290,7 +290,7 @@ class BaseTest < ActiveSupport::TestCase test "implicit multipart with several view paths uses the first one with template" do begin BaseMailer.view_paths.unshift(File.join(FIXTURE_LOAD_PATH, "another.path")) - email = BaseMailer.welcome.deliver + email = BaseMailer.welcome assert_equal("Welcome from another path", email.body.encoded) ensure BaseMailer.view_paths.shift @@ -300,7 +300,7 @@ class BaseTest < ActiveSupport::TestCase test "implicit multipart with inexistent templates uses the next view path" do begin BaseMailer.view_paths.unshift(File.join(FIXTURE_LOAD_PATH, "unknown")) - email = BaseMailer.welcome.deliver + email = BaseMailer.welcome assert_equal("Welcome", email.body.encoded) ensure BaseMailer.view_paths.shift @@ -309,7 +309,7 @@ class BaseTest < ActiveSupport::TestCase # Explicit multipart test "explicit multipart" do - email = BaseMailer.explicit_multipart.deliver + email = BaseMailer.explicit_multipart assert_equal(2, email.parts.size) assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) @@ -321,18 +321,18 @@ class BaseTest < ActiveSupport::TestCase test "explicit multipart does not sort order" do order = ["text/html", "text/plain"] with_default BaseMailer, :parts_order => order do - email = BaseMailer.explicit_multipart.deliver + email = BaseMailer.explicit_multipart assert_equal("text/plain", email.parts[0].mime_type) assert_equal("text/html", email.parts[1].mime_type) - email = BaseMailer.explicit_multipart(:parts_order => order.reverse).deliver + email = BaseMailer.explicit_multipart(:parts_order => order.reverse) assert_equal("text/plain", email.parts[0].mime_type) assert_equal("text/html", email.parts[1].mime_type) end end test "explicit multipart with attachments creates nested parts" do - email = BaseMailer.explicit_multipart(:attachments => true).deliver + email = BaseMailer.explicit_multipart(:attachments => true) assert_equal("application/pdf", email.parts[0].mime_type) assert_equal("multipart/alternative", email.parts[1].mime_type) assert_equal("text/plain", email.parts[1].parts[0].mime_type) @@ -342,7 +342,7 @@ class BaseTest < ActiveSupport::TestCase end test "explicit multipart with templates" do - email = BaseMailer.explicit_multipart_templates.deliver + email = BaseMailer.explicit_multipart_templates assert_equal(2, email.parts.size) assert_equal("multipart/alternative", email.mime_type) assert_equal("text/html", email.parts[0].mime_type) @@ -352,7 +352,7 @@ class BaseTest < ActiveSupport::TestCase end test "explicit multipart with any" do - email = BaseMailer.explicit_multipart_with_any.deliver + email = BaseMailer.explicit_multipart_with_any assert_equal(2, email.parts.size) assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) @@ -362,7 +362,8 @@ class BaseTest < ActiveSupport::TestCase end test "explicit multipart with options" do - email = BaseMailer.custom_block(true).deliver + email = BaseMailer.custom_block(true) + email.ready_to_send! assert_equal(2, email.parts.size) assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) @@ -372,7 +373,7 @@ class BaseTest < ActiveSupport::TestCase end test "explicit multipart with one part is rendered as body" do - email = BaseMailer.custom_block.deliver + email = BaseMailer.custom_block assert_equal(0, email.parts.size) assert_equal("text/plain", email.mime_type) assert_equal("base64", email.content_transfer_encoding) -- cgit v1.2.3 From ccea6ab07d38c5bc2de341c3f08d199ef55bccc6 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Wed, 27 Jan 2010 00:37:22 +1100 Subject: Fixing up tests and docs to use defaults :from => 'name' instead of defaults({:from => 'name'}) --- actionmailer/lib/action_mailer/base.rb | 3 ++- actionmailer/test/base_test.rb | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index f677ab629e..669e49c91c 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -23,7 +23,8 @@ module ActionMailer #:nodoc: # Examples: # # class Notifier < ActionMailer::Base - # defaults({:from => 'system@example.com'}) + # defaults :from => 'no-reply@example.com', + # :return_path => 'system@example.com' # # def welcome(recipient) # @account = recipient diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 6900e77178..0709c92326 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -5,9 +5,9 @@ class BaseTest < ActiveSupport::TestCase class BaseMailer < ActionMailer::Base self.mailer_name = "base_mailer" - defaults({:to => 'system@test.lindsaar.net', - :from => 'jose@test.plataformatec.com', - :reply_to => 'mikel@test.lindsaar.net'}) + defaults :to => 'system@test.lindsaar.net', + :from => 'jose@test.plataformatec.com', + :reply_to => 'mikel@test.lindsaar.net' def welcome(hash = {}) headers['X-SPAM'] = "Not SPAM" -- cgit v1.2.3 From f8bf1982dff9cf0f35fb7a121932c794ecdc1cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 14:58:00 +0100 Subject: Add tests for explicit engines. --- railties/lib/rails/application.rb | 5 +-- railties/lib/rails/application/configurable.rb | 19 ++++++++++ railties/lib/rails/railtie.rb | 10 +---- railties/test/isolation/abstract_unit.rb | 21 +++++++++++ railties/test/railties/engine_test.rb | 23 ++++++++++++ railties/test/railties/plugin_test.rb | 41 ++++++++++++++++++++- railties/test/railties/shared_tests.rb | 51 +++++--------------------- 7 files changed, 115 insertions(+), 55 deletions(-) create mode 100644 railties/lib/rails/application/configurable.rb create mode 100644 railties/test/railties/engine_test.rb diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index eba49e1520..12aa279959 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -6,6 +6,7 @@ require 'rails/engine' module Rails class Application < Engine autoload :Bootstrap, 'rails/application/bootstrap' + autoload :Configurable, 'rails/application/configurable' autoload :Configuration, 'rails/application/configuration' autoload :Finisher, 'rails/application/finisher' autoload :Railties, 'rails/application/railties' @@ -41,10 +42,6 @@ module Rails require environment if environment end - def config - @config ||= Application::Configuration.new(self.class.find_root_with_flag("config.ru", Dir.pwd)) - end - def routes ::ActionController::Routing::Routes end diff --git a/railties/lib/rails/application/configurable.rb b/railties/lib/rails/application/configurable.rb new file mode 100644 index 0000000000..f598e33965 --- /dev/null +++ b/railties/lib/rails/application/configurable.rb @@ -0,0 +1,19 @@ +module Rails + class Application + module Configurable + def self.included(base) + base.extend ClassMethods + end + + module ClassMethods + def inherited(base) + raise "You cannot inherit from a Rails::Application child" + end + end + + def config + @config ||= Application::Configuration.new(self.class.find_root_with_flag("config.ru", Dir.pwd)) + end + end + end +end \ No newline at end of file diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb index 3cf358d75f..c038d0ac70 100644 --- a/railties/lib/rails/railtie.rb +++ b/railties/lib/rails/railtie.rb @@ -17,7 +17,7 @@ module Rails def inherited(base) unless abstract_railtie?(base) - base.send(:include, self::Configurable) if add_configurable?(base) + base.send(:include, self::Configurable) subclasses << base end end @@ -53,14 +53,6 @@ module Rails def abstract_railtie?(base) ABSTRACT_RAILTIES.include?(base.name) end - - # Just add configurable behavior if a Configurable module is defined - # and the class is a direct child from self. This is required to avoid - # application or plugins getting class configuration method from Railties - # and/or Engines. - def add_configurable?(base) - defined?(self::Configurable) && base.ancestors[1] == self - end end def rake_tasks diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index dc5fddb19d..940585836c 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -100,6 +100,8 @@ module TestHelpers end class Bukkit + attr_reader :path + def initialize(path) @path = path end @@ -118,10 +120,29 @@ module TestHelpers def plugin(name, string = "") dir = "#{app_path}/vendor/plugins/#{name}" FileUtils.mkdir_p(dir) + File.open("#{dir}/init.rb", 'w') do |f| f.puts "::#{name.upcase} = 'loaded'" f.puts string end + + Bukkit.new(dir).tap do |bukkit| + yield bukkit if block_given? + end + end + + def engine(name) + dir = "#{app_path}/random/#{name}" + FileUtils.mkdir_p(dir) + + app = File.readlines("#{app_path}/config/application.rb") + app.insert(2, "$:.unshift(\"#{dir}/lib\")") + app.insert(3, "require #{name.inspect}") + + File.open("#{app_path}/config/application.rb", 'r+') do |f| + f.puts app + end + Bukkit.new(dir).tap do |bukkit| yield bukkit if block_given? end diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb new file mode 100644 index 0000000000..374f5ea93c --- /dev/null +++ b/railties/test/railties/engine_test.rb @@ -0,0 +1,23 @@ +require "isolation/abstract_unit" +require "railties/shared_tests" + +module RailtiesTest + class EngineTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + include SharedTests + + def setup + build_app + + @plugin = engine "bukkits" do |plugin| + plugin.write "lib/bukkits.rb", <<-RUBY + class Bukkits + class Engine < ::Rails::Engine + end + end + RUBY + plugin.write "lib/another.rb", "class Another; end" + end + end + end +end diff --git a/railties/test/railties/plugin_test.rb b/railties/test/railties/plugin_test.rb index adcc5431f6..0adc31e3ed 100644 --- a/railties/test/railties/plugin_test.rb +++ b/railties/test/railties/plugin_test.rb @@ -2,7 +2,7 @@ require "isolation/abstract_unit" require "railties/shared_tests" module RailtiesTest - class PluginSpecificTest < Test::Unit::TestCase + class PluginTest < Test::Unit::TestCase include ActiveSupport::Testing::Isolation include SharedTests @@ -11,9 +11,16 @@ module RailtiesTest @plugin = plugin "bukkits", "::LEVEL = config.log_level" do |plugin| plugin.write "lib/bukkits.rb", "class Bukkits; end" + plugin.write "lib/another.rb", "class Another; end" end end + test "plugin can load the file with the same name in lib" do + boot_rails + require "bukkits" + assert_equal "Bukkits", Bukkits.name + end + test "it loads the plugin's init.rb file" do boot_rails assert_equal "loaded", BUKKITS @@ -24,6 +31,20 @@ module RailtiesTest assert_equal :debug, LEVEL end + test "plugin_init_is_ran_before_application_ones" do + plugin "foo", "$foo = true" do |plugin| + plugin.write "lib/foo.rb", "module Foo; end" + end + + app_file 'config/initializers/foo.rb', <<-RUBY + raise "no $foo" unless $foo + raise "no Foo" unless Foo + RUBY + + boot_rails + assert $foo + end + test "plugin should work without init.rb" do @plugin.delete("init.rb") @@ -56,5 +77,23 @@ module RailtiesTest assert rescued, "Expected boot rails to fail" end + + test "deprecated tasks are also loaded" do + $executed = false + @plugin.write "tasks/foo.rake", <<-RUBY + task :foo do + $executed = true + end + RUBY + + boot_rails + require 'rake' + require 'rake/rdoctask' + require 'rake/testtask' + Rails.application.load_tasks + Rake::Task[:foo].invoke + assert $executed + end + end end diff --git a/railties/test/railties/shared_tests.rb b/railties/test/railties/shared_tests.rb index ab6ab0a215..a20aa5e4f5 100644 --- a/railties/test/railties/shared_tests.rb +++ b/railties/test/railties/shared_tests.rb @@ -12,35 +12,21 @@ module RailtiesTest def test_plugin_puts_its_lib_directory_on_load_path boot_rails - require "bukkits" - assert_equal "Bukkits", Bukkits.name - end - - def test_plugin_init_is_ran_before_application_ones - plugin "foo", "$foo = true" do |plugin| - plugin.write "lib/foo.rb", "module Foo; end" - end - - app_file 'config/initializers/foo.rb', <<-RUBY - raise "no $foo" unless $foo - raise "no Foo" unless Foo - RUBY - - boot_rails - assert $foo + require "another" + assert_equal "Another", Another.name end def test_plugin_paths_get_added_to_as_dependency_list boot_rails - assert_equal "Bukkits", Bukkits.name + assert_equal "Another", Another.name end def test_plugins_constants_are_not_reloaded_by_default boot_rails - assert_equal "Bukkits", Bukkits.name + assert_equal "Another", Another.name ActiveSupport::Dependencies.clear - @plugin.delete("lib/bukkits.rb") - assert_nothing_raised { Bukkits } + @plugin.delete("lib/another.rb") + assert_nothing_raised { Another } end def test_plugin_constants_get_reloaded_if_config_reload_plugins @@ -50,10 +36,10 @@ module RailtiesTest boot_rails - assert_equal "Bukkits", Bukkits.name + assert_equal "Another", Another.name ActiveSupport::Dependencies.clear - @plugin.delete("lib/bukkits.rb") - assert_raises(NameError) { Bukkits } + @plugin.delete("lib/another.rb") + assert_raises(NameError) { Another } end def test_plugin_puts_its_models_directory_on_load_path @@ -190,23 +176,6 @@ module RailtiesTest assert $executed end - def test_deprecated_tasks_are_also_loaded - $executed = false - @plugin.write "tasks/foo.rake", <<-RUBY - task :foo do - $executed = true - end - RUBY - - boot_rails - require 'rake' - require 'rake/rdoctask' - require 'rake/testtask' - Rails.application.load_tasks - Rake::Task[:foo].invoke - assert $executed - end - def test_i18n_files_have_lower_priority_than_application_ones add_to_config <<-RUBY config.i18n.load_path << "#{app_path}/app/locales/en.yml" @@ -235,7 +204,7 @@ YAML #{RAILS_FRAMEWORK_ROOT}/activemodel/lib/active_model/locale/en.yml #{RAILS_FRAMEWORK_ROOT}/activerecord/lib/active_record/locale/en.yml #{RAILS_FRAMEWORK_ROOT}/actionpack/lib/action_view/locale/en.yml - #{app_path}/vendor/plugins/bukkits/config/locales/en.yml + #{@plugin.path}/config/locales/en.yml #{app_path}/config/locales/en.yml #{app_path}/app/locales/en.yml ).map { |path| File.expand_path(path) }, I18n.load_path.map { |path| File.expand_path(path) } -- cgit v1.2.3 From 517b35a2bbe5ec381fecbbc54e67ba053f9da420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 15:00:16 +0100 Subject: Middleware stack actually runs routes and not the application. --- railties/lib/rails/tasks/middleware.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/lib/rails/tasks/middleware.rake b/railties/lib/rails/tasks/middleware.rake index 62e10e2beb..251da67c96 100644 --- a/railties/lib/rails/tasks/middleware.rake +++ b/railties/lib/rails/tasks/middleware.rake @@ -3,5 +3,5 @@ task :middleware => :environment do Rails.configuration.middleware.active.each do |middleware| puts "use #{middleware.inspect}" end - puts "run #{Rails::Application.instance.class.name}" + puts "run #{Rails::Application.instance.class.name}.routes" end -- cgit v1.2.3 From edb8131535c74ac215bf36c0d58d2019ed091a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 15:27:40 +0100 Subject: Move Rails::Rack::Metal to Rails::Application::Metal and just add cascade if any metal was declared. --- railties/lib/rails/application.rb | 1 + railties/lib/rails/application/metal.rb | 46 ++++++++++++++++++++++++++++ railties/lib/rails/configuration.rb | 2 +- railties/lib/rails/engine.rb | 2 +- railties/lib/rails/rack.rb | 1 - railties/lib/rails/rack/metal.rb | 41 ------------------------- railties/test/application/middleware_test.rb | 7 ++++- 7 files changed, 55 insertions(+), 45 deletions(-) create mode 100644 railties/lib/rails/application/metal.rb delete mode 100644 railties/lib/rails/rack/metal.rb diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 12aa279959..9e41210119 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -9,6 +9,7 @@ module Rails autoload :Configurable, 'rails/application/configurable' autoload :Configuration, 'rails/application/configuration' autoload :Finisher, 'rails/application/finisher' + autoload :Metal, 'rails/application/metal' autoload :Railties, 'rails/application/railties' autoload :RoutesReloader, 'rails/application/routes_reloader' diff --git a/railties/lib/rails/application/metal.rb b/railties/lib/rails/application/metal.rb new file mode 100644 index 0000000000..17786dd4ba --- /dev/null +++ b/railties/lib/rails/application/metal.rb @@ -0,0 +1,46 @@ +require 'action_dispatch' + +module Rails + class Application + class Metal + def self.paths + @paths ||= [] + end + + def self.metals + @metals ||= [] + end + + def initialize(list=nil) + metals = [] + list = Array(list || :all).map(&:to_sym) + + self.class.paths.each do |path| + matcher = /\A#{Regexp.escape(path)}\/(.*)\.rb\Z/ + Dir.glob("#{path}/**/*.rb").sort.each do |metal_path| + metal = metal_path.sub(matcher, '\1').to_sym + next unless list.include?(metal) || list.include?(:all) + require_dependency metal + metals << metal + end + end + + metals = metals.sort_by do |m| + [list.index(m) || list.index(:all), m.to_s] + end + + @metals = metals.map { |m| m.to_s.camelize.constantize } + self.class.metals.concat(@metals) + end + + def new(app) + ActionDispatch::Cascade.new(@metals, app) + end + + def name + ActionDispatch::Cascade.name + end + alias_method :to_s, :name + end + end +end diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index 3c5c1c1e16..c5cb7b2d09 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -16,7 +16,7 @@ module Rails middleware.use('::ActionDispatch::Cookies') middleware.use(lambda { ActionController::Base.session_store }, lambda { ActionController::Base.session_options }) middleware.use('::ActionDispatch::Flash', :if => lambda { ActionController::Base.session_store }) - middleware.use(lambda { Rails::Rack::Metal.new(Rails.application.config.metals) }) + middleware.use(lambda { Rails::Application::Metal.new(Rails.application.config.metals) }, :if => lambda { Rails::Application::Metal.metals.any? }) middleware.use('ActionDispatch::ParamsParser') middleware.use('::Rack::MethodOverride') middleware.use('::ActionDispatch::Head') diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 8cb938c2b9..ebbee67cf4 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -99,7 +99,7 @@ module Rails end initializer :add_metals do - Rails::Rack::Metal.paths.unshift(*paths.app.metals.to_a) + Rails::Application::Metal.paths.unshift(*paths.app.metals.to_a) end initializer :load_application_initializers do diff --git a/railties/lib/rails/rack.rb b/railties/lib/rails/rack.rb index 4bc0c2c88b..1f20ceae44 100644 --- a/railties/lib/rails/rack.rb +++ b/railties/lib/rails/rack.rb @@ -3,7 +3,6 @@ module Rails autoload :Debugger, "rails/rack/debugger" autoload :Logger, "rails/rack/logger" autoload :LogTailer, "rails/rack/log_tailer" - autoload :Metal, "rails/rack/metal" autoload :Static, "rails/rack/static" end end diff --git a/railties/lib/rails/rack/metal.rb b/railties/lib/rails/rack/metal.rb deleted file mode 100644 index 732936da32..0000000000 --- a/railties/lib/rails/rack/metal.rb +++ /dev/null @@ -1,41 +0,0 @@ -require 'action_dispatch' - -module Rails - module Rack - class Metal - def self.paths - @paths ||= [] - end - - def initialize(list=nil) - metals = [] - list = Array(list || :all).map(&:to_sym) - - self.class.paths.each do |path| - matcher = /\A#{Regexp.escape(path)}\/(.*)\.rb\Z/ - Dir.glob("#{path}/**/*.rb").sort.each do |metal_path| - metal = metal_path.sub(matcher, '\1').to_sym - next unless list.include?(metal) || list.include?(:all) - require_dependency metal - metals << metal - end - end - - metals = metals.sort_by do |m| - [list.index(m) || list.index(:all), m.to_s] - end - - @metals = metals.map { |m| m.to_s.camelize.constantize } - end - - def new(app) - ActionDispatch::Cascade.new(@metals, app) - end - - def name - ActionDispatch::Cascade.name - end - alias_method :to_s, :name - end - end -end diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index 31696598ce..0b92cdba54 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -23,7 +23,6 @@ module ApplicationTests "ActionDispatch::Cookies", "ActionDispatch::Session::CookieStore", "ActionDispatch::Flash", - "ActionDispatch::Cascade", "ActionDispatch::ParamsParser", "Rack::MethodOverride", "ActionDispatch::Head", @@ -70,6 +69,12 @@ module ApplicationTests assert_equal "Rack::Config", middleware.first end + test "shows cascade if any metal exists" do + app_file "app/metal/foo.rb", "class Foo; end" + boot! + assert middleware.include?("ActionDispatch::Cascade") + end + private def boot! require "#{app_path}/config/environment" -- cgit v1.2.3 From 081dfca33a7254ae86baa8feeb31f2c293b5f165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 15:37:45 +0100 Subject: Clean up Rails::Rack::Logger. --- railties/lib/rails/rack/logger.rb | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/railties/lib/rails/rack/logger.rb b/railties/lib/rails/rack/logger.rb index 91a613092f..de21fb4f10 100644 --- a/railties/lib/rails/rack/logger.rb +++ b/railties/lib/rails/rack/logger.rb @@ -9,27 +9,23 @@ module Rails end def call(env) - @env = env - before_dispatch - result = @app.call(@env) - after_dispatch - result + before_dispatch(env) + @app.call(env) + ensure + after_dispatch(env) end protected - def request - @request ||= ActionDispatch::Request.new(@env) - end - - def before_dispatch + def before_dispatch(env) + request = ActionDispatch::Request.new(env) path = request.request_uri.inspect rescue "unknown" info "\n\nStarted #{request.method.to_s.upcase} #{path} " << "for #{request.remote_ip} at #{Time.now.to_s(:db)}" end - def after_dispatch + def after_dispatch(env) Rails::Subscriber.flush_all! end -- cgit v1.2.3 From d7de1c76cad28f52fc62693d415a07abf6c86ef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 15:46:17 +0100 Subject: Add a test which ensures application can overwrite plugins/engines view paths. --- railties/test/railties/shared_tests.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/railties/test/railties/shared_tests.rb b/railties/test/railties/shared_tests.rb index a20aa5e4f5..fc4a19e7e7 100644 --- a/railties/test/railties/shared_tests.rb +++ b/railties/test/railties/shared_tests.rb @@ -72,6 +72,25 @@ module RailtiesTest assert_equal "Hello bukkits\n", response[2].body end + def test_plugin_adds_its_views_to_view_paths_with_lower_proriority + @plugin.write "app/controllers/bukkit_controller.rb", <<-RUBY + class BukkitController < ActionController::Base + def index + end + end + RUBY + + @plugin.write "app/views/bukkit/index.html.erb", "Hello bukkits" + app_file "app/views/bukkit/index.html.erb", "Hi bukkits" + + boot_rails + + require "action_controller" + require "rack/mock" + response = BukkitController.action(:index).call(Rack::MockRequest.env_for("/")) + assert_equal "Hi bukkits\n", response[2].body + end + def test_plugin_adds_helpers_to_controller_views @plugin.write "app/controllers/bukkit_controller.rb", <<-RUBY class BukkitController < ActionController::Base -- cgit v1.2.3 From f74fbf9d326091200121d42cd895588d5371daa7 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 26 Jan 2010 08:51:50 -0600 Subject: Keep ActionController::Base.helpers_dir around for a bit longer --- actionpack/lib/action_controller/metal/helpers.rb | 70 +++++++++++------------ 1 file changed, 33 insertions(+), 37 deletions(-) diff --git a/actionpack/lib/action_controller/metal/helpers.rb b/actionpack/lib/action_controller/metal/helpers.rb index ef3b89db14..0ebdf07911 100644 --- a/actionpack/lib/action_controller/metal/helpers.rb +++ b/actionpack/lib/action_controller/metal/helpers.rb @@ -57,14 +57,10 @@ module ActionController module ClassMethods def helpers_dir - ActiveSupport::Deprecation.warn "ActionController::Base.helpers_dir is deprecated. " << - "Please use ActionController::Base.helpers_path (which returns an array)" self.helpers_path end def helpers_dir=(value) - ActiveSupport::Deprecation.warn "ActionController::Base.helpers_dir= is deprecated. " << - "Please use ActionController::Base.helpers_path= (which is an array)" self.helpers_path = Array(value) end @@ -91,42 +87,42 @@ module ActionController @helper_proxy ||= ActionView::Base.new.extend(_helpers) end - private - # Overwrite _modules_for_helpers to accept :all as argument, which loads - # all helpers in helpers_dir. - # - # ==== Parameters - # args:: A list of helpers - # - # ==== Returns - # Array[Module]:: A normalized list of modules for the list of - # helpers provided. - def _modules_for_helpers(args) - args += all_application_helpers if args.delete(:all) - super(args) - end + private + # Overwrite _modules_for_helpers to accept :all as argument, which loads + # all helpers in helpers_dir. + # + # ==== Parameters + # args:: A list of helpers + # + # ==== Returns + # Array[Module]:: A normalized list of modules for the list of + # helpers provided. + def _modules_for_helpers(args) + args += all_application_helpers if args.delete(:all) + super(args) + end - def default_helper_module! - module_name = name.sub(/Controller$/, '') - module_path = module_name.underscore - helper module_path - rescue MissingSourceFile => e - raise e unless e.is_missing? "helpers/#{module_path}_helper" - rescue NameError => e - raise e unless e.missing_name? "#{module_name}Helper" - end + def default_helper_module! + module_name = name.sub(/Controller$/, '') + module_path = module_name.underscore + helper module_path + rescue MissingSourceFile => e + raise e unless e.is_missing? "helpers/#{module_path}_helper" + rescue NameError => e + raise e unless e.missing_name? "#{module_name}Helper" + end - # Extract helper names from files in app/helpers/**/*_helper.rb - def all_application_helpers - helpers = [] - helpers_path.each do |path| - extract = /^#{Regexp.quote(path)}\/?(.*)_helper.rb$/ - helpers += Dir["#{path}/**/*_helper.rb"].map { |file| file.sub(extract, '\1') } + # Extract helper names from files in app/helpers/**/*_helper.rb + def all_application_helpers + helpers = [] + helpers_path.each do |path| + extract = /^#{Regexp.quote(path)}\/?(.*)_helper.rb$/ + helpers += Dir["#{path}/**/*_helper.rb"].map { |file| file.sub(extract, '\1') } + end + helpers.sort! + helpers.uniq! + helpers end - helpers.sort! - helpers.uniq! - helpers - end end end end -- cgit v1.2.3 From 05c4ad9d3f6ff8d0017f4bca9b52e552629c4813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim=20and=20Mikel=20Lindsaar?= Date: Tue, 26 Jan 2010 16:00:24 +0100 Subject: Tidy up tests and docs. --- actionmailer/lib/action_mailer/base.rb | 4 ++-- actionmailer/test/base_test.rb | 37 +++++++++++++++++----------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 669e49c91c..b230e34631 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -360,8 +360,8 @@ module ActionMailer #:nodoc: # You can also pass a hash into headers of header field names and values, which # will then be set on the Mail::Message object: # - # headers {'X-Special-Domain-Specific-Header' => "SecretValue", - # 'In-Reply-To' => incoming.message_id } + # headers 'X-Special-Domain-Specific-Header' => "SecretValue", + # 'In-Reply-To' => incoming.message_id # # The resulting Mail::Message will have the following in it's header: # diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 0709c92326..4a65363e3e 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -79,7 +79,7 @@ class BaseTest < ActiveSupport::TestCase # Basic mail usage without block test "mail() should set the headers of the mail message" do email = BaseMailer.welcome - assert_equal(['system@test.lindsaar.net'], email.to) + assert_equal(['system@test.lindsaar.net'], email.to) assert_equal(['jose@test.plataformatec.com'], email.from) assert_equal('The first email on new API!', email.subject) end @@ -126,6 +126,22 @@ class BaseTest < ActiveSupport::TestCase assert_equal("Not SPAM", email['X-SPAM'].decoded) end + test "can pass random headers in as a hash to mail" do + hash = {'X-Special-Domain-Specific-Header' => "SecretValue", + 'In-Reply-To' => '1234@mikel.me.com' } + mail = BaseMailer.simple(hash) + assert_equal('SecretValue', mail['X-Special-Domain-Specific-Header'].decoded) + assert_equal('1234@mikel.me.com', mail['In-Reply-To'].decoded) + end + + test "can pass random headers in as a hash" do + hash = {'X-Special-Domain-Specific-Header' => "SecretValue", + 'In-Reply-To' => '1234@mikel.me.com' } + mail = BaseMailer.simple_with_headers(hash) + assert_equal('SecretValue', mail['X-Special-Domain-Specific-Header'].decoded) + assert_equal('1234@mikel.me.com', mail['In-Reply-To'].decoded) + end + # Attachments test "attachment with content" do email = BaseMailer.attachment_with_content @@ -397,7 +413,8 @@ class BaseTest < ActiveSupport::TestCase test "calling deliver on the action should deliver the mail object" do BaseMailer.deliveries.clear BaseMailer.expects(:deliver_mail).once - BaseMailer.welcome.deliver + mail = BaseMailer.welcome.deliver + assert_instance_of Mail::Message, mail end test "calling deliver on the action should increment the deliveries collection" do @@ -417,22 +434,6 @@ class BaseTest < ActiveSupport::TestCase mail = BaseMailer.explicit_multipart assert_not_nil(mail.content_type_parameters[:boundary]) end - - test "can pass random headers in as a hash" do - hash = {'X-Special-Domain-Specific-Header' => "SecretValue", - 'In-Reply-To' => '1234@mikel.me.com' } - mail = BaseMailer.simple_with_headers(hash) - assert_equal('SecretValue', mail['X-Special-Domain-Specific-Header'].decoded) - assert_equal('1234@mikel.me.com', mail['In-Reply-To'].decoded) - end - - test "can pass random headers in as a hash to mail" do - hash = {'X-Special-Domain-Specific-Header' => "SecretValue", - 'In-Reply-To' => '1234@mikel.me.com' } - mail = BaseMailer.simple(hash) - assert_equal('SecretValue', mail['X-Special-Domain-Specific-Header'].decoded) - assert_equal('1234@mikel.me.com', mail['In-Reply-To'].decoded) - end protected -- cgit v1.2.3 From 48a3985dd77160b34fc3ac35a75d850d8a2711f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 16:18:29 +0100 Subject: Also include translation in ActionMailer. --- actionmailer/lib/action_mailer/base.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index b230e34631..2288a30691 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -255,6 +255,7 @@ module ActionMailer #:nodoc: include AbstractController::Layouts include AbstractController::Helpers include AbstractController::UrlFor + include AbstractController::Translation helper ActionMailer::MailHelper -- cgit v1.2.3 From 9f7190187cd755345557009a0b0ca9eec679b415 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 26 Jan 2010 09:27:21 -0600 Subject: Failing AM test for nested layouts --- .../test/fixtures/nested/layouts/spam.html.erb | 1 + .../fixtures/nested_layout_mailer/signup.html.erb | 1 + actionmailer/test/old_base/mail_layout_test.rb | 19 +++++++++++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 actionmailer/test/fixtures/nested/layouts/spam.html.erb create mode 100644 actionmailer/test/fixtures/nested_layout_mailer/signup.html.erb diff --git a/actionmailer/test/fixtures/nested/layouts/spam.html.erb b/actionmailer/test/fixtures/nested/layouts/spam.html.erb new file mode 100644 index 0000000000..7a24b19b7f --- /dev/null +++ b/actionmailer/test/fixtures/nested/layouts/spam.html.erb @@ -0,0 +1 @@ +Nested Spammer layout <%= yield %> \ No newline at end of file diff --git a/actionmailer/test/fixtures/nested_layout_mailer/signup.html.erb b/actionmailer/test/fixtures/nested_layout_mailer/signup.html.erb new file mode 100644 index 0000000000..4789e888c6 --- /dev/null +++ b/actionmailer/test/fixtures/nested_layout_mailer/signup.html.erb @@ -0,0 +1 @@ +We do not spam \ No newline at end of file diff --git a/actionmailer/test/old_base/mail_layout_test.rb b/actionmailer/test/old_base/mail_layout_test.rb index 4038fbf339..2abd3ece92 100644 --- a/actionmailer/test/old_base/mail_layout_test.rb +++ b/actionmailer/test/old_base/mail_layout_test.rb @@ -1,7 +1,7 @@ require 'abstract_unit' class AutoLayoutMailer < ActionMailer::Base - + def hello recipients 'test@localhost' subject "You have a mail" @@ -51,6 +51,16 @@ class ExplicitLayoutMailer < ActionMailer::Base end end +class NestedLayoutMailer < ActionMailer::Base + layout 'nested/layouts/spam' + + def signup + recipients 'test@localhost' + subject "You have a mail" + from "tester@example.com" + end +end + class LayoutMailerTest < Test::Unit::TestCase def setup set_delivery_method :test @@ -77,7 +87,7 @@ class LayoutMailerTest < Test::Unit::TestCase # CHANGED: content_type returns an object # assert_equal 'text/plain', mail.parts.first.content_type assert_equal 'text/plain', mail.parts.first.mime_type - + # CHANGED: body returns an object # assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body assert_equal "text/plain layout - text/plain multipart", mail.parts.first.body.to_s @@ -145,4 +155,9 @@ class LayoutMailerTest < Test::Unit::TestCase mail = ExplicitLayoutMailer.logout assert_equal "You logged out", mail.body.to_s.strip end + + def test_nested_class_layout + mail = NestedLayoutMailer.signup + assert_equal "Nested Spammer layout We do not spam", mail.body.to_s.strip + end end -- cgit v1.2.3 From e274eb1df1dcf526febb7c3a1a8dc2c02325d68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 16:34:25 +0100 Subject: Bring layouts with proc back alive. --- actionpack/lib/abstract_controller/layouts.rb | 3 +++ actionpack/test/abstract/layouts_test.rb | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/actionpack/lib/abstract_controller/layouts.rb b/actionpack/lib/abstract_controller/layouts.rb index 6fbf6bc392..56ddf9bf01 100644 --- a/actionpack/lib/abstract_controller/layouts.rb +++ b/actionpack/lib/abstract_controller/layouts.rb @@ -270,6 +270,9 @@ module AbstractController end end ruby_eval + when Proc + define_method :_layout_from_proc, &@_layout + self.class_eval %{def _layout(details) _layout_from_proc(self) end} when false self.class_eval %{def _layout(details) end} when true diff --git a/actionpack/test/abstract/layouts_test.rb b/actionpack/test/abstract/layouts_test.rb index df73d948f0..8cbb72dc83 100644 --- a/actionpack/test/abstract/layouts_test.rb +++ b/actionpack/test/abstract/layouts_test.rb @@ -67,7 +67,15 @@ module AbstractControllerTests class WithChildOfImplied < WithStringImpliedChild end - + + class WithProc < Base + layout proc { |c| "omg" } + + def index + render :_template => ActionView::Template::Text.new("Hello proc!") + end + end + class WithSymbol < Base layout :hello @@ -198,6 +206,12 @@ module AbstractControllerTests controller.process(:index) assert_equal "Hello nil!", controller.response_body end + + test "when layout is specified as a proc, call it and use the layout returned" do + controller = WithProc.new + controller.process(:index) + assert_equal "OMGHI2U Hello proc!", controller.response_body + end test "when layout is specified as a symbol, call the requested method and use the layout returned" do controller = WithSymbol.new -- cgit v1.2.3 From 31b538df6457ba723668afc62e85056e3bca9413 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 26 Jan 2010 09:37:20 -0600 Subject: Failing AM test for legacy multipart alternative rendering --- .../test_mailer/multipart_alternative.html.erb | 1 + .../test_mailer/multipart_alternative.plain.erb | 1 + actionmailer/test/old_base/mail_render_test.rb | 37 ++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 actionmailer/test/fixtures/test_mailer/multipart_alternative.html.erb create mode 100644 actionmailer/test/fixtures/test_mailer/multipart_alternative.plain.erb diff --git a/actionmailer/test/fixtures/test_mailer/multipart_alternative.html.erb b/actionmailer/test/fixtures/test_mailer/multipart_alternative.html.erb new file mode 100644 index 0000000000..73ea14f82f --- /dev/null +++ b/actionmailer/test/fixtures/test_mailer/multipart_alternative.html.erb @@ -0,0 +1 @@ +foo <%= @foo %> \ No newline at end of file diff --git a/actionmailer/test/fixtures/test_mailer/multipart_alternative.plain.erb b/actionmailer/test/fixtures/test_mailer/multipart_alternative.plain.erb new file mode 100644 index 0000000000..779fe4c1ea --- /dev/null +++ b/actionmailer/test/fixtures/test_mailer/multipart_alternative.plain.erb @@ -0,0 +1 @@ +foo: <%= @foo %> \ No newline at end of file diff --git a/actionmailer/test/old_base/mail_render_test.rb b/actionmailer/test/old_base/mail_render_test.rb index 804200fd36..7ba55b1bd2 100644 --- a/actionmailer/test/old_base/mail_render_test.rb +++ b/actionmailer/test/old_base/mail_render_test.rb @@ -62,6 +62,33 @@ class RenderMailer < ActionMailer::Base super mailer_name "test_mailer" end + + def multipart_alternative + recipients 'test@localhost' + subject 'multipart/alternative' + from 'tester@example.com' + + build_multipart_message(:foo => "bar") + end + + private + def build_multipart_message(assigns = {}) + content_type "multipart/alternative" + + part "text/plain" do |p| + p.body = build_body_part('plain', assigns, :layout => false) + end + + part "text/html" do |p| + p.body = build_body_part('html', assigns) + p.transfer_encoding = "base64" + end + end + + def build_body_part(content_type, assigns, options = {}) + render "#{template}.#{content_type}", :body => assigns + # render options.merge(:file => "#{template}.#{content_type}", :body => assigns) + end end class FirstMailer < ActionMailer::Base @@ -129,6 +156,16 @@ class RenderHelperTest < Test::Unit::TestCase mail = RenderMailer.no_instance_variable.deliver assert_equal "Look, subject.nil? is true!", mail.body.to_s.strip end + + def test_legacy_multipart_alternative + mail = RenderMailer.multipart_alternative.deliver + assert_equal(2, email.parts.size) + assert_equal("multipart/alternative", email.mime_type) + assert_equal("text/plain", email.parts[0].mime_type) + assert_equal("foo: bar", email.parts[0].body.encoded) + assert_equal("text/html", email.parts[1].mime_type) + assert_equal("foo bar", email.parts[1].body.encoded) + end end class FirstSecondHelperTest < Test::Unit::TestCase -- cgit v1.2.3 From af43674c1cc73630736537a73e79a24ac2bef995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 19:15:20 +0100 Subject: Fix failing tests on AM about render(:body => Hash). --- actionmailer/lib/action_mailer/deprecated_api.rb | 6 ++- actionmailer/lib/action_mailer/old_api.rb | 8 +--- actionmailer/test/old_base/mail_layout_test.rb | 4 +- actionmailer/test/old_base/mail_render_test.rb | 47 +++++------------------- actionmailer/test/old_base/mail_service_test.rb | 37 +++++++++---------- actionmailer/test/subscriber_test.rb | 2 +- 6 files changed, 36 insertions(+), 68 deletions(-) diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index 61101c26a1..36eec1087e 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -93,10 +93,12 @@ module ActionMailer def render(*args) options = args.last.is_a?(Hash) ? args.last : {} - if options[:body] + + if options[:body].is_a?(Hash) ActiveSupport::Deprecation.warn(':body in render deprecated. Please use instance ' << 'variables as assigns instead', caller[0,1]) - body options.delete(:body) + + options[:body].each { |k,v| instance_variable_set(:"@#{k}", v) } end super end diff --git a/actionmailer/lib/action_mailer/old_api.rb b/actionmailer/lib/action_mailer/old_api.rb index 22c3c518b1..4694958222 100644 --- a/actionmailer/lib/action_mailer/old_api.rb +++ b/actionmailer/lib/action_mailer/old_api.rb @@ -204,12 +204,8 @@ module ActionMailer def create_parts if String === @body - self.response_body = @body - end - - if String === response_body - @parts.unshift create_inline_part(response_body) - else + @parts.unshift create_inline_part(@body) + elsif @parts.empty? || @parts.all? { |p| p.content_disposition =~ /^attachment/ } self.class.view_paths.first.find_all(@template, {}, @mailer_name).each do |template| @parts << create_inline_part(render_to_body(:_template => template), template.mime_type) end diff --git a/actionmailer/test/old_base/mail_layout_test.rb b/actionmailer/test/old_base/mail_layout_test.rb index 2abd3ece92..c69252efa9 100644 --- a/actionmailer/test/old_base/mail_layout_test.rb +++ b/actionmailer/test/old_base/mail_layout_test.rb @@ -14,7 +14,7 @@ class AutoLayoutMailer < ActionMailer::Base from "tester@example.com" @world = "Earth" - render(:inline => "Hello, <%= @world %>", :layout => 'spam') + body render(:inline => "Hello, <%= @world %>", :layout => 'spam') end def nolayout @@ -23,7 +23,7 @@ class AutoLayoutMailer < ActionMailer::Base from "tester@example.com" @world = "Earth" - render(:inline => "Hello, <%= @world %>", :layout => false) + body render(:inline => "Hello, <%= @world %>", :layout => false) end def multipart(type = nil) diff --git a/actionmailer/test/old_base/mail_render_test.rb b/actionmailer/test/old_base/mail_render_test.rb index 7ba55b1bd2..4213c2a173 100644 --- a/actionmailer/test/old_base/mail_render_test.rb +++ b/actionmailer/test/old_base/mail_render_test.rb @@ -7,7 +7,7 @@ class RenderMailer < ActionMailer::Base from "tester@example.com" @world = "Earth" - render :inline => "Hello, <%= @world %>" + body render(:inline => "Hello, <%= @world %>") end def file_template @@ -16,16 +16,7 @@ class RenderMailer < ActionMailer::Base from "tester@example.com" @recipient = 'test@localhost' - render :file => "templates/signed_up" - end - - def implicit_body - recipients 'test@localhost' - subject "using helpers" - from "tester@example.com" - - @recipient = 'test@localhost' - render :template => "templates/signed_up" + body render(:file => "templates/signed_up") end def rxml_template @@ -40,21 +31,13 @@ class RenderMailer < ActionMailer::Base from "tester@example.com" end - def mailer_accessor - recipients 'test@localhost' - subject "Mailer Accessor" - from "tester@example.com" - - render :inline => "Look, <%= mailer.subject %>!" - end - def no_instance_variable recipients 'test@localhost' subject "No Instance Variable" from "tester@example.com" silence_warnings do - render :inline => "Look, subject.nil? is <%= @subject.nil? %>!" + body render(:inline => "Look, subject.nil? is <%= @subject.nil? %>!") end end @@ -81,13 +64,11 @@ class RenderMailer < ActionMailer::Base part "text/html" do |p| p.body = build_body_part('html', assigns) - p.transfer_encoding = "base64" end end def build_body_part(content_type, assigns, options = {}) render "#{template}.#{content_type}", :body => assigns - # render options.merge(:file => "#{template}.#{content_type}", :body => assigns) end end @@ -122,11 +103,6 @@ class RenderHelperTest < Test::Unit::TestCase restore_delivery_method end - def test_implicit_body - mail = RenderMailer.implicit_body - assert_equal "Hello there, \n\nMr. test@localhost", mail.body.to_s.strip - end - def test_inline_template mail = RenderMailer.inline_template assert_equal "Hello, Earth", mail.body.to_s.strip @@ -147,11 +123,6 @@ class RenderHelperTest < Test::Unit::TestCase assert_equal "Hey Ho, let's go!", mail.body.to_s.strip end - def test_mailer_accessor - mail = RenderMailer.mailer_accessor.deliver - assert_equal "Look, Mailer Accessor!", mail.body.to_s.strip - end - def test_no_instance_variable mail = RenderMailer.no_instance_variable.deliver assert_equal "Look, subject.nil? is true!", mail.body.to_s.strip @@ -159,12 +130,12 @@ class RenderHelperTest < Test::Unit::TestCase def test_legacy_multipart_alternative mail = RenderMailer.multipart_alternative.deliver - assert_equal(2, email.parts.size) - assert_equal("multipart/alternative", email.mime_type) - assert_equal("text/plain", email.parts[0].mime_type) - assert_equal("foo: bar", email.parts[0].body.encoded) - assert_equal("text/html", email.parts[1].mime_type) - assert_equal("foo bar", email.parts[1].body.encoded) + assert_equal(2, mail.parts.size) + assert_equal("multipart/alternative", mail.mime_type) + assert_equal("text/plain", mail.parts[0].mime_type) + assert_equal("foo: bar", mail.parts[0].body.encoded) + assert_equal("text/html", mail.parts[1].mime_type) + assert_equal("foo bar", mail.parts[1].body.encoded) end end diff --git a/actionmailer/test/old_base/mail_service_test.rb b/actionmailer/test/old_base/mail_service_test.rb index fb784328bc..70dafaf33c 100644 --- a/actionmailer/test/old_base/mail_service_test.rb +++ b/actionmailer/test/old_base/mail_service_test.rb @@ -27,20 +27,19 @@ class TestMailer < ActionMailer::Base subject "[Cancelled] Goodbye #{recipient}" from "system@loudthinking.com" sent_on Time.local(2004, 12, 12) - - render :text => "Goodbye, Mr. #{recipient}" + body "Goodbye, Mr. #{recipient}" end def from_with_name from "System " recipients "root@loudthinking.com" - render :text => "Nothing to see here." + body "Nothing to see here." end def from_without_name from "system@loudthinking.com" recipients "root@loudthinking.com" - render :text => "Nothing to see here." + body "Nothing to see here." end def cc_bcc(recipient) @@ -51,7 +50,7 @@ class TestMailer < ActionMailer::Base cc "nobody@loudthinking.com" bcc "root@loudthinking.com" - render :text => "Nothing to see here." + body "Nothing to see here." end def different_reply_to(recipient) @@ -61,7 +60,7 @@ class TestMailer < ActionMailer::Base sent_on Time.local(2008, 5, 23) reply_to "atraver@gmail.com" - render :text => "Nothing to see here." + body "Nothing to see here." end def iso_charset(recipient) @@ -73,7 +72,7 @@ class TestMailer < ActionMailer::Base bcc "root@loudthinking.com" charset "iso-8859-1" - render :text => "Nothing to see here." + body "Nothing to see here." end def unencoded_subject(recipient) @@ -84,7 +83,7 @@ class TestMailer < ActionMailer::Base cc "nobody@loudthinking.com" bcc "root@loudthinking.com" - render :text => "Nothing to see here." + body "Nothing to see here." end def extended_headers(recipient) @@ -96,7 +95,7 @@ class TestMailer < ActionMailer::Base bcc "Grytøyr " charset "iso-8859-1" - render :text => "Nothing to see here." + body "Nothing to see here." end def utf8_body(recipient) @@ -108,7 +107,7 @@ class TestMailer < ActionMailer::Base bcc "Foo áëô îü " charset "utf-8" - render :text => "åœö blah" + body "åœö blah" end def multipart_with_mime_version(recipient) @@ -158,7 +157,7 @@ class TestMailer < ActionMailer::Base attachment :content_type => "image/jpeg", :filename => File.join(File.dirname(__FILE__), "fixtures", "attachments", "foo.jpg"), :data => "123456789" - render :text => "plain text default" + body "plain text default" end def implicitly_multipart_example(recipient, cs = nil, order = nil) @@ -187,12 +186,12 @@ class TestMailer < ActionMailer::Base from "test@example.com" content_type "text/html" - render :text => "Emphasize this" + body "Emphasize this" end def html_mail_with_underscores(recipient) subject "html mail with underscores" - render :text => %{_Google} + body %{_Google} end def custom_template(recipient) @@ -219,7 +218,7 @@ class TestMailer < ActionMailer::Base subject "various newlines" from "test@example.com" - render :text => "line #1\nline #2\rline #3\r\nline #4\r\r" + + body "line #1\nline #2\rline #3\r\nline #4\r\r" + "line #5\n\nline#6\r\n\r\nline #7" end @@ -282,7 +281,7 @@ class TestMailer < ActionMailer::Base from "One: Two " cc "Three: Four " bcc "Five: Six " - render :text => "testing" + body "testing" end def custom_content_type_attributes @@ -290,7 +289,7 @@ class TestMailer < ActionMailer::Base subject "custom content types" from "some.one@somewhere.test" content_type "text/plain; format=flowed" - render :text => "testing" + body "testing" end def return_path @@ -298,13 +297,13 @@ class TestMailer < ActionMailer::Base subject "return path test" from "some.one@somewhere.test" headers["return-path"] = "another@somewhere.test" - render :text => "testing" + body "testing" end def subject_with_i18n(recipient) recipients recipient from "system@loudthinking.com" - render :text => "testing" + body "testing" end class << self @@ -1111,7 +1110,7 @@ end class MethodNamingTest < ActiveSupport::TestCase class TestMailer < ActionMailer::Base def send - render :text => 'foo' + body 'foo' end end diff --git a/actionmailer/test/subscriber_test.rb b/actionmailer/test/subscriber_test.rb index 6c347b8392..3d1736d64f 100644 --- a/actionmailer/test/subscriber_test.rb +++ b/actionmailer/test/subscriber_test.rb @@ -11,7 +11,7 @@ class AMSubscriberTest < ActionMailer::TestCase recipients "somewhere@example.com" subject "basic" from "basic@example.com" - render :text => "Hello world" + body "Hello world" end def receive(mail) -- cgit v1.2.3 From 9f63c4b26e6afe04849dc906b52177ba5221e3b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 19:50:59 +0100 Subject: Bring AM tests back to green again. --- actionmailer/test/fixtures/nested/layouts/spam.html.erb | 1 - actionmailer/test/old_base/mail_layout_test.rb | 15 --------------- actionmailer/test/old_base/mail_render_test.rb | 4 +++- 3 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 actionmailer/test/fixtures/nested/layouts/spam.html.erb diff --git a/actionmailer/test/fixtures/nested/layouts/spam.html.erb b/actionmailer/test/fixtures/nested/layouts/spam.html.erb deleted file mode 100644 index 7a24b19b7f..0000000000 --- a/actionmailer/test/fixtures/nested/layouts/spam.html.erb +++ /dev/null @@ -1 +0,0 @@ -Nested Spammer layout <%= yield %> \ No newline at end of file diff --git a/actionmailer/test/old_base/mail_layout_test.rb b/actionmailer/test/old_base/mail_layout_test.rb index c69252efa9..5679aa5a64 100644 --- a/actionmailer/test/old_base/mail_layout_test.rb +++ b/actionmailer/test/old_base/mail_layout_test.rb @@ -51,16 +51,6 @@ class ExplicitLayoutMailer < ActionMailer::Base end end -class NestedLayoutMailer < ActionMailer::Base - layout 'nested/layouts/spam' - - def signup - recipients 'test@localhost' - subject "You have a mail" - from "tester@example.com" - end -end - class LayoutMailerTest < Test::Unit::TestCase def setup set_delivery_method :test @@ -155,9 +145,4 @@ class LayoutMailerTest < Test::Unit::TestCase mail = ExplicitLayoutMailer.logout assert_equal "You logged out", mail.body.to_s.strip end - - def test_nested_class_layout - mail = NestedLayoutMailer.signup - assert_equal "Nested Spammer layout We do not spam", mail.body.to_s.strip - end end diff --git a/actionmailer/test/old_base/mail_render_test.rb b/actionmailer/test/old_base/mail_render_test.rb index 4213c2a173..405d43d7d3 100644 --- a/actionmailer/test/old_base/mail_render_test.rb +++ b/actionmailer/test/old_base/mail_render_test.rb @@ -68,7 +68,9 @@ class RenderMailer < ActionMailer::Base end def build_body_part(content_type, assigns, options = {}) - render "#{template}.#{content_type}", :body => assigns + ActiveSupport::Deprecation.silence do + render "#{template}.#{content_type}", :body => assigns + end end end -- cgit v1.2.3 From dc57d545bb3e8ff4123892e5e311e658ab506252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 20:43:35 +0100 Subject: Fix t('.helper'). --- actionpack/lib/action_view/base.rb | 6 ++++-- .../lib/action_view/helpers/translation_helper.rb | 8 ++++++-- actionpack/lib/action_view/template.rb | 4 ++-- actionpack/lib/action_view/template/resolver.rb | 13 ++++++++----- actionpack/test/controller/helper_test.rb | 21 +++++++++++---------- actionpack/test/fixtures/test/translation.erb | 1 + actionpack/test/template/translation_helper_test.rb | 10 +++++----- 7 files changed, 37 insertions(+), 26 deletions(-) create mode 100644 actionpack/test/fixtures/test/translation.erb diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index c4b0455c2a..af13f2cd3e 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -276,9 +276,11 @@ module ActionView #:nodoc: @config = nil @formats = formats @assigns = assigns_for_first_render.each { |key, value| instance_variable_set("@#{key}", value) } - @_controller = controller @helpers = self.class.helpers || Module.new - @_content_for = Hash.new {|h,k| h[k] = ActionView::SafeBuffer.new } + + @_controller = controller + @_content_for = Hash.new {|h,k| h[k] = ActionView::SafeBuffer.new } + @_virtual_path = nil self.view_paths = view_paths end diff --git a/actionpack/lib/action_view/helpers/translation_helper.rb b/actionpack/lib/action_view/helpers/translation_helper.rb index 35c431d78d..ad18339c60 100644 --- a/actionpack/lib/action_view/helpers/translation_helper.rb +++ b/actionpack/lib/action_view/helpers/translation_helper.rb @@ -25,11 +25,15 @@ module ActionView end alias :l :localize - private + def scope_key_by_partial(key) if key.to_s.first == "." - template.path_without_format_and_extension.gsub(%r{/_?}, ".") + key.to_s + if @_virtual_path + @_virtual_path.gsub(%r{/_?}, ".") + key.to_s + else + raise "Cannot use t(#{key.inspect}) shortcut because path is not available" + end else key end diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index adaf6544a7..cd6b1930a1 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -87,9 +87,9 @@ module ActionView source = <<-end_src def #{method_name}(local_assigns) - old_output_buffer = output_buffer;#{locals_code};#{code} + _old_virtual_path, @_virtual_path = @_virtual_path, #{@details[:virtual_path].inspect};_old_output_buffer = output_buffer;#{locals_code};#{code} ensure - self.output_buffer = old_output_buffer + @_virtual_path, self.output_buffer = _old_virtual_path, _old_output_buffer end end_src diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb index c6a17907ff..340a6afe5e 100644 --- a/actionpack/lib/action_view/template/resolver.rb +++ b/actionpack/lib/action_view/template/resolver.rb @@ -117,15 +117,18 @@ module ActionView # # :api: plugin def path_to_details(path) # [:erb, :format => :html, :locale => :en, :partial => true/false] - if m = path.match(%r'(?:^|/)(_)?[\w-]+((?:\.[\w-]+)*)\.(\w+)$') - partial = m[1] == '_' - details = (m[2]||"").split('.').reject { |e| e.empty? } - handler = Template.handler_class_for_extension(m[3]) + if m = path.match(%r'((^|.*/)(_)?[\w-]+)((?:\.[\w-]+)*)\.(\w+)$') + partial = m[3] == '_' + details = (m[4]||"").split('.').reject { |e| e.empty? } + handler = Template.handler_class_for_extension(m[5]) format = Mime[details.last] && details.pop.to_sym locale = details.last && details.pop.to_sym - return handler, :format => format, :locale => locale, :partial => partial + virtual_path = (m[1].gsub("#{@path}/", "") << details.join(".")) + + return handler, :format => format, :locale => locale, :partial => partial, + :virtual_path => virtual_path end end end diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb index 75a96d6497..e53e62d1ff 100644 --- a/actionpack/test/controller/helper_test.rb +++ b/actionpack/test/controller/helper_test.rb @@ -135,16 +135,17 @@ class HelperTest < ActiveSupport::TestCase assert methods.include?('foobar') end - def test_deprecation - assert_deprecated do - ActionController::Base.helpers_dir = "some/foo/bar" - end - assert_deprecated do - assert_equal ["some/foo/bar"], ActionController::Base.helpers_dir - end - ensure - ActionController::Base.helpers_path = [File.dirname(__FILE__) + '/../fixtures/helpers'] - end + # TODO Add this deprecation back before Rails 3.0 final release + # def test_deprecation + # assert_deprecated do + # ActionController::Base.helpers_dir = "some/foo/bar" + # end + # assert_deprecated do + # assert_equal ["some/foo/bar"], ActionController::Base.helpers_dir + # end + # ensure + # ActionController::Base.helpers_path = [File.dirname(__FILE__) + '/../fixtures/helpers'] + # end private def expected_helper_methods diff --git a/actionpack/test/fixtures/test/translation.erb b/actionpack/test/fixtures/test/translation.erb new file mode 100644 index 0000000000..81a837d1ff --- /dev/null +++ b/actionpack/test/fixtures/test/translation.erb @@ -0,0 +1 @@ +<%= t('.helper') %> \ No newline at end of file diff --git a/actionpack/test/template/translation_helper_test.rb b/actionpack/test/template/translation_helper_test.rb index d67d2c7911..4b73c44f7e 100644 --- a/actionpack/test/template/translation_helper_test.rb +++ b/actionpack/test/template/translation_helper_test.rb @@ -1,9 +1,9 @@ require 'abstract_unit' -class TranslationHelperTest < Test::Unit::TestCase +class TranslationHelperTest < ActiveSupport::TestCase include ActionView::Helpers::TagHelper include ActionView::Helpers::TranslationHelper - + attr_reader :request def setup end @@ -25,8 +25,8 @@ class TranslationHelperTest < Test::Unit::TestCase end def test_scoping_by_partial - expects(:template).returns(stub(:path_without_format_and_extension => "people/index")) - I18n.expects(:translate).with("people.index.foo", :locale => 'en', :raise => true).returns("") - translate ".foo", :locale => 'en' + I18n.expects(:translate).with("test.translation.helper", :raise => true).returns("helper") + @view = ActionView::Base.new(ActionController::Base.view_paths, {}) + assert_equal "helper", @view.render(:file => "test/translation") end end -- cgit v1.2.3 From 6404feee500dc5a2268da1e41af08a5ff847338a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 21:05:50 +0100 Subject: AC railtie should configure helpers path. --- actionpack/lib/action_controller/metal/helpers.rb | 5 ++--- actionpack/lib/action_controller/railtie.rb | 4 ++++ activesupport/lib/active_support/railtie.rb | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/actionpack/lib/action_controller/metal/helpers.rb b/actionpack/lib/action_controller/metal/helpers.rb index 0ebdf07911..03ba4b3f83 100644 --- a/actionpack/lib/action_controller/metal/helpers.rb +++ b/actionpack/lib/action_controller/metal/helpers.rb @@ -50,9 +50,8 @@ module ActionController include AbstractController::Helpers included do - extlib_inheritable_accessor(:helpers_path) do - defined?(Rails::Application) ? Rails::Application.paths.app.helpers.to_a : [] - end + extlib_inheritable_accessor(:helpers_path) + self.helpers_path = [] end module ClassMethods diff --git a/actionpack/lib/action_controller/railtie.rb b/actionpack/lib/action_controller/railtie.rb index 29a0a346ec..9151de4462 100644 --- a/actionpack/lib/action_controller/railtie.rb +++ b/actionpack/lib/action_controller/railtie.rb @@ -21,5 +21,9 @@ module ActionController initializer "action_controller.initialize_framework_caches" do ActionController::Base.cache_store ||= RAILS_CACHE end + + initializer "action_controller.set_helpers_path" do |app| + ActionController::Base.helpers_path = app.config.paths.app.helpers.to_a + end end end diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index a80fa77e1e..c8d8b85000 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -7,13 +7,13 @@ module ActiveSupport # Loads support for "whiny nil" (noisy warnings when methods are invoked # on +nil+ values) if Configuration#whiny_nils is true. - initializer :initialize_whiny_nils do |app| + initializer "active_support.initialize_whiny_nils" do |app| require 'active_support/whiny_nil' if app.config.whiny_nils end # Sets the default value for Time.zone # If assigned value cannot be matched to a TimeZone, an exception will be raised. - initializer :initialize_time_zone do |app| + initializer "active_support.initialize_time_zone" do |app| require 'active_support/core_ext/time/zones' zone_default = Time.__send__(:get_zone, app.config.time_zone) @@ -36,7 +36,7 @@ module I18n config.i18n.engines_load_path = [] config.i18n.load_path = [] - initializer :initialize_i18n do + initializer "i18n.initialize" do require 'active_support/i18n' ActionDispatch::Callbacks.to_prepare do -- cgit v1.2.3 From ec7c642f5fe60afc857aa64f1a9b4c2be56f9d70 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 26 Jan 2010 22:37:55 +0100 Subject: removes unused method Class#subclasses --- activesupport/lib/active_support/core_ext/class/removal.rb | 7 ------- activesupport/test/core_ext/class_test.rb | 10 ---------- 2 files changed, 17 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/class/removal.rb b/activesupport/lib/active_support/core_ext/class/removal.rb index 652be4ed78..82163eeb30 100644 --- a/activesupport/lib/active_support/core_ext/class/removal.rb +++ b/activesupport/lib/active_support/core_ext/class/removal.rb @@ -16,13 +16,6 @@ class Class #:nodoc: Object.remove_subclasses_of(self) end - # Returns an array with the names of the subclasses of +self+ as strings. - # - # Integer.subclasses # => ["Bignum", "Fixnum"] - def subclasses - Object.subclasses_of(self).map { |o| o.to_s } - end - # Removes the classes in +klasses+ from their parent module. # # Ordinary classes belong to some module via a constant. This method computes diff --git a/activesupport/test/core_ext/class_test.rb b/activesupport/test/core_ext/class_test.rb index bb4eb3c7d5..58b745a8b2 100644 --- a/activesupport/test/core_ext/class_test.rb +++ b/activesupport/test/core_ext/class_test.rb @@ -34,14 +34,4 @@ class ClassTest < Test::Unit::TestCase Class.remove_class(Y::Z::C) assert_raise(NameError) { Y::Z::C.is_a?(Class) } end - - def test_retrieving_subclasses - @parent = eval("class D; end; D") - @sub = eval("class E < D; end; E") - @subofsub = eval("class F < E; end; F") - assert_equal 2, @parent.subclasses.size - assert_equal [@subofsub.to_s], @sub.subclasses - assert_equal [], @subofsub.subclasses - assert_equal [@sub.to_s, @subofsub.to_s].sort, @parent.subclasses.sort - end end -- cgit v1.2.3 From 1b2ac25a2fe12d636f90bce1c510667d7accf407 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 26 Jan 2010 22:42:56 +0100 Subject: removes unused Class#remove_subclasses --- .../lib/active_support/core_ext/class/removal.rb | 9 --------- .../test/core_ext/object_and_class_ext_test.rb | 21 --------------------- 2 files changed, 30 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/class/removal.rb b/activesupport/lib/active_support/core_ext/class/removal.rb index 82163eeb30..c76c87e313 100644 --- a/activesupport/lib/active_support/core_ext/class/removal.rb +++ b/activesupport/lib/active_support/core_ext/class/removal.rb @@ -7,15 +7,6 @@ class Class #:nodoc: eval("defined?(::#{self}) && ::#{self}.equal?(self)") end - # Unassociates the class with its subclasses and removes the subclasses - # themselves. - # - # Integer.remove_subclasses # => [Bignum, Fixnum] - # Fixnum # => NameError: uninitialized constant Fixnum - def remove_subclasses - Object.remove_subclasses_of(self) - end - # Removes the classes in +klasses+ from their parent module. # # Ordinary classes belong to some module via a constant. This method computes diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb index e6fbdb637b..4305114f22 100644 --- a/activesupport/test/core_ext/object_and_class_ext_test.rb +++ b/activesupport/test/core_ext/object_and_class_ext_test.rb @@ -41,27 +41,6 @@ class Foo end class ClassExtTest < Test::Unit::TestCase - def test_methods - assert defined?(ClassB) - assert defined?(ClassC) - assert defined?(ClassD) - - ClassA.remove_subclasses - - assert !defined?(ClassB) - assert !defined?(ClassC) - assert !defined?(ClassD) - end - - def test_subclasses_of - cj = ClassJ - assert_equal [ClassJ], Object.subclasses_of(ClassI) - ClassI.remove_subclasses - assert_equal [], Object.subclasses_of(ClassI) - ensure - Object.const_set :ClassJ, cj - end - def test_subclasses_of_should_find_nested_classes assert Object.subclasses_of(ClassK).include?(Nested::ClassL) end -- cgit v1.2.3 From 5b01c8bb8bd9354fda8dc00c2df6888dbab7f017 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 26 Jan 2010 22:44:32 +0100 Subject: removes unused Object#remove_subclasses_of --- activesupport/lib/active_support/core_ext/object/extending.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/object/extending.rb b/activesupport/lib/active_support/core_ext/object/extending.rb index b8b6970382..e1aed3fc3c 100644 --- a/activesupport/lib/active_support/core_ext/object/extending.rb +++ b/activesupport/lib/active_support/core_ext/object/extending.rb @@ -36,10 +36,6 @@ class Class end class Object - def remove_subclasses_of(*superclasses) #:nodoc: - Class.remove_class(*subclasses_of(*superclasses)) - end - # Exclude this class unless it's a subclass of our supers and is defined. # We check defined? in case we find a removed class that has yet to be # garbage collected. This also fails for anonymous classes -- please -- cgit v1.2.3 From 245bfafe335ff883f7a096eab95ac22fe2848679 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 26 Jan 2010 22:46:47 +0100 Subject: removes unused Object#subclasses_of --- .../active_support/core_ext/object/extending.rb | 12 ------ .../test/core_ext/object_and_class_ext_test.rb | 49 ---------------------- 2 files changed, 61 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/object/extending.rb b/activesupport/lib/active_support/core_ext/object/extending.rb index e1aed3fc3c..5a375f39ad 100644 --- a/activesupport/lib/active_support/core_ext/object/extending.rb +++ b/activesupport/lib/active_support/core_ext/object/extending.rb @@ -36,18 +36,6 @@ class Class end class Object - # Exclude this class unless it's a subclass of our supers and is defined. - # We check defined? in case we find a removed class that has yet to be - # garbage collected. This also fails for anonymous classes -- please - # submit a patch if you have a workaround. - def subclasses_of(*superclasses) #:nodoc: - subclasses = [] - superclasses.each do |klass| - subclasses.concat klass.descendents.select {|k| k.name.blank? || k.reachable?} - end - subclasses - end - def extended_by #:nodoc: ancestors = class << self; ancestors end ancestors.select { |mod| mod.class == Module } - [ Object, Kernel ] diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb index 4305114f22..375273d680 100644 --- a/activesupport/test/core_ext/object_and_class_ext_test.rb +++ b/activesupport/test/core_ext/object_and_class_ext_test.rb @@ -40,55 +40,6 @@ class Foo include Bar end -class ClassExtTest < Test::Unit::TestCase - def test_subclasses_of_should_find_nested_classes - assert Object.subclasses_of(ClassK).include?(Nested::ClassL) - end - - def test_subclasses_of_should_not_return_removed_classes - # First create the removed class - old_class = Nested.class_eval { remove_const :ClassL } - new_class = Class.new(ClassK) - Nested.const_set :ClassL, new_class - assert_equal "Nested::ClassL", new_class.name # Sanity check - - subclasses = Object.subclasses_of(ClassK) - assert subclasses.include?(new_class) - assert ! subclasses.include?(old_class) - ensure - Nested.const_set :ClassL, old_class unless defined?(Nested::ClassL) - end - - def test_subclasses_of_should_not_trigger_const_missing - const_missing = false - Nested.on_const_missing { const_missing = true } - - subclasses = Object.subclasses_of ClassK - assert !const_missing - assert_equal [ Nested::ClassL ], subclasses - - removed = Nested.class_eval { remove_const :ClassL } # keep it in memory - subclasses = Object.subclasses_of ClassK - assert !const_missing - assert subclasses.empty? - ensure - Nested.const_set :ClassL, removed unless defined?(Nested::ClassL) - end - - def test_subclasses_of_with_multiple_roots - classes = Object.subclasses_of(ClassI, ClassK) - assert_equal %w(ClassJ Nested::ClassL), classes.collect(&:to_s).sort - end - - def test_subclasses_of_doesnt_find_anonymous_classes - assert_equal [], Object.subclasses_of(Foo) - bar = Class.new(Foo) - assert_nothing_raised do - assert_equal [bar], Object.subclasses_of(Foo) - end - end -end - class ObjectTests < Test::Unit::TestCase def test_extended_by foo = Foo.new -- cgit v1.2.3 From f85f5dfc8ffefff174b695c6363211d342f77a57 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 26 Jan 2010 22:48:21 +0100 Subject: removes unused Class#descedents --- .../active_support/core_ext/object/extending.rb | 34 ---------------------- 1 file changed, 34 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/object/extending.rb b/activesupport/lib/active_support/core_ext/object/extending.rb index 5a375f39ad..76ed8801f9 100644 --- a/activesupport/lib/active_support/core_ext/object/extending.rb +++ b/activesupport/lib/active_support/core_ext/object/extending.rb @@ -1,40 +1,6 @@ require 'active_support/core_ext/class/removal' require 'active_support/core_ext/object/blank' -class Class - # Rubinius - if defined?(Class.__subclasses__) - def descendents - subclasses = [] - __subclasses__.each {|k| subclasses << k; subclasses.concat k.descendents } - subclasses - end - else - # MRI - begin - ObjectSpace.each_object(Class.new) {} - - def descendents - subclasses = [] - ObjectSpace.each_object(class << self; self; end) do |k| - subclasses << k unless k == self - end - subclasses - end - # JRuby - rescue StandardError - def descendents - subclasses = [] - ObjectSpace.each_object(Class) do |k| - subclasses << k if k < self - end - subclasses.uniq! - subclasses - end - end - end -end - class Object def extended_by #:nodoc: ancestors = class << self; ancestors end -- cgit v1.2.3 From 5f981ff0294ba45aa44ad15aa063970b29aeec44 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 26 Jan 2010 22:49:35 +0100 Subject: removes unused method Class#reachable? --- activesupport/lib/active_support/core_ext/class/removal.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/class/removal.rb b/activesupport/lib/active_support/core_ext/class/removal.rb index c76c87e313..80a920e4d6 100644 --- a/activesupport/lib/active_support/core_ext/class/removal.rb +++ b/activesupport/lib/active_support/core_ext/class/removal.rb @@ -2,11 +2,6 @@ require 'active_support/core_ext/object/extending' require 'active_support/core_ext/module/introspection' class Class #:nodoc: - - def reachable? - eval("defined?(::#{self}) && ::#{self}.equal?(self)") - end - # Removes the classes in +klasses+ from their parent module. # # Ordinary classes belong to some module via a constant. This method computes -- cgit v1.2.3 From 44afd785c8e390f47bc5b80e5d94309b6b56a13c Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 26 Jan 2010 22:51:44 +0100 Subject: removes unused method Class#remove_class --- .../lib/active_support/core_ext/class/removal.rb | 31 ---------------------- activesupport/test/core_ext/class_test.rb | 17 ------------ 2 files changed, 48 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/class/removal.rb b/activesupport/lib/active_support/core_ext/class/removal.rb index 80a920e4d6..74140eb978 100644 --- a/activesupport/lib/active_support/core_ext/class/removal.rb +++ b/activesupport/lib/active_support/core_ext/class/removal.rb @@ -2,35 +2,4 @@ require 'active_support/core_ext/object/extending' require 'active_support/core_ext/module/introspection' class Class #:nodoc: - # Removes the classes in +klasses+ from their parent module. - # - # Ordinary classes belong to some module via a constant. This method computes - # that constant name from the class name and removes it from the module it - # belongs to. - # - # Object.remove_class(Integer) # => [Integer] - # Integer # => NameError: uninitialized constant Integer - # - # Take into account that in general the class object could be still stored - # somewhere else. - # - # i = Integer # => Integer - # Object.remove_class(Integer) # => [Integer] - # Integer # => NameError: uninitialized constant Integer - # i.subclasses # => ["Bignum", "Fixnum"] - # Fixnum.superclass # => Integer - def remove_class(*klasses) - klasses.flatten.each do |klass| - # Skip this class if there is nothing bound to this name - next unless defined?(klass.name) - - basename = klass.to_s.split("::").last - parent = klass.parent - - # Skip this class if it does not match the current one bound to this name - next unless parent.const_defined?(basename) && klass = parent.const_get(basename) - - parent.instance_eval { remove_const basename } unless parent == klass - end - end end diff --git a/activesupport/test/core_ext/class_test.rb b/activesupport/test/core_ext/class_test.rb index 58b745a8b2..a082beb26a 100644 --- a/activesupport/test/core_ext/class_test.rb +++ b/activesupport/test/core_ext/class_test.rb @@ -17,21 +17,4 @@ module Y end class ClassTest < Test::Unit::TestCase - def test_removing_class_in_root_namespace - assert A.is_a?(Class) - Class.remove_class(A) - assert_raise(NameError) { A.is_a?(Class) } - end - - def test_removing_class_in_one_level_namespace - assert X::B.is_a?(Class) - Class.remove_class(X::B) - assert_raise(NameError) { X::B.is_a?(Class) } - end - - def test_removing_class_in_two_level_namespace - assert Y::Z::C.is_a?(Class) - Class.remove_class(Y::Z::C) - assert_raise(NameError) { Y::Z::C.is_a?(Class) } - end end -- cgit v1.2.3 From 7d312e54bad9c39634c137caec07dfc8df471650 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 26 Jan 2010 22:57:27 +0100 Subject: deletes no void files removal.rb and class_test.rb --- actionpack/test/abstract/layouts_test.rb | 1 - activesupport/lib/active_support/core_ext/class.rb | 1 - .../lib/active_support/core_ext/class/removal.rb | 5 ----- .../lib/active_support/core_ext/object/extending.rb | 1 - activesupport/test/core_ext/class_test.rb | 20 -------------------- .../test/core_ext/object_and_class_ext_test.rb | 1 - 6 files changed, 29 deletions(-) delete mode 100644 activesupport/lib/active_support/core_ext/class/removal.rb delete mode 100644 activesupport/test/core_ext/class_test.rb diff --git a/actionpack/test/abstract/layouts_test.rb b/actionpack/test/abstract/layouts_test.rb index df73d948f0..5c96d1cfff 100644 --- a/actionpack/test/abstract/layouts_test.rb +++ b/actionpack/test/abstract/layouts_test.rb @@ -1,5 +1,4 @@ require 'abstract_unit' -require 'active_support/core_ext/class/removal' module AbstractControllerTests module Layouts diff --git a/activesupport/lib/active_support/core_ext/class.rb b/activesupport/lib/active_support/core_ext/class.rb index 44ad6c8c08..62df7d8b82 100644 --- a/activesupport/lib/active_support/core_ext/class.rb +++ b/activesupport/lib/active_support/core_ext/class.rb @@ -1,4 +1,3 @@ require 'active_support/core_ext/class/attribute_accessors' require 'active_support/core_ext/class/inheritable_attributes' -require 'active_support/core_ext/class/removal' require 'active_support/core_ext/class/delegating_attributes' diff --git a/activesupport/lib/active_support/core_ext/class/removal.rb b/activesupport/lib/active_support/core_ext/class/removal.rb deleted file mode 100644 index 74140eb978..0000000000 --- a/activesupport/lib/active_support/core_ext/class/removal.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'active_support/core_ext/object/extending' -require 'active_support/core_ext/module/introspection' - -class Class #:nodoc: -end diff --git a/activesupport/lib/active_support/core_ext/object/extending.rb b/activesupport/lib/active_support/core_ext/object/extending.rb index 76ed8801f9..c3331ab478 100644 --- a/activesupport/lib/active_support/core_ext/object/extending.rb +++ b/activesupport/lib/active_support/core_ext/object/extending.rb @@ -1,4 +1,3 @@ -require 'active_support/core_ext/class/removal' require 'active_support/core_ext/object/blank' class Object diff --git a/activesupport/test/core_ext/class_test.rb b/activesupport/test/core_ext/class_test.rb deleted file mode 100644 index a082beb26a..0000000000 --- a/activesupport/test/core_ext/class_test.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'abstract_unit' -require 'active_support/core_ext/class' - -class A -end - -module X - class B - end -end - -module Y - module Z - class C - end - end -end - -class ClassTest < Test::Unit::TestCase -end diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb index 375273d680..33a321db36 100644 --- a/activesupport/test/core_ext/object_and_class_ext_test.rb +++ b/activesupport/test/core_ext/object_and_class_ext_test.rb @@ -1,7 +1,6 @@ require 'abstract_unit' require 'active_support/time' require 'active_support/core_ext/object' -require 'active_support/core_ext/class/removal' class ClassA; end class ClassB < ClassA; end -- cgit v1.2.3 From ccec730d7f2ccf5e44d3ac2b4b05c7c57af1cfb4 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 26 Jan 2010 23:01:51 +0100 Subject: removes unused method Object#extend_with_included_modules_from --- .../lib/active_support/core_ext/object/extending.rb | 4 ---- activesupport/test/core_ext/object_and_class_ext_test.rb | 15 --------------- 2 files changed, 19 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/object/extending.rb b/activesupport/lib/active_support/core_ext/object/extending.rb index c3331ab478..357ac4a18d 100644 --- a/activesupport/lib/active_support/core_ext/object/extending.rb +++ b/activesupport/lib/active_support/core_ext/object/extending.rb @@ -5,8 +5,4 @@ class Object ancestors = class << self; ancestors end ancestors.select { |mod| mod.class == Module } - [ Object, Kernel ] end - - def extend_with_included_modules_from(object) #:nodoc: - object.extended_by.each { |mod| extend mod } - end end diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb index 33a321db36..7046d0e3f4 100644 --- a/activesupport/test/core_ext/object_and_class_ext_test.rb +++ b/activesupport/test/core_ext/object_and_class_ext_test.rb @@ -47,21 +47,6 @@ class ObjectTests < Test::Unit::TestCase assert(([Bar, Baz] - foo.extended_by).empty?, "Expected Bar, Baz in #{foo.extended_by.inspect}") end - def test_extend_with_included_modules_from - foo, object = Foo.new, Object.new - assert !object.respond_to?(:bar) - assert !object.respond_to?(:baz) - - object.extend_with_included_modules_from(foo) - assert object.respond_to?(:bar) - assert !object.respond_to?(:baz) - - foo.extend(Baz) - object.extend_with_included_modules_from(foo) - assert object.respond_to?(:bar) - assert object.respond_to?(:baz) - end - class DuckTime def acts_like_time? true -- cgit v1.2.3 From c25ac0deeefe55837ba8fd2b2dc860924a507e63 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 26 Jan 2010 23:03:58 +0100 Subject: removes Object#extended_by --- activesupport/lib/active_support/core_ext/object/extending.rb | 4 ---- activesupport/test/core_ext/object_and_class_ext_test.rb | 7 ------- 2 files changed, 11 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/object/extending.rb b/activesupport/lib/active_support/core_ext/object/extending.rb index 357ac4a18d..ab446e399d 100644 --- a/activesupport/lib/active_support/core_ext/object/extending.rb +++ b/activesupport/lib/active_support/core_ext/object/extending.rb @@ -1,8 +1,4 @@ require 'active_support/core_ext/object/blank' class Object - def extended_by #:nodoc: - ancestors = class << self; ancestors end - ancestors.select { |mod| mod.class == Module } - [ Object, Kernel ] - end end diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb index 7046d0e3f4..0b2a9c418e 100644 --- a/activesupport/test/core_ext/object_and_class_ext_test.rb +++ b/activesupport/test/core_ext/object_and_class_ext_test.rb @@ -40,13 +40,6 @@ class Foo end class ObjectTests < Test::Unit::TestCase - def test_extended_by - foo = Foo.new - assert foo.extended_by.include?(Bar) - foo.extend(Baz) - assert(([Bar, Baz] - foo.extended_by).empty?, "Expected Bar, Baz in #{foo.extended_by.inspect}") - end - class DuckTime def acts_like_time? true -- cgit v1.2.3 From 3c6891593d84b83c70441b4c953080481bdcc4bf Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 26 Jan 2010 23:08:00 +0100 Subject: removes now void extending.rb --- actionpack/lib/action_view/helpers/prototype_helper.rb | 1 - activesupport/lib/active_support/core_ext/object.rb | 1 - activesupport/lib/active_support/core_ext/object/extending.rb | 4 ---- 3 files changed, 6 deletions(-) delete mode 100644 activesupport/lib/active_support/core_ext/object/extending.rb diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index ff7bc3b34e..bef93dd0f8 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -1,6 +1,5 @@ require 'set' require 'active_support/json' -require 'active_support/core_ext/object/extending' require 'active_support/core_ext/object/returning' module ActionView diff --git a/activesupport/lib/active_support/core_ext/object.rb b/activesupport/lib/active_support/core_ext/object.rb index 04e8f06b3d..08e07a5b24 100644 --- a/activesupport/lib/active_support/core_ext/object.rb +++ b/activesupport/lib/active_support/core_ext/object.rb @@ -4,7 +4,6 @@ require 'active_support/core_ext/object/duplicable' require 'active_support/core_ext/object/try' require 'active_support/core_ext/object/conversions' -require 'active_support/core_ext/object/extending' require 'active_support/core_ext/object/instance_variables' require 'active_support/core_ext/object/metaclass' require 'active_support/core_ext/object/misc' diff --git a/activesupport/lib/active_support/core_ext/object/extending.rb b/activesupport/lib/active_support/core_ext/object/extending.rb deleted file mode 100644 index ab446e399d..0000000000 --- a/activesupport/lib/active_support/core_ext/object/extending.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'active_support/core_ext/object/blank' - -class Object -end -- cgit v1.2.3 From beda2d43d6ac5c3435fc2fba0cbd108c20fe1c67 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 26 Jan 2010 13:00:19 -0800 Subject: future proofing the sqlite3 adapter code Signed-off-by: Yehuda Katz --- .../lib/active_record/connection_adapters/sqlite_adapter.rb | 6 +++--- activerecord/test/cases/calculations_test.rb | 3 +++ activerecord/test/cases/query_cache_test.rb | 6 ++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb index 0a52f3a6a2..29225b83c5 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb @@ -193,20 +193,20 @@ module ActiveRecord SQL execute(sql, name).map do |row| - row[0] + row['name'] end end def columns(table_name, name = nil) #:nodoc: table_structure(table_name).map do |field| - SQLiteColumn.new(field['name'], field['dflt_value'], field['type'], field['notnull'] == "0") + SQLiteColumn.new(field['name'], field['dflt_value'], field['type'], field['notnull'].to_i == 0) end end def indexes(table_name, name = nil) #:nodoc: execute("PRAGMA index_list(#{quote_table_name(table_name)})", name).map do |row| index = IndexDefinition.new(table_name, row['name']) - index.unique = row['unique'] != '0' + index.unique = row['unique'].to_i != 0 index.columns = execute("PRAGMA index_info('#{index.name}')").map { |col| col['name'] } index end diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb index c3b2e56387..e6d56a7193 100644 --- a/activerecord/test/cases/calculations_test.rb +++ b/activerecord/test/cases/calculations_test.rb @@ -288,6 +288,9 @@ class CalculationsTest < ActiveRecord::TestCase # Oracle adapter returns floating point value 636.0 after SUM if current_adapter?(:OracleAdapter) assert_equal 636, Account.sum("2 * credit_limit") + elsif current_adapter?(:SQLite3Adapter) + # Future versions of the SQLite3 adapter will return a number + assert_equal 636, Account.sum("2 * credit_limit").to_i else assert_equal '636', Account.sum("2 * credit_limit") end diff --git a/activerecord/test/cases/query_cache_test.rb b/activerecord/test/cases/query_cache_test.rb index 2af6a56b6a..3710f8e40b 100644 --- a/activerecord/test/cases/query_cache_test.rb +++ b/activerecord/test/cases/query_cache_test.rb @@ -49,10 +49,16 @@ class QueryCacheTest < ActiveRecord::TestCase end def test_cache_does_not_wrap_string_results_in_arrays + require 'sqlite3/version' if current_adapter?(:SQLite3Adapter) + Task.cache do # Oracle adapter returns count() as Fixnum or Float if current_adapter?(:OracleAdapter) assert Task.connection.select_value("SELECT count(*) AS count_all FROM tasks").is_a?(Numeric) + elsif current_adapter?(:SQLite3Adapter) && SQLite3::Version::VERSION > '1.2.5' + # Future versions of the sqlite3 adapter will return numeric + assert_instance_of Fixnum, + Task.connection.select_value("SELECT count(*) AS count_all FROM tasks") else assert_instance_of String, Task.connection.select_value("SELECT count(*) AS count_all FROM tasks") end -- cgit v1.2.3 From 458b6a7fc905a23643fc0d26146e6bf230c9c472 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Wed, 27 Jan 2010 10:35:56 +1100 Subject: Fixing mailer generators to use the right email address --- railties/lib/generators/test_unit/mailer/templates/functional_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/lib/generators/test_unit/mailer/templates/functional_test.rb b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb index fcebb40135..e1aeb2db90 100644 --- a/railties/lib/generators/test_unit/mailer/templates/functional_test.rb +++ b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb @@ -4,7 +4,7 @@ class <%= class_name %>Test < ActionMailer::TestCase <% for action in actions -%> test "<%= action %>" do @expected.subject = <%= action.to_s.humanize.inspect %> - @expected.to = "to@example.com" + @expected.to = "to@example.org" @expected.from = "from@example.com" @expected.body = read_fixture("<%= action %>") @expected.date = Time.now -- cgit v1.2.3 From 1cda85d08a68888744bd230bccd75bf268587028 Mon Sep 17 00:00:00 2001 From: Geoff Buesing Date: Tue, 26 Jan 2010 20:18:17 -0600 Subject: Georgetown TimeZone is now mapped to "America/Guyana" instead of "America/Argentina/San_Juan" [#1821 status:resolved] --- activesupport/CHANGELOG | 2 ++ .../lib/active_support/values/time_zone.rb | 6 +++--- .../lib/tzinfo/definitions/America/Guyana.rb | 24 ++++++++++++++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Guyana.rb diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 87ec6f2a2c..c3f531235c 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,5 +1,7 @@ *Edge* +* Georgetown TimeZone is now mapped to "America/Guyana" instead of "America/Argentina/San_Juan" #1821 [Geoff Buesing, Reuben Sivan] + * Changed the default ActiveSupport.use_standard_json_time_format from false to true and ActiveSupport.escape_html_entities_in_json from true to false to match previously announced Rails 3 defaults [DHH] diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index 245d3ce051..4db3dd1705 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -55,7 +55,7 @@ module ActiveSupport "Newfoundland" => "America/St_Johns", "Brasilia" => "America/Sao_Paulo", "Buenos Aires" => "America/Argentina/Buenos_Aires", - "Georgetown" => "America/Argentina/San_Juan", + "Georgetown" => "America/Guyana", "Greenland" => "America/Godthab", "Mid-Atlantic" => "Atlantic/South_Georgia", "Azores" => "Atlantic/Azores", @@ -323,9 +323,9 @@ module ActiveSupport [-18_000, "Eastern Time (US & Canada)", "Indiana (East)", "Bogota", "Lima", "Quito" ], [-16_200, "Caracas" ], - [-14_400, "Atlantic Time (Canada)", "La Paz", "Santiago" ], + [-14_400, "Atlantic Time (Canada)", "Georgetown", "La Paz", "Santiago" ], [-12_600, "Newfoundland" ], - [-10_800, "Brasilia", "Buenos Aires", "Georgetown", "Greenland" ], + [-10_800, "Brasilia", "Buenos Aires", "Greenland" ], [ -7_200, "Mid-Atlantic" ], [ -3_600, "Azores", "Cape Verde Is." ], [ 0, "Dublin", "Edinburgh", "Lisbon", "London", "Casablanca", diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Guyana.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Guyana.rb new file mode 100644 index 0000000000..fccca4ceb4 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Guyana.rb @@ -0,0 +1,24 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Guyana + include TimezoneDefinition + + timezone 'America/Guyana' do |tz| + tz.offset :o0, -13960, 0, :LMT + tz.offset :o1, -13500, 0, :GBGT + tz.offset :o2, -13500, 0, :GYT + tz.offset :o3, -10800, 0, :GYT + tz.offset :o4, -14400, 0, :GYT + + tz.transition 1915, 3, :o1, 5228404549, 2160 + tz.transition 1966, 5, :o2, 78056693, 32 + tz.transition 1975, 7, :o3, 176010300 + tz.transition 1991, 1, :o4, 662698800 + end + end + end + end +end -- cgit v1.2.3 From f3caa63bcbbfff093efcdfa3547fb2eb96479f0a Mon Sep 17 00:00:00 2001 From: Geoff Buesing Date: Tue, 26 Jan 2010 20:22:29 -0600 Subject: Update bundled TZInfo to v0.3.16 --- activesupport/CHANGELOG | 2 + activesupport/lib/active_support/vendor.rb | 2 +- .../vendor/tzinfo-0.3.15/lib/tzinfo.rb | 33 -- .../tzinfo-0.3.15/lib/tzinfo/data_timezone.rb | 47 -- .../tzinfo-0.3.15/lib/tzinfo/data_timezone_info.rb | 228 --------- .../lib/tzinfo/definitions/Africa/Algiers.rb | 55 --- .../lib/tzinfo/definitions/Africa/Cairo.rb | 219 --------- .../lib/tzinfo/definitions/Africa/Casablanca.rb | 42 -- .../lib/tzinfo/definitions/Africa/Harare.rb | 18 - .../lib/tzinfo/definitions/Africa/Johannesburg.rb | 25 - .../lib/tzinfo/definitions/Africa/Monrovia.rb | 22 - .../lib/tzinfo/definitions/Africa/Nairobi.rb | 23 - .../definitions/America/Argentina/Buenos_Aires.rb | 84 ---- .../definitions/America/Argentina/San_Juan.rb | 86 ---- .../lib/tzinfo/definitions/America/Bogota.rb | 23 - .../lib/tzinfo/definitions/America/Caracas.rb | 23 - .../lib/tzinfo/definitions/America/Chicago.rb | 283 ------------ .../lib/tzinfo/definitions/America/Chihuahua.rb | 136 ------ .../lib/tzinfo/definitions/America/Denver.rb | 204 --------- .../lib/tzinfo/definitions/America/Godthab.rb | 161 ------- .../lib/tzinfo/definitions/America/Guatemala.rb | 27 -- .../lib/tzinfo/definitions/America/Guyana.rb | 24 - .../lib/tzinfo/definitions/America/Halifax.rb | 274 ----------- .../definitions/America/Indiana/Indianapolis.rb | 149 ------ .../lib/tzinfo/definitions/America/Juneau.rb | 194 -------- .../lib/tzinfo/definitions/America/La_Paz.rb | 22 - .../lib/tzinfo/definitions/America/Lima.rb | 35 -- .../lib/tzinfo/definitions/America/Los_Angeles.rb | 232 ---------- .../lib/tzinfo/definitions/America/Mazatlan.rb | 139 ------ .../lib/tzinfo/definitions/America/Mexico_City.rb | 144 ------ .../lib/tzinfo/definitions/America/Monterrey.rb | 131 ------ .../lib/tzinfo/definitions/America/New_York.rb | 282 ------------ .../lib/tzinfo/definitions/America/Phoenix.rb | 30 -- .../lib/tzinfo/definitions/America/Regina.rb | 74 --- .../lib/tzinfo/definitions/America/Santiago.rb | 205 --------- .../lib/tzinfo/definitions/America/Sao_Paulo.rb | 171 ------- .../lib/tzinfo/definitions/America/St_Johns.rb | 288 ------------ .../lib/tzinfo/definitions/America/Tijuana.rb | 196 -------- .../lib/tzinfo/definitions/Asia/Almaty.rb | 67 --- .../lib/tzinfo/definitions/Asia/Baghdad.rb | 73 --- .../lib/tzinfo/definitions/Asia/Baku.rb | 161 ------- .../lib/tzinfo/definitions/Asia/Bangkok.rb | 20 - .../lib/tzinfo/definitions/Asia/Chongqing.rb | 33 -- .../lib/tzinfo/definitions/Asia/Colombo.rb | 30 -- .../lib/tzinfo/definitions/Asia/Dhaka.rb | 29 -- .../lib/tzinfo/definitions/Asia/Hong_Kong.rb | 87 ---- .../lib/tzinfo/definitions/Asia/Irkutsk.rb | 165 ------- .../lib/tzinfo/definitions/Asia/Jakarta.rb | 30 -- .../lib/tzinfo/definitions/Asia/Jerusalem.rb | 163 ------- .../lib/tzinfo/definitions/Asia/Kabul.rb | 20 - .../lib/tzinfo/definitions/Asia/Kamchatka.rb | 163 ------- .../lib/tzinfo/definitions/Asia/Karachi.rb | 114 ----- .../lib/tzinfo/definitions/Asia/Kathmandu.rb | 20 - .../lib/tzinfo/definitions/Asia/Kolkata.rb | 25 - .../lib/tzinfo/definitions/Asia/Krasnoyarsk.rb | 163 ------- .../lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb | 31 -- .../lib/tzinfo/definitions/Asia/Kuwait.rb | 18 - .../lib/tzinfo/definitions/Asia/Magadan.rb | 163 ------- .../lib/tzinfo/definitions/Asia/Muscat.rb | 18 - .../lib/tzinfo/definitions/Asia/Novosibirsk.rb | 164 ------- .../lib/tzinfo/definitions/Asia/Rangoon.rb | 24 - .../lib/tzinfo/definitions/Asia/Riyadh.rb | 18 - .../lib/tzinfo/definitions/Asia/Seoul.rb | 34 -- .../lib/tzinfo/definitions/Asia/Shanghai.rb | 35 -- .../lib/tzinfo/definitions/Asia/Singapore.rb | 33 -- .../lib/tzinfo/definitions/Asia/Taipei.rb | 59 --- .../lib/tzinfo/definitions/Asia/Tashkent.rb | 47 -- .../lib/tzinfo/definitions/Asia/Tbilisi.rb | 78 ---- .../lib/tzinfo/definitions/Asia/Tehran.rb | 121 ----- .../lib/tzinfo/definitions/Asia/Tokyo.rb | 30 -- .../lib/tzinfo/definitions/Asia/Ulaanbaatar.rb | 65 --- .../lib/tzinfo/definitions/Asia/Urumqi.rb | 33 -- .../lib/tzinfo/definitions/Asia/Vladivostok.rb | 164 ------- .../lib/tzinfo/definitions/Asia/Yakutsk.rb | 163 ------- .../lib/tzinfo/definitions/Asia/Yekaterinburg.rb | 165 ------- .../lib/tzinfo/definitions/Asia/Yerevan.rb | 165 ------- .../lib/tzinfo/definitions/Atlantic/Azores.rb | 270 ----------- .../lib/tzinfo/definitions/Atlantic/Cape_Verde.rb | 23 - .../tzinfo/definitions/Atlantic/South_Georgia.rb | 18 - .../lib/tzinfo/definitions/Australia/Adelaide.rb | 187 -------- .../lib/tzinfo/definitions/Australia/Brisbane.rb | 35 -- .../lib/tzinfo/definitions/Australia/Darwin.rb | 29 -- .../lib/tzinfo/definitions/Australia/Hobart.rb | 193 -------- .../lib/tzinfo/definitions/Australia/Melbourne.rb | 185 -------- .../lib/tzinfo/definitions/Australia/Perth.rb | 37 -- .../lib/tzinfo/definitions/Australia/Sydney.rb | 185 -------- .../lib/tzinfo/definitions/Etc/UTC.rb | 16 - .../lib/tzinfo/definitions/Europe/Amsterdam.rb | 228 --------- .../lib/tzinfo/definitions/Europe/Athens.rb | 185 -------- .../lib/tzinfo/definitions/Europe/Belgrade.rb | 163 ------- .../lib/tzinfo/definitions/Europe/Berlin.rb | 188 -------- .../lib/tzinfo/definitions/Europe/Bratislava.rb | 13 - .../lib/tzinfo/definitions/Europe/Brussels.rb | 232 ---------- .../lib/tzinfo/definitions/Europe/Bucharest.rb | 181 -------- .../lib/tzinfo/definitions/Europe/Budapest.rb | 197 -------- .../lib/tzinfo/definitions/Europe/Copenhagen.rb | 179 -------- .../lib/tzinfo/definitions/Europe/Dublin.rb | 276 ----------- .../lib/tzinfo/definitions/Europe/Helsinki.rb | 163 ------- .../lib/tzinfo/definitions/Europe/Istanbul.rb | 218 --------- .../lib/tzinfo/definitions/Europe/Kiev.rb | 168 ------- .../lib/tzinfo/definitions/Europe/Lisbon.rb | 268 ----------- .../lib/tzinfo/definitions/Europe/Ljubljana.rb | 13 - .../lib/tzinfo/definitions/Europe/London.rb | 288 ------------ .../lib/tzinfo/definitions/Europe/Madrid.rb | 211 --------- .../lib/tzinfo/definitions/Europe/Minsk.rb | 170 ------- .../lib/tzinfo/definitions/Europe/Moscow.rb | 181 -------- .../lib/tzinfo/definitions/Europe/Paris.rb | 232 ---------- .../lib/tzinfo/definitions/Europe/Prague.rb | 187 -------- .../lib/tzinfo/definitions/Europe/Riga.rb | 176 ------- .../lib/tzinfo/definitions/Europe/Rome.rb | 215 --------- .../lib/tzinfo/definitions/Europe/Sarajevo.rb | 13 - .../lib/tzinfo/definitions/Europe/Skopje.rb | 13 - .../lib/tzinfo/definitions/Europe/Sofia.rb | 173 ------- .../lib/tzinfo/definitions/Europe/Stockholm.rb | 165 ------- .../lib/tzinfo/definitions/Europe/Tallinn.rb | 172 ------- .../lib/tzinfo/definitions/Europe/Vienna.rb | 183 -------- .../lib/tzinfo/definitions/Europe/Vilnius.rb | 170 ------- .../lib/tzinfo/definitions/Europe/Warsaw.rb | 212 --------- .../lib/tzinfo/definitions/Europe/Zagreb.rb | 13 - .../lib/tzinfo/definitions/Pacific/Auckland.rb | 202 -------- .../lib/tzinfo/definitions/Pacific/Fiji.rb | 23 - .../lib/tzinfo/definitions/Pacific/Guam.rb | 22 - .../lib/tzinfo/definitions/Pacific/Honolulu.rb | 28 -- .../lib/tzinfo/definitions/Pacific/Majuro.rb | 20 - .../lib/tzinfo/definitions/Pacific/Midway.rb | 25 - .../lib/tzinfo/definitions/Pacific/Noumea.rb | 25 - .../lib/tzinfo/definitions/Pacific/Pago_Pago.rb | 26 -- .../lib/tzinfo/definitions/Pacific/Port_Moresby.rb | 20 - .../lib/tzinfo/definitions/Pacific/Tongatapu.rb | 27 -- .../tzinfo-0.3.15/lib/tzinfo/info_timezone.rb | 52 --- .../tzinfo-0.3.15/lib/tzinfo/linked_timezone.rb | 51 --- .../lib/tzinfo/linked_timezone_info.rb | 44 -- .../tzinfo-0.3.15/lib/tzinfo/offset_rationals.rb | 98 ---- .../tzinfo-0.3.15/lib/tzinfo/ruby_core_support.rb | 56 --- .../tzinfo-0.3.15/lib/tzinfo/time_or_datetime.rb | 292 ------------ .../vendor/tzinfo-0.3.15/lib/tzinfo/timezone.rb | 508 --------------------- .../lib/tzinfo/timezone_definition.rb | 56 --- .../tzinfo-0.3.15/lib/tzinfo/timezone_info.rb | 40 -- .../lib/tzinfo/timezone_offset_info.rb | 94 ---- .../tzinfo-0.3.15/lib/tzinfo/timezone_period.rb | 198 -------- .../lib/tzinfo/timezone_transition_info.rb | 129 ------ .../vendor/tzinfo-0.3.16/lib/tzinfo.rb | 33 ++ .../tzinfo-0.3.16/lib/tzinfo/data_timezone.rb | 47 ++ .../tzinfo-0.3.16/lib/tzinfo/data_timezone_info.rb | 228 +++++++++ .../lib/tzinfo/definitions/Africa/Algiers.rb | 55 +++ .../lib/tzinfo/definitions/Africa/Cairo.rb | 219 +++++++++ .../lib/tzinfo/definitions/Africa/Casablanca.rb | 42 ++ .../lib/tzinfo/definitions/Africa/Harare.rb | 18 + .../lib/tzinfo/definitions/Africa/Johannesburg.rb | 25 + .../lib/tzinfo/definitions/Africa/Monrovia.rb | 22 + .../lib/tzinfo/definitions/Africa/Nairobi.rb | 23 + .../definitions/America/Argentina/Buenos_Aires.rb | 84 ++++ .../lib/tzinfo/definitions/America/Bogota.rb | 23 + .../lib/tzinfo/definitions/America/Caracas.rb | 23 + .../lib/tzinfo/definitions/America/Chicago.rb | 283 ++++++++++++ .../lib/tzinfo/definitions/America/Chihuahua.rb | 136 ++++++ .../lib/tzinfo/definitions/America/Denver.rb | 204 +++++++++ .../lib/tzinfo/definitions/America/Godthab.rb | 161 +++++++ .../lib/tzinfo/definitions/America/Guatemala.rb | 27 ++ .../lib/tzinfo/definitions/America/Guyana.rb | 24 + .../lib/tzinfo/definitions/America/Halifax.rb | 274 +++++++++++ .../definitions/America/Indiana/Indianapolis.rb | 149 ++++++ .../lib/tzinfo/definitions/America/Juneau.rb | 194 ++++++++ .../lib/tzinfo/definitions/America/La_Paz.rb | 22 + .../lib/tzinfo/definitions/America/Lima.rb | 35 ++ .../lib/tzinfo/definitions/America/Los_Angeles.rb | 232 ++++++++++ .../lib/tzinfo/definitions/America/Mazatlan.rb | 139 ++++++ .../lib/tzinfo/definitions/America/Mexico_City.rb | 144 ++++++ .../lib/tzinfo/definitions/America/Monterrey.rb | 131 ++++++ .../lib/tzinfo/definitions/America/New_York.rb | 282 ++++++++++++ .../lib/tzinfo/definitions/America/Phoenix.rb | 30 ++ .../lib/tzinfo/definitions/America/Regina.rb | 74 +++ .../lib/tzinfo/definitions/America/Santiago.rb | 205 +++++++++ .../lib/tzinfo/definitions/America/Sao_Paulo.rb | 171 +++++++ .../lib/tzinfo/definitions/America/St_Johns.rb | 288 ++++++++++++ .../lib/tzinfo/definitions/America/Tijuana.rb | 196 ++++++++ .../lib/tzinfo/definitions/Asia/Almaty.rb | 67 +++ .../lib/tzinfo/definitions/Asia/Baghdad.rb | 73 +++ .../lib/tzinfo/definitions/Asia/Baku.rb | 161 +++++++ .../lib/tzinfo/definitions/Asia/Bangkok.rb | 20 + .../lib/tzinfo/definitions/Asia/Chongqing.rb | 33 ++ .../lib/tzinfo/definitions/Asia/Colombo.rb | 30 ++ .../lib/tzinfo/definitions/Asia/Dhaka.rb | 112 +++++ .../lib/tzinfo/definitions/Asia/Hong_Kong.rb | 90 ++++ .../lib/tzinfo/definitions/Asia/Irkutsk.rb | 165 +++++++ .../lib/tzinfo/definitions/Asia/Jakarta.rb | 30 ++ .../lib/tzinfo/definitions/Asia/Jerusalem.rb | 163 +++++++ .../lib/tzinfo/definitions/Asia/Kabul.rb | 20 + .../lib/tzinfo/definitions/Asia/Kamchatka.rb | 163 +++++++ .../lib/tzinfo/definitions/Asia/Karachi.rb | 114 +++++ .../lib/tzinfo/definitions/Asia/Kathmandu.rb | 20 + .../lib/tzinfo/definitions/Asia/Kolkata.rb | 25 + .../lib/tzinfo/definitions/Asia/Krasnoyarsk.rb | 163 +++++++ .../lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb | 31 ++ .../lib/tzinfo/definitions/Asia/Kuwait.rb | 18 + .../lib/tzinfo/definitions/Asia/Magadan.rb | 163 +++++++ .../lib/tzinfo/definitions/Asia/Muscat.rb | 18 + .../lib/tzinfo/definitions/Asia/Novosibirsk.rb | 164 +++++++ .../lib/tzinfo/definitions/Asia/Rangoon.rb | 24 + .../lib/tzinfo/definitions/Asia/Riyadh.rb | 18 + .../lib/tzinfo/definitions/Asia/Seoul.rb | 34 ++ .../lib/tzinfo/definitions/Asia/Shanghai.rb | 35 ++ .../lib/tzinfo/definitions/Asia/Singapore.rb | 33 ++ .../lib/tzinfo/definitions/Asia/Taipei.rb | 59 +++ .../lib/tzinfo/definitions/Asia/Tashkent.rb | 47 ++ .../lib/tzinfo/definitions/Asia/Tbilisi.rb | 78 ++++ .../lib/tzinfo/definitions/Asia/Tehran.rb | 121 +++++ .../lib/tzinfo/definitions/Asia/Tokyo.rb | 30 ++ .../lib/tzinfo/definitions/Asia/Ulaanbaatar.rb | 65 +++ .../lib/tzinfo/definitions/Asia/Urumqi.rb | 33 ++ .../lib/tzinfo/definitions/Asia/Vladivostok.rb | 164 +++++++ .../lib/tzinfo/definitions/Asia/Yakutsk.rb | 163 +++++++ .../lib/tzinfo/definitions/Asia/Yekaterinburg.rb | 165 +++++++ .../lib/tzinfo/definitions/Asia/Yerevan.rb | 165 +++++++ .../lib/tzinfo/definitions/Atlantic/Azores.rb | 270 +++++++++++ .../lib/tzinfo/definitions/Atlantic/Cape_Verde.rb | 23 + .../tzinfo/definitions/Atlantic/South_Georgia.rb | 18 + .../lib/tzinfo/definitions/Australia/Adelaide.rb | 187 ++++++++ .../lib/tzinfo/definitions/Australia/Brisbane.rb | 35 ++ .../lib/tzinfo/definitions/Australia/Darwin.rb | 29 ++ .../lib/tzinfo/definitions/Australia/Hobart.rb | 193 ++++++++ .../lib/tzinfo/definitions/Australia/Melbourne.rb | 185 ++++++++ .../lib/tzinfo/definitions/Australia/Perth.rb | 37 ++ .../lib/tzinfo/definitions/Australia/Sydney.rb | 185 ++++++++ .../lib/tzinfo/definitions/Etc/UTC.rb | 16 + .../lib/tzinfo/definitions/Europe/Amsterdam.rb | 228 +++++++++ .../lib/tzinfo/definitions/Europe/Athens.rb | 185 ++++++++ .../lib/tzinfo/definitions/Europe/Belgrade.rb | 163 +++++++ .../lib/tzinfo/definitions/Europe/Berlin.rb | 188 ++++++++ .../lib/tzinfo/definitions/Europe/Bratislava.rb | 13 + .../lib/tzinfo/definitions/Europe/Brussels.rb | 232 ++++++++++ .../lib/tzinfo/definitions/Europe/Bucharest.rb | 181 ++++++++ .../lib/tzinfo/definitions/Europe/Budapest.rb | 197 ++++++++ .../lib/tzinfo/definitions/Europe/Copenhagen.rb | 179 ++++++++ .../lib/tzinfo/definitions/Europe/Dublin.rb | 276 +++++++++++ .../lib/tzinfo/definitions/Europe/Helsinki.rb | 163 +++++++ .../lib/tzinfo/definitions/Europe/Istanbul.rb | 218 +++++++++ .../lib/tzinfo/definitions/Europe/Kiev.rb | 168 +++++++ .../lib/tzinfo/definitions/Europe/Lisbon.rb | 268 +++++++++++ .../lib/tzinfo/definitions/Europe/Ljubljana.rb | 13 + .../lib/tzinfo/definitions/Europe/London.rb | 288 ++++++++++++ .../lib/tzinfo/definitions/Europe/Madrid.rb | 211 +++++++++ .../lib/tzinfo/definitions/Europe/Minsk.rb | 170 +++++++ .../lib/tzinfo/definitions/Europe/Moscow.rb | 181 ++++++++ .../lib/tzinfo/definitions/Europe/Paris.rb | 232 ++++++++++ .../lib/tzinfo/definitions/Europe/Prague.rb | 187 ++++++++ .../lib/tzinfo/definitions/Europe/Riga.rb | 176 +++++++ .../lib/tzinfo/definitions/Europe/Rome.rb | 215 +++++++++ .../lib/tzinfo/definitions/Europe/Sarajevo.rb | 13 + .../lib/tzinfo/definitions/Europe/Skopje.rb | 13 + .../lib/tzinfo/definitions/Europe/Sofia.rb | 173 +++++++ .../lib/tzinfo/definitions/Europe/Stockholm.rb | 165 +++++++ .../lib/tzinfo/definitions/Europe/Tallinn.rb | 172 +++++++ .../lib/tzinfo/definitions/Europe/Vienna.rb | 183 ++++++++ .../lib/tzinfo/definitions/Europe/Vilnius.rb | 170 +++++++ .../lib/tzinfo/definitions/Europe/Warsaw.rb | 212 +++++++++ .../lib/tzinfo/definitions/Europe/Zagreb.rb | 13 + .../lib/tzinfo/definitions/Pacific/Auckland.rb | 202 ++++++++ .../lib/tzinfo/definitions/Pacific/Fiji.rb | 25 + .../lib/tzinfo/definitions/Pacific/Guam.rb | 22 + .../lib/tzinfo/definitions/Pacific/Honolulu.rb | 28 ++ .../lib/tzinfo/definitions/Pacific/Majuro.rb | 20 + .../lib/tzinfo/definitions/Pacific/Midway.rb | 25 + .../lib/tzinfo/definitions/Pacific/Noumea.rb | 25 + .../lib/tzinfo/definitions/Pacific/Pago_Pago.rb | 26 ++ .../lib/tzinfo/definitions/Pacific/Port_Moresby.rb | 20 + .../lib/tzinfo/definitions/Pacific/Tongatapu.rb | 27 ++ .../tzinfo-0.3.16/lib/tzinfo/info_timezone.rb | 52 +++ .../tzinfo-0.3.16/lib/tzinfo/linked_timezone.rb | 51 +++ .../lib/tzinfo/linked_timezone_info.rb | 44 ++ .../tzinfo-0.3.16/lib/tzinfo/offset_rationals.rb | 98 ++++ .../tzinfo-0.3.16/lib/tzinfo/ruby_core_support.rb | 56 +++ .../tzinfo-0.3.16/lib/tzinfo/time_or_datetime.rb | 292 ++++++++++++ .../vendor/tzinfo-0.3.16/lib/tzinfo/timezone.rb | 508 +++++++++++++++++++++ .../lib/tzinfo/timezone_definition.rb | 56 +++ .../tzinfo-0.3.16/lib/tzinfo/timezone_info.rb | 40 ++ .../lib/tzinfo/timezone_offset_info.rb | 94 ++++ .../tzinfo-0.3.16/lib/tzinfo/timezone_period.rb | 198 ++++++++ .../lib/tzinfo/timezone_transition_info.rb | 129 ++++++ 279 files changed, 15985 insertions(+), 15981 deletions(-) delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/data_timezone.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/data_timezone_info.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Algiers.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Cairo.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Casablanca.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Harare.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Johannesburg.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Monrovia.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Nairobi.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Argentina/Buenos_Aires.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Argentina/San_Juan.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Bogota.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Caracas.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Chicago.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Chihuahua.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Denver.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Godthab.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Guatemala.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Guyana.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Halifax.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Indiana/Indianapolis.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Juneau.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/La_Paz.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Lima.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Los_Angeles.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Mazatlan.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Mexico_City.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Monterrey.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/New_York.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Phoenix.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Regina.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Santiago.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Sao_Paulo.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/St_Johns.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Tijuana.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Almaty.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Baghdad.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Baku.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Bangkok.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Chongqing.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Colombo.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Dhaka.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Hong_Kong.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Irkutsk.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Jakarta.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Jerusalem.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kabul.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kamchatka.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Karachi.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kathmandu.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kolkata.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Krasnoyarsk.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kuwait.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Magadan.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Muscat.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Novosibirsk.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Rangoon.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Riyadh.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Seoul.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Shanghai.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Singapore.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Taipei.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tashkent.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tbilisi.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tehran.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tokyo.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Ulaanbaatar.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Urumqi.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Vladivostok.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Yakutsk.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Yekaterinburg.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Yerevan.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Atlantic/Azores.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Atlantic/Cape_Verde.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Atlantic/South_Georgia.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Adelaide.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Brisbane.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Darwin.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Hobart.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Melbourne.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Perth.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Sydney.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Etc/UTC.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Amsterdam.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Athens.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Belgrade.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Berlin.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Bratislava.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Brussels.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Bucharest.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Budapest.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Copenhagen.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Dublin.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Helsinki.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Istanbul.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Kiev.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Lisbon.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Ljubljana.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/London.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Madrid.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Minsk.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Moscow.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Paris.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Prague.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Riga.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Rome.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Sarajevo.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Skopje.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Sofia.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Stockholm.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Tallinn.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Vienna.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Vilnius.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Warsaw.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Zagreb.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Auckland.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Fiji.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Guam.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Honolulu.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Majuro.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Midway.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Noumea.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Pago_Pago.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Port_Moresby.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Tongatapu.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/info_timezone.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/linked_timezone.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/linked_timezone_info.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/offset_rationals.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/ruby_core_support.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/time_or_datetime.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_definition.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_info.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_offset_info.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_period.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_transition_info.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone_info.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Algiers.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Cairo.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Casablanca.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Harare.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Johannesburg.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Monrovia.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Nairobi.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Argentina/Buenos_Aires.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Bogota.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Caracas.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chicago.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chihuahua.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Denver.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Godthab.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guatemala.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guyana.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Halifax.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Indiana/Indianapolis.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Juneau.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/La_Paz.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Lima.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Los_Angeles.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mazatlan.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mexico_City.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Monterrey.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/New_York.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Phoenix.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Regina.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Santiago.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Sao_Paulo.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/St_Johns.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Tijuana.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Almaty.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baghdad.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baku.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Bangkok.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Chongqing.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Colombo.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Dhaka.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Hong_Kong.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Irkutsk.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jakarta.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jerusalem.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kabul.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kamchatka.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Karachi.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kathmandu.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kolkata.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Krasnoyarsk.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuwait.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Magadan.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Muscat.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Novosibirsk.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Rangoon.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Riyadh.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Seoul.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Shanghai.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Singapore.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Taipei.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tashkent.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tbilisi.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tehran.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tokyo.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Ulaanbaatar.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Urumqi.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Vladivostok.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yakutsk.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yekaterinburg.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yerevan.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Azores.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Cape_Verde.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/South_Georgia.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Adelaide.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Brisbane.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Darwin.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Hobart.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Melbourne.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Perth.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Sydney.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Etc/UTC.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Amsterdam.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Athens.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Belgrade.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Berlin.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bratislava.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Brussels.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bucharest.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Budapest.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Copenhagen.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Dublin.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Helsinki.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Istanbul.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Kiev.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Lisbon.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Ljubljana.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/London.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Madrid.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Minsk.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Moscow.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Paris.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Prague.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Riga.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Rome.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sarajevo.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Skopje.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sofia.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Stockholm.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Tallinn.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vienna.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vilnius.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Warsaw.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Zagreb.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Auckland.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Fiji.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Guam.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Honolulu.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Majuro.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Midway.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Noumea.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Pago_Pago.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Port_Moresby.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Tongatapu.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/info_timezone.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone_info.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/offset_rationals.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/ruby_core_support.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/time_or_datetime.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_definition.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_info.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_offset_info.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_period.rb create mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_transition_info.rb diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index c3f531235c..710e5c81e0 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,5 +1,7 @@ *Edge* +* Update bundled TZInfo to v0.3.16 [Geoff Buesing] + * Georgetown TimeZone is now mapped to "America/Guyana" instead of "America/Argentina/San_Juan" #1821 [Geoff Buesing, Reuben Sivan] * Changed the default ActiveSupport.use_standard_json_time_format from false to true and diff --git a/activesupport/lib/active_support/vendor.rb b/activesupport/lib/active_support/vendor.rb index 1e46491d83..ca70beb0a8 100644 --- a/activesupport/lib/active_support/vendor.rb +++ b/activesupport/lib/active_support/vendor.rb @@ -4,7 +4,7 @@ def ActiveSupport.requirable?(file) $LOAD_PATH.any? { |p| Dir.glob("#{p}/#{file}.*").any? } end -[%w(builder 2.1.2), %w(memcache-client 1.7.5), %w(tzinfo 0.3.15)].each do |lib, version| +[%w(builder 2.1.2), %w(memcache-client 1.7.5), %w(tzinfo 0.3.16)].each do |lib, version| # If the lib is not already requirable unless ActiveSupport.requirable? lib # Try to activate a gem ~> satisfying the requested version first. diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo.rb deleted file mode 100644 index c8bdbeec5d..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo.rb +++ /dev/null @@ -1,33 +0,0 @@ -#-- -# Copyright (c) 2005-2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -# Add the directory containing this file to the start of the load path if it -# isn't there already. -$:.unshift(File.dirname(__FILE__)) unless - $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) - -require 'tzinfo/timezone' -# require 'tzinfo/country' -# require 'tzinfo/tzdataparser' -# require 'tzinfo/timezone_proxy' -require 'tzinfo/data_timezone' -require 'tzinfo/linked_timezone' \ No newline at end of file diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/data_timezone.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/data_timezone.rb deleted file mode 100644 index 5eccbdf0db..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/data_timezone.rb +++ /dev/null @@ -1,47 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/info_timezone' - -module TZInfo - - # A Timezone based on a DataTimezoneInfo. - class DataTimezone < InfoTimezone #:nodoc: - - # Returns the TimezonePeriod for the given UTC time. utc can either be - # a DateTime, Time or integer timestamp (Time.to_i). Any timezone - # information in utc is ignored (it is treated as a UTC time). - # - # If no TimezonePeriod could be found, PeriodNotFound is raised. - def period_for_utc(utc) - info.period_for_utc(utc) - end - - # Returns the set of TimezonePeriod instances that are valid for the given - # local time as an array. If you just want a single period, use - # period_for_local instead and specify how abiguities should be resolved. - # Raises PeriodNotFound if no periods are found for the given time. - def periods_for_local(local) - info.periods_for_local(local) - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/data_timezone_info.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/data_timezone_info.rb deleted file mode 100644 index a45d94554b..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/data_timezone_info.rb +++ /dev/null @@ -1,228 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/time_or_datetime' -require 'tzinfo/timezone_info' -require 'tzinfo/timezone_offset_info' -require 'tzinfo/timezone_period' -require 'tzinfo/timezone_transition_info' - -module TZInfo - # Thrown if no offsets have been defined when calling period_for_utc or - # periods_for_local. Indicates an error in the timezone data. - class NoOffsetsDefined < StandardError - end - - # Represents a (non-linked) timezone defined in a data module. - class DataTimezoneInfo < TimezoneInfo #:nodoc: - - # Constructs a new TimezoneInfo with its identifier. - def initialize(identifier) - super(identifier) - @offsets = {} - @transitions = [] - @previous_offset = nil - @transitions_index = nil - end - - # Defines a offset. The id uniquely identifies this offset within the - # timezone. utc_offset and std_offset define the offset in seconds of - # standard time from UTC and daylight savings from standard time - # respectively. abbreviation describes the timezone offset (e.g. GMT, BST, - # EST or EDT). - # - # The first offset to be defined is treated as the offset that applies - # until the first transition. This will usually be in Local Mean Time (LMT). - # - # ArgumentError will be raised if the id is already defined. - def offset(id, utc_offset, std_offset, abbreviation) - raise ArgumentError, 'Offset already defined' if @offsets.has_key?(id) - - offset = TimezoneOffsetInfo.new(utc_offset, std_offset, abbreviation) - @offsets[id] = offset - @previous_offset = offset unless @previous_offset - end - - # Defines a transition. Transitions must be defined in chronological order. - # ArgumentError will be raised if a transition is added out of order. - # offset_id refers to an id defined with offset. ArgumentError will be - # raised if the offset_id cannot be found. numerator_or_time and - # denomiator specify the time the transition occurs as. See - # TimezoneTransitionInfo for more detail about specifying times. - def transition(year, month, offset_id, numerator_or_time, denominator = nil) - offset = @offsets[offset_id] - raise ArgumentError, 'Offset not found' unless offset - - if @transitions_index - if year < @last_year || (year == @last_year && month < @last_month) - raise ArgumentError, 'Transitions must be increasing date order' - end - - # Record the position of the first transition with this index. - index = transition_index(year, month) - @transitions_index[index] ||= @transitions.length - - # Fill in any gaps - (index - 1).downto(0) do |i| - break if @transitions_index[i] - @transitions_index[i] = @transitions.length - end - else - @transitions_index = [@transitions.length] - @start_year = year - @start_month = month - end - - @transitions << TimezoneTransitionInfo.new(offset, @previous_offset, - numerator_or_time, denominator) - @last_year = year - @last_month = month - @previous_offset = offset - end - - # Returns the TimezonePeriod for the given UTC time. - # Raises NoOffsetsDefined if no offsets have been defined. - def period_for_utc(utc) - unless @transitions.empty? - utc = TimeOrDateTime.wrap(utc) - index = transition_index(utc.year, utc.mon) - - start_transition = nil - start = transition_before_end(index) - if start - start.downto(0) do |i| - if @transitions[i].at <= utc - start_transition = @transitions[i] - break - end - end - end - - end_transition = nil - start = transition_after_start(index) - if start - start.upto(@transitions.length - 1) do |i| - if @transitions[i].at > utc - end_transition = @transitions[i] - break - end - end - end - - if start_transition || end_transition - TimezonePeriod.new(start_transition, end_transition) - else - # Won't happen since there are transitions. Must always find one - # transition that is either >= or < the specified time. - raise 'No transitions found in search' - end - else - raise NoOffsetsDefined, 'No offsets have been defined' unless @previous_offset - TimezonePeriod.new(nil, nil, @previous_offset) - end - end - - # Returns the set of TimezonePeriods for the given local time as an array. - # Results returned are ordered by increasing UTC start date. - # Returns an empty array if no periods are found for the given time. - # Raises NoOffsetsDefined if no offsets have been defined. - def periods_for_local(local) - unless @transitions.empty? - local = TimeOrDateTime.wrap(local) - index = transition_index(local.year, local.mon) - - result = [] - - start_index = transition_after_start(index - 1) - if start_index && @transitions[start_index].local_end > local - if start_index > 0 - if @transitions[start_index - 1].local_start <= local - result << TimezonePeriod.new(@transitions[start_index - 1], @transitions[start_index]) - end - else - result << TimezonePeriod.new(nil, @transitions[start_index]) - end - end - - end_index = transition_before_end(index + 1) - - if end_index - start_index = end_index unless start_index - - start_index.upto(transition_before_end(index + 1)) do |i| - if @transitions[i].local_start <= local - if i + 1 < @transitions.length - if @transitions[i + 1].local_end > local - result << TimezonePeriod.new(@transitions[i], @transitions[i + 1]) - end - else - result << TimezonePeriod.new(@transitions[i], nil) - end - end - end - end - - result - else - raise NoOffsetsDefined, 'No offsets have been defined' unless @previous_offset - [TimezonePeriod.new(nil, nil, @previous_offset)] - end - end - - private - # Returns the index into the @transitions_index array for a given year - # and month. - def transition_index(year, month) - index = (year - @start_year) * 2 - index += 1 if month > 6 - index -= 1 if @start_month > 6 - index - end - - # Returns the index into @transitions of the first transition that occurs - # on or after the start of the given index into @transitions_index. - # Returns nil if there are no such transitions. - def transition_after_start(index) - if index >= @transitions_index.length - nil - else - index = 0 if index < 0 - @transitions_index[index] - end - end - - # Returns the index into @transitions of the first transition that occurs - # before the end of the given index into @transitions_index. - # Returns nil if there are no such transitions. - def transition_before_end(index) - index = index + 1 - - if index <= 0 - nil - elsif index >= @transitions_index.length - @transitions.length - 1 - else - @transitions_index[index] - 1 - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Algiers.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Algiers.rb deleted file mode 100644 index 8c5f25577f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Algiers.rb +++ /dev/null @@ -1,55 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Algiers - include TimezoneDefinition - - timezone 'Africa/Algiers' do |tz| - tz.offset :o0, 732, 0, :LMT - tz.offset :o1, 561, 0, :PMT - tz.offset :o2, 0, 0, :WET - tz.offset :o3, 0, 3600, :WEST - tz.offset :o4, 3600, 0, :CET - tz.offset :o5, 3600, 3600, :CEST - - tz.transition 1891, 3, :o1, 2170625843, 900 - tz.transition 1911, 3, :o2, 69670267013, 28800 - tz.transition 1916, 6, :o3, 58104707, 24 - tz.transition 1916, 10, :o2, 58107323, 24 - tz.transition 1917, 3, :o3, 58111499, 24 - tz.transition 1917, 10, :o2, 58116227, 24 - tz.transition 1918, 3, :o3, 58119899, 24 - tz.transition 1918, 10, :o2, 58124963, 24 - tz.transition 1919, 3, :o3, 58128467, 24 - tz.transition 1919, 10, :o2, 58133699, 24 - tz.transition 1920, 2, :o3, 58136867, 24 - tz.transition 1920, 10, :o2, 58142915, 24 - tz.transition 1921, 3, :o3, 58146323, 24 - tz.transition 1921, 6, :o2, 58148699, 24 - tz.transition 1939, 9, :o3, 58308443, 24 - tz.transition 1939, 11, :o2, 4859173, 2 - tz.transition 1940, 2, :o4, 29156215, 12 - tz.transition 1944, 4, :o5, 58348405, 24 - tz.transition 1944, 10, :o4, 4862743, 2 - tz.transition 1945, 4, :o5, 58357141, 24 - tz.transition 1945, 9, :o4, 58361147, 24 - tz.transition 1946, 10, :o2, 58370411, 24 - tz.transition 1956, 1, :o4, 4871003, 2 - tz.transition 1963, 4, :o2, 58515203, 24 - tz.transition 1971, 4, :o3, 41468400 - tz.transition 1971, 9, :o2, 54774000 - tz.transition 1977, 5, :o3, 231724800 - tz.transition 1977, 10, :o4, 246236400 - tz.transition 1978, 3, :o5, 259545600 - tz.transition 1978, 9, :o4, 275274000 - tz.transition 1979, 10, :o2, 309740400 - tz.transition 1980, 4, :o3, 325468800 - tz.transition 1980, 10, :o2, 341802000 - tz.transition 1981, 5, :o4, 357523200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Cairo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Cairo.rb deleted file mode 100644 index b7ed8e8244..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Cairo.rb +++ /dev/null @@ -1,219 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Cairo - include TimezoneDefinition - - timezone 'Africa/Cairo' do |tz| - tz.offset :o0, 7500, 0, :LMT - tz.offset :o1, 7200, 0, :EET - tz.offset :o2, 7200, 3600, :EEST - - tz.transition 1900, 9, :o1, 695604503, 288 - tz.transition 1940, 7, :o2, 29157905, 12 - tz.transition 1940, 9, :o1, 19439227, 8 - tz.transition 1941, 4, :o2, 29161193, 12 - tz.transition 1941, 9, :o1, 19442027, 8 - tz.transition 1942, 3, :o2, 29165405, 12 - tz.transition 1942, 10, :o1, 19445275, 8 - tz.transition 1943, 3, :o2, 29169785, 12 - tz.transition 1943, 10, :o1, 19448235, 8 - tz.transition 1944, 3, :o2, 29174177, 12 - tz.transition 1944, 10, :o1, 19451163, 8 - tz.transition 1945, 4, :o2, 29178737, 12 - tz.transition 1945, 10, :o1, 19454083, 8 - tz.transition 1957, 5, :o2, 29231621, 12 - tz.transition 1957, 9, :o1, 19488899, 8 - tz.transition 1958, 4, :o2, 29235893, 12 - tz.transition 1958, 9, :o1, 19491819, 8 - tz.transition 1959, 4, :o2, 58480547, 24 - tz.transition 1959, 9, :o1, 4873683, 2 - tz.transition 1960, 4, :o2, 58489331, 24 - tz.transition 1960, 9, :o1, 4874415, 2 - tz.transition 1961, 4, :o2, 58498091, 24 - tz.transition 1961, 9, :o1, 4875145, 2 - tz.transition 1962, 4, :o2, 58506851, 24 - tz.transition 1962, 9, :o1, 4875875, 2 - tz.transition 1963, 4, :o2, 58515611, 24 - tz.transition 1963, 9, :o1, 4876605, 2 - tz.transition 1964, 4, :o2, 58524395, 24 - tz.transition 1964, 9, :o1, 4877337, 2 - tz.transition 1965, 4, :o2, 58533155, 24 - tz.transition 1965, 9, :o1, 4878067, 2 - tz.transition 1966, 4, :o2, 58541915, 24 - tz.transition 1966, 10, :o1, 4878799, 2 - tz.transition 1967, 4, :o2, 58550675, 24 - tz.transition 1967, 10, :o1, 4879529, 2 - tz.transition 1968, 4, :o2, 58559459, 24 - tz.transition 1968, 10, :o1, 4880261, 2 - tz.transition 1969, 4, :o2, 58568219, 24 - tz.transition 1969, 10, :o1, 4880991, 2 - tz.transition 1970, 4, :o2, 10364400 - tz.transition 1970, 10, :o1, 23587200 - tz.transition 1971, 4, :o2, 41900400 - tz.transition 1971, 10, :o1, 55123200 - tz.transition 1972, 4, :o2, 73522800 - tz.transition 1972, 10, :o1, 86745600 - tz.transition 1973, 4, :o2, 105058800 - tz.transition 1973, 10, :o1, 118281600 - tz.transition 1974, 4, :o2, 136594800 - tz.transition 1974, 10, :o1, 149817600 - tz.transition 1975, 4, :o2, 168130800 - tz.transition 1975, 10, :o1, 181353600 - tz.transition 1976, 4, :o2, 199753200 - tz.transition 1976, 10, :o1, 212976000 - tz.transition 1977, 4, :o2, 231289200 - tz.transition 1977, 10, :o1, 244512000 - tz.transition 1978, 4, :o2, 262825200 - tz.transition 1978, 10, :o1, 276048000 - tz.transition 1979, 4, :o2, 294361200 - tz.transition 1979, 10, :o1, 307584000 - tz.transition 1980, 4, :o2, 325983600 - tz.transition 1980, 10, :o1, 339206400 - tz.transition 1981, 4, :o2, 357519600 - tz.transition 1981, 10, :o1, 370742400 - tz.transition 1982, 7, :o2, 396399600 - tz.transition 1982, 10, :o1, 402278400 - tz.transition 1983, 7, :o2, 426812400 - tz.transition 1983, 10, :o1, 433814400 - tz.transition 1984, 4, :o2, 452214000 - tz.transition 1984, 10, :o1, 465436800 - tz.transition 1985, 4, :o2, 483750000 - tz.transition 1985, 10, :o1, 496972800 - tz.transition 1986, 4, :o2, 515286000 - tz.transition 1986, 10, :o1, 528508800 - tz.transition 1987, 4, :o2, 546822000 - tz.transition 1987, 10, :o1, 560044800 - tz.transition 1988, 4, :o2, 578444400 - tz.transition 1988, 10, :o1, 591667200 - tz.transition 1989, 5, :o2, 610412400 - tz.transition 1989, 10, :o1, 623203200 - tz.transition 1990, 4, :o2, 641516400 - tz.transition 1990, 10, :o1, 654739200 - tz.transition 1991, 4, :o2, 673052400 - tz.transition 1991, 10, :o1, 686275200 - tz.transition 1992, 4, :o2, 704674800 - tz.transition 1992, 10, :o1, 717897600 - tz.transition 1993, 4, :o2, 736210800 - tz.transition 1993, 10, :o1, 749433600 - tz.transition 1994, 4, :o2, 767746800 - tz.transition 1994, 10, :o1, 780969600 - tz.transition 1995, 4, :o2, 799020000 - tz.transition 1995, 9, :o1, 812322000 - tz.transition 1996, 4, :o2, 830469600 - tz.transition 1996, 9, :o1, 843771600 - tz.transition 1997, 4, :o2, 861919200 - tz.transition 1997, 9, :o1, 875221200 - tz.transition 1998, 4, :o2, 893368800 - tz.transition 1998, 9, :o1, 906670800 - tz.transition 1999, 4, :o2, 925423200 - tz.transition 1999, 9, :o1, 938725200 - tz.transition 2000, 4, :o2, 956872800 - tz.transition 2000, 9, :o1, 970174800 - tz.transition 2001, 4, :o2, 988322400 - tz.transition 2001, 9, :o1, 1001624400 - tz.transition 2002, 4, :o2, 1019772000 - tz.transition 2002, 9, :o1, 1033074000 - tz.transition 2003, 4, :o2, 1051221600 - tz.transition 2003, 9, :o1, 1064523600 - tz.transition 2004, 4, :o2, 1083276000 - tz.transition 2004, 9, :o1, 1096578000 - tz.transition 2005, 4, :o2, 1114725600 - tz.transition 2005, 9, :o1, 1128027600 - tz.transition 2006, 4, :o2, 1146175200 - tz.transition 2006, 9, :o1, 1158872400 - tz.transition 2007, 4, :o2, 1177624800 - tz.transition 2007, 9, :o1, 1189112400 - tz.transition 2008, 4, :o2, 1209074400 - tz.transition 2008, 8, :o1, 1219957200 - tz.transition 2009, 4, :o2, 1240524000 - tz.transition 2009, 8, :o1, 1250802000 - tz.transition 2010, 4, :o2, 1272578400 - tz.transition 2010, 9, :o1, 1285880400 - tz.transition 2011, 4, :o2, 1304028000 - tz.transition 2011, 9, :o1, 1317330000 - tz.transition 2012, 4, :o2, 1335477600 - tz.transition 2012, 9, :o1, 1348779600 - tz.transition 2013, 4, :o2, 1366927200 - tz.transition 2013, 9, :o1, 1380229200 - tz.transition 2014, 4, :o2, 1398376800 - tz.transition 2014, 9, :o1, 1411678800 - tz.transition 2015, 4, :o2, 1429826400 - tz.transition 2015, 9, :o1, 1443128400 - tz.transition 2016, 4, :o2, 1461880800 - tz.transition 2016, 9, :o1, 1475182800 - tz.transition 2017, 4, :o2, 1493330400 - tz.transition 2017, 9, :o1, 1506632400 - tz.transition 2018, 4, :o2, 1524780000 - tz.transition 2018, 9, :o1, 1538082000 - tz.transition 2019, 4, :o2, 1556229600 - tz.transition 2019, 9, :o1, 1569531600 - tz.transition 2020, 4, :o2, 1587679200 - tz.transition 2020, 9, :o1, 1600981200 - tz.transition 2021, 4, :o2, 1619733600 - tz.transition 2021, 9, :o1, 1633035600 - tz.transition 2022, 4, :o2, 1651183200 - tz.transition 2022, 9, :o1, 1664485200 - tz.transition 2023, 4, :o2, 1682632800 - tz.transition 2023, 9, :o1, 1695934800 - tz.transition 2024, 4, :o2, 1714082400 - tz.transition 2024, 9, :o1, 1727384400 - tz.transition 2025, 4, :o2, 1745532000 - tz.transition 2025, 9, :o1, 1758834000 - tz.transition 2026, 4, :o2, 1776981600 - tz.transition 2026, 9, :o1, 1790283600 - tz.transition 2027, 4, :o2, 1809036000 - tz.transition 2027, 9, :o1, 1822338000 - tz.transition 2028, 4, :o2, 1840485600 - tz.transition 2028, 9, :o1, 1853787600 - tz.transition 2029, 4, :o2, 1871935200 - tz.transition 2029, 9, :o1, 1885237200 - tz.transition 2030, 4, :o2, 1903384800 - tz.transition 2030, 9, :o1, 1916686800 - tz.transition 2031, 4, :o2, 1934834400 - tz.transition 2031, 9, :o1, 1948136400 - tz.transition 2032, 4, :o2, 1966888800 - tz.transition 2032, 9, :o1, 1980190800 - tz.transition 2033, 4, :o2, 1998338400 - tz.transition 2033, 9, :o1, 2011640400 - tz.transition 2034, 4, :o2, 2029788000 - tz.transition 2034, 9, :o1, 2043090000 - tz.transition 2035, 4, :o2, 2061237600 - tz.transition 2035, 9, :o1, 2074539600 - tz.transition 2036, 4, :o2, 2092687200 - tz.transition 2036, 9, :o1, 2105989200 - tz.transition 2037, 4, :o2, 2124136800 - tz.transition 2037, 9, :o1, 2137438800 - tz.transition 2038, 4, :o2, 29586521, 12 - tz.transition 2038, 9, :o1, 19725579, 8 - tz.transition 2039, 4, :o2, 29590889, 12 - tz.transition 2039, 9, :o1, 19728491, 8 - tz.transition 2040, 4, :o2, 29595257, 12 - tz.transition 2040, 9, :o1, 19731403, 8 - tz.transition 2041, 4, :o2, 29599625, 12 - tz.transition 2041, 9, :o1, 19734315, 8 - tz.transition 2042, 4, :o2, 29603993, 12 - tz.transition 2042, 9, :o1, 19737227, 8 - tz.transition 2043, 4, :o2, 29608361, 12 - tz.transition 2043, 9, :o1, 19740139, 8 - tz.transition 2044, 4, :o2, 29612813, 12 - tz.transition 2044, 9, :o1, 19743107, 8 - tz.transition 2045, 4, :o2, 29617181, 12 - tz.transition 2045, 9, :o1, 19746019, 8 - tz.transition 2046, 4, :o2, 29621549, 12 - tz.transition 2046, 9, :o1, 19748931, 8 - tz.transition 2047, 4, :o2, 29625917, 12 - tz.transition 2047, 9, :o1, 19751843, 8 - tz.transition 2048, 4, :o2, 29630285, 12 - tz.transition 2048, 9, :o1, 19754755, 8 - tz.transition 2049, 4, :o2, 29634737, 12 - tz.transition 2049, 9, :o1, 19757723, 8 - tz.transition 2050, 4, :o2, 29639105, 12 - tz.transition 2050, 9, :o1, 19760635, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Casablanca.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Casablanca.rb deleted file mode 100644 index 18d73c93a0..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Casablanca.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Casablanca - include TimezoneDefinition - - timezone 'Africa/Casablanca' do |tz| - tz.offset :o0, -1820, 0, :LMT - tz.offset :o1, 0, 0, :WET - tz.offset :o2, 0, 3600, :WEST - tz.offset :o3, 3600, 0, :CET - - tz.transition 1913, 10, :o1, 10454687371, 4320 - tz.transition 1939, 9, :o2, 4859037, 2 - tz.transition 1939, 11, :o1, 58310075, 24 - tz.transition 1940, 2, :o2, 4859369, 2 - tz.transition 1945, 11, :o1, 58362659, 24 - tz.transition 1950, 6, :o2, 4866887, 2 - tz.transition 1950, 10, :o1, 58406003, 24 - tz.transition 1967, 6, :o2, 2439645, 1 - tz.transition 1967, 9, :o1, 58554347, 24 - tz.transition 1974, 6, :o2, 141264000 - tz.transition 1974, 8, :o1, 147222000 - tz.transition 1976, 5, :o2, 199756800 - tz.transition 1976, 7, :o1, 207702000 - tz.transition 1977, 5, :o2, 231292800 - tz.transition 1977, 9, :o1, 244249200 - tz.transition 1978, 6, :o2, 265507200 - tz.transition 1978, 8, :o1, 271033200 - tz.transition 1984, 3, :o3, 448243200 - tz.transition 1985, 12, :o1, 504918000 - tz.transition 2008, 6, :o2, 1212278400 - tz.transition 2008, 8, :o1, 1220223600 - tz.transition 2009, 6, :o2, 1243814400 - tz.transition 2009, 8, :o1, 1250809200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Harare.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Harare.rb deleted file mode 100644 index 070c95ae0f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Harare.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Harare - include TimezoneDefinition - - timezone 'Africa/Harare' do |tz| - tz.offset :o0, 7452, 0, :LMT - tz.offset :o1, 7200, 0, :CAT - - tz.transition 1903, 2, :o1, 1932939531, 800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Johannesburg.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Johannesburg.rb deleted file mode 100644 index f0af0d8e33..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Johannesburg.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Johannesburg - include TimezoneDefinition - - timezone 'Africa/Johannesburg' do |tz| - tz.offset :o0, 6720, 0, :LMT - tz.offset :o1, 5400, 0, :SAST - tz.offset :o2, 7200, 0, :SAST - tz.offset :o3, 7200, 3600, :SAST - - tz.transition 1892, 2, :o1, 108546139, 45 - tz.transition 1903, 2, :o2, 38658791, 16 - tz.transition 1942, 9, :o3, 4861245, 2 - tz.transition 1943, 3, :o2, 58339307, 24 - tz.transition 1943, 9, :o3, 4861973, 2 - tz.transition 1944, 3, :o2, 58348043, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Monrovia.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Monrovia.rb deleted file mode 100644 index 40e711fa44..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Monrovia.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Monrovia - include TimezoneDefinition - - timezone 'Africa/Monrovia' do |tz| - tz.offset :o0, -2588, 0, :LMT - tz.offset :o1, -2588, 0, :MMT - tz.offset :o2, -2670, 0, :LRT - tz.offset :o3, 0, 0, :GMT - - tz.transition 1882, 1, :o1, 52022445047, 21600 - tz.transition 1919, 3, :o2, 52315600247, 21600 - tz.transition 1972, 5, :o3, 73529070 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Nairobi.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Nairobi.rb deleted file mode 100644 index 7b0a2f43be..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Africa/Nairobi.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Nairobi - include TimezoneDefinition - - timezone 'Africa/Nairobi' do |tz| - tz.offset :o0, 8836, 0, :LMT - tz.offset :o1, 10800, 0, :EAT - tz.offset :o2, 9000, 0, :BEAT - tz.offset :o3, 9885, 0, :BEAUT - - tz.transition 1928, 6, :o1, 52389253391, 21600 - tz.transition 1929, 12, :o2, 19407819, 8 - tz.transition 1939, 12, :o3, 116622211, 48 - tz.transition 1959, 12, :o1, 14036742061, 5760 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Argentina/Buenos_Aires.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Argentina/Buenos_Aires.rb deleted file mode 100644 index 307f9546de..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +++ /dev/null @@ -1,84 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Argentina - module Buenos_Aires - include TimezoneDefinition - - timezone 'America/Argentina/Buenos_Aires' do |tz| - tz.offset :o0, -14028, 0, :LMT - tz.offset :o1, -15408, 0, :CMT - tz.offset :o2, -14400, 0, :ART - tz.offset :o3, -14400, 3600, :ARST - tz.offset :o4, -10800, 0, :ART - tz.offset :o5, -10800, 3600, :ARST - - tz.transition 1894, 10, :o1, 17374555169, 7200 - tz.transition 1920, 5, :o2, 1453467407, 600 - tz.transition 1930, 12, :o3, 7278935, 3 - tz.transition 1931, 4, :o2, 19411461, 8 - tz.transition 1931, 10, :o3, 7279889, 3 - tz.transition 1932, 3, :o2, 19414141, 8 - tz.transition 1932, 11, :o3, 7281038, 3 - tz.transition 1933, 3, :o2, 19417061, 8 - tz.transition 1933, 11, :o3, 7282133, 3 - tz.transition 1934, 3, :o2, 19419981, 8 - tz.transition 1934, 11, :o3, 7283228, 3 - tz.transition 1935, 3, :o2, 19422901, 8 - tz.transition 1935, 11, :o3, 7284323, 3 - tz.transition 1936, 3, :o2, 19425829, 8 - tz.transition 1936, 11, :o3, 7285421, 3 - tz.transition 1937, 3, :o2, 19428749, 8 - tz.transition 1937, 11, :o3, 7286516, 3 - tz.transition 1938, 3, :o2, 19431669, 8 - tz.transition 1938, 11, :o3, 7287611, 3 - tz.transition 1939, 3, :o2, 19434589, 8 - tz.transition 1939, 11, :o3, 7288706, 3 - tz.transition 1940, 3, :o2, 19437517, 8 - tz.transition 1940, 7, :o3, 7289435, 3 - tz.transition 1941, 6, :o2, 19441285, 8 - tz.transition 1941, 10, :o3, 7290848, 3 - tz.transition 1943, 8, :o2, 19447501, 8 - tz.transition 1943, 10, :o3, 7293038, 3 - tz.transition 1946, 3, :o2, 19455045, 8 - tz.transition 1946, 10, :o3, 7296284, 3 - tz.transition 1963, 10, :o2, 19506429, 8 - tz.transition 1963, 12, :o3, 7315136, 3 - tz.transition 1964, 3, :o2, 19507645, 8 - tz.transition 1964, 10, :o3, 7316051, 3 - tz.transition 1965, 3, :o2, 19510565, 8 - tz.transition 1965, 10, :o3, 7317146, 3 - tz.transition 1966, 3, :o2, 19513485, 8 - tz.transition 1966, 10, :o3, 7318241, 3 - tz.transition 1967, 4, :o2, 19516661, 8 - tz.transition 1967, 10, :o3, 7319294, 3 - tz.transition 1968, 4, :o2, 19519629, 8 - tz.transition 1968, 10, :o3, 7320407, 3 - tz.transition 1969, 4, :o2, 19522541, 8 - tz.transition 1969, 10, :o4, 7321499, 3 - tz.transition 1974, 1, :o5, 128142000 - tz.transition 1974, 5, :o4, 136605600 - tz.transition 1988, 12, :o5, 596948400 - tz.transition 1989, 3, :o4, 605066400 - tz.transition 1989, 10, :o5, 624423600 - tz.transition 1990, 3, :o4, 636516000 - tz.transition 1990, 10, :o5, 656478000 - tz.transition 1991, 3, :o4, 667965600 - tz.transition 1991, 10, :o5, 687927600 - tz.transition 1992, 3, :o4, 699415200 - tz.transition 1992, 10, :o5, 719377200 - tz.transition 1993, 3, :o4, 731469600 - tz.transition 1999, 10, :o3, 938919600 - tz.transition 2000, 3, :o4, 952052400 - tz.transition 2007, 12, :o5, 1198983600 - tz.transition 2008, 3, :o4, 1205632800 - tz.transition 2008, 10, :o5, 1224385200 - tz.transition 2009, 3, :o4, 1237082400 - end - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Argentina/San_Juan.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Argentina/San_Juan.rb deleted file mode 100644 index ba8be4705f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Argentina/San_Juan.rb +++ /dev/null @@ -1,86 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Argentina - module San_Juan - include TimezoneDefinition - - timezone 'America/Argentina/San_Juan' do |tz| - tz.offset :o0, -16444, 0, :LMT - tz.offset :o1, -15408, 0, :CMT - tz.offset :o2, -14400, 0, :ART - tz.offset :o3, -14400, 3600, :ARST - tz.offset :o4, -10800, 0, :ART - tz.offset :o5, -10800, 3600, :ARST - tz.offset :o6, -14400, 0, :WART - - tz.transition 1894, 10, :o1, 52123666111, 21600 - tz.transition 1920, 5, :o2, 1453467407, 600 - tz.transition 1930, 12, :o3, 7278935, 3 - tz.transition 1931, 4, :o2, 19411461, 8 - tz.transition 1931, 10, :o3, 7279889, 3 - tz.transition 1932, 3, :o2, 19414141, 8 - tz.transition 1932, 11, :o3, 7281038, 3 - tz.transition 1933, 3, :o2, 19417061, 8 - tz.transition 1933, 11, :o3, 7282133, 3 - tz.transition 1934, 3, :o2, 19419981, 8 - tz.transition 1934, 11, :o3, 7283228, 3 - tz.transition 1935, 3, :o2, 19422901, 8 - tz.transition 1935, 11, :o3, 7284323, 3 - tz.transition 1936, 3, :o2, 19425829, 8 - tz.transition 1936, 11, :o3, 7285421, 3 - tz.transition 1937, 3, :o2, 19428749, 8 - tz.transition 1937, 11, :o3, 7286516, 3 - tz.transition 1938, 3, :o2, 19431669, 8 - tz.transition 1938, 11, :o3, 7287611, 3 - tz.transition 1939, 3, :o2, 19434589, 8 - tz.transition 1939, 11, :o3, 7288706, 3 - tz.transition 1940, 3, :o2, 19437517, 8 - tz.transition 1940, 7, :o3, 7289435, 3 - tz.transition 1941, 6, :o2, 19441285, 8 - tz.transition 1941, 10, :o3, 7290848, 3 - tz.transition 1943, 8, :o2, 19447501, 8 - tz.transition 1943, 10, :o3, 7293038, 3 - tz.transition 1946, 3, :o2, 19455045, 8 - tz.transition 1946, 10, :o3, 7296284, 3 - tz.transition 1963, 10, :o2, 19506429, 8 - tz.transition 1963, 12, :o3, 7315136, 3 - tz.transition 1964, 3, :o2, 19507645, 8 - tz.transition 1964, 10, :o3, 7316051, 3 - tz.transition 1965, 3, :o2, 19510565, 8 - tz.transition 1965, 10, :o3, 7317146, 3 - tz.transition 1966, 3, :o2, 19513485, 8 - tz.transition 1966, 10, :o3, 7318241, 3 - tz.transition 1967, 4, :o2, 19516661, 8 - tz.transition 1967, 10, :o3, 7319294, 3 - tz.transition 1968, 4, :o2, 19519629, 8 - tz.transition 1968, 10, :o3, 7320407, 3 - tz.transition 1969, 4, :o2, 19522541, 8 - tz.transition 1969, 10, :o4, 7321499, 3 - tz.transition 1974, 1, :o5, 128142000 - tz.transition 1974, 5, :o4, 136605600 - tz.transition 1988, 12, :o5, 596948400 - tz.transition 1989, 3, :o4, 605066400 - tz.transition 1989, 10, :o5, 624423600 - tz.transition 1990, 3, :o4, 636516000 - tz.transition 1990, 10, :o5, 656478000 - tz.transition 1991, 3, :o6, 667792800 - tz.transition 1991, 5, :o4, 673588800 - tz.transition 1991, 10, :o5, 687927600 - tz.transition 1992, 3, :o4, 699415200 - tz.transition 1992, 10, :o5, 719377200 - tz.transition 1993, 3, :o4, 731469600 - tz.transition 1999, 10, :o3, 938919600 - tz.transition 2000, 3, :o4, 952052400 - tz.transition 2004, 5, :o6, 1085972400 - tz.transition 2004, 7, :o4, 1090728000 - tz.transition 2007, 12, :o5, 1198983600 - tz.transition 2008, 3, :o4, 1205632800 - end - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Bogota.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Bogota.rb deleted file mode 100644 index ef96435c6a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Bogota.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Bogota - include TimezoneDefinition - - timezone 'America/Bogota' do |tz| - tz.offset :o0, -17780, 0, :LMT - tz.offset :o1, -17780, 0, :BMT - tz.offset :o2, -18000, 0, :COT - tz.offset :o3, -18000, 3600, :COST - - tz.transition 1884, 3, :o1, 10407954409, 4320 - tz.transition 1914, 11, :o2, 10456385929, 4320 - tz.transition 1992, 5, :o3, 704869200 - tz.transition 1993, 4, :o2, 733896000 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Caracas.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Caracas.rb deleted file mode 100644 index 27392a540a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Caracas.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Caracas - include TimezoneDefinition - - timezone 'America/Caracas' do |tz| - tz.offset :o0, -16064, 0, :LMT - tz.offset :o1, -16060, 0, :CMT - tz.offset :o2, -16200, 0, :VET - tz.offset :o3, -14400, 0, :VET - - tz.transition 1890, 1, :o1, 1627673863, 675 - tz.transition 1912, 2, :o2, 10452001043, 4320 - tz.transition 1965, 1, :o3, 39020187, 16 - tz.transition 2007, 12, :o2, 1197183600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Chicago.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Chicago.rb deleted file mode 100644 index 0996857cf0..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Chicago.rb +++ /dev/null @@ -1,283 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Chicago - include TimezoneDefinition - - timezone 'America/Chicago' do |tz| - tz.offset :o0, -21036, 0, :LMT - tz.offset :o1, -21600, 0, :CST - tz.offset :o2, -21600, 3600, :CDT - tz.offset :o3, -18000, 0, :EST - tz.offset :o4, -21600, 3600, :CWT - tz.offset :o5, -21600, 3600, :CPT - - tz.transition 1883, 11, :o1, 9636533, 4 - tz.transition 1918, 3, :o2, 14530103, 6 - tz.transition 1918, 10, :o1, 58125451, 24 - tz.transition 1919, 3, :o2, 14532287, 6 - tz.transition 1919, 10, :o1, 58134187, 24 - tz.transition 1920, 6, :o2, 14534933, 6 - tz.transition 1920, 10, :o1, 58143091, 24 - tz.transition 1921, 3, :o2, 14536655, 6 - tz.transition 1921, 10, :o1, 58151827, 24 - tz.transition 1922, 4, :o2, 14539049, 6 - tz.transition 1922, 9, :o1, 58159723, 24 - tz.transition 1923, 4, :o2, 14541233, 6 - tz.transition 1923, 9, :o1, 58168627, 24 - tz.transition 1924, 4, :o2, 14543417, 6 - tz.transition 1924, 9, :o1, 58177363, 24 - tz.transition 1925, 4, :o2, 14545601, 6 - tz.transition 1925, 9, :o1, 58186099, 24 - tz.transition 1926, 4, :o2, 14547785, 6 - tz.transition 1926, 9, :o1, 58194835, 24 - tz.transition 1927, 4, :o2, 14549969, 6 - tz.transition 1927, 9, :o1, 58203571, 24 - tz.transition 1928, 4, :o2, 14552195, 6 - tz.transition 1928, 9, :o1, 58212475, 24 - tz.transition 1929, 4, :o2, 14554379, 6 - tz.transition 1929, 9, :o1, 58221211, 24 - tz.transition 1930, 4, :o2, 14556563, 6 - tz.transition 1930, 9, :o1, 58229947, 24 - tz.transition 1931, 4, :o2, 14558747, 6 - tz.transition 1931, 9, :o1, 58238683, 24 - tz.transition 1932, 4, :o2, 14560931, 6 - tz.transition 1932, 9, :o1, 58247419, 24 - tz.transition 1933, 4, :o2, 14563157, 6 - tz.transition 1933, 9, :o1, 58256155, 24 - tz.transition 1934, 4, :o2, 14565341, 6 - tz.transition 1934, 9, :o1, 58265059, 24 - tz.transition 1935, 4, :o2, 14567525, 6 - tz.transition 1935, 9, :o1, 58273795, 24 - tz.transition 1936, 3, :o3, 14569373, 6 - tz.transition 1936, 11, :o1, 58283707, 24 - tz.transition 1937, 4, :o2, 14571893, 6 - tz.transition 1937, 9, :o1, 58291267, 24 - tz.transition 1938, 4, :o2, 14574077, 6 - tz.transition 1938, 9, :o1, 58300003, 24 - tz.transition 1939, 4, :o2, 14576303, 6 - tz.transition 1939, 9, :o1, 58308739, 24 - tz.transition 1940, 4, :o2, 14578487, 6 - tz.transition 1940, 9, :o1, 58317643, 24 - tz.transition 1941, 4, :o2, 14580671, 6 - tz.transition 1941, 9, :o1, 58326379, 24 - tz.transition 1942, 2, :o4, 14582399, 6 - tz.transition 1945, 8, :o5, 58360379, 24 - tz.transition 1945, 9, :o1, 58361491, 24 - tz.transition 1946, 4, :o2, 14591633, 6 - tz.transition 1946, 9, :o1, 58370227, 24 - tz.transition 1947, 4, :o2, 14593817, 6 - tz.transition 1947, 9, :o1, 58378963, 24 - tz.transition 1948, 4, :o2, 14596001, 6 - tz.transition 1948, 9, :o1, 58387699, 24 - tz.transition 1949, 4, :o2, 14598185, 6 - tz.transition 1949, 9, :o1, 58396435, 24 - tz.transition 1950, 4, :o2, 14600411, 6 - tz.transition 1950, 9, :o1, 58405171, 24 - tz.transition 1951, 4, :o2, 14602595, 6 - tz.transition 1951, 9, :o1, 58414075, 24 - tz.transition 1952, 4, :o2, 14604779, 6 - tz.transition 1952, 9, :o1, 58422811, 24 - tz.transition 1953, 4, :o2, 14606963, 6 - tz.transition 1953, 9, :o1, 58431547, 24 - tz.transition 1954, 4, :o2, 14609147, 6 - tz.transition 1954, 9, :o1, 58440283, 24 - tz.transition 1955, 4, :o2, 14611331, 6 - tz.transition 1955, 10, :o1, 58449859, 24 - tz.transition 1956, 4, :o2, 14613557, 6 - tz.transition 1956, 10, :o1, 58458595, 24 - tz.transition 1957, 4, :o2, 14615741, 6 - tz.transition 1957, 10, :o1, 58467331, 24 - tz.transition 1958, 4, :o2, 14617925, 6 - tz.transition 1958, 10, :o1, 58476067, 24 - tz.transition 1959, 4, :o2, 14620109, 6 - tz.transition 1959, 10, :o1, 58484803, 24 - tz.transition 1960, 4, :o2, 14622293, 6 - tz.transition 1960, 10, :o1, 58493707, 24 - tz.transition 1961, 4, :o2, 14624519, 6 - tz.transition 1961, 10, :o1, 58502443, 24 - tz.transition 1962, 4, :o2, 14626703, 6 - tz.transition 1962, 10, :o1, 58511179, 24 - tz.transition 1963, 4, :o2, 14628887, 6 - tz.transition 1963, 10, :o1, 58519915, 24 - tz.transition 1964, 4, :o2, 14631071, 6 - tz.transition 1964, 10, :o1, 58528651, 24 - tz.transition 1965, 4, :o2, 14633255, 6 - tz.transition 1965, 10, :o1, 58537555, 24 - tz.transition 1966, 4, :o2, 14635439, 6 - tz.transition 1966, 10, :o1, 58546291, 24 - tz.transition 1967, 4, :o2, 14637665, 6 - tz.transition 1967, 10, :o1, 58555027, 24 - tz.transition 1968, 4, :o2, 14639849, 6 - tz.transition 1968, 10, :o1, 58563763, 24 - tz.transition 1969, 4, :o2, 14642033, 6 - tz.transition 1969, 10, :o1, 58572499, 24 - tz.transition 1970, 4, :o2, 9964800 - tz.transition 1970, 10, :o1, 25686000 - tz.transition 1971, 4, :o2, 41414400 - tz.transition 1971, 10, :o1, 57740400 - tz.transition 1972, 4, :o2, 73468800 - tz.transition 1972, 10, :o1, 89190000 - tz.transition 1973, 4, :o2, 104918400 - tz.transition 1973, 10, :o1, 120639600 - tz.transition 1974, 1, :o2, 126691200 - tz.transition 1974, 10, :o1, 152089200 - tz.transition 1975, 2, :o2, 162374400 - tz.transition 1975, 10, :o1, 183538800 - tz.transition 1976, 4, :o2, 199267200 - tz.transition 1976, 10, :o1, 215593200 - tz.transition 1977, 4, :o2, 230716800 - tz.transition 1977, 10, :o1, 247042800 - tz.transition 1978, 4, :o2, 262771200 - tz.transition 1978, 10, :o1, 278492400 - tz.transition 1979, 4, :o2, 294220800 - tz.transition 1979, 10, :o1, 309942000 - tz.transition 1980, 4, :o2, 325670400 - tz.transition 1980, 10, :o1, 341391600 - tz.transition 1981, 4, :o2, 357120000 - tz.transition 1981, 10, :o1, 372841200 - tz.transition 1982, 4, :o2, 388569600 - tz.transition 1982, 10, :o1, 404895600 - tz.transition 1983, 4, :o2, 420019200 - tz.transition 1983, 10, :o1, 436345200 - tz.transition 1984, 4, :o2, 452073600 - tz.transition 1984, 10, :o1, 467794800 - tz.transition 1985, 4, :o2, 483523200 - tz.transition 1985, 10, :o1, 499244400 - tz.transition 1986, 4, :o2, 514972800 - tz.transition 1986, 10, :o1, 530694000 - tz.transition 1987, 4, :o2, 544608000 - tz.transition 1987, 10, :o1, 562143600 - tz.transition 1988, 4, :o2, 576057600 - tz.transition 1988, 10, :o1, 594198000 - tz.transition 1989, 4, :o2, 607507200 - tz.transition 1989, 10, :o1, 625647600 - tz.transition 1990, 4, :o2, 638956800 - tz.transition 1990, 10, :o1, 657097200 - tz.transition 1991, 4, :o2, 671011200 - tz.transition 1991, 10, :o1, 688546800 - tz.transition 1992, 4, :o2, 702460800 - tz.transition 1992, 10, :o1, 719996400 - tz.transition 1993, 4, :o2, 733910400 - tz.transition 1993, 10, :o1, 752050800 - tz.transition 1994, 4, :o2, 765360000 - tz.transition 1994, 10, :o1, 783500400 - tz.transition 1995, 4, :o2, 796809600 - tz.transition 1995, 10, :o1, 814950000 - tz.transition 1996, 4, :o2, 828864000 - tz.transition 1996, 10, :o1, 846399600 - tz.transition 1997, 4, :o2, 860313600 - tz.transition 1997, 10, :o1, 877849200 - tz.transition 1998, 4, :o2, 891763200 - tz.transition 1998, 10, :o1, 909298800 - tz.transition 1999, 4, :o2, 923212800 - tz.transition 1999, 10, :o1, 941353200 - tz.transition 2000, 4, :o2, 954662400 - tz.transition 2000, 10, :o1, 972802800 - tz.transition 2001, 4, :o2, 986112000 - tz.transition 2001, 10, :o1, 1004252400 - tz.transition 2002, 4, :o2, 1018166400 - tz.transition 2002, 10, :o1, 1035702000 - tz.transition 2003, 4, :o2, 1049616000 - tz.transition 2003, 10, :o1, 1067151600 - tz.transition 2004, 4, :o2, 1081065600 - tz.transition 2004, 10, :o1, 1099206000 - tz.transition 2005, 4, :o2, 1112515200 - tz.transition 2005, 10, :o1, 1130655600 - tz.transition 2006, 4, :o2, 1143964800 - tz.transition 2006, 10, :o1, 1162105200 - tz.transition 2007, 3, :o2, 1173600000 - tz.transition 2007, 11, :o1, 1194159600 - tz.transition 2008, 3, :o2, 1205049600 - tz.transition 2008, 11, :o1, 1225609200 - tz.transition 2009, 3, :o2, 1236499200 - tz.transition 2009, 11, :o1, 1257058800 - tz.transition 2010, 3, :o2, 1268553600 - tz.transition 2010, 11, :o1, 1289113200 - tz.transition 2011, 3, :o2, 1300003200 - tz.transition 2011, 11, :o1, 1320562800 - tz.transition 2012, 3, :o2, 1331452800 - tz.transition 2012, 11, :o1, 1352012400 - tz.transition 2013, 3, :o2, 1362902400 - tz.transition 2013, 11, :o1, 1383462000 - tz.transition 2014, 3, :o2, 1394352000 - tz.transition 2014, 11, :o1, 1414911600 - tz.transition 2015, 3, :o2, 1425801600 - tz.transition 2015, 11, :o1, 1446361200 - tz.transition 2016, 3, :o2, 1457856000 - tz.transition 2016, 11, :o1, 1478415600 - tz.transition 2017, 3, :o2, 1489305600 - tz.transition 2017, 11, :o1, 1509865200 - tz.transition 2018, 3, :o2, 1520755200 - tz.transition 2018, 11, :o1, 1541314800 - tz.transition 2019, 3, :o2, 1552204800 - tz.transition 2019, 11, :o1, 1572764400 - tz.transition 2020, 3, :o2, 1583654400 - tz.transition 2020, 11, :o1, 1604214000 - tz.transition 2021, 3, :o2, 1615708800 - tz.transition 2021, 11, :o1, 1636268400 - tz.transition 2022, 3, :o2, 1647158400 - tz.transition 2022, 11, :o1, 1667718000 - tz.transition 2023, 3, :o2, 1678608000 - tz.transition 2023, 11, :o1, 1699167600 - tz.transition 2024, 3, :o2, 1710057600 - tz.transition 2024, 11, :o1, 1730617200 - tz.transition 2025, 3, :o2, 1741507200 - tz.transition 2025, 11, :o1, 1762066800 - tz.transition 2026, 3, :o2, 1772956800 - tz.transition 2026, 11, :o1, 1793516400 - tz.transition 2027, 3, :o2, 1805011200 - tz.transition 2027, 11, :o1, 1825570800 - tz.transition 2028, 3, :o2, 1836460800 - tz.transition 2028, 11, :o1, 1857020400 - tz.transition 2029, 3, :o2, 1867910400 - tz.transition 2029, 11, :o1, 1888470000 - tz.transition 2030, 3, :o2, 1899360000 - tz.transition 2030, 11, :o1, 1919919600 - tz.transition 2031, 3, :o2, 1930809600 - tz.transition 2031, 11, :o1, 1951369200 - tz.transition 2032, 3, :o2, 1962864000 - tz.transition 2032, 11, :o1, 1983423600 - tz.transition 2033, 3, :o2, 1994313600 - tz.transition 2033, 11, :o1, 2014873200 - tz.transition 2034, 3, :o2, 2025763200 - tz.transition 2034, 11, :o1, 2046322800 - tz.transition 2035, 3, :o2, 2057212800 - tz.transition 2035, 11, :o1, 2077772400 - tz.transition 2036, 3, :o2, 2088662400 - tz.transition 2036, 11, :o1, 2109222000 - tz.transition 2037, 3, :o2, 2120112000 - tz.transition 2037, 11, :o1, 2140671600 - tz.transition 2038, 3, :o2, 14792981, 6 - tz.transition 2038, 11, :o1, 59177635, 24 - tz.transition 2039, 3, :o2, 14795165, 6 - tz.transition 2039, 11, :o1, 59186371, 24 - tz.transition 2040, 3, :o2, 14797349, 6 - tz.transition 2040, 11, :o1, 59195107, 24 - tz.transition 2041, 3, :o2, 14799533, 6 - tz.transition 2041, 11, :o1, 59203843, 24 - tz.transition 2042, 3, :o2, 14801717, 6 - tz.transition 2042, 11, :o1, 59212579, 24 - tz.transition 2043, 3, :o2, 14803901, 6 - tz.transition 2043, 11, :o1, 59221315, 24 - tz.transition 2044, 3, :o2, 14806127, 6 - tz.transition 2044, 11, :o1, 59230219, 24 - tz.transition 2045, 3, :o2, 14808311, 6 - tz.transition 2045, 11, :o1, 59238955, 24 - tz.transition 2046, 3, :o2, 14810495, 6 - tz.transition 2046, 11, :o1, 59247691, 24 - tz.transition 2047, 3, :o2, 14812679, 6 - tz.transition 2047, 11, :o1, 59256427, 24 - tz.transition 2048, 3, :o2, 14814863, 6 - tz.transition 2048, 11, :o1, 59265163, 24 - tz.transition 2049, 3, :o2, 14817089, 6 - tz.transition 2049, 11, :o1, 59274067, 24 - tz.transition 2050, 3, :o2, 14819273, 6 - tz.transition 2050, 11, :o1, 59282803, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Chihuahua.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Chihuahua.rb deleted file mode 100644 index 1710b57c79..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Chihuahua.rb +++ /dev/null @@ -1,136 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Chihuahua - include TimezoneDefinition - - timezone 'America/Chihuahua' do |tz| - tz.offset :o0, -25460, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -21600, 0, :CST - tz.offset :o3, -21600, 3600, :CDT - tz.offset :o4, -25200, 3600, :MDT - - tz.transition 1922, 1, :o1, 58153339, 24 - tz.transition 1927, 6, :o2, 9700171, 4 - tz.transition 1930, 11, :o1, 9705183, 4 - tz.transition 1931, 5, :o2, 9705855, 4 - tz.transition 1931, 10, :o1, 9706463, 4 - tz.transition 1932, 4, :o2, 58243171, 24 - tz.transition 1996, 4, :o3, 828864000 - tz.transition 1996, 10, :o2, 846399600 - tz.transition 1997, 4, :o3, 860313600 - tz.transition 1997, 10, :o2, 877849200 - tz.transition 1998, 4, :o4, 891766800 - tz.transition 1998, 10, :o1, 909302400 - tz.transition 1999, 4, :o4, 923216400 - tz.transition 1999, 10, :o1, 941356800 - tz.transition 2000, 4, :o4, 954666000 - tz.transition 2000, 10, :o1, 972806400 - tz.transition 2001, 5, :o4, 989139600 - tz.transition 2001, 9, :o1, 1001836800 - tz.transition 2002, 4, :o4, 1018170000 - tz.transition 2002, 10, :o1, 1035705600 - tz.transition 2003, 4, :o4, 1049619600 - tz.transition 2003, 10, :o1, 1067155200 - tz.transition 2004, 4, :o4, 1081069200 - tz.transition 2004, 10, :o1, 1099209600 - tz.transition 2005, 4, :o4, 1112518800 - tz.transition 2005, 10, :o1, 1130659200 - tz.transition 2006, 4, :o4, 1143968400 - tz.transition 2006, 10, :o1, 1162108800 - tz.transition 2007, 4, :o4, 1175418000 - tz.transition 2007, 10, :o1, 1193558400 - tz.transition 2008, 4, :o4, 1207472400 - tz.transition 2008, 10, :o1, 1225008000 - tz.transition 2009, 4, :o4, 1238922000 - tz.transition 2009, 10, :o1, 1256457600 - tz.transition 2010, 4, :o4, 1270371600 - tz.transition 2010, 10, :o1, 1288512000 - tz.transition 2011, 4, :o4, 1301821200 - tz.transition 2011, 10, :o1, 1319961600 - tz.transition 2012, 4, :o4, 1333270800 - tz.transition 2012, 10, :o1, 1351411200 - tz.transition 2013, 4, :o4, 1365325200 - tz.transition 2013, 10, :o1, 1382860800 - tz.transition 2014, 4, :o4, 1396774800 - tz.transition 2014, 10, :o1, 1414310400 - tz.transition 2015, 4, :o4, 1428224400 - tz.transition 2015, 10, :o1, 1445760000 - tz.transition 2016, 4, :o4, 1459674000 - tz.transition 2016, 10, :o1, 1477814400 - tz.transition 2017, 4, :o4, 1491123600 - tz.transition 2017, 10, :o1, 1509264000 - tz.transition 2018, 4, :o4, 1522573200 - tz.transition 2018, 10, :o1, 1540713600 - tz.transition 2019, 4, :o4, 1554627600 - tz.transition 2019, 10, :o1, 1572163200 - tz.transition 2020, 4, :o4, 1586077200 - tz.transition 2020, 10, :o1, 1603612800 - tz.transition 2021, 4, :o4, 1617526800 - tz.transition 2021, 10, :o1, 1635667200 - tz.transition 2022, 4, :o4, 1648976400 - tz.transition 2022, 10, :o1, 1667116800 - tz.transition 2023, 4, :o4, 1680426000 - tz.transition 2023, 10, :o1, 1698566400 - tz.transition 2024, 4, :o4, 1712480400 - tz.transition 2024, 10, :o1, 1730016000 - tz.transition 2025, 4, :o4, 1743930000 - tz.transition 2025, 10, :o1, 1761465600 - tz.transition 2026, 4, :o4, 1775379600 - tz.transition 2026, 10, :o1, 1792915200 - tz.transition 2027, 4, :o4, 1806829200 - tz.transition 2027, 10, :o1, 1824969600 - tz.transition 2028, 4, :o4, 1838278800 - tz.transition 2028, 10, :o1, 1856419200 - tz.transition 2029, 4, :o4, 1869728400 - tz.transition 2029, 10, :o1, 1887868800 - tz.transition 2030, 4, :o4, 1901782800 - tz.transition 2030, 10, :o1, 1919318400 - tz.transition 2031, 4, :o4, 1933232400 - tz.transition 2031, 10, :o1, 1950768000 - tz.transition 2032, 4, :o4, 1964682000 - tz.transition 2032, 10, :o1, 1982822400 - tz.transition 2033, 4, :o4, 1996131600 - tz.transition 2033, 10, :o1, 2014272000 - tz.transition 2034, 4, :o4, 2027581200 - tz.transition 2034, 10, :o1, 2045721600 - tz.transition 2035, 4, :o4, 2059030800 - tz.transition 2035, 10, :o1, 2077171200 - tz.transition 2036, 4, :o4, 2091085200 - tz.transition 2036, 10, :o1, 2108620800 - tz.transition 2037, 4, :o4, 2122534800 - tz.transition 2037, 10, :o1, 2140070400 - tz.transition 2038, 4, :o4, 19724143, 8 - tz.transition 2038, 10, :o1, 14794367, 6 - tz.transition 2039, 4, :o4, 19727055, 8 - tz.transition 2039, 10, :o1, 14796551, 6 - tz.transition 2040, 4, :o4, 19729967, 8 - tz.transition 2040, 10, :o1, 14798735, 6 - tz.transition 2041, 4, :o4, 19732935, 8 - tz.transition 2041, 10, :o1, 14800919, 6 - tz.transition 2042, 4, :o4, 19735847, 8 - tz.transition 2042, 10, :o1, 14803103, 6 - tz.transition 2043, 4, :o4, 19738759, 8 - tz.transition 2043, 10, :o1, 14805287, 6 - tz.transition 2044, 4, :o4, 19741671, 8 - tz.transition 2044, 10, :o1, 14807513, 6 - tz.transition 2045, 4, :o4, 19744583, 8 - tz.transition 2045, 10, :o1, 14809697, 6 - tz.transition 2046, 4, :o4, 19747495, 8 - tz.transition 2046, 10, :o1, 14811881, 6 - tz.transition 2047, 4, :o4, 19750463, 8 - tz.transition 2047, 10, :o1, 14814065, 6 - tz.transition 2048, 4, :o4, 19753375, 8 - tz.transition 2048, 10, :o1, 14816249, 6 - tz.transition 2049, 4, :o4, 19756287, 8 - tz.transition 2049, 10, :o1, 14818475, 6 - tz.transition 2050, 4, :o4, 19759199, 8 - tz.transition 2050, 10, :o1, 14820659, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Denver.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Denver.rb deleted file mode 100644 index 1c1efb5ff3..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Denver.rb +++ /dev/null @@ -1,204 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Denver - include TimezoneDefinition - - timezone 'America/Denver' do |tz| - tz.offset :o0, -25196, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -25200, 3600, :MDT - tz.offset :o3, -25200, 3600, :MWT - tz.offset :o4, -25200, 3600, :MPT - - tz.transition 1883, 11, :o1, 57819199, 24 - tz.transition 1918, 3, :o2, 19373471, 8 - tz.transition 1918, 10, :o1, 14531363, 6 - tz.transition 1919, 3, :o2, 19376383, 8 - tz.transition 1919, 10, :o1, 14533547, 6 - tz.transition 1920, 3, :o2, 19379295, 8 - tz.transition 1920, 10, :o1, 14535773, 6 - tz.transition 1921, 3, :o2, 19382207, 8 - tz.transition 1921, 5, :o1, 14536991, 6 - tz.transition 1942, 2, :o3, 19443199, 8 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 14590373, 6 - tz.transition 1965, 4, :o2, 19511007, 8 - tz.transition 1965, 10, :o1, 14634389, 6 - tz.transition 1966, 4, :o2, 19513919, 8 - tz.transition 1966, 10, :o1, 14636573, 6 - tz.transition 1967, 4, :o2, 19516887, 8 - tz.transition 1967, 10, :o1, 14638757, 6 - tz.transition 1968, 4, :o2, 19519799, 8 - tz.transition 1968, 10, :o1, 14640941, 6 - tz.transition 1969, 4, :o2, 19522711, 8 - tz.transition 1969, 10, :o1, 14643125, 6 - tz.transition 1970, 4, :o2, 9968400 - tz.transition 1970, 10, :o1, 25689600 - tz.transition 1971, 4, :o2, 41418000 - tz.transition 1971, 10, :o1, 57744000 - tz.transition 1972, 4, :o2, 73472400 - tz.transition 1972, 10, :o1, 89193600 - tz.transition 1973, 4, :o2, 104922000 - tz.transition 1973, 10, :o1, 120643200 - tz.transition 1974, 1, :o2, 126694800 - tz.transition 1974, 10, :o1, 152092800 - tz.transition 1975, 2, :o2, 162378000 - tz.transition 1975, 10, :o1, 183542400 - tz.transition 1976, 4, :o2, 199270800 - tz.transition 1976, 10, :o1, 215596800 - tz.transition 1977, 4, :o2, 230720400 - tz.transition 1977, 10, :o1, 247046400 - tz.transition 1978, 4, :o2, 262774800 - tz.transition 1978, 10, :o1, 278496000 - tz.transition 1979, 4, :o2, 294224400 - tz.transition 1979, 10, :o1, 309945600 - tz.transition 1980, 4, :o2, 325674000 - tz.transition 1980, 10, :o1, 341395200 - tz.transition 1981, 4, :o2, 357123600 - tz.transition 1981, 10, :o1, 372844800 - tz.transition 1982, 4, :o2, 388573200 - tz.transition 1982, 10, :o1, 404899200 - tz.transition 1983, 4, :o2, 420022800 - tz.transition 1983, 10, :o1, 436348800 - tz.transition 1984, 4, :o2, 452077200 - tz.transition 1984, 10, :o1, 467798400 - tz.transition 1985, 4, :o2, 483526800 - tz.transition 1985, 10, :o1, 499248000 - tz.transition 1986, 4, :o2, 514976400 - tz.transition 1986, 10, :o1, 530697600 - tz.transition 1987, 4, :o2, 544611600 - tz.transition 1987, 10, :o1, 562147200 - tz.transition 1988, 4, :o2, 576061200 - tz.transition 1988, 10, :o1, 594201600 - tz.transition 1989, 4, :o2, 607510800 - tz.transition 1989, 10, :o1, 625651200 - tz.transition 1990, 4, :o2, 638960400 - tz.transition 1990, 10, :o1, 657100800 - tz.transition 1991, 4, :o2, 671014800 - tz.transition 1991, 10, :o1, 688550400 - tz.transition 1992, 4, :o2, 702464400 - tz.transition 1992, 10, :o1, 720000000 - tz.transition 1993, 4, :o2, 733914000 - tz.transition 1993, 10, :o1, 752054400 - tz.transition 1994, 4, :o2, 765363600 - tz.transition 1994, 10, :o1, 783504000 - tz.transition 1995, 4, :o2, 796813200 - tz.transition 1995, 10, :o1, 814953600 - tz.transition 1996, 4, :o2, 828867600 - tz.transition 1996, 10, :o1, 846403200 - tz.transition 1997, 4, :o2, 860317200 - tz.transition 1997, 10, :o1, 877852800 - tz.transition 1998, 4, :o2, 891766800 - tz.transition 1998, 10, :o1, 909302400 - tz.transition 1999, 4, :o2, 923216400 - tz.transition 1999, 10, :o1, 941356800 - tz.transition 2000, 4, :o2, 954666000 - tz.transition 2000, 10, :o1, 972806400 - tz.transition 2001, 4, :o2, 986115600 - tz.transition 2001, 10, :o1, 1004256000 - tz.transition 2002, 4, :o2, 1018170000 - tz.transition 2002, 10, :o1, 1035705600 - tz.transition 2003, 4, :o2, 1049619600 - tz.transition 2003, 10, :o1, 1067155200 - tz.transition 2004, 4, :o2, 1081069200 - tz.transition 2004, 10, :o1, 1099209600 - tz.transition 2005, 4, :o2, 1112518800 - tz.transition 2005, 10, :o1, 1130659200 - tz.transition 2006, 4, :o2, 1143968400 - tz.transition 2006, 10, :o1, 1162108800 - tz.transition 2007, 3, :o2, 1173603600 - tz.transition 2007, 11, :o1, 1194163200 - tz.transition 2008, 3, :o2, 1205053200 - tz.transition 2008, 11, :o1, 1225612800 - tz.transition 2009, 3, :o2, 1236502800 - tz.transition 2009, 11, :o1, 1257062400 - tz.transition 2010, 3, :o2, 1268557200 - tz.transition 2010, 11, :o1, 1289116800 - tz.transition 2011, 3, :o2, 1300006800 - tz.transition 2011, 11, :o1, 1320566400 - tz.transition 2012, 3, :o2, 1331456400 - tz.transition 2012, 11, :o1, 1352016000 - tz.transition 2013, 3, :o2, 1362906000 - tz.transition 2013, 11, :o1, 1383465600 - tz.transition 2014, 3, :o2, 1394355600 - tz.transition 2014, 11, :o1, 1414915200 - tz.transition 2015, 3, :o2, 1425805200 - tz.transition 2015, 11, :o1, 1446364800 - tz.transition 2016, 3, :o2, 1457859600 - tz.transition 2016, 11, :o1, 1478419200 - tz.transition 2017, 3, :o2, 1489309200 - tz.transition 2017, 11, :o1, 1509868800 - tz.transition 2018, 3, :o2, 1520758800 - tz.transition 2018, 11, :o1, 1541318400 - tz.transition 2019, 3, :o2, 1552208400 - tz.transition 2019, 11, :o1, 1572768000 - tz.transition 2020, 3, :o2, 1583658000 - tz.transition 2020, 11, :o1, 1604217600 - tz.transition 2021, 3, :o2, 1615712400 - tz.transition 2021, 11, :o1, 1636272000 - tz.transition 2022, 3, :o2, 1647162000 - tz.transition 2022, 11, :o1, 1667721600 - tz.transition 2023, 3, :o2, 1678611600 - tz.transition 2023, 11, :o1, 1699171200 - tz.transition 2024, 3, :o2, 1710061200 - tz.transition 2024, 11, :o1, 1730620800 - tz.transition 2025, 3, :o2, 1741510800 - tz.transition 2025, 11, :o1, 1762070400 - tz.transition 2026, 3, :o2, 1772960400 - tz.transition 2026, 11, :o1, 1793520000 - tz.transition 2027, 3, :o2, 1805014800 - tz.transition 2027, 11, :o1, 1825574400 - tz.transition 2028, 3, :o2, 1836464400 - tz.transition 2028, 11, :o1, 1857024000 - tz.transition 2029, 3, :o2, 1867914000 - tz.transition 2029, 11, :o1, 1888473600 - tz.transition 2030, 3, :o2, 1899363600 - tz.transition 2030, 11, :o1, 1919923200 - tz.transition 2031, 3, :o2, 1930813200 - tz.transition 2031, 11, :o1, 1951372800 - tz.transition 2032, 3, :o2, 1962867600 - tz.transition 2032, 11, :o1, 1983427200 - tz.transition 2033, 3, :o2, 1994317200 - tz.transition 2033, 11, :o1, 2014876800 - tz.transition 2034, 3, :o2, 2025766800 - tz.transition 2034, 11, :o1, 2046326400 - tz.transition 2035, 3, :o2, 2057216400 - tz.transition 2035, 11, :o1, 2077776000 - tz.transition 2036, 3, :o2, 2088666000 - tz.transition 2036, 11, :o1, 2109225600 - tz.transition 2037, 3, :o2, 2120115600 - tz.transition 2037, 11, :o1, 2140675200 - tz.transition 2038, 3, :o2, 19723975, 8 - tz.transition 2038, 11, :o1, 14794409, 6 - tz.transition 2039, 3, :o2, 19726887, 8 - tz.transition 2039, 11, :o1, 14796593, 6 - tz.transition 2040, 3, :o2, 19729799, 8 - tz.transition 2040, 11, :o1, 14798777, 6 - tz.transition 2041, 3, :o2, 19732711, 8 - tz.transition 2041, 11, :o1, 14800961, 6 - tz.transition 2042, 3, :o2, 19735623, 8 - tz.transition 2042, 11, :o1, 14803145, 6 - tz.transition 2043, 3, :o2, 19738535, 8 - tz.transition 2043, 11, :o1, 14805329, 6 - tz.transition 2044, 3, :o2, 19741503, 8 - tz.transition 2044, 11, :o1, 14807555, 6 - tz.transition 2045, 3, :o2, 19744415, 8 - tz.transition 2045, 11, :o1, 14809739, 6 - tz.transition 2046, 3, :o2, 19747327, 8 - tz.transition 2046, 11, :o1, 14811923, 6 - tz.transition 2047, 3, :o2, 19750239, 8 - tz.transition 2047, 11, :o1, 14814107, 6 - tz.transition 2048, 3, :o2, 19753151, 8 - tz.transition 2048, 11, :o1, 14816291, 6 - tz.transition 2049, 3, :o2, 19756119, 8 - tz.transition 2049, 11, :o1, 14818517, 6 - tz.transition 2050, 3, :o2, 19759031, 8 - tz.transition 2050, 11, :o1, 14820701, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Godthab.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Godthab.rb deleted file mode 100644 index 1e05518b0d..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Godthab.rb +++ /dev/null @@ -1,161 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Godthab - include TimezoneDefinition - - timezone 'America/Godthab' do |tz| - tz.offset :o0, -12416, 0, :LMT - tz.offset :o1, -10800, 0, :WGT - tz.offset :o2, -10800, 3600, :WGST - - tz.transition 1916, 7, :o1, 3268448069, 1350 - tz.transition 1980, 4, :o2, 323845200 - tz.transition 1980, 9, :o1, 338950800 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 9, :o1, 370400400 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 9, :o1, 401850000 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o1, 717555600 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 9, :o1, 749005200 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 9, :o1, 780454800 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 9, :o1, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Guatemala.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Guatemala.rb deleted file mode 100644 index a2bf73401c..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Guatemala.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Guatemala - include TimezoneDefinition - - timezone 'America/Guatemala' do |tz| - tz.offset :o0, -21724, 0, :LMT - tz.offset :o1, -21600, 0, :CST - tz.offset :o2, -21600, 3600, :CDT - - tz.transition 1918, 10, :o1, 52312429831, 21600 - tz.transition 1973, 11, :o2, 123055200 - tz.transition 1974, 2, :o1, 130914000 - tz.transition 1983, 5, :o2, 422344800 - tz.transition 1983, 9, :o1, 433054800 - tz.transition 1991, 3, :o2, 669708000 - tz.transition 1991, 9, :o1, 684219600 - tz.transition 2006, 4, :o2, 1146376800 - tz.transition 2006, 10, :o1, 1159678800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Guyana.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Guyana.rb deleted file mode 100644 index fccca4ceb4..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Guyana.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Guyana - include TimezoneDefinition - - timezone 'America/Guyana' do |tz| - tz.offset :o0, -13960, 0, :LMT - tz.offset :o1, -13500, 0, :GBGT - tz.offset :o2, -13500, 0, :GYT - tz.offset :o3, -10800, 0, :GYT - tz.offset :o4, -14400, 0, :GYT - - tz.transition 1915, 3, :o1, 5228404549, 2160 - tz.transition 1966, 5, :o2, 78056693, 32 - tz.transition 1975, 7, :o3, 176010300 - tz.transition 1991, 1, :o4, 662698800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Halifax.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Halifax.rb deleted file mode 100644 index d25ae775b3..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Halifax.rb +++ /dev/null @@ -1,274 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Halifax - include TimezoneDefinition - - timezone 'America/Halifax' do |tz| - tz.offset :o0, -15264, 0, :LMT - tz.offset :o1, -14400, 0, :AST - tz.offset :o2, -14400, 3600, :ADT - tz.offset :o3, -14400, 3600, :AWT - tz.offset :o4, -14400, 3600, :APT - - tz.transition 1902, 6, :o1, 724774703, 300 - tz.transition 1916, 4, :o2, 7262864, 3 - tz.transition 1916, 10, :o1, 19369101, 8 - tz.transition 1918, 4, :o2, 9686791, 4 - tz.transition 1918, 10, :o1, 58125545, 24 - tz.transition 1920, 5, :o2, 7267361, 3 - tz.transition 1920, 8, :o1, 19380525, 8 - tz.transition 1921, 5, :o2, 7268447, 3 - tz.transition 1921, 9, :o1, 19383501, 8 - tz.transition 1922, 4, :o2, 7269524, 3 - tz.transition 1922, 9, :o1, 19386421, 8 - tz.transition 1923, 5, :o2, 7270637, 3 - tz.transition 1923, 9, :o1, 19389333, 8 - tz.transition 1924, 5, :o2, 7271729, 3 - tz.transition 1924, 9, :o1, 19392349, 8 - tz.transition 1925, 5, :o2, 7272821, 3 - tz.transition 1925, 9, :o1, 19395373, 8 - tz.transition 1926, 5, :o2, 7273955, 3 - tz.transition 1926, 9, :o1, 19398173, 8 - tz.transition 1927, 5, :o2, 7275005, 3 - tz.transition 1927, 9, :o1, 19401197, 8 - tz.transition 1928, 5, :o2, 7276139, 3 - tz.transition 1928, 9, :o1, 19403989, 8 - tz.transition 1929, 5, :o2, 7277231, 3 - tz.transition 1929, 9, :o1, 19406861, 8 - tz.transition 1930, 5, :o2, 7278323, 3 - tz.transition 1930, 9, :o1, 19409877, 8 - tz.transition 1931, 5, :o2, 7279415, 3 - tz.transition 1931, 9, :o1, 19412901, 8 - tz.transition 1932, 5, :o2, 7280486, 3 - tz.transition 1932, 9, :o1, 19415813, 8 - tz.transition 1933, 4, :o2, 7281578, 3 - tz.transition 1933, 10, :o1, 19418781, 8 - tz.transition 1934, 5, :o2, 7282733, 3 - tz.transition 1934, 9, :o1, 19421573, 8 - tz.transition 1935, 6, :o2, 7283867, 3 - tz.transition 1935, 9, :o1, 19424605, 8 - tz.transition 1936, 6, :o2, 7284962, 3 - tz.transition 1936, 9, :o1, 19427405, 8 - tz.transition 1937, 5, :o2, 7285967, 3 - tz.transition 1937, 9, :o1, 19430429, 8 - tz.transition 1938, 5, :o2, 7287059, 3 - tz.transition 1938, 9, :o1, 19433341, 8 - tz.transition 1939, 5, :o2, 7288235, 3 - tz.transition 1939, 9, :o1, 19436253, 8 - tz.transition 1940, 5, :o2, 7289264, 3 - tz.transition 1940, 9, :o1, 19439221, 8 - tz.transition 1941, 5, :o2, 7290356, 3 - tz.transition 1941, 9, :o1, 19442133, 8 - tz.transition 1942, 2, :o3, 9721599, 4 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 58361489, 24 - tz.transition 1946, 4, :o2, 9727755, 4 - tz.transition 1946, 9, :o1, 58370225, 24 - tz.transition 1947, 4, :o2, 9729211, 4 - tz.transition 1947, 9, :o1, 58378961, 24 - tz.transition 1948, 4, :o2, 9730667, 4 - tz.transition 1948, 9, :o1, 58387697, 24 - tz.transition 1949, 4, :o2, 9732123, 4 - tz.transition 1949, 9, :o1, 58396433, 24 - tz.transition 1951, 4, :o2, 9735063, 4 - tz.transition 1951, 9, :o1, 58414073, 24 - tz.transition 1952, 4, :o2, 9736519, 4 - tz.transition 1952, 9, :o1, 58422809, 24 - tz.transition 1953, 4, :o2, 9737975, 4 - tz.transition 1953, 9, :o1, 58431545, 24 - tz.transition 1954, 4, :o2, 9739431, 4 - tz.transition 1954, 9, :o1, 58440281, 24 - tz.transition 1956, 4, :o2, 9742371, 4 - tz.transition 1956, 9, :o1, 58457921, 24 - tz.transition 1957, 4, :o2, 9743827, 4 - tz.transition 1957, 9, :o1, 58466657, 24 - tz.transition 1958, 4, :o2, 9745283, 4 - tz.transition 1958, 9, :o1, 58475393, 24 - tz.transition 1959, 4, :o2, 9746739, 4 - tz.transition 1959, 9, :o1, 58484129, 24 - tz.transition 1962, 4, :o2, 9751135, 4 - tz.transition 1962, 10, :o1, 58511177, 24 - tz.transition 1963, 4, :o2, 9752591, 4 - tz.transition 1963, 10, :o1, 58519913, 24 - tz.transition 1964, 4, :o2, 9754047, 4 - tz.transition 1964, 10, :o1, 58528649, 24 - tz.transition 1965, 4, :o2, 9755503, 4 - tz.transition 1965, 10, :o1, 58537553, 24 - tz.transition 1966, 4, :o2, 9756959, 4 - tz.transition 1966, 10, :o1, 58546289, 24 - tz.transition 1967, 4, :o2, 9758443, 4 - tz.transition 1967, 10, :o1, 58555025, 24 - tz.transition 1968, 4, :o2, 9759899, 4 - tz.transition 1968, 10, :o1, 58563761, 24 - tz.transition 1969, 4, :o2, 9761355, 4 - tz.transition 1969, 10, :o1, 58572497, 24 - tz.transition 1970, 4, :o2, 9957600 - tz.transition 1970, 10, :o1, 25678800 - tz.transition 1971, 4, :o2, 41407200 - tz.transition 1971, 10, :o1, 57733200 - tz.transition 1972, 4, :o2, 73461600 - tz.transition 1972, 10, :o1, 89182800 - tz.transition 1973, 4, :o2, 104911200 - tz.transition 1973, 10, :o1, 120632400 - tz.transition 1974, 4, :o2, 136360800 - tz.transition 1974, 10, :o1, 152082000 - tz.transition 1975, 4, :o2, 167810400 - tz.transition 1975, 10, :o1, 183531600 - tz.transition 1976, 4, :o2, 199260000 - tz.transition 1976, 10, :o1, 215586000 - tz.transition 1977, 4, :o2, 230709600 - tz.transition 1977, 10, :o1, 247035600 - tz.transition 1978, 4, :o2, 262764000 - tz.transition 1978, 10, :o1, 278485200 - tz.transition 1979, 4, :o2, 294213600 - tz.transition 1979, 10, :o1, 309934800 - tz.transition 1980, 4, :o2, 325663200 - tz.transition 1980, 10, :o1, 341384400 - tz.transition 1981, 4, :o2, 357112800 - tz.transition 1981, 10, :o1, 372834000 - tz.transition 1982, 4, :o2, 388562400 - tz.transition 1982, 10, :o1, 404888400 - tz.transition 1983, 4, :o2, 420012000 - tz.transition 1983, 10, :o1, 436338000 - tz.transition 1984, 4, :o2, 452066400 - tz.transition 1984, 10, :o1, 467787600 - tz.transition 1985, 4, :o2, 483516000 - tz.transition 1985, 10, :o1, 499237200 - tz.transition 1986, 4, :o2, 514965600 - tz.transition 1986, 10, :o1, 530686800 - tz.transition 1987, 4, :o2, 544600800 - tz.transition 1987, 10, :o1, 562136400 - tz.transition 1988, 4, :o2, 576050400 - tz.transition 1988, 10, :o1, 594190800 - tz.transition 1989, 4, :o2, 607500000 - tz.transition 1989, 10, :o1, 625640400 - tz.transition 1990, 4, :o2, 638949600 - tz.transition 1990, 10, :o1, 657090000 - tz.transition 1991, 4, :o2, 671004000 - tz.transition 1991, 10, :o1, 688539600 - tz.transition 1992, 4, :o2, 702453600 - tz.transition 1992, 10, :o1, 719989200 - tz.transition 1993, 4, :o2, 733903200 - tz.transition 1993, 10, :o1, 752043600 - tz.transition 1994, 4, :o2, 765352800 - tz.transition 1994, 10, :o1, 783493200 - tz.transition 1995, 4, :o2, 796802400 - tz.transition 1995, 10, :o1, 814942800 - tz.transition 1996, 4, :o2, 828856800 - tz.transition 1996, 10, :o1, 846392400 - tz.transition 1997, 4, :o2, 860306400 - tz.transition 1997, 10, :o1, 877842000 - tz.transition 1998, 4, :o2, 891756000 - tz.transition 1998, 10, :o1, 909291600 - tz.transition 1999, 4, :o2, 923205600 - tz.transition 1999, 10, :o1, 941346000 - tz.transition 2000, 4, :o2, 954655200 - tz.transition 2000, 10, :o1, 972795600 - tz.transition 2001, 4, :o2, 986104800 - tz.transition 2001, 10, :o1, 1004245200 - tz.transition 2002, 4, :o2, 1018159200 - tz.transition 2002, 10, :o1, 1035694800 - tz.transition 2003, 4, :o2, 1049608800 - tz.transition 2003, 10, :o1, 1067144400 - tz.transition 2004, 4, :o2, 1081058400 - tz.transition 2004, 10, :o1, 1099198800 - tz.transition 2005, 4, :o2, 1112508000 - tz.transition 2005, 10, :o1, 1130648400 - tz.transition 2006, 4, :o2, 1143957600 - tz.transition 2006, 10, :o1, 1162098000 - tz.transition 2007, 3, :o2, 1173592800 - tz.transition 2007, 11, :o1, 1194152400 - tz.transition 2008, 3, :o2, 1205042400 - tz.transition 2008, 11, :o1, 1225602000 - tz.transition 2009, 3, :o2, 1236492000 - tz.transition 2009, 11, :o1, 1257051600 - tz.transition 2010, 3, :o2, 1268546400 - tz.transition 2010, 11, :o1, 1289106000 - tz.transition 2011, 3, :o2, 1299996000 - tz.transition 2011, 11, :o1, 1320555600 - tz.transition 2012, 3, :o2, 1331445600 - tz.transition 2012, 11, :o1, 1352005200 - tz.transition 2013, 3, :o2, 1362895200 - tz.transition 2013, 11, :o1, 1383454800 - tz.transition 2014, 3, :o2, 1394344800 - tz.transition 2014, 11, :o1, 1414904400 - tz.transition 2015, 3, :o2, 1425794400 - tz.transition 2015, 11, :o1, 1446354000 - tz.transition 2016, 3, :o2, 1457848800 - tz.transition 2016, 11, :o1, 1478408400 - tz.transition 2017, 3, :o2, 1489298400 - tz.transition 2017, 11, :o1, 1509858000 - tz.transition 2018, 3, :o2, 1520748000 - tz.transition 2018, 11, :o1, 1541307600 - tz.transition 2019, 3, :o2, 1552197600 - tz.transition 2019, 11, :o1, 1572757200 - tz.transition 2020, 3, :o2, 1583647200 - tz.transition 2020, 11, :o1, 1604206800 - tz.transition 2021, 3, :o2, 1615701600 - tz.transition 2021, 11, :o1, 1636261200 - tz.transition 2022, 3, :o2, 1647151200 - tz.transition 2022, 11, :o1, 1667710800 - tz.transition 2023, 3, :o2, 1678600800 - tz.transition 2023, 11, :o1, 1699160400 - tz.transition 2024, 3, :o2, 1710050400 - tz.transition 2024, 11, :o1, 1730610000 - tz.transition 2025, 3, :o2, 1741500000 - tz.transition 2025, 11, :o1, 1762059600 - tz.transition 2026, 3, :o2, 1772949600 - tz.transition 2026, 11, :o1, 1793509200 - tz.transition 2027, 3, :o2, 1805004000 - tz.transition 2027, 11, :o1, 1825563600 - tz.transition 2028, 3, :o2, 1836453600 - tz.transition 2028, 11, :o1, 1857013200 - tz.transition 2029, 3, :o2, 1867903200 - tz.transition 2029, 11, :o1, 1888462800 - tz.transition 2030, 3, :o2, 1899352800 - tz.transition 2030, 11, :o1, 1919912400 - tz.transition 2031, 3, :o2, 1930802400 - tz.transition 2031, 11, :o1, 1951362000 - tz.transition 2032, 3, :o2, 1962856800 - tz.transition 2032, 11, :o1, 1983416400 - tz.transition 2033, 3, :o2, 1994306400 - tz.transition 2033, 11, :o1, 2014866000 - tz.transition 2034, 3, :o2, 2025756000 - tz.transition 2034, 11, :o1, 2046315600 - tz.transition 2035, 3, :o2, 2057205600 - tz.transition 2035, 11, :o1, 2077765200 - tz.transition 2036, 3, :o2, 2088655200 - tz.transition 2036, 11, :o1, 2109214800 - tz.transition 2037, 3, :o2, 2120104800 - tz.transition 2037, 11, :o1, 2140664400 - tz.transition 2038, 3, :o2, 9861987, 4 - tz.transition 2038, 11, :o1, 59177633, 24 - tz.transition 2039, 3, :o2, 9863443, 4 - tz.transition 2039, 11, :o1, 59186369, 24 - tz.transition 2040, 3, :o2, 9864899, 4 - tz.transition 2040, 11, :o1, 59195105, 24 - tz.transition 2041, 3, :o2, 9866355, 4 - tz.transition 2041, 11, :o1, 59203841, 24 - tz.transition 2042, 3, :o2, 9867811, 4 - tz.transition 2042, 11, :o1, 59212577, 24 - tz.transition 2043, 3, :o2, 9869267, 4 - tz.transition 2043, 11, :o1, 59221313, 24 - tz.transition 2044, 3, :o2, 9870751, 4 - tz.transition 2044, 11, :o1, 59230217, 24 - tz.transition 2045, 3, :o2, 9872207, 4 - tz.transition 2045, 11, :o1, 59238953, 24 - tz.transition 2046, 3, :o2, 9873663, 4 - tz.transition 2046, 11, :o1, 59247689, 24 - tz.transition 2047, 3, :o2, 9875119, 4 - tz.transition 2047, 11, :o1, 59256425, 24 - tz.transition 2048, 3, :o2, 9876575, 4 - tz.transition 2048, 11, :o1, 59265161, 24 - tz.transition 2049, 3, :o2, 9878059, 4 - tz.transition 2049, 11, :o1, 59274065, 24 - tz.transition 2050, 3, :o2, 9879515, 4 - tz.transition 2050, 11, :o1, 59282801, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Indiana/Indianapolis.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Indiana/Indianapolis.rb deleted file mode 100644 index f1430f6c24..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Indiana/Indianapolis.rb +++ /dev/null @@ -1,149 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Indiana - module Indianapolis - include TimezoneDefinition - - timezone 'America/Indiana/Indianapolis' do |tz| - tz.offset :o0, -20678, 0, :LMT - tz.offset :o1, -21600, 0, :CST - tz.offset :o2, -21600, 3600, :CDT - tz.offset :o3, -21600, 3600, :CWT - tz.offset :o4, -21600, 3600, :CPT - tz.offset :o5, -18000, 0, :EST - tz.offset :o6, -18000, 3600, :EDT - - tz.transition 1883, 11, :o1, 9636533, 4 - tz.transition 1918, 3, :o2, 14530103, 6 - tz.transition 1918, 10, :o1, 58125451, 24 - tz.transition 1919, 3, :o2, 14532287, 6 - tz.transition 1919, 10, :o1, 58134187, 24 - tz.transition 1941, 6, :o2, 14581007, 6 - tz.transition 1941, 9, :o1, 58326379, 24 - tz.transition 1942, 2, :o3, 14582399, 6 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 58361491, 24 - tz.transition 1946, 4, :o2, 14591633, 6 - tz.transition 1946, 9, :o1, 58370227, 24 - tz.transition 1947, 4, :o2, 14593817, 6 - tz.transition 1947, 9, :o1, 58378963, 24 - tz.transition 1948, 4, :o2, 14596001, 6 - tz.transition 1948, 9, :o1, 58387699, 24 - tz.transition 1949, 4, :o2, 14598185, 6 - tz.transition 1949, 9, :o1, 58396435, 24 - tz.transition 1950, 4, :o2, 14600411, 6 - tz.transition 1950, 9, :o1, 58405171, 24 - tz.transition 1951, 4, :o2, 14602595, 6 - tz.transition 1951, 9, :o1, 58414075, 24 - tz.transition 1952, 4, :o2, 14604779, 6 - tz.transition 1952, 9, :o1, 58422811, 24 - tz.transition 1953, 4, :o2, 14606963, 6 - tz.transition 1953, 9, :o1, 58431547, 24 - tz.transition 1954, 4, :o2, 14609147, 6 - tz.transition 1954, 9, :o1, 58440283, 24 - tz.transition 1955, 4, :o5, 14611331, 6 - tz.transition 1957, 9, :o1, 58466659, 24 - tz.transition 1958, 4, :o5, 14617925, 6 - tz.transition 1969, 4, :o6, 58568131, 24 - tz.transition 1969, 10, :o5, 9762083, 4 - tz.transition 1970, 4, :o6, 9961200 - tz.transition 1970, 10, :o5, 25682400 - tz.transition 2006, 4, :o6, 1143961200 - tz.transition 2006, 10, :o5, 1162101600 - tz.transition 2007, 3, :o6, 1173596400 - tz.transition 2007, 11, :o5, 1194156000 - tz.transition 2008, 3, :o6, 1205046000 - tz.transition 2008, 11, :o5, 1225605600 - tz.transition 2009, 3, :o6, 1236495600 - tz.transition 2009, 11, :o5, 1257055200 - tz.transition 2010, 3, :o6, 1268550000 - tz.transition 2010, 11, :o5, 1289109600 - tz.transition 2011, 3, :o6, 1299999600 - tz.transition 2011, 11, :o5, 1320559200 - tz.transition 2012, 3, :o6, 1331449200 - tz.transition 2012, 11, :o5, 1352008800 - tz.transition 2013, 3, :o6, 1362898800 - tz.transition 2013, 11, :o5, 1383458400 - tz.transition 2014, 3, :o6, 1394348400 - tz.transition 2014, 11, :o5, 1414908000 - tz.transition 2015, 3, :o6, 1425798000 - tz.transition 2015, 11, :o5, 1446357600 - tz.transition 2016, 3, :o6, 1457852400 - tz.transition 2016, 11, :o5, 1478412000 - tz.transition 2017, 3, :o6, 1489302000 - tz.transition 2017, 11, :o5, 1509861600 - tz.transition 2018, 3, :o6, 1520751600 - tz.transition 2018, 11, :o5, 1541311200 - tz.transition 2019, 3, :o6, 1552201200 - tz.transition 2019, 11, :o5, 1572760800 - tz.transition 2020, 3, :o6, 1583650800 - tz.transition 2020, 11, :o5, 1604210400 - tz.transition 2021, 3, :o6, 1615705200 - tz.transition 2021, 11, :o5, 1636264800 - tz.transition 2022, 3, :o6, 1647154800 - tz.transition 2022, 11, :o5, 1667714400 - tz.transition 2023, 3, :o6, 1678604400 - tz.transition 2023, 11, :o5, 1699164000 - tz.transition 2024, 3, :o6, 1710054000 - tz.transition 2024, 11, :o5, 1730613600 - tz.transition 2025, 3, :o6, 1741503600 - tz.transition 2025, 11, :o5, 1762063200 - tz.transition 2026, 3, :o6, 1772953200 - tz.transition 2026, 11, :o5, 1793512800 - tz.transition 2027, 3, :o6, 1805007600 - tz.transition 2027, 11, :o5, 1825567200 - tz.transition 2028, 3, :o6, 1836457200 - tz.transition 2028, 11, :o5, 1857016800 - tz.transition 2029, 3, :o6, 1867906800 - tz.transition 2029, 11, :o5, 1888466400 - tz.transition 2030, 3, :o6, 1899356400 - tz.transition 2030, 11, :o5, 1919916000 - tz.transition 2031, 3, :o6, 1930806000 - tz.transition 2031, 11, :o5, 1951365600 - tz.transition 2032, 3, :o6, 1962860400 - tz.transition 2032, 11, :o5, 1983420000 - tz.transition 2033, 3, :o6, 1994310000 - tz.transition 2033, 11, :o5, 2014869600 - tz.transition 2034, 3, :o6, 2025759600 - tz.transition 2034, 11, :o5, 2046319200 - tz.transition 2035, 3, :o6, 2057209200 - tz.transition 2035, 11, :o5, 2077768800 - tz.transition 2036, 3, :o6, 2088658800 - tz.transition 2036, 11, :o5, 2109218400 - tz.transition 2037, 3, :o6, 2120108400 - tz.transition 2037, 11, :o5, 2140668000 - tz.transition 2038, 3, :o6, 59171923, 24 - tz.transition 2038, 11, :o5, 9862939, 4 - tz.transition 2039, 3, :o6, 59180659, 24 - tz.transition 2039, 11, :o5, 9864395, 4 - tz.transition 2040, 3, :o6, 59189395, 24 - tz.transition 2040, 11, :o5, 9865851, 4 - tz.transition 2041, 3, :o6, 59198131, 24 - tz.transition 2041, 11, :o5, 9867307, 4 - tz.transition 2042, 3, :o6, 59206867, 24 - tz.transition 2042, 11, :o5, 9868763, 4 - tz.transition 2043, 3, :o6, 59215603, 24 - tz.transition 2043, 11, :o5, 9870219, 4 - tz.transition 2044, 3, :o6, 59224507, 24 - tz.transition 2044, 11, :o5, 9871703, 4 - tz.transition 2045, 3, :o6, 59233243, 24 - tz.transition 2045, 11, :o5, 9873159, 4 - tz.transition 2046, 3, :o6, 59241979, 24 - tz.transition 2046, 11, :o5, 9874615, 4 - tz.transition 2047, 3, :o6, 59250715, 24 - tz.transition 2047, 11, :o5, 9876071, 4 - tz.transition 2048, 3, :o6, 59259451, 24 - tz.transition 2048, 11, :o5, 9877527, 4 - tz.transition 2049, 3, :o6, 59268355, 24 - tz.transition 2049, 11, :o5, 9879011, 4 - tz.transition 2050, 3, :o6, 59277091, 24 - tz.transition 2050, 11, :o5, 9880467, 4 - end - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Juneau.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Juneau.rb deleted file mode 100644 index f646f3f54a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Juneau.rb +++ /dev/null @@ -1,194 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Juneau - include TimezoneDefinition - - timezone 'America/Juneau' do |tz| - tz.offset :o0, 54139, 0, :LMT - tz.offset :o1, -32261, 0, :LMT - tz.offset :o2, -28800, 0, :PST - tz.offset :o3, -28800, 3600, :PWT - tz.offset :o4, -28800, 3600, :PPT - tz.offset :o5, -28800, 3600, :PDT - tz.offset :o6, -32400, 0, :YST - tz.offset :o7, -32400, 0, :AKST - tz.offset :o8, -32400, 3600, :AKDT - - tz.transition 1867, 10, :o1, 207641393861, 86400 - tz.transition 1900, 8, :o2, 208677805061, 86400 - tz.transition 1942, 2, :o3, 29164799, 12 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o2, 19453831, 8 - tz.transition 1969, 4, :o5, 29284067, 12 - tz.transition 1969, 10, :o2, 19524167, 8 - tz.transition 1970, 4, :o5, 9972000 - tz.transition 1970, 10, :o2, 25693200 - tz.transition 1971, 4, :o5, 41421600 - tz.transition 1971, 10, :o2, 57747600 - tz.transition 1972, 4, :o5, 73476000 - tz.transition 1972, 10, :o2, 89197200 - tz.transition 1973, 4, :o5, 104925600 - tz.transition 1973, 10, :o2, 120646800 - tz.transition 1974, 1, :o5, 126698400 - tz.transition 1974, 10, :o2, 152096400 - tz.transition 1975, 2, :o5, 162381600 - tz.transition 1975, 10, :o2, 183546000 - tz.transition 1976, 4, :o5, 199274400 - tz.transition 1976, 10, :o2, 215600400 - tz.transition 1977, 4, :o5, 230724000 - tz.transition 1977, 10, :o2, 247050000 - tz.transition 1978, 4, :o5, 262778400 - tz.transition 1978, 10, :o2, 278499600 - tz.transition 1979, 4, :o5, 294228000 - tz.transition 1979, 10, :o2, 309949200 - tz.transition 1980, 4, :o5, 325677600 - tz.transition 1980, 10, :o2, 341398800 - tz.transition 1981, 4, :o5, 357127200 - tz.transition 1981, 10, :o2, 372848400 - tz.transition 1982, 4, :o5, 388576800 - tz.transition 1982, 10, :o2, 404902800 - tz.transition 1983, 4, :o5, 420026400 - tz.transition 1983, 10, :o6, 436352400 - tz.transition 1983, 11, :o7, 439030800 - tz.transition 1984, 4, :o8, 452084400 - tz.transition 1984, 10, :o7, 467805600 - tz.transition 1985, 4, :o8, 483534000 - tz.transition 1985, 10, :o7, 499255200 - tz.transition 1986, 4, :o8, 514983600 - tz.transition 1986, 10, :o7, 530704800 - tz.transition 1987, 4, :o8, 544618800 - tz.transition 1987, 10, :o7, 562154400 - tz.transition 1988, 4, :o8, 576068400 - tz.transition 1988, 10, :o7, 594208800 - tz.transition 1989, 4, :o8, 607518000 - tz.transition 1989, 10, :o7, 625658400 - tz.transition 1990, 4, :o8, 638967600 - tz.transition 1990, 10, :o7, 657108000 - tz.transition 1991, 4, :o8, 671022000 - tz.transition 1991, 10, :o7, 688557600 - tz.transition 1992, 4, :o8, 702471600 - tz.transition 1992, 10, :o7, 720007200 - tz.transition 1993, 4, :o8, 733921200 - tz.transition 1993, 10, :o7, 752061600 - tz.transition 1994, 4, :o8, 765370800 - tz.transition 1994, 10, :o7, 783511200 - tz.transition 1995, 4, :o8, 796820400 - tz.transition 1995, 10, :o7, 814960800 - tz.transition 1996, 4, :o8, 828874800 - tz.transition 1996, 10, :o7, 846410400 - tz.transition 1997, 4, :o8, 860324400 - tz.transition 1997, 10, :o7, 877860000 - tz.transition 1998, 4, :o8, 891774000 - tz.transition 1998, 10, :o7, 909309600 - tz.transition 1999, 4, :o8, 923223600 - tz.transition 1999, 10, :o7, 941364000 - tz.transition 2000, 4, :o8, 954673200 - tz.transition 2000, 10, :o7, 972813600 - tz.transition 2001, 4, :o8, 986122800 - tz.transition 2001, 10, :o7, 1004263200 - tz.transition 2002, 4, :o8, 1018177200 - tz.transition 2002, 10, :o7, 1035712800 - tz.transition 2003, 4, :o8, 1049626800 - tz.transition 2003, 10, :o7, 1067162400 - tz.transition 2004, 4, :o8, 1081076400 - tz.transition 2004, 10, :o7, 1099216800 - tz.transition 2005, 4, :o8, 1112526000 - tz.transition 2005, 10, :o7, 1130666400 - tz.transition 2006, 4, :o8, 1143975600 - tz.transition 2006, 10, :o7, 1162116000 - tz.transition 2007, 3, :o8, 1173610800 - tz.transition 2007, 11, :o7, 1194170400 - tz.transition 2008, 3, :o8, 1205060400 - tz.transition 2008, 11, :o7, 1225620000 - tz.transition 2009, 3, :o8, 1236510000 - tz.transition 2009, 11, :o7, 1257069600 - tz.transition 2010, 3, :o8, 1268564400 - tz.transition 2010, 11, :o7, 1289124000 - tz.transition 2011, 3, :o8, 1300014000 - tz.transition 2011, 11, :o7, 1320573600 - tz.transition 2012, 3, :o8, 1331463600 - tz.transition 2012, 11, :o7, 1352023200 - tz.transition 2013, 3, :o8, 1362913200 - tz.transition 2013, 11, :o7, 1383472800 - tz.transition 2014, 3, :o8, 1394362800 - tz.transition 2014, 11, :o7, 1414922400 - tz.transition 2015, 3, :o8, 1425812400 - tz.transition 2015, 11, :o7, 1446372000 - tz.transition 2016, 3, :o8, 1457866800 - tz.transition 2016, 11, :o7, 1478426400 - tz.transition 2017, 3, :o8, 1489316400 - tz.transition 2017, 11, :o7, 1509876000 - tz.transition 2018, 3, :o8, 1520766000 - tz.transition 2018, 11, :o7, 1541325600 - tz.transition 2019, 3, :o8, 1552215600 - tz.transition 2019, 11, :o7, 1572775200 - tz.transition 2020, 3, :o8, 1583665200 - tz.transition 2020, 11, :o7, 1604224800 - tz.transition 2021, 3, :o8, 1615719600 - tz.transition 2021, 11, :o7, 1636279200 - tz.transition 2022, 3, :o8, 1647169200 - tz.transition 2022, 11, :o7, 1667728800 - tz.transition 2023, 3, :o8, 1678618800 - tz.transition 2023, 11, :o7, 1699178400 - tz.transition 2024, 3, :o8, 1710068400 - tz.transition 2024, 11, :o7, 1730628000 - tz.transition 2025, 3, :o8, 1741518000 - tz.transition 2025, 11, :o7, 1762077600 - tz.transition 2026, 3, :o8, 1772967600 - tz.transition 2026, 11, :o7, 1793527200 - tz.transition 2027, 3, :o8, 1805022000 - tz.transition 2027, 11, :o7, 1825581600 - tz.transition 2028, 3, :o8, 1836471600 - tz.transition 2028, 11, :o7, 1857031200 - tz.transition 2029, 3, :o8, 1867921200 - tz.transition 2029, 11, :o7, 1888480800 - tz.transition 2030, 3, :o8, 1899370800 - tz.transition 2030, 11, :o7, 1919930400 - tz.transition 2031, 3, :o8, 1930820400 - tz.transition 2031, 11, :o7, 1951380000 - tz.transition 2032, 3, :o8, 1962874800 - tz.transition 2032, 11, :o7, 1983434400 - tz.transition 2033, 3, :o8, 1994324400 - tz.transition 2033, 11, :o7, 2014884000 - tz.transition 2034, 3, :o8, 2025774000 - tz.transition 2034, 11, :o7, 2046333600 - tz.transition 2035, 3, :o8, 2057223600 - tz.transition 2035, 11, :o7, 2077783200 - tz.transition 2036, 3, :o8, 2088673200 - tz.transition 2036, 11, :o7, 2109232800 - tz.transition 2037, 3, :o8, 2120122800 - tz.transition 2037, 11, :o7, 2140682400 - tz.transition 2038, 3, :o8, 59171927, 24 - tz.transition 2038, 11, :o7, 29588819, 12 - tz.transition 2039, 3, :o8, 59180663, 24 - tz.transition 2039, 11, :o7, 29593187, 12 - tz.transition 2040, 3, :o8, 59189399, 24 - tz.transition 2040, 11, :o7, 29597555, 12 - tz.transition 2041, 3, :o8, 59198135, 24 - tz.transition 2041, 11, :o7, 29601923, 12 - tz.transition 2042, 3, :o8, 59206871, 24 - tz.transition 2042, 11, :o7, 29606291, 12 - tz.transition 2043, 3, :o8, 59215607, 24 - tz.transition 2043, 11, :o7, 29610659, 12 - tz.transition 2044, 3, :o8, 59224511, 24 - tz.transition 2044, 11, :o7, 29615111, 12 - tz.transition 2045, 3, :o8, 59233247, 24 - tz.transition 2045, 11, :o7, 29619479, 12 - tz.transition 2046, 3, :o8, 59241983, 24 - tz.transition 2046, 11, :o7, 29623847, 12 - tz.transition 2047, 3, :o8, 59250719, 24 - tz.transition 2047, 11, :o7, 29628215, 12 - tz.transition 2048, 3, :o8, 59259455, 24 - tz.transition 2048, 11, :o7, 29632583, 12 - tz.transition 2049, 3, :o8, 59268359, 24 - tz.transition 2049, 11, :o7, 29637035, 12 - tz.transition 2050, 3, :o8, 59277095, 24 - tz.transition 2050, 11, :o7, 29641403, 12 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/La_Paz.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/La_Paz.rb deleted file mode 100644 index 45c907899f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/La_Paz.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module La_Paz - include TimezoneDefinition - - timezone 'America/La_Paz' do |tz| - tz.offset :o0, -16356, 0, :LMT - tz.offset :o1, -16356, 0, :CMT - tz.offset :o2, -16356, 3600, :BOST - tz.offset :o3, -14400, 0, :BOT - - tz.transition 1890, 1, :o1, 17361854563, 7200 - tz.transition 1931, 10, :o2, 17471733763, 7200 - tz.transition 1932, 3, :o3, 17472871063, 7200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Lima.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Lima.rb deleted file mode 100644 index af68ac29f7..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Lima.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Lima - include TimezoneDefinition - - timezone 'America/Lima' do |tz| - tz.offset :o0, -18492, 0, :LMT - tz.offset :o1, -18516, 0, :LMT - tz.offset :o2, -18000, 0, :PET - tz.offset :o3, -18000, 3600, :PEST - - tz.transition 1890, 1, :o1, 17361854741, 7200 - tz.transition 1908, 7, :o2, 17410685143, 7200 - tz.transition 1938, 1, :o3, 58293593, 24 - tz.transition 1938, 4, :o2, 7286969, 3 - tz.transition 1938, 9, :o3, 58300001, 24 - tz.transition 1939, 3, :o2, 7288046, 3 - tz.transition 1939, 9, :o3, 58308737, 24 - tz.transition 1940, 3, :o2, 7289138, 3 - tz.transition 1986, 1, :o3, 504939600 - tz.transition 1986, 4, :o2, 512712000 - tz.transition 1987, 1, :o3, 536475600 - tz.transition 1987, 4, :o2, 544248000 - tz.transition 1990, 1, :o3, 631170000 - tz.transition 1990, 4, :o2, 638942400 - tz.transition 1994, 1, :o3, 757400400 - tz.transition 1994, 4, :o2, 765172800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Los_Angeles.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Los_Angeles.rb deleted file mode 100644 index 16007fd675..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Los_Angeles.rb +++ /dev/null @@ -1,232 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Los_Angeles - include TimezoneDefinition - - timezone 'America/Los_Angeles' do |tz| - tz.offset :o0, -28378, 0, :LMT - tz.offset :o1, -28800, 0, :PST - tz.offset :o2, -28800, 3600, :PDT - tz.offset :o3, -28800, 3600, :PWT - tz.offset :o4, -28800, 3600, :PPT - - tz.transition 1883, 11, :o1, 7227400, 3 - tz.transition 1918, 3, :o2, 29060207, 12 - tz.transition 1918, 10, :o1, 19375151, 8 - tz.transition 1919, 3, :o2, 29064575, 12 - tz.transition 1919, 10, :o1, 19378063, 8 - tz.transition 1942, 2, :o3, 29164799, 12 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 19453831, 8 - tz.transition 1948, 3, :o2, 29191499, 12 - tz.transition 1949, 1, :o1, 19463343, 8 - tz.transition 1950, 4, :o2, 29200823, 12 - tz.transition 1950, 9, :o1, 19468391, 8 - tz.transition 1951, 4, :o2, 29205191, 12 - tz.transition 1951, 9, :o1, 19471359, 8 - tz.transition 1952, 4, :o2, 29209559, 12 - tz.transition 1952, 9, :o1, 19474271, 8 - tz.transition 1953, 4, :o2, 29213927, 12 - tz.transition 1953, 9, :o1, 19477183, 8 - tz.transition 1954, 4, :o2, 29218295, 12 - tz.transition 1954, 9, :o1, 19480095, 8 - tz.transition 1955, 4, :o2, 29222663, 12 - tz.transition 1955, 9, :o1, 19483007, 8 - tz.transition 1956, 4, :o2, 29227115, 12 - tz.transition 1956, 9, :o1, 19485975, 8 - tz.transition 1957, 4, :o2, 29231483, 12 - tz.transition 1957, 9, :o1, 19488887, 8 - tz.transition 1958, 4, :o2, 29235851, 12 - tz.transition 1958, 9, :o1, 19491799, 8 - tz.transition 1959, 4, :o2, 29240219, 12 - tz.transition 1959, 9, :o1, 19494711, 8 - tz.transition 1960, 4, :o2, 29244587, 12 - tz.transition 1960, 9, :o1, 19497623, 8 - tz.transition 1961, 4, :o2, 29249039, 12 - tz.transition 1961, 9, :o1, 19500535, 8 - tz.transition 1962, 4, :o2, 29253407, 12 - tz.transition 1962, 10, :o1, 19503727, 8 - tz.transition 1963, 4, :o2, 29257775, 12 - tz.transition 1963, 10, :o1, 19506639, 8 - tz.transition 1964, 4, :o2, 29262143, 12 - tz.transition 1964, 10, :o1, 19509551, 8 - tz.transition 1965, 4, :o2, 29266511, 12 - tz.transition 1965, 10, :o1, 19512519, 8 - tz.transition 1966, 4, :o2, 29270879, 12 - tz.transition 1966, 10, :o1, 19515431, 8 - tz.transition 1967, 4, :o2, 29275331, 12 - tz.transition 1967, 10, :o1, 19518343, 8 - tz.transition 1968, 4, :o2, 29279699, 12 - tz.transition 1968, 10, :o1, 19521255, 8 - tz.transition 1969, 4, :o2, 29284067, 12 - tz.transition 1969, 10, :o1, 19524167, 8 - tz.transition 1970, 4, :o2, 9972000 - tz.transition 1970, 10, :o1, 25693200 - tz.transition 1971, 4, :o2, 41421600 - tz.transition 1971, 10, :o1, 57747600 - tz.transition 1972, 4, :o2, 73476000 - tz.transition 1972, 10, :o1, 89197200 - tz.transition 1973, 4, :o2, 104925600 - tz.transition 1973, 10, :o1, 120646800 - tz.transition 1974, 1, :o2, 126698400 - tz.transition 1974, 10, :o1, 152096400 - tz.transition 1975, 2, :o2, 162381600 - tz.transition 1975, 10, :o1, 183546000 - tz.transition 1976, 4, :o2, 199274400 - tz.transition 1976, 10, :o1, 215600400 - tz.transition 1977, 4, :o2, 230724000 - tz.transition 1977, 10, :o1, 247050000 - tz.transition 1978, 4, :o2, 262778400 - tz.transition 1978, 10, :o1, 278499600 - tz.transition 1979, 4, :o2, 294228000 - tz.transition 1979, 10, :o1, 309949200 - tz.transition 1980, 4, :o2, 325677600 - tz.transition 1980, 10, :o1, 341398800 - tz.transition 1981, 4, :o2, 357127200 - tz.transition 1981, 10, :o1, 372848400 - tz.transition 1982, 4, :o2, 388576800 - tz.transition 1982, 10, :o1, 404902800 - tz.transition 1983, 4, :o2, 420026400 - tz.transition 1983, 10, :o1, 436352400 - tz.transition 1984, 4, :o2, 452080800 - tz.transition 1984, 10, :o1, 467802000 - tz.transition 1985, 4, :o2, 483530400 - tz.transition 1985, 10, :o1, 499251600 - tz.transition 1986, 4, :o2, 514980000 - tz.transition 1986, 10, :o1, 530701200 - tz.transition 1987, 4, :o2, 544615200 - tz.transition 1987, 10, :o1, 562150800 - tz.transition 1988, 4, :o2, 576064800 - tz.transition 1988, 10, :o1, 594205200 - tz.transition 1989, 4, :o2, 607514400 - tz.transition 1989, 10, :o1, 625654800 - tz.transition 1990, 4, :o2, 638964000 - tz.transition 1990, 10, :o1, 657104400 - tz.transition 1991, 4, :o2, 671018400 - tz.transition 1991, 10, :o1, 688554000 - tz.transition 1992, 4, :o2, 702468000 - tz.transition 1992, 10, :o1, 720003600 - tz.transition 1993, 4, :o2, 733917600 - tz.transition 1993, 10, :o1, 752058000 - tz.transition 1994, 4, :o2, 765367200 - tz.transition 1994, 10, :o1, 783507600 - tz.transition 1995, 4, :o2, 796816800 - tz.transition 1995, 10, :o1, 814957200 - tz.transition 1996, 4, :o2, 828871200 - tz.transition 1996, 10, :o1, 846406800 - tz.transition 1997, 4, :o2, 860320800 - tz.transition 1997, 10, :o1, 877856400 - tz.transition 1998, 4, :o2, 891770400 - tz.transition 1998, 10, :o1, 909306000 - tz.transition 1999, 4, :o2, 923220000 - tz.transition 1999, 10, :o1, 941360400 - tz.transition 2000, 4, :o2, 954669600 - tz.transition 2000, 10, :o1, 972810000 - tz.transition 2001, 4, :o2, 986119200 - tz.transition 2001, 10, :o1, 1004259600 - tz.transition 2002, 4, :o2, 1018173600 - tz.transition 2002, 10, :o1, 1035709200 - tz.transition 2003, 4, :o2, 1049623200 - tz.transition 2003, 10, :o1, 1067158800 - tz.transition 2004, 4, :o2, 1081072800 - tz.transition 2004, 10, :o1, 1099213200 - tz.transition 2005, 4, :o2, 1112522400 - tz.transition 2005, 10, :o1, 1130662800 - tz.transition 2006, 4, :o2, 1143972000 - tz.transition 2006, 10, :o1, 1162112400 - tz.transition 2007, 3, :o2, 1173607200 - tz.transition 2007, 11, :o1, 1194166800 - tz.transition 2008, 3, :o2, 1205056800 - tz.transition 2008, 11, :o1, 1225616400 - tz.transition 2009, 3, :o2, 1236506400 - tz.transition 2009, 11, :o1, 1257066000 - tz.transition 2010, 3, :o2, 1268560800 - tz.transition 2010, 11, :o1, 1289120400 - tz.transition 2011, 3, :o2, 1300010400 - tz.transition 2011, 11, :o1, 1320570000 - tz.transition 2012, 3, :o2, 1331460000 - tz.transition 2012, 11, :o1, 1352019600 - tz.transition 2013, 3, :o2, 1362909600 - tz.transition 2013, 11, :o1, 1383469200 - tz.transition 2014, 3, :o2, 1394359200 - tz.transition 2014, 11, :o1, 1414918800 - tz.transition 2015, 3, :o2, 1425808800 - tz.transition 2015, 11, :o1, 1446368400 - tz.transition 2016, 3, :o2, 1457863200 - tz.transition 2016, 11, :o1, 1478422800 - tz.transition 2017, 3, :o2, 1489312800 - tz.transition 2017, 11, :o1, 1509872400 - tz.transition 2018, 3, :o2, 1520762400 - tz.transition 2018, 11, :o1, 1541322000 - tz.transition 2019, 3, :o2, 1552212000 - tz.transition 2019, 11, :o1, 1572771600 - tz.transition 2020, 3, :o2, 1583661600 - tz.transition 2020, 11, :o1, 1604221200 - tz.transition 2021, 3, :o2, 1615716000 - tz.transition 2021, 11, :o1, 1636275600 - tz.transition 2022, 3, :o2, 1647165600 - tz.transition 2022, 11, :o1, 1667725200 - tz.transition 2023, 3, :o2, 1678615200 - tz.transition 2023, 11, :o1, 1699174800 - tz.transition 2024, 3, :o2, 1710064800 - tz.transition 2024, 11, :o1, 1730624400 - tz.transition 2025, 3, :o2, 1741514400 - tz.transition 2025, 11, :o1, 1762074000 - tz.transition 2026, 3, :o2, 1772964000 - tz.transition 2026, 11, :o1, 1793523600 - tz.transition 2027, 3, :o2, 1805018400 - tz.transition 2027, 11, :o1, 1825578000 - tz.transition 2028, 3, :o2, 1836468000 - tz.transition 2028, 11, :o1, 1857027600 - tz.transition 2029, 3, :o2, 1867917600 - tz.transition 2029, 11, :o1, 1888477200 - tz.transition 2030, 3, :o2, 1899367200 - tz.transition 2030, 11, :o1, 1919926800 - tz.transition 2031, 3, :o2, 1930816800 - tz.transition 2031, 11, :o1, 1951376400 - tz.transition 2032, 3, :o2, 1962871200 - tz.transition 2032, 11, :o1, 1983430800 - tz.transition 2033, 3, :o2, 1994320800 - tz.transition 2033, 11, :o1, 2014880400 - tz.transition 2034, 3, :o2, 2025770400 - tz.transition 2034, 11, :o1, 2046330000 - tz.transition 2035, 3, :o2, 2057220000 - tz.transition 2035, 11, :o1, 2077779600 - tz.transition 2036, 3, :o2, 2088669600 - tz.transition 2036, 11, :o1, 2109229200 - tz.transition 2037, 3, :o2, 2120119200 - tz.transition 2037, 11, :o1, 2140678800 - tz.transition 2038, 3, :o2, 29585963, 12 - tz.transition 2038, 11, :o1, 19725879, 8 - tz.transition 2039, 3, :o2, 29590331, 12 - tz.transition 2039, 11, :o1, 19728791, 8 - tz.transition 2040, 3, :o2, 29594699, 12 - tz.transition 2040, 11, :o1, 19731703, 8 - tz.transition 2041, 3, :o2, 29599067, 12 - tz.transition 2041, 11, :o1, 19734615, 8 - tz.transition 2042, 3, :o2, 29603435, 12 - tz.transition 2042, 11, :o1, 19737527, 8 - tz.transition 2043, 3, :o2, 29607803, 12 - tz.transition 2043, 11, :o1, 19740439, 8 - tz.transition 2044, 3, :o2, 29612255, 12 - tz.transition 2044, 11, :o1, 19743407, 8 - tz.transition 2045, 3, :o2, 29616623, 12 - tz.transition 2045, 11, :o1, 19746319, 8 - tz.transition 2046, 3, :o2, 29620991, 12 - tz.transition 2046, 11, :o1, 19749231, 8 - tz.transition 2047, 3, :o2, 29625359, 12 - tz.transition 2047, 11, :o1, 19752143, 8 - tz.transition 2048, 3, :o2, 29629727, 12 - tz.transition 2048, 11, :o1, 19755055, 8 - tz.transition 2049, 3, :o2, 29634179, 12 - tz.transition 2049, 11, :o1, 19758023, 8 - tz.transition 2050, 3, :o2, 29638547, 12 - tz.transition 2050, 11, :o1, 19760935, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Mazatlan.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Mazatlan.rb deleted file mode 100644 index ba9e6efcf1..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Mazatlan.rb +++ /dev/null @@ -1,139 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Mazatlan - include TimezoneDefinition - - timezone 'America/Mazatlan' do |tz| - tz.offset :o0, -25540, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -21600, 0, :CST - tz.offset :o3, -28800, 0, :PST - tz.offset :o4, -25200, 3600, :MDT - - tz.transition 1922, 1, :o1, 58153339, 24 - tz.transition 1927, 6, :o2, 9700171, 4 - tz.transition 1930, 11, :o1, 9705183, 4 - tz.transition 1931, 5, :o2, 9705855, 4 - tz.transition 1931, 10, :o1, 9706463, 4 - tz.transition 1932, 4, :o2, 58243171, 24 - tz.transition 1942, 4, :o1, 9721895, 4 - tz.transition 1949, 1, :o3, 58390339, 24 - tz.transition 1970, 1, :o1, 28800 - tz.transition 1996, 4, :o4, 828867600 - tz.transition 1996, 10, :o1, 846403200 - tz.transition 1997, 4, :o4, 860317200 - tz.transition 1997, 10, :o1, 877852800 - tz.transition 1998, 4, :o4, 891766800 - tz.transition 1998, 10, :o1, 909302400 - tz.transition 1999, 4, :o4, 923216400 - tz.transition 1999, 10, :o1, 941356800 - tz.transition 2000, 4, :o4, 954666000 - tz.transition 2000, 10, :o1, 972806400 - tz.transition 2001, 5, :o4, 989139600 - tz.transition 2001, 9, :o1, 1001836800 - tz.transition 2002, 4, :o4, 1018170000 - tz.transition 2002, 10, :o1, 1035705600 - tz.transition 2003, 4, :o4, 1049619600 - tz.transition 2003, 10, :o1, 1067155200 - tz.transition 2004, 4, :o4, 1081069200 - tz.transition 2004, 10, :o1, 1099209600 - tz.transition 2005, 4, :o4, 1112518800 - tz.transition 2005, 10, :o1, 1130659200 - tz.transition 2006, 4, :o4, 1143968400 - tz.transition 2006, 10, :o1, 1162108800 - tz.transition 2007, 4, :o4, 1175418000 - tz.transition 2007, 10, :o1, 1193558400 - tz.transition 2008, 4, :o4, 1207472400 - tz.transition 2008, 10, :o1, 1225008000 - tz.transition 2009, 4, :o4, 1238922000 - tz.transition 2009, 10, :o1, 1256457600 - tz.transition 2010, 4, :o4, 1270371600 - tz.transition 2010, 10, :o1, 1288512000 - tz.transition 2011, 4, :o4, 1301821200 - tz.transition 2011, 10, :o1, 1319961600 - tz.transition 2012, 4, :o4, 1333270800 - tz.transition 2012, 10, :o1, 1351411200 - tz.transition 2013, 4, :o4, 1365325200 - tz.transition 2013, 10, :o1, 1382860800 - tz.transition 2014, 4, :o4, 1396774800 - tz.transition 2014, 10, :o1, 1414310400 - tz.transition 2015, 4, :o4, 1428224400 - tz.transition 2015, 10, :o1, 1445760000 - tz.transition 2016, 4, :o4, 1459674000 - tz.transition 2016, 10, :o1, 1477814400 - tz.transition 2017, 4, :o4, 1491123600 - tz.transition 2017, 10, :o1, 1509264000 - tz.transition 2018, 4, :o4, 1522573200 - tz.transition 2018, 10, :o1, 1540713600 - tz.transition 2019, 4, :o4, 1554627600 - tz.transition 2019, 10, :o1, 1572163200 - tz.transition 2020, 4, :o4, 1586077200 - tz.transition 2020, 10, :o1, 1603612800 - tz.transition 2021, 4, :o4, 1617526800 - tz.transition 2021, 10, :o1, 1635667200 - tz.transition 2022, 4, :o4, 1648976400 - tz.transition 2022, 10, :o1, 1667116800 - tz.transition 2023, 4, :o4, 1680426000 - tz.transition 2023, 10, :o1, 1698566400 - tz.transition 2024, 4, :o4, 1712480400 - tz.transition 2024, 10, :o1, 1730016000 - tz.transition 2025, 4, :o4, 1743930000 - tz.transition 2025, 10, :o1, 1761465600 - tz.transition 2026, 4, :o4, 1775379600 - tz.transition 2026, 10, :o1, 1792915200 - tz.transition 2027, 4, :o4, 1806829200 - tz.transition 2027, 10, :o1, 1824969600 - tz.transition 2028, 4, :o4, 1838278800 - tz.transition 2028, 10, :o1, 1856419200 - tz.transition 2029, 4, :o4, 1869728400 - tz.transition 2029, 10, :o1, 1887868800 - tz.transition 2030, 4, :o4, 1901782800 - tz.transition 2030, 10, :o1, 1919318400 - tz.transition 2031, 4, :o4, 1933232400 - tz.transition 2031, 10, :o1, 1950768000 - tz.transition 2032, 4, :o4, 1964682000 - tz.transition 2032, 10, :o1, 1982822400 - tz.transition 2033, 4, :o4, 1996131600 - tz.transition 2033, 10, :o1, 2014272000 - tz.transition 2034, 4, :o4, 2027581200 - tz.transition 2034, 10, :o1, 2045721600 - tz.transition 2035, 4, :o4, 2059030800 - tz.transition 2035, 10, :o1, 2077171200 - tz.transition 2036, 4, :o4, 2091085200 - tz.transition 2036, 10, :o1, 2108620800 - tz.transition 2037, 4, :o4, 2122534800 - tz.transition 2037, 10, :o1, 2140070400 - tz.transition 2038, 4, :o4, 19724143, 8 - tz.transition 2038, 10, :o1, 14794367, 6 - tz.transition 2039, 4, :o4, 19727055, 8 - tz.transition 2039, 10, :o1, 14796551, 6 - tz.transition 2040, 4, :o4, 19729967, 8 - tz.transition 2040, 10, :o1, 14798735, 6 - tz.transition 2041, 4, :o4, 19732935, 8 - tz.transition 2041, 10, :o1, 14800919, 6 - tz.transition 2042, 4, :o4, 19735847, 8 - tz.transition 2042, 10, :o1, 14803103, 6 - tz.transition 2043, 4, :o4, 19738759, 8 - tz.transition 2043, 10, :o1, 14805287, 6 - tz.transition 2044, 4, :o4, 19741671, 8 - tz.transition 2044, 10, :o1, 14807513, 6 - tz.transition 2045, 4, :o4, 19744583, 8 - tz.transition 2045, 10, :o1, 14809697, 6 - tz.transition 2046, 4, :o4, 19747495, 8 - tz.transition 2046, 10, :o1, 14811881, 6 - tz.transition 2047, 4, :o4, 19750463, 8 - tz.transition 2047, 10, :o1, 14814065, 6 - tz.transition 2048, 4, :o4, 19753375, 8 - tz.transition 2048, 10, :o1, 14816249, 6 - tz.transition 2049, 4, :o4, 19756287, 8 - tz.transition 2049, 10, :o1, 14818475, 6 - tz.transition 2050, 4, :o4, 19759199, 8 - tz.transition 2050, 10, :o1, 14820659, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Mexico_City.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Mexico_City.rb deleted file mode 100644 index 2347fce647..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Mexico_City.rb +++ /dev/null @@ -1,144 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Mexico_City - include TimezoneDefinition - - timezone 'America/Mexico_City' do |tz| - tz.offset :o0, -23796, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -21600, 0, :CST - tz.offset :o3, -21600, 3600, :CDT - tz.offset :o4, -21600, 3600, :CWT - - tz.transition 1922, 1, :o1, 58153339, 24 - tz.transition 1927, 6, :o2, 9700171, 4 - tz.transition 1930, 11, :o1, 9705183, 4 - tz.transition 1931, 5, :o2, 9705855, 4 - tz.transition 1931, 10, :o1, 9706463, 4 - tz.transition 1932, 4, :o2, 58243171, 24 - tz.transition 1939, 2, :o3, 9717199, 4 - tz.transition 1939, 6, :o2, 58306553, 24 - tz.transition 1940, 12, :o3, 9719891, 4 - tz.transition 1941, 4, :o2, 58322057, 24 - tz.transition 1943, 12, :o4, 9724299, 4 - tz.transition 1944, 5, :o2, 58349081, 24 - tz.transition 1950, 2, :o3, 9733299, 4 - tz.transition 1950, 7, :o2, 58403825, 24 - tz.transition 1996, 4, :o3, 828864000 - tz.transition 1996, 10, :o2, 846399600 - tz.transition 1997, 4, :o3, 860313600 - tz.transition 1997, 10, :o2, 877849200 - tz.transition 1998, 4, :o3, 891763200 - tz.transition 1998, 10, :o2, 909298800 - tz.transition 1999, 4, :o3, 923212800 - tz.transition 1999, 10, :o2, 941353200 - tz.transition 2000, 4, :o3, 954662400 - tz.transition 2000, 10, :o2, 972802800 - tz.transition 2001, 5, :o3, 989136000 - tz.transition 2001, 9, :o2, 1001833200 - tz.transition 2002, 4, :o3, 1018166400 - tz.transition 2002, 10, :o2, 1035702000 - tz.transition 2003, 4, :o3, 1049616000 - tz.transition 2003, 10, :o2, 1067151600 - tz.transition 2004, 4, :o3, 1081065600 - tz.transition 2004, 10, :o2, 1099206000 - tz.transition 2005, 4, :o3, 1112515200 - tz.transition 2005, 10, :o2, 1130655600 - tz.transition 2006, 4, :o3, 1143964800 - tz.transition 2006, 10, :o2, 1162105200 - tz.transition 2007, 4, :o3, 1175414400 - tz.transition 2007, 10, :o2, 1193554800 - tz.transition 2008, 4, :o3, 1207468800 - tz.transition 2008, 10, :o2, 1225004400 - tz.transition 2009, 4, :o3, 1238918400 - tz.transition 2009, 10, :o2, 1256454000 - tz.transition 2010, 4, :o3, 1270368000 - tz.transition 2010, 10, :o2, 1288508400 - tz.transition 2011, 4, :o3, 1301817600 - tz.transition 2011, 10, :o2, 1319958000 - tz.transition 2012, 4, :o3, 1333267200 - tz.transition 2012, 10, :o2, 1351407600 - tz.transition 2013, 4, :o3, 1365321600 - tz.transition 2013, 10, :o2, 1382857200 - tz.transition 2014, 4, :o3, 1396771200 - tz.transition 2014, 10, :o2, 1414306800 - tz.transition 2015, 4, :o3, 1428220800 - tz.transition 2015, 10, :o2, 1445756400 - tz.transition 2016, 4, :o3, 1459670400 - tz.transition 2016, 10, :o2, 1477810800 - tz.transition 2017, 4, :o3, 1491120000 - tz.transition 2017, 10, :o2, 1509260400 - tz.transition 2018, 4, :o3, 1522569600 - tz.transition 2018, 10, :o2, 1540710000 - tz.transition 2019, 4, :o3, 1554624000 - tz.transition 2019, 10, :o2, 1572159600 - tz.transition 2020, 4, :o3, 1586073600 - tz.transition 2020, 10, :o2, 1603609200 - tz.transition 2021, 4, :o3, 1617523200 - tz.transition 2021, 10, :o2, 1635663600 - tz.transition 2022, 4, :o3, 1648972800 - tz.transition 2022, 10, :o2, 1667113200 - tz.transition 2023, 4, :o3, 1680422400 - tz.transition 2023, 10, :o2, 1698562800 - tz.transition 2024, 4, :o3, 1712476800 - tz.transition 2024, 10, :o2, 1730012400 - tz.transition 2025, 4, :o3, 1743926400 - tz.transition 2025, 10, :o2, 1761462000 - tz.transition 2026, 4, :o3, 1775376000 - tz.transition 2026, 10, :o2, 1792911600 - tz.transition 2027, 4, :o3, 1806825600 - tz.transition 2027, 10, :o2, 1824966000 - tz.transition 2028, 4, :o3, 1838275200 - tz.transition 2028, 10, :o2, 1856415600 - tz.transition 2029, 4, :o3, 1869724800 - tz.transition 2029, 10, :o2, 1887865200 - tz.transition 2030, 4, :o3, 1901779200 - tz.transition 2030, 10, :o2, 1919314800 - tz.transition 2031, 4, :o3, 1933228800 - tz.transition 2031, 10, :o2, 1950764400 - tz.transition 2032, 4, :o3, 1964678400 - tz.transition 2032, 10, :o2, 1982818800 - tz.transition 2033, 4, :o3, 1996128000 - tz.transition 2033, 10, :o2, 2014268400 - tz.transition 2034, 4, :o3, 2027577600 - tz.transition 2034, 10, :o2, 2045718000 - tz.transition 2035, 4, :o3, 2059027200 - tz.transition 2035, 10, :o2, 2077167600 - tz.transition 2036, 4, :o3, 2091081600 - tz.transition 2036, 10, :o2, 2108617200 - tz.transition 2037, 4, :o3, 2122531200 - tz.transition 2037, 10, :o2, 2140066800 - tz.transition 2038, 4, :o3, 14793107, 6 - tz.transition 2038, 10, :o2, 59177467, 24 - tz.transition 2039, 4, :o3, 14795291, 6 - tz.transition 2039, 10, :o2, 59186203, 24 - tz.transition 2040, 4, :o3, 14797475, 6 - tz.transition 2040, 10, :o2, 59194939, 24 - tz.transition 2041, 4, :o3, 14799701, 6 - tz.transition 2041, 10, :o2, 59203675, 24 - tz.transition 2042, 4, :o3, 14801885, 6 - tz.transition 2042, 10, :o2, 59212411, 24 - tz.transition 2043, 4, :o3, 14804069, 6 - tz.transition 2043, 10, :o2, 59221147, 24 - tz.transition 2044, 4, :o3, 14806253, 6 - tz.transition 2044, 10, :o2, 59230051, 24 - tz.transition 2045, 4, :o3, 14808437, 6 - tz.transition 2045, 10, :o2, 59238787, 24 - tz.transition 2046, 4, :o3, 14810621, 6 - tz.transition 2046, 10, :o2, 59247523, 24 - tz.transition 2047, 4, :o3, 14812847, 6 - tz.transition 2047, 10, :o2, 59256259, 24 - tz.transition 2048, 4, :o3, 14815031, 6 - tz.transition 2048, 10, :o2, 59264995, 24 - tz.transition 2049, 4, :o3, 14817215, 6 - tz.transition 2049, 10, :o2, 59273899, 24 - tz.transition 2050, 4, :o3, 14819399, 6 - tz.transition 2050, 10, :o2, 59282635, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Monterrey.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Monterrey.rb deleted file mode 100644 index 5816a9eab1..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Monterrey.rb +++ /dev/null @@ -1,131 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Monterrey - include TimezoneDefinition - - timezone 'America/Monterrey' do |tz| - tz.offset :o0, -24076, 0, :LMT - tz.offset :o1, -21600, 0, :CST - tz.offset :o2, -21600, 3600, :CDT - - tz.transition 1922, 1, :o1, 9692223, 4 - tz.transition 1988, 4, :o2, 576057600 - tz.transition 1988, 10, :o1, 594198000 - tz.transition 1996, 4, :o2, 828864000 - tz.transition 1996, 10, :o1, 846399600 - tz.transition 1997, 4, :o2, 860313600 - tz.transition 1997, 10, :o1, 877849200 - tz.transition 1998, 4, :o2, 891763200 - tz.transition 1998, 10, :o1, 909298800 - tz.transition 1999, 4, :o2, 923212800 - tz.transition 1999, 10, :o1, 941353200 - tz.transition 2000, 4, :o2, 954662400 - tz.transition 2000, 10, :o1, 972802800 - tz.transition 2001, 5, :o2, 989136000 - tz.transition 2001, 9, :o1, 1001833200 - tz.transition 2002, 4, :o2, 1018166400 - tz.transition 2002, 10, :o1, 1035702000 - tz.transition 2003, 4, :o2, 1049616000 - tz.transition 2003, 10, :o1, 1067151600 - tz.transition 2004, 4, :o2, 1081065600 - tz.transition 2004, 10, :o1, 1099206000 - tz.transition 2005, 4, :o2, 1112515200 - tz.transition 2005, 10, :o1, 1130655600 - tz.transition 2006, 4, :o2, 1143964800 - tz.transition 2006, 10, :o1, 1162105200 - tz.transition 2007, 4, :o2, 1175414400 - tz.transition 2007, 10, :o1, 1193554800 - tz.transition 2008, 4, :o2, 1207468800 - tz.transition 2008, 10, :o1, 1225004400 - tz.transition 2009, 4, :o2, 1238918400 - tz.transition 2009, 10, :o1, 1256454000 - tz.transition 2010, 4, :o2, 1270368000 - tz.transition 2010, 10, :o1, 1288508400 - tz.transition 2011, 4, :o2, 1301817600 - tz.transition 2011, 10, :o1, 1319958000 - tz.transition 2012, 4, :o2, 1333267200 - tz.transition 2012, 10, :o1, 1351407600 - tz.transition 2013, 4, :o2, 1365321600 - tz.transition 2013, 10, :o1, 1382857200 - tz.transition 2014, 4, :o2, 1396771200 - tz.transition 2014, 10, :o1, 1414306800 - tz.transition 2015, 4, :o2, 1428220800 - tz.transition 2015, 10, :o1, 1445756400 - tz.transition 2016, 4, :o2, 1459670400 - tz.transition 2016, 10, :o1, 1477810800 - tz.transition 2017, 4, :o2, 1491120000 - tz.transition 2017, 10, :o1, 1509260400 - tz.transition 2018, 4, :o2, 1522569600 - tz.transition 2018, 10, :o1, 1540710000 - tz.transition 2019, 4, :o2, 1554624000 - tz.transition 2019, 10, :o1, 1572159600 - tz.transition 2020, 4, :o2, 1586073600 - tz.transition 2020, 10, :o1, 1603609200 - tz.transition 2021, 4, :o2, 1617523200 - tz.transition 2021, 10, :o1, 1635663600 - tz.transition 2022, 4, :o2, 1648972800 - tz.transition 2022, 10, :o1, 1667113200 - tz.transition 2023, 4, :o2, 1680422400 - tz.transition 2023, 10, :o1, 1698562800 - tz.transition 2024, 4, :o2, 1712476800 - tz.transition 2024, 10, :o1, 1730012400 - tz.transition 2025, 4, :o2, 1743926400 - tz.transition 2025, 10, :o1, 1761462000 - tz.transition 2026, 4, :o2, 1775376000 - tz.transition 2026, 10, :o1, 1792911600 - tz.transition 2027, 4, :o2, 1806825600 - tz.transition 2027, 10, :o1, 1824966000 - tz.transition 2028, 4, :o2, 1838275200 - tz.transition 2028, 10, :o1, 1856415600 - tz.transition 2029, 4, :o2, 1869724800 - tz.transition 2029, 10, :o1, 1887865200 - tz.transition 2030, 4, :o2, 1901779200 - tz.transition 2030, 10, :o1, 1919314800 - tz.transition 2031, 4, :o2, 1933228800 - tz.transition 2031, 10, :o1, 1950764400 - tz.transition 2032, 4, :o2, 1964678400 - tz.transition 2032, 10, :o1, 1982818800 - tz.transition 2033, 4, :o2, 1996128000 - tz.transition 2033, 10, :o1, 2014268400 - tz.transition 2034, 4, :o2, 2027577600 - tz.transition 2034, 10, :o1, 2045718000 - tz.transition 2035, 4, :o2, 2059027200 - tz.transition 2035, 10, :o1, 2077167600 - tz.transition 2036, 4, :o2, 2091081600 - tz.transition 2036, 10, :o1, 2108617200 - tz.transition 2037, 4, :o2, 2122531200 - tz.transition 2037, 10, :o1, 2140066800 - tz.transition 2038, 4, :o2, 14793107, 6 - tz.transition 2038, 10, :o1, 59177467, 24 - tz.transition 2039, 4, :o2, 14795291, 6 - tz.transition 2039, 10, :o1, 59186203, 24 - tz.transition 2040, 4, :o2, 14797475, 6 - tz.transition 2040, 10, :o1, 59194939, 24 - tz.transition 2041, 4, :o2, 14799701, 6 - tz.transition 2041, 10, :o1, 59203675, 24 - tz.transition 2042, 4, :o2, 14801885, 6 - tz.transition 2042, 10, :o1, 59212411, 24 - tz.transition 2043, 4, :o2, 14804069, 6 - tz.transition 2043, 10, :o1, 59221147, 24 - tz.transition 2044, 4, :o2, 14806253, 6 - tz.transition 2044, 10, :o1, 59230051, 24 - tz.transition 2045, 4, :o2, 14808437, 6 - tz.transition 2045, 10, :o1, 59238787, 24 - tz.transition 2046, 4, :o2, 14810621, 6 - tz.transition 2046, 10, :o1, 59247523, 24 - tz.transition 2047, 4, :o2, 14812847, 6 - tz.transition 2047, 10, :o1, 59256259, 24 - tz.transition 2048, 4, :o2, 14815031, 6 - tz.transition 2048, 10, :o1, 59264995, 24 - tz.transition 2049, 4, :o2, 14817215, 6 - tz.transition 2049, 10, :o1, 59273899, 24 - tz.transition 2050, 4, :o2, 14819399, 6 - tz.transition 2050, 10, :o1, 59282635, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/New_York.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/New_York.rb deleted file mode 100644 index 7d802bd2de..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/New_York.rb +++ /dev/null @@ -1,282 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module New_York - include TimezoneDefinition - - timezone 'America/New_York' do |tz| - tz.offset :o0, -17762, 0, :LMT - tz.offset :o1, -18000, 0, :EST - tz.offset :o2, -18000, 3600, :EDT - tz.offset :o3, -18000, 3600, :EWT - tz.offset :o4, -18000, 3600, :EPT - - tz.transition 1883, 11, :o1, 57819197, 24 - tz.transition 1918, 3, :o2, 58120411, 24 - tz.transition 1918, 10, :o1, 9687575, 4 - tz.transition 1919, 3, :o2, 58129147, 24 - tz.transition 1919, 10, :o1, 9689031, 4 - tz.transition 1920, 3, :o2, 58137883, 24 - tz.transition 1920, 10, :o1, 9690515, 4 - tz.transition 1921, 4, :o2, 58147291, 24 - tz.transition 1921, 9, :o1, 9691831, 4 - tz.transition 1922, 4, :o2, 58156195, 24 - tz.transition 1922, 9, :o1, 9693287, 4 - tz.transition 1923, 4, :o2, 58164931, 24 - tz.transition 1923, 9, :o1, 9694771, 4 - tz.transition 1924, 4, :o2, 58173667, 24 - tz.transition 1924, 9, :o1, 9696227, 4 - tz.transition 1925, 4, :o2, 58182403, 24 - tz.transition 1925, 9, :o1, 9697683, 4 - tz.transition 1926, 4, :o2, 58191139, 24 - tz.transition 1926, 9, :o1, 9699139, 4 - tz.transition 1927, 4, :o2, 58199875, 24 - tz.transition 1927, 9, :o1, 9700595, 4 - tz.transition 1928, 4, :o2, 58208779, 24 - tz.transition 1928, 9, :o1, 9702079, 4 - tz.transition 1929, 4, :o2, 58217515, 24 - tz.transition 1929, 9, :o1, 9703535, 4 - tz.transition 1930, 4, :o2, 58226251, 24 - tz.transition 1930, 9, :o1, 9704991, 4 - tz.transition 1931, 4, :o2, 58234987, 24 - tz.transition 1931, 9, :o1, 9706447, 4 - tz.transition 1932, 4, :o2, 58243723, 24 - tz.transition 1932, 9, :o1, 9707903, 4 - tz.transition 1933, 4, :o2, 58252627, 24 - tz.transition 1933, 9, :o1, 9709359, 4 - tz.transition 1934, 4, :o2, 58261363, 24 - tz.transition 1934, 9, :o1, 9710843, 4 - tz.transition 1935, 4, :o2, 58270099, 24 - tz.transition 1935, 9, :o1, 9712299, 4 - tz.transition 1936, 4, :o2, 58278835, 24 - tz.transition 1936, 9, :o1, 9713755, 4 - tz.transition 1937, 4, :o2, 58287571, 24 - tz.transition 1937, 9, :o1, 9715211, 4 - tz.transition 1938, 4, :o2, 58296307, 24 - tz.transition 1938, 9, :o1, 9716667, 4 - tz.transition 1939, 4, :o2, 58305211, 24 - tz.transition 1939, 9, :o1, 9718123, 4 - tz.transition 1940, 4, :o2, 58313947, 24 - tz.transition 1940, 9, :o1, 9719607, 4 - tz.transition 1941, 4, :o2, 58322683, 24 - tz.transition 1941, 9, :o1, 9721063, 4 - tz.transition 1942, 2, :o3, 58329595, 24 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 9726915, 4 - tz.transition 1946, 4, :o2, 58366531, 24 - tz.transition 1946, 9, :o1, 9728371, 4 - tz.transition 1947, 4, :o2, 58375267, 24 - tz.transition 1947, 9, :o1, 9729827, 4 - tz.transition 1948, 4, :o2, 58384003, 24 - tz.transition 1948, 9, :o1, 9731283, 4 - tz.transition 1949, 4, :o2, 58392739, 24 - tz.transition 1949, 9, :o1, 9732739, 4 - tz.transition 1950, 4, :o2, 58401643, 24 - tz.transition 1950, 9, :o1, 9734195, 4 - tz.transition 1951, 4, :o2, 58410379, 24 - tz.transition 1951, 9, :o1, 9735679, 4 - tz.transition 1952, 4, :o2, 58419115, 24 - tz.transition 1952, 9, :o1, 9737135, 4 - tz.transition 1953, 4, :o2, 58427851, 24 - tz.transition 1953, 9, :o1, 9738591, 4 - tz.transition 1954, 4, :o2, 58436587, 24 - tz.transition 1954, 9, :o1, 9740047, 4 - tz.transition 1955, 4, :o2, 58445323, 24 - tz.transition 1955, 10, :o1, 9741643, 4 - tz.transition 1956, 4, :o2, 58454227, 24 - tz.transition 1956, 10, :o1, 9743099, 4 - tz.transition 1957, 4, :o2, 58462963, 24 - tz.transition 1957, 10, :o1, 9744555, 4 - tz.transition 1958, 4, :o2, 58471699, 24 - tz.transition 1958, 10, :o1, 9746011, 4 - tz.transition 1959, 4, :o2, 58480435, 24 - tz.transition 1959, 10, :o1, 9747467, 4 - tz.transition 1960, 4, :o2, 58489171, 24 - tz.transition 1960, 10, :o1, 9748951, 4 - tz.transition 1961, 4, :o2, 58498075, 24 - tz.transition 1961, 10, :o1, 9750407, 4 - tz.transition 1962, 4, :o2, 58506811, 24 - tz.transition 1962, 10, :o1, 9751863, 4 - tz.transition 1963, 4, :o2, 58515547, 24 - tz.transition 1963, 10, :o1, 9753319, 4 - tz.transition 1964, 4, :o2, 58524283, 24 - tz.transition 1964, 10, :o1, 9754775, 4 - tz.transition 1965, 4, :o2, 58533019, 24 - tz.transition 1965, 10, :o1, 9756259, 4 - tz.transition 1966, 4, :o2, 58541755, 24 - tz.transition 1966, 10, :o1, 9757715, 4 - tz.transition 1967, 4, :o2, 58550659, 24 - tz.transition 1967, 10, :o1, 9759171, 4 - tz.transition 1968, 4, :o2, 58559395, 24 - tz.transition 1968, 10, :o1, 9760627, 4 - tz.transition 1969, 4, :o2, 58568131, 24 - tz.transition 1969, 10, :o1, 9762083, 4 - tz.transition 1970, 4, :o2, 9961200 - tz.transition 1970, 10, :o1, 25682400 - tz.transition 1971, 4, :o2, 41410800 - tz.transition 1971, 10, :o1, 57736800 - tz.transition 1972, 4, :o2, 73465200 - tz.transition 1972, 10, :o1, 89186400 - tz.transition 1973, 4, :o2, 104914800 - tz.transition 1973, 10, :o1, 120636000 - tz.transition 1974, 1, :o2, 126687600 - tz.transition 1974, 10, :o1, 152085600 - tz.transition 1975, 2, :o2, 162370800 - tz.transition 1975, 10, :o1, 183535200 - tz.transition 1976, 4, :o2, 199263600 - tz.transition 1976, 10, :o1, 215589600 - tz.transition 1977, 4, :o2, 230713200 - tz.transition 1977, 10, :o1, 247039200 - tz.transition 1978, 4, :o2, 262767600 - tz.transition 1978, 10, :o1, 278488800 - tz.transition 1979, 4, :o2, 294217200 - tz.transition 1979, 10, :o1, 309938400 - tz.transition 1980, 4, :o2, 325666800 - tz.transition 1980, 10, :o1, 341388000 - tz.transition 1981, 4, :o2, 357116400 - tz.transition 1981, 10, :o1, 372837600 - tz.transition 1982, 4, :o2, 388566000 - tz.transition 1982, 10, :o1, 404892000 - tz.transition 1983, 4, :o2, 420015600 - tz.transition 1983, 10, :o1, 436341600 - tz.transition 1984, 4, :o2, 452070000 - tz.transition 1984, 10, :o1, 467791200 - tz.transition 1985, 4, :o2, 483519600 - tz.transition 1985, 10, :o1, 499240800 - tz.transition 1986, 4, :o2, 514969200 - tz.transition 1986, 10, :o1, 530690400 - tz.transition 1987, 4, :o2, 544604400 - tz.transition 1987, 10, :o1, 562140000 - tz.transition 1988, 4, :o2, 576054000 - tz.transition 1988, 10, :o1, 594194400 - tz.transition 1989, 4, :o2, 607503600 - tz.transition 1989, 10, :o1, 625644000 - tz.transition 1990, 4, :o2, 638953200 - tz.transition 1990, 10, :o1, 657093600 - tz.transition 1991, 4, :o2, 671007600 - tz.transition 1991, 10, :o1, 688543200 - tz.transition 1992, 4, :o2, 702457200 - tz.transition 1992, 10, :o1, 719992800 - tz.transition 1993, 4, :o2, 733906800 - tz.transition 1993, 10, :o1, 752047200 - tz.transition 1994, 4, :o2, 765356400 - tz.transition 1994, 10, :o1, 783496800 - tz.transition 1995, 4, :o2, 796806000 - tz.transition 1995, 10, :o1, 814946400 - tz.transition 1996, 4, :o2, 828860400 - tz.transition 1996, 10, :o1, 846396000 - tz.transition 1997, 4, :o2, 860310000 - tz.transition 1997, 10, :o1, 877845600 - tz.transition 1998, 4, :o2, 891759600 - tz.transition 1998, 10, :o1, 909295200 - tz.transition 1999, 4, :o2, 923209200 - tz.transition 1999, 10, :o1, 941349600 - tz.transition 2000, 4, :o2, 954658800 - tz.transition 2000, 10, :o1, 972799200 - tz.transition 2001, 4, :o2, 986108400 - tz.transition 2001, 10, :o1, 1004248800 - tz.transition 2002, 4, :o2, 1018162800 - tz.transition 2002, 10, :o1, 1035698400 - tz.transition 2003, 4, :o2, 1049612400 - tz.transition 2003, 10, :o1, 1067148000 - tz.transition 2004, 4, :o2, 1081062000 - tz.transition 2004, 10, :o1, 1099202400 - tz.transition 2005, 4, :o2, 1112511600 - tz.transition 2005, 10, :o1, 1130652000 - tz.transition 2006, 4, :o2, 1143961200 - tz.transition 2006, 10, :o1, 1162101600 - tz.transition 2007, 3, :o2, 1173596400 - tz.transition 2007, 11, :o1, 1194156000 - tz.transition 2008, 3, :o2, 1205046000 - tz.transition 2008, 11, :o1, 1225605600 - tz.transition 2009, 3, :o2, 1236495600 - tz.transition 2009, 11, :o1, 1257055200 - tz.transition 2010, 3, :o2, 1268550000 - tz.transition 2010, 11, :o1, 1289109600 - tz.transition 2011, 3, :o2, 1299999600 - tz.transition 2011, 11, :o1, 1320559200 - tz.transition 2012, 3, :o2, 1331449200 - tz.transition 2012, 11, :o1, 1352008800 - tz.transition 2013, 3, :o2, 1362898800 - tz.transition 2013, 11, :o1, 1383458400 - tz.transition 2014, 3, :o2, 1394348400 - tz.transition 2014, 11, :o1, 1414908000 - tz.transition 2015, 3, :o2, 1425798000 - tz.transition 2015, 11, :o1, 1446357600 - tz.transition 2016, 3, :o2, 1457852400 - tz.transition 2016, 11, :o1, 1478412000 - tz.transition 2017, 3, :o2, 1489302000 - tz.transition 2017, 11, :o1, 1509861600 - tz.transition 2018, 3, :o2, 1520751600 - tz.transition 2018, 11, :o1, 1541311200 - tz.transition 2019, 3, :o2, 1552201200 - tz.transition 2019, 11, :o1, 1572760800 - tz.transition 2020, 3, :o2, 1583650800 - tz.transition 2020, 11, :o1, 1604210400 - tz.transition 2021, 3, :o2, 1615705200 - tz.transition 2021, 11, :o1, 1636264800 - tz.transition 2022, 3, :o2, 1647154800 - tz.transition 2022, 11, :o1, 1667714400 - tz.transition 2023, 3, :o2, 1678604400 - tz.transition 2023, 11, :o1, 1699164000 - tz.transition 2024, 3, :o2, 1710054000 - tz.transition 2024, 11, :o1, 1730613600 - tz.transition 2025, 3, :o2, 1741503600 - tz.transition 2025, 11, :o1, 1762063200 - tz.transition 2026, 3, :o2, 1772953200 - tz.transition 2026, 11, :o1, 1793512800 - tz.transition 2027, 3, :o2, 1805007600 - tz.transition 2027, 11, :o1, 1825567200 - tz.transition 2028, 3, :o2, 1836457200 - tz.transition 2028, 11, :o1, 1857016800 - tz.transition 2029, 3, :o2, 1867906800 - tz.transition 2029, 11, :o1, 1888466400 - tz.transition 2030, 3, :o2, 1899356400 - tz.transition 2030, 11, :o1, 1919916000 - tz.transition 2031, 3, :o2, 1930806000 - tz.transition 2031, 11, :o1, 1951365600 - tz.transition 2032, 3, :o2, 1962860400 - tz.transition 2032, 11, :o1, 1983420000 - tz.transition 2033, 3, :o2, 1994310000 - tz.transition 2033, 11, :o1, 2014869600 - tz.transition 2034, 3, :o2, 2025759600 - tz.transition 2034, 11, :o1, 2046319200 - tz.transition 2035, 3, :o2, 2057209200 - tz.transition 2035, 11, :o1, 2077768800 - tz.transition 2036, 3, :o2, 2088658800 - tz.transition 2036, 11, :o1, 2109218400 - tz.transition 2037, 3, :o2, 2120108400 - tz.transition 2037, 11, :o1, 2140668000 - tz.transition 2038, 3, :o2, 59171923, 24 - tz.transition 2038, 11, :o1, 9862939, 4 - tz.transition 2039, 3, :o2, 59180659, 24 - tz.transition 2039, 11, :o1, 9864395, 4 - tz.transition 2040, 3, :o2, 59189395, 24 - tz.transition 2040, 11, :o1, 9865851, 4 - tz.transition 2041, 3, :o2, 59198131, 24 - tz.transition 2041, 11, :o1, 9867307, 4 - tz.transition 2042, 3, :o2, 59206867, 24 - tz.transition 2042, 11, :o1, 9868763, 4 - tz.transition 2043, 3, :o2, 59215603, 24 - tz.transition 2043, 11, :o1, 9870219, 4 - tz.transition 2044, 3, :o2, 59224507, 24 - tz.transition 2044, 11, :o1, 9871703, 4 - tz.transition 2045, 3, :o2, 59233243, 24 - tz.transition 2045, 11, :o1, 9873159, 4 - tz.transition 2046, 3, :o2, 59241979, 24 - tz.transition 2046, 11, :o1, 9874615, 4 - tz.transition 2047, 3, :o2, 59250715, 24 - tz.transition 2047, 11, :o1, 9876071, 4 - tz.transition 2048, 3, :o2, 59259451, 24 - tz.transition 2048, 11, :o1, 9877527, 4 - tz.transition 2049, 3, :o2, 59268355, 24 - tz.transition 2049, 11, :o1, 9879011, 4 - tz.transition 2050, 3, :o2, 59277091, 24 - tz.transition 2050, 11, :o1, 9880467, 4 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Phoenix.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Phoenix.rb deleted file mode 100644 index b514e0c0f9..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Phoenix.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Phoenix - include TimezoneDefinition - - timezone 'America/Phoenix' do |tz| - tz.offset :o0, -26898, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -25200, 3600, :MDT - tz.offset :o3, -25200, 3600, :MWT - - tz.transition 1883, 11, :o1, 57819199, 24 - tz.transition 1918, 3, :o2, 19373471, 8 - tz.transition 1918, 10, :o1, 14531363, 6 - tz.transition 1919, 3, :o2, 19376383, 8 - tz.transition 1919, 10, :o1, 14533547, 6 - tz.transition 1942, 2, :o3, 19443199, 8 - tz.transition 1944, 1, :o1, 3500770681, 1440 - tz.transition 1944, 4, :o3, 3500901781, 1440 - tz.transition 1944, 10, :o1, 3501165241, 1440 - tz.transition 1967, 4, :o2, 19516887, 8 - tz.transition 1967, 10, :o1, 14638757, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Regina.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Regina.rb deleted file mode 100644 index ebdb68814a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Regina.rb +++ /dev/null @@ -1,74 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Regina - include TimezoneDefinition - - timezone 'America/Regina' do |tz| - tz.offset :o0, -25116, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -25200, 3600, :MDT - tz.offset :o3, -25200, 3600, :MWT - tz.offset :o4, -25200, 3600, :MPT - tz.offset :o5, -21600, 0, :CST - - tz.transition 1905, 9, :o1, 17403046493, 7200 - tz.transition 1918, 4, :o2, 19373583, 8 - tz.transition 1918, 10, :o1, 14531387, 6 - tz.transition 1930, 5, :o2, 58226419, 24 - tz.transition 1930, 10, :o1, 9705019, 4 - tz.transition 1931, 5, :o2, 58235155, 24 - tz.transition 1931, 10, :o1, 9706475, 4 - tz.transition 1932, 5, :o2, 58243891, 24 - tz.transition 1932, 10, :o1, 9707931, 4 - tz.transition 1933, 5, :o2, 58252795, 24 - tz.transition 1933, 10, :o1, 9709387, 4 - tz.transition 1934, 5, :o2, 58261531, 24 - tz.transition 1934, 10, :o1, 9710871, 4 - tz.transition 1937, 4, :o2, 58287235, 24 - tz.transition 1937, 10, :o1, 9715267, 4 - tz.transition 1938, 4, :o2, 58295971, 24 - tz.transition 1938, 10, :o1, 9716695, 4 - tz.transition 1939, 4, :o2, 58304707, 24 - tz.transition 1939, 10, :o1, 9718179, 4 - tz.transition 1940, 4, :o2, 58313611, 24 - tz.transition 1940, 10, :o1, 9719663, 4 - tz.transition 1941, 4, :o2, 58322347, 24 - tz.transition 1941, 10, :o1, 9721119, 4 - tz.transition 1942, 2, :o3, 19443199, 8 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 14590373, 6 - tz.transition 1946, 4, :o2, 19455399, 8 - tz.transition 1946, 10, :o1, 14592641, 6 - tz.transition 1947, 4, :o2, 19458423, 8 - tz.transition 1947, 9, :o1, 14594741, 6 - tz.transition 1948, 4, :o2, 19461335, 8 - tz.transition 1948, 9, :o1, 14596925, 6 - tz.transition 1949, 4, :o2, 19464247, 8 - tz.transition 1949, 9, :o1, 14599109, 6 - tz.transition 1950, 4, :o2, 19467215, 8 - tz.transition 1950, 9, :o1, 14601293, 6 - tz.transition 1951, 4, :o2, 19470127, 8 - tz.transition 1951, 9, :o1, 14603519, 6 - tz.transition 1952, 4, :o2, 19473039, 8 - tz.transition 1952, 9, :o1, 14605703, 6 - tz.transition 1953, 4, :o2, 19475951, 8 - tz.transition 1953, 9, :o1, 14607887, 6 - tz.transition 1954, 4, :o2, 19478863, 8 - tz.transition 1954, 9, :o1, 14610071, 6 - tz.transition 1955, 4, :o2, 19481775, 8 - tz.transition 1955, 9, :o1, 14612255, 6 - tz.transition 1956, 4, :o2, 19484743, 8 - tz.transition 1956, 9, :o1, 14614481, 6 - tz.transition 1957, 4, :o2, 19487655, 8 - tz.transition 1957, 9, :o1, 14616665, 6 - tz.transition 1959, 4, :o2, 19493479, 8 - tz.transition 1959, 10, :o1, 14621201, 6 - tz.transition 1960, 4, :o5, 19496391, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Santiago.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Santiago.rb deleted file mode 100644 index 0287c9ebc4..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Santiago.rb +++ /dev/null @@ -1,205 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Santiago - include TimezoneDefinition - - timezone 'America/Santiago' do |tz| - tz.offset :o0, -16966, 0, :LMT - tz.offset :o1, -16966, 0, :SMT - tz.offset :o2, -18000, 0, :CLT - tz.offset :o3, -14400, 0, :CLT - tz.offset :o4, -18000, 3600, :CLST - tz.offset :o5, -14400, 3600, :CLST - - tz.transition 1890, 1, :o1, 104171127683, 43200 - tz.transition 1910, 1, :o2, 104486660483, 43200 - tz.transition 1916, 7, :o1, 58105097, 24 - tz.transition 1918, 9, :o3, 104623388483, 43200 - tz.transition 1919, 7, :o1, 7266422, 3 - tz.transition 1927, 9, :o4, 104765386883, 43200 - tz.transition 1928, 4, :o2, 7276013, 3 - tz.transition 1928, 9, :o4, 58211777, 24 - tz.transition 1929, 4, :o2, 7277108, 3 - tz.transition 1929, 9, :o4, 58220537, 24 - tz.transition 1930, 4, :o2, 7278203, 3 - tz.transition 1930, 9, :o4, 58229297, 24 - tz.transition 1931, 4, :o2, 7279298, 3 - tz.transition 1931, 9, :o4, 58238057, 24 - tz.transition 1932, 4, :o2, 7280396, 3 - tz.transition 1932, 9, :o4, 58246841, 24 - tz.transition 1942, 6, :o2, 7291535, 3 - tz.transition 1942, 8, :o4, 58333745, 24 - tz.transition 1946, 9, :o2, 19456517, 8 - tz.transition 1947, 5, :o3, 58375865, 24 - tz.transition 1968, 11, :o5, 7320491, 3 - tz.transition 1969, 3, :o3, 19522485, 8 - tz.transition 1969, 11, :o5, 7321646, 3 - tz.transition 1970, 3, :o3, 7527600 - tz.transition 1970, 10, :o5, 24465600 - tz.transition 1971, 3, :o3, 37767600 - tz.transition 1971, 10, :o5, 55915200 - tz.transition 1972, 3, :o3, 69217200 - tz.transition 1972, 10, :o5, 87969600 - tz.transition 1973, 3, :o3, 100666800 - tz.transition 1973, 9, :o5, 118209600 - tz.transition 1974, 3, :o3, 132116400 - tz.transition 1974, 10, :o5, 150868800 - tz.transition 1975, 3, :o3, 163566000 - tz.transition 1975, 10, :o5, 182318400 - tz.transition 1976, 3, :o3, 195620400 - tz.transition 1976, 10, :o5, 213768000 - tz.transition 1977, 3, :o3, 227070000 - tz.transition 1977, 10, :o5, 245217600 - tz.transition 1978, 3, :o3, 258519600 - tz.transition 1978, 10, :o5, 277272000 - tz.transition 1979, 3, :o3, 289969200 - tz.transition 1979, 10, :o5, 308721600 - tz.transition 1980, 3, :o3, 321418800 - tz.transition 1980, 10, :o5, 340171200 - tz.transition 1981, 3, :o3, 353473200 - tz.transition 1981, 10, :o5, 371620800 - tz.transition 1982, 3, :o3, 384922800 - tz.transition 1982, 10, :o5, 403070400 - tz.transition 1983, 3, :o3, 416372400 - tz.transition 1983, 10, :o5, 434520000 - tz.transition 1984, 3, :o3, 447822000 - tz.transition 1984, 10, :o5, 466574400 - tz.transition 1985, 3, :o3, 479271600 - tz.transition 1985, 10, :o5, 498024000 - tz.transition 1986, 3, :o3, 510721200 - tz.transition 1986, 10, :o5, 529473600 - tz.transition 1987, 4, :o3, 545194800 - tz.transition 1987, 10, :o5, 560923200 - tz.transition 1988, 3, :o3, 574225200 - tz.transition 1988, 10, :o5, 591768000 - tz.transition 1989, 3, :o3, 605674800 - tz.transition 1989, 10, :o5, 624427200 - tz.transition 1990, 3, :o3, 637729200 - tz.transition 1990, 9, :o5, 653457600 - tz.transition 1991, 3, :o3, 668574000 - tz.transition 1991, 10, :o5, 687326400 - tz.transition 1992, 3, :o3, 700628400 - tz.transition 1992, 10, :o5, 718776000 - tz.transition 1993, 3, :o3, 732078000 - tz.transition 1993, 10, :o5, 750225600 - tz.transition 1994, 3, :o3, 763527600 - tz.transition 1994, 10, :o5, 781675200 - tz.transition 1995, 3, :o3, 794977200 - tz.transition 1995, 10, :o5, 813729600 - tz.transition 1996, 3, :o3, 826426800 - tz.transition 1996, 10, :o5, 845179200 - tz.transition 1997, 3, :o3, 859690800 - tz.transition 1997, 10, :o5, 876628800 - tz.transition 1998, 3, :o3, 889930800 - tz.transition 1998, 9, :o5, 906868800 - tz.transition 1999, 4, :o3, 923194800 - tz.transition 1999, 10, :o5, 939528000 - tz.transition 2000, 3, :o3, 952830000 - tz.transition 2000, 10, :o5, 971582400 - tz.transition 2001, 3, :o3, 984279600 - tz.transition 2001, 10, :o5, 1003032000 - tz.transition 2002, 3, :o3, 1015729200 - tz.transition 2002, 10, :o5, 1034481600 - tz.transition 2003, 3, :o3, 1047178800 - tz.transition 2003, 10, :o5, 1065931200 - tz.transition 2004, 3, :o3, 1079233200 - tz.transition 2004, 10, :o5, 1097380800 - tz.transition 2005, 3, :o3, 1110682800 - tz.transition 2005, 10, :o5, 1128830400 - tz.transition 2006, 3, :o3, 1142132400 - tz.transition 2006, 10, :o5, 1160884800 - tz.transition 2007, 3, :o3, 1173582000 - tz.transition 2007, 10, :o5, 1192334400 - tz.transition 2008, 3, :o3, 1206846000 - tz.transition 2008, 10, :o5, 1223784000 - tz.transition 2009, 3, :o3, 1237086000 - tz.transition 2009, 10, :o5, 1255233600 - tz.transition 2010, 3, :o3, 1268535600 - tz.transition 2010, 10, :o5, 1286683200 - tz.transition 2011, 3, :o3, 1299985200 - tz.transition 2011, 10, :o5, 1318132800 - tz.transition 2012, 3, :o3, 1331434800 - tz.transition 2012, 10, :o5, 1350187200 - tz.transition 2013, 3, :o3, 1362884400 - tz.transition 2013, 10, :o5, 1381636800 - tz.transition 2014, 3, :o3, 1394334000 - tz.transition 2014, 10, :o5, 1413086400 - tz.transition 2015, 3, :o3, 1426388400 - tz.transition 2015, 10, :o5, 1444536000 - tz.transition 2016, 3, :o3, 1457838000 - tz.transition 2016, 10, :o5, 1475985600 - tz.transition 2017, 3, :o3, 1489287600 - tz.transition 2017, 10, :o5, 1508040000 - tz.transition 2018, 3, :o3, 1520737200 - tz.transition 2018, 10, :o5, 1539489600 - tz.transition 2019, 3, :o3, 1552186800 - tz.transition 2019, 10, :o5, 1570939200 - tz.transition 2020, 3, :o3, 1584241200 - tz.transition 2020, 10, :o5, 1602388800 - tz.transition 2021, 3, :o3, 1615690800 - tz.transition 2021, 10, :o5, 1633838400 - tz.transition 2022, 3, :o3, 1647140400 - tz.transition 2022, 10, :o5, 1665288000 - tz.transition 2023, 3, :o3, 1678590000 - tz.transition 2023, 10, :o5, 1697342400 - tz.transition 2024, 3, :o3, 1710039600 - tz.transition 2024, 10, :o5, 1728792000 - tz.transition 2025, 3, :o3, 1741489200 - tz.transition 2025, 10, :o5, 1760241600 - tz.transition 2026, 3, :o3, 1773543600 - tz.transition 2026, 10, :o5, 1791691200 - tz.transition 2027, 3, :o3, 1804993200 - tz.transition 2027, 10, :o5, 1823140800 - tz.transition 2028, 3, :o3, 1836442800 - tz.transition 2028, 10, :o5, 1855195200 - tz.transition 2029, 3, :o3, 1867892400 - tz.transition 2029, 10, :o5, 1886644800 - tz.transition 2030, 3, :o3, 1899342000 - tz.transition 2030, 10, :o5, 1918094400 - tz.transition 2031, 3, :o3, 1930791600 - tz.transition 2031, 10, :o5, 1949544000 - tz.transition 2032, 3, :o3, 1962846000 - tz.transition 2032, 10, :o5, 1980993600 - tz.transition 2033, 3, :o3, 1994295600 - tz.transition 2033, 10, :o5, 2012443200 - tz.transition 2034, 3, :o3, 2025745200 - tz.transition 2034, 10, :o5, 2044497600 - tz.transition 2035, 3, :o3, 2057194800 - tz.transition 2035, 10, :o5, 2075947200 - tz.transition 2036, 3, :o3, 2088644400 - tz.transition 2036, 10, :o5, 2107396800 - tz.transition 2037, 3, :o3, 2120698800 - tz.transition 2037, 10, :o5, 2138846400 - tz.transition 2038, 3, :o3, 19723973, 8 - tz.transition 2038, 10, :o5, 7397120, 3 - tz.transition 2039, 3, :o3, 19726885, 8 - tz.transition 2039, 10, :o5, 7398212, 3 - tz.transition 2040, 3, :o3, 19729797, 8 - tz.transition 2040, 10, :o5, 7399325, 3 - tz.transition 2041, 3, :o3, 19732709, 8 - tz.transition 2041, 10, :o5, 7400417, 3 - tz.transition 2042, 3, :o3, 19735621, 8 - tz.transition 2042, 10, :o5, 7401509, 3 - tz.transition 2043, 3, :o3, 19738589, 8 - tz.transition 2043, 10, :o5, 7402601, 3 - tz.transition 2044, 3, :o3, 19741501, 8 - tz.transition 2044, 10, :o5, 7403693, 3 - tz.transition 2045, 3, :o3, 19744413, 8 - tz.transition 2045, 10, :o5, 7404806, 3 - tz.transition 2046, 3, :o3, 19747325, 8 - tz.transition 2046, 10, :o5, 7405898, 3 - tz.transition 2047, 3, :o3, 19750237, 8 - tz.transition 2047, 10, :o5, 7406990, 3 - tz.transition 2048, 3, :o3, 19753205, 8 - tz.transition 2048, 10, :o5, 7408082, 3 - tz.transition 2049, 3, :o3, 19756117, 8 - tz.transition 2049, 10, :o5, 7409174, 3 - tz.transition 2050, 3, :o3, 19759029, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Sao_Paulo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Sao_Paulo.rb deleted file mode 100644 index 0524f81c04..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Sao_Paulo.rb +++ /dev/null @@ -1,171 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Sao_Paulo - include TimezoneDefinition - - timezone 'America/Sao_Paulo' do |tz| - tz.offset :o0, -11188, 0, :LMT - tz.offset :o1, -10800, 0, :BRT - tz.offset :o2, -10800, 3600, :BRST - - tz.transition 1914, 1, :o1, 52274886397, 21600 - tz.transition 1931, 10, :o2, 29119417, 12 - tz.transition 1932, 4, :o1, 29121583, 12 - tz.transition 1932, 10, :o2, 19415869, 8 - tz.transition 1933, 4, :o1, 29125963, 12 - tz.transition 1949, 12, :o2, 19466013, 8 - tz.transition 1950, 4, :o1, 19467101, 8 - tz.transition 1950, 12, :o2, 19468933, 8 - tz.transition 1951, 4, :o1, 29204851, 12 - tz.transition 1951, 12, :o2, 19471853, 8 - tz.transition 1952, 4, :o1, 29209243, 12 - tz.transition 1952, 12, :o2, 19474781, 8 - tz.transition 1953, 3, :o1, 29213251, 12 - tz.transition 1963, 10, :o2, 19506605, 8 - tz.transition 1964, 3, :o1, 29261467, 12 - tz.transition 1965, 1, :o2, 19510333, 8 - tz.transition 1965, 3, :o1, 29266207, 12 - tz.transition 1965, 12, :o2, 19512765, 8 - tz.transition 1966, 3, :o1, 29270227, 12 - tz.transition 1966, 11, :o2, 19515445, 8 - tz.transition 1967, 3, :o1, 29274607, 12 - tz.transition 1967, 11, :o2, 19518365, 8 - tz.transition 1968, 3, :o1, 29278999, 12 - tz.transition 1985, 11, :o2, 499748400 - tz.transition 1986, 3, :o1, 511236000 - tz.transition 1986, 10, :o2, 530593200 - tz.transition 1987, 2, :o1, 540266400 - tz.transition 1987, 10, :o2, 562129200 - tz.transition 1988, 2, :o1, 571197600 - tz.transition 1988, 10, :o2, 592974000 - tz.transition 1989, 1, :o1, 602042400 - tz.transition 1989, 10, :o2, 624423600 - tz.transition 1990, 2, :o1, 634701600 - tz.transition 1990, 10, :o2, 656478000 - tz.transition 1991, 2, :o1, 666756000 - tz.transition 1991, 10, :o2, 687927600 - tz.transition 1992, 2, :o1, 697600800 - tz.transition 1992, 10, :o2, 719982000 - tz.transition 1993, 1, :o1, 728445600 - tz.transition 1993, 10, :o2, 750826800 - tz.transition 1994, 2, :o1, 761709600 - tz.transition 1994, 10, :o2, 782276400 - tz.transition 1995, 2, :o1, 793159200 - tz.transition 1995, 10, :o2, 813726000 - tz.transition 1996, 2, :o1, 824004000 - tz.transition 1996, 10, :o2, 844570800 - tz.transition 1997, 2, :o1, 856058400 - tz.transition 1997, 10, :o2, 876106800 - tz.transition 1998, 3, :o1, 888717600 - tz.transition 1998, 10, :o2, 908074800 - tz.transition 1999, 2, :o1, 919562400 - tz.transition 1999, 10, :o2, 938919600 - tz.transition 2000, 2, :o1, 951616800 - tz.transition 2000, 10, :o2, 970974000 - tz.transition 2001, 2, :o1, 982461600 - tz.transition 2001, 10, :o2, 1003028400 - tz.transition 2002, 2, :o1, 1013911200 - tz.transition 2002, 11, :o2, 1036292400 - tz.transition 2003, 2, :o1, 1045360800 - tz.transition 2003, 10, :o2, 1066532400 - tz.transition 2004, 2, :o1, 1076810400 - tz.transition 2004, 11, :o2, 1099364400 - tz.transition 2005, 2, :o1, 1108864800 - tz.transition 2005, 10, :o2, 1129431600 - tz.transition 2006, 2, :o1, 1140314400 - tz.transition 2006, 11, :o2, 1162695600 - tz.transition 2007, 2, :o1, 1172368800 - tz.transition 2007, 10, :o2, 1192330800 - tz.transition 2008, 2, :o1, 1203213600 - tz.transition 2008, 10, :o2, 1224385200 - tz.transition 2009, 2, :o1, 1234663200 - tz.transition 2009, 10, :o2, 1255834800 - tz.transition 2010, 2, :o1, 1266717600 - tz.transition 2010, 10, :o2, 1287284400 - tz.transition 2011, 2, :o1, 1298167200 - tz.transition 2011, 10, :o2, 1318734000 - tz.transition 2012, 2, :o1, 1330221600 - tz.transition 2012, 10, :o2, 1350788400 - tz.transition 2013, 2, :o1, 1361066400 - tz.transition 2013, 10, :o2, 1382238000 - tz.transition 2014, 2, :o1, 1392516000 - tz.transition 2014, 10, :o2, 1413687600 - tz.transition 2015, 2, :o1, 1424570400 - tz.transition 2015, 10, :o2, 1445137200 - tz.transition 2016, 2, :o1, 1456020000 - tz.transition 2016, 10, :o2, 1476586800 - tz.transition 2017, 2, :o1, 1487469600 - tz.transition 2017, 10, :o2, 1508036400 - tz.transition 2018, 2, :o1, 1518919200 - tz.transition 2018, 10, :o2, 1540090800 - tz.transition 2019, 2, :o1, 1550368800 - tz.transition 2019, 10, :o2, 1571540400 - tz.transition 2020, 2, :o1, 1581818400 - tz.transition 2020, 10, :o2, 1602990000 - tz.transition 2021, 2, :o1, 1613872800 - tz.transition 2021, 10, :o2, 1634439600 - tz.transition 2022, 2, :o1, 1645322400 - tz.transition 2022, 10, :o2, 1665889200 - tz.transition 2023, 2, :o1, 1677376800 - tz.transition 2023, 10, :o2, 1697338800 - tz.transition 2024, 2, :o1, 1708221600 - tz.transition 2024, 10, :o2, 1729393200 - tz.transition 2025, 2, :o1, 1739671200 - tz.transition 2025, 10, :o2, 1760842800 - tz.transition 2026, 2, :o1, 1771725600 - tz.transition 2026, 10, :o2, 1792292400 - tz.transition 2027, 2, :o1, 1803175200 - tz.transition 2027, 10, :o2, 1823742000 - tz.transition 2028, 2, :o1, 1834624800 - tz.transition 2028, 10, :o2, 1855191600 - tz.transition 2029, 2, :o1, 1866074400 - tz.transition 2029, 10, :o2, 1887246000 - tz.transition 2030, 2, :o1, 1897524000 - tz.transition 2030, 10, :o2, 1918695600 - tz.transition 2031, 2, :o1, 1928973600 - tz.transition 2031, 10, :o2, 1950145200 - tz.transition 2032, 2, :o1, 1960423200 - tz.transition 2032, 10, :o2, 1981594800 - tz.transition 2033, 2, :o1, 1992477600 - tz.transition 2033, 10, :o2, 2013044400 - tz.transition 2034, 2, :o1, 2024532000 - tz.transition 2034, 10, :o2, 2044494000 - tz.transition 2035, 2, :o1, 2055376800 - tz.transition 2035, 10, :o2, 2076548400 - tz.transition 2036, 2, :o1, 2086826400 - tz.transition 2036, 10, :o2, 2107998000 - tz.transition 2037, 2, :o1, 2118880800 - tz.transition 2037, 10, :o2, 2139447600 - tz.transition 2038, 2, :o1, 29585707, 12 - tz.transition 2038, 10, :o2, 19725709, 8 - tz.transition 2039, 2, :o1, 29590075, 12 - tz.transition 2039, 10, :o2, 19728621, 8 - tz.transition 2040, 2, :o1, 29594443, 12 - tz.transition 2040, 10, :o2, 19731589, 8 - tz.transition 2041, 2, :o1, 29598811, 12 - tz.transition 2041, 10, :o2, 19734501, 8 - tz.transition 2042, 2, :o1, 29603179, 12 - tz.transition 2042, 10, :o2, 19737413, 8 - tz.transition 2043, 2, :o1, 29607547, 12 - tz.transition 2043, 10, :o2, 19740325, 8 - tz.transition 2044, 2, :o1, 29611999, 12 - tz.transition 2044, 10, :o2, 19743237, 8 - tz.transition 2045, 2, :o1, 29616367, 12 - tz.transition 2045, 10, :o2, 19746149, 8 - tz.transition 2046, 2, :o1, 29620735, 12 - tz.transition 2046, 10, :o2, 19749117, 8 - tz.transition 2047, 2, :o1, 29625103, 12 - tz.transition 2047, 10, :o2, 19752029, 8 - tz.transition 2048, 2, :o1, 29629471, 12 - tz.transition 2048, 10, :o2, 19754941, 8 - tz.transition 2049, 2, :o1, 29633923, 12 - tz.transition 2049, 10, :o2, 19757853, 8 - tz.transition 2050, 2, :o1, 29638291, 12 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/St_Johns.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/St_Johns.rb deleted file mode 100644 index e4a3599d35..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/St_Johns.rb +++ /dev/null @@ -1,288 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module St_Johns - include TimezoneDefinition - - timezone 'America/St_Johns' do |tz| - tz.offset :o0, -12652, 0, :LMT - tz.offset :o1, -12652, 0, :NST - tz.offset :o2, -12652, 3600, :NDT - tz.offset :o3, -12600, 0, :NST - tz.offset :o4, -12600, 3600, :NDT - tz.offset :o5, -12600, 3600, :NWT - tz.offset :o6, -12600, 3600, :NPT - tz.offset :o7, -12600, 7200, :NDDT - - tz.transition 1884, 1, :o1, 52038215563, 21600 - tz.transition 1917, 4, :o2, 52300657363, 21600 - tz.transition 1917, 9, :o1, 52304155663, 21600 - tz.transition 1918, 4, :o2, 52308670963, 21600 - tz.transition 1918, 10, :o1, 52312990063, 21600 - tz.transition 1919, 5, :o2, 52317027463, 21600 - tz.transition 1919, 8, :o1, 52319164963, 21600 - tz.transition 1920, 5, :o2, 52324868263, 21600 - tz.transition 1920, 11, :o1, 52328798563, 21600 - tz.transition 1921, 5, :o2, 52332730663, 21600 - tz.transition 1921, 10, :o1, 52336660963, 21600 - tz.transition 1922, 5, :o2, 52340744263, 21600 - tz.transition 1922, 10, :o1, 52344523363, 21600 - tz.transition 1923, 5, :o2, 52348606663, 21600 - tz.transition 1923, 10, :o1, 52352385763, 21600 - tz.transition 1924, 5, :o2, 52356469063, 21600 - tz.transition 1924, 10, :o1, 52360248163, 21600 - tz.transition 1925, 5, :o2, 52364331463, 21600 - tz.transition 1925, 10, :o1, 52368110563, 21600 - tz.transition 1926, 5, :o2, 52372193863, 21600 - tz.transition 1926, 11, :o1, 52376124163, 21600 - tz.transition 1927, 5, :o2, 52380056263, 21600 - tz.transition 1927, 10, :o1, 52383986563, 21600 - tz.transition 1928, 5, :o2, 52388069863, 21600 - tz.transition 1928, 10, :o1, 52391848963, 21600 - tz.transition 1929, 5, :o2, 52395932263, 21600 - tz.transition 1929, 10, :o1, 52399711363, 21600 - tz.transition 1930, 5, :o2, 52403794663, 21600 - tz.transition 1930, 10, :o1, 52407573763, 21600 - tz.transition 1931, 5, :o2, 52411657063, 21600 - tz.transition 1931, 10, :o1, 52415436163, 21600 - tz.transition 1932, 5, :o2, 52419519463, 21600 - tz.transition 1932, 10, :o1, 52423449763, 21600 - tz.transition 1933, 5, :o2, 52427533063, 21600 - tz.transition 1933, 10, :o1, 52431312163, 21600 - tz.transition 1934, 5, :o2, 52435395463, 21600 - tz.transition 1934, 10, :o1, 52439174563, 21600 - tz.transition 1935, 3, :o3, 52442459563, 21600 - tz.transition 1935, 5, :o4, 116540573, 48 - tz.transition 1935, 10, :o3, 38849657, 16 - tz.transition 1936, 5, :o4, 116558383, 48 - tz.transition 1936, 10, :o3, 116565437, 48 - tz.transition 1937, 5, :o4, 116575855, 48 - tz.transition 1937, 10, :o3, 116582909, 48 - tz.transition 1938, 5, :o4, 116593327, 48 - tz.transition 1938, 10, :o3, 116600381, 48 - tz.transition 1939, 5, :o4, 116611135, 48 - tz.transition 1939, 10, :o3, 116617853, 48 - tz.transition 1940, 5, :o4, 116628607, 48 - tz.transition 1940, 10, :o3, 116635661, 48 - tz.transition 1941, 5, :o4, 116646079, 48 - tz.transition 1941, 10, :o3, 116653133, 48 - tz.transition 1942, 5, :o5, 116663551, 48 - tz.transition 1945, 8, :o6, 58360379, 24 - tz.transition 1945, 9, :o3, 38907659, 16 - tz.transition 1946, 5, :o4, 116733731, 48 - tz.transition 1946, 10, :o3, 38913595, 16 - tz.transition 1947, 5, :o4, 116751203, 48 - tz.transition 1947, 10, :o3, 38919419, 16 - tz.transition 1948, 5, :o4, 116768675, 48 - tz.transition 1948, 10, :o3, 38925243, 16 - tz.transition 1949, 5, :o4, 116786147, 48 - tz.transition 1949, 10, :o3, 38931067, 16 - tz.transition 1950, 5, :o4, 116803955, 48 - tz.transition 1950, 10, :o3, 38937003, 16 - tz.transition 1951, 4, :o4, 116820755, 48 - tz.transition 1951, 9, :o3, 38942715, 16 - tz.transition 1952, 4, :o4, 116838227, 48 - tz.transition 1952, 9, :o3, 38948539, 16 - tz.transition 1953, 4, :o4, 116855699, 48 - tz.transition 1953, 9, :o3, 38954363, 16 - tz.transition 1954, 4, :o4, 116873171, 48 - tz.transition 1954, 9, :o3, 38960187, 16 - tz.transition 1955, 4, :o4, 116890643, 48 - tz.transition 1955, 9, :o3, 38966011, 16 - tz.transition 1956, 4, :o4, 116908451, 48 - tz.transition 1956, 9, :o3, 38971947, 16 - tz.transition 1957, 4, :o4, 116925923, 48 - tz.transition 1957, 9, :o3, 38977771, 16 - tz.transition 1958, 4, :o4, 116943395, 48 - tz.transition 1958, 9, :o3, 38983595, 16 - tz.transition 1959, 4, :o4, 116960867, 48 - tz.transition 1959, 9, :o3, 38989419, 16 - tz.transition 1960, 4, :o4, 116978339, 48 - tz.transition 1960, 10, :o3, 38995803, 16 - tz.transition 1961, 4, :o4, 116996147, 48 - tz.transition 1961, 10, :o3, 39001627, 16 - tz.transition 1962, 4, :o4, 117013619, 48 - tz.transition 1962, 10, :o3, 39007451, 16 - tz.transition 1963, 4, :o4, 117031091, 48 - tz.transition 1963, 10, :o3, 39013275, 16 - tz.transition 1964, 4, :o4, 117048563, 48 - tz.transition 1964, 10, :o3, 39019099, 16 - tz.transition 1965, 4, :o4, 117066035, 48 - tz.transition 1965, 10, :o3, 39025035, 16 - tz.transition 1966, 4, :o4, 117083507, 48 - tz.transition 1966, 10, :o3, 39030859, 16 - tz.transition 1967, 4, :o4, 117101315, 48 - tz.transition 1967, 10, :o3, 39036683, 16 - tz.transition 1968, 4, :o4, 117118787, 48 - tz.transition 1968, 10, :o3, 39042507, 16 - tz.transition 1969, 4, :o4, 117136259, 48 - tz.transition 1969, 10, :o3, 39048331, 16 - tz.transition 1970, 4, :o4, 9955800 - tz.transition 1970, 10, :o3, 25677000 - tz.transition 1971, 4, :o4, 41405400 - tz.transition 1971, 10, :o3, 57731400 - tz.transition 1972, 4, :o4, 73459800 - tz.transition 1972, 10, :o3, 89181000 - tz.transition 1973, 4, :o4, 104909400 - tz.transition 1973, 10, :o3, 120630600 - tz.transition 1974, 4, :o4, 136359000 - tz.transition 1974, 10, :o3, 152080200 - tz.transition 1975, 4, :o4, 167808600 - tz.transition 1975, 10, :o3, 183529800 - tz.transition 1976, 4, :o4, 199258200 - tz.transition 1976, 10, :o3, 215584200 - tz.transition 1977, 4, :o4, 230707800 - tz.transition 1977, 10, :o3, 247033800 - tz.transition 1978, 4, :o4, 262762200 - tz.transition 1978, 10, :o3, 278483400 - tz.transition 1979, 4, :o4, 294211800 - tz.transition 1979, 10, :o3, 309933000 - tz.transition 1980, 4, :o4, 325661400 - tz.transition 1980, 10, :o3, 341382600 - tz.transition 1981, 4, :o4, 357111000 - tz.transition 1981, 10, :o3, 372832200 - tz.transition 1982, 4, :o4, 388560600 - tz.transition 1982, 10, :o3, 404886600 - tz.transition 1983, 4, :o4, 420010200 - tz.transition 1983, 10, :o3, 436336200 - tz.transition 1984, 4, :o4, 452064600 - tz.transition 1984, 10, :o3, 467785800 - tz.transition 1985, 4, :o4, 483514200 - tz.transition 1985, 10, :o3, 499235400 - tz.transition 1986, 4, :o4, 514963800 - tz.transition 1986, 10, :o3, 530685000 - tz.transition 1987, 4, :o4, 544591860 - tz.transition 1987, 10, :o3, 562127460 - tz.transition 1988, 4, :o7, 576041460 - tz.transition 1988, 10, :o3, 594178260 - tz.transition 1989, 4, :o4, 607491060 - tz.transition 1989, 10, :o3, 625631460 - tz.transition 1990, 4, :o4, 638940660 - tz.transition 1990, 10, :o3, 657081060 - tz.transition 1991, 4, :o4, 670995060 - tz.transition 1991, 10, :o3, 688530660 - tz.transition 1992, 4, :o4, 702444660 - tz.transition 1992, 10, :o3, 719980260 - tz.transition 1993, 4, :o4, 733894260 - tz.transition 1993, 10, :o3, 752034660 - tz.transition 1994, 4, :o4, 765343860 - tz.transition 1994, 10, :o3, 783484260 - tz.transition 1995, 4, :o4, 796793460 - tz.transition 1995, 10, :o3, 814933860 - tz.transition 1996, 4, :o4, 828847860 - tz.transition 1996, 10, :o3, 846383460 - tz.transition 1997, 4, :o4, 860297460 - tz.transition 1997, 10, :o3, 877833060 - tz.transition 1998, 4, :o4, 891747060 - tz.transition 1998, 10, :o3, 909282660 - tz.transition 1999, 4, :o4, 923196660 - tz.transition 1999, 10, :o3, 941337060 - tz.transition 2000, 4, :o4, 954646260 - tz.transition 2000, 10, :o3, 972786660 - tz.transition 2001, 4, :o4, 986095860 - tz.transition 2001, 10, :o3, 1004236260 - tz.transition 2002, 4, :o4, 1018150260 - tz.transition 2002, 10, :o3, 1035685860 - tz.transition 2003, 4, :o4, 1049599860 - tz.transition 2003, 10, :o3, 1067135460 - tz.transition 2004, 4, :o4, 1081049460 - tz.transition 2004, 10, :o3, 1099189860 - tz.transition 2005, 4, :o4, 1112499060 - tz.transition 2005, 10, :o3, 1130639460 - tz.transition 2006, 4, :o4, 1143948660 - tz.transition 2006, 10, :o3, 1162089060 - tz.transition 2007, 3, :o4, 1173583860 - tz.transition 2007, 11, :o3, 1194143460 - tz.transition 2008, 3, :o4, 1205033460 - tz.transition 2008, 11, :o3, 1225593060 - tz.transition 2009, 3, :o4, 1236483060 - tz.transition 2009, 11, :o3, 1257042660 - tz.transition 2010, 3, :o4, 1268537460 - tz.transition 2010, 11, :o3, 1289097060 - tz.transition 2011, 3, :o4, 1299987060 - tz.transition 2011, 11, :o3, 1320546660 - tz.transition 2012, 3, :o4, 1331436660 - tz.transition 2012, 11, :o3, 1351996260 - tz.transition 2013, 3, :o4, 1362886260 - tz.transition 2013, 11, :o3, 1383445860 - tz.transition 2014, 3, :o4, 1394335860 - tz.transition 2014, 11, :o3, 1414895460 - tz.transition 2015, 3, :o4, 1425785460 - tz.transition 2015, 11, :o3, 1446345060 - tz.transition 2016, 3, :o4, 1457839860 - tz.transition 2016, 11, :o3, 1478399460 - tz.transition 2017, 3, :o4, 1489289460 - tz.transition 2017, 11, :o3, 1509849060 - tz.transition 2018, 3, :o4, 1520739060 - tz.transition 2018, 11, :o3, 1541298660 - tz.transition 2019, 3, :o4, 1552188660 - tz.transition 2019, 11, :o3, 1572748260 - tz.transition 2020, 3, :o4, 1583638260 - tz.transition 2020, 11, :o3, 1604197860 - tz.transition 2021, 3, :o4, 1615692660 - tz.transition 2021, 11, :o3, 1636252260 - tz.transition 2022, 3, :o4, 1647142260 - tz.transition 2022, 11, :o3, 1667701860 - tz.transition 2023, 3, :o4, 1678591860 - tz.transition 2023, 11, :o3, 1699151460 - tz.transition 2024, 3, :o4, 1710041460 - tz.transition 2024, 11, :o3, 1730601060 - tz.transition 2025, 3, :o4, 1741491060 - tz.transition 2025, 11, :o3, 1762050660 - tz.transition 2026, 3, :o4, 1772940660 - tz.transition 2026, 11, :o3, 1793500260 - tz.transition 2027, 3, :o4, 1804995060 - tz.transition 2027, 11, :o3, 1825554660 - tz.transition 2028, 3, :o4, 1836444660 - tz.transition 2028, 11, :o3, 1857004260 - tz.transition 2029, 3, :o4, 1867894260 - tz.transition 2029, 11, :o3, 1888453860 - tz.transition 2030, 3, :o4, 1899343860 - tz.transition 2030, 11, :o3, 1919903460 - tz.transition 2031, 3, :o4, 1930793460 - tz.transition 2031, 11, :o3, 1951353060 - tz.transition 2032, 3, :o4, 1962847860 - tz.transition 2032, 11, :o3, 1983407460 - tz.transition 2033, 3, :o4, 1994297460 - tz.transition 2033, 11, :o3, 2014857060 - tz.transition 2034, 3, :o4, 2025747060 - tz.transition 2034, 11, :o3, 2046306660 - tz.transition 2035, 3, :o4, 2057196660 - tz.transition 2035, 11, :o3, 2077756260 - tz.transition 2036, 3, :o4, 2088646260 - tz.transition 2036, 11, :o3, 2109205860 - tz.transition 2037, 3, :o4, 2120095860 - tz.transition 2037, 11, :o3, 2140655460 - tz.transition 2038, 3, :o4, 3550315171, 1440 - tz.transition 2038, 11, :o3, 3550657831, 1440 - tz.transition 2039, 3, :o4, 3550839331, 1440 - tz.transition 2039, 11, :o3, 3551181991, 1440 - tz.transition 2040, 3, :o4, 3551363491, 1440 - tz.transition 2040, 11, :o3, 3551706151, 1440 - tz.transition 2041, 3, :o4, 3551887651, 1440 - tz.transition 2041, 11, :o3, 3552230311, 1440 - tz.transition 2042, 3, :o4, 3552411811, 1440 - tz.transition 2042, 11, :o3, 3552754471, 1440 - tz.transition 2043, 3, :o4, 3552935971, 1440 - tz.transition 2043, 11, :o3, 3553278631, 1440 - tz.transition 2044, 3, :o4, 3553470211, 1440 - tz.transition 2044, 11, :o3, 3553812871, 1440 - tz.transition 2045, 3, :o4, 3553994371, 1440 - tz.transition 2045, 11, :o3, 3554337031, 1440 - tz.transition 2046, 3, :o4, 3554518531, 1440 - tz.transition 2046, 11, :o3, 3554861191, 1440 - tz.transition 2047, 3, :o4, 3555042691, 1440 - tz.transition 2047, 11, :o3, 3555385351, 1440 - tz.transition 2048, 3, :o4, 3555566851, 1440 - tz.transition 2048, 11, :o3, 3555909511, 1440 - tz.transition 2049, 3, :o4, 3556101091, 1440 - tz.transition 2049, 11, :o3, 3556443751, 1440 - tz.transition 2050, 3, :o4, 3556625251, 1440 - tz.transition 2050, 11, :o3, 3556967911, 1440 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Tijuana.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Tijuana.rb deleted file mode 100644 index 423059da46..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/America/Tijuana.rb +++ /dev/null @@ -1,196 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Tijuana - include TimezoneDefinition - - timezone 'America/Tijuana' do |tz| - tz.offset :o0, -28084, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -28800, 0, :PST - tz.offset :o3, -28800, 3600, :PDT - tz.offset :o4, -28800, 3600, :PWT - tz.offset :o5, -28800, 3600, :PPT - - tz.transition 1922, 1, :o1, 14538335, 6 - tz.transition 1924, 1, :o2, 58170859, 24 - tz.transition 1927, 6, :o1, 58201027, 24 - tz.transition 1930, 11, :o2, 58231099, 24 - tz.transition 1931, 4, :o3, 14558597, 6 - tz.transition 1931, 9, :o2, 58238755, 24 - tz.transition 1942, 4, :o4, 14582843, 6 - tz.transition 1945, 8, :o5, 58360379, 24 - tz.transition 1945, 11, :o2, 58362523, 24 - tz.transition 1948, 4, :o3, 14595881, 6 - tz.transition 1949, 1, :o2, 58390339, 24 - tz.transition 1954, 4, :o3, 29218295, 12 - tz.transition 1954, 9, :o2, 19480095, 8 - tz.transition 1955, 4, :o3, 29222663, 12 - tz.transition 1955, 9, :o2, 19483007, 8 - tz.transition 1956, 4, :o3, 29227115, 12 - tz.transition 1956, 9, :o2, 19485975, 8 - tz.transition 1957, 4, :o3, 29231483, 12 - tz.transition 1957, 9, :o2, 19488887, 8 - tz.transition 1958, 4, :o3, 29235851, 12 - tz.transition 1958, 9, :o2, 19491799, 8 - tz.transition 1959, 4, :o3, 29240219, 12 - tz.transition 1959, 9, :o2, 19494711, 8 - tz.transition 1960, 4, :o3, 29244587, 12 - tz.transition 1960, 9, :o2, 19497623, 8 - tz.transition 1976, 4, :o3, 199274400 - tz.transition 1976, 10, :o2, 215600400 - tz.transition 1977, 4, :o3, 230724000 - tz.transition 1977, 10, :o2, 247050000 - tz.transition 1978, 4, :o3, 262778400 - tz.transition 1978, 10, :o2, 278499600 - tz.transition 1979, 4, :o3, 294228000 - tz.transition 1979, 10, :o2, 309949200 - tz.transition 1980, 4, :o3, 325677600 - tz.transition 1980, 10, :o2, 341398800 - tz.transition 1981, 4, :o3, 357127200 - tz.transition 1981, 10, :o2, 372848400 - tz.transition 1982, 4, :o3, 388576800 - tz.transition 1982, 10, :o2, 404902800 - tz.transition 1983, 4, :o3, 420026400 - tz.transition 1983, 10, :o2, 436352400 - tz.transition 1984, 4, :o3, 452080800 - tz.transition 1984, 10, :o2, 467802000 - tz.transition 1985, 4, :o3, 483530400 - tz.transition 1985, 10, :o2, 499251600 - tz.transition 1986, 4, :o3, 514980000 - tz.transition 1986, 10, :o2, 530701200 - tz.transition 1987, 4, :o3, 544615200 - tz.transition 1987, 10, :o2, 562150800 - tz.transition 1988, 4, :o3, 576064800 - tz.transition 1988, 10, :o2, 594205200 - tz.transition 1989, 4, :o3, 607514400 - tz.transition 1989, 10, :o2, 625654800 - tz.transition 1990, 4, :o3, 638964000 - tz.transition 1990, 10, :o2, 657104400 - tz.transition 1991, 4, :o3, 671018400 - tz.transition 1991, 10, :o2, 688554000 - tz.transition 1992, 4, :o3, 702468000 - tz.transition 1992, 10, :o2, 720003600 - tz.transition 1993, 4, :o3, 733917600 - tz.transition 1993, 10, :o2, 752058000 - tz.transition 1994, 4, :o3, 765367200 - tz.transition 1994, 10, :o2, 783507600 - tz.transition 1995, 4, :o3, 796816800 - tz.transition 1995, 10, :o2, 814957200 - tz.transition 1996, 4, :o3, 828871200 - tz.transition 1996, 10, :o2, 846406800 - tz.transition 1997, 4, :o3, 860320800 - tz.transition 1997, 10, :o2, 877856400 - tz.transition 1998, 4, :o3, 891770400 - tz.transition 1998, 10, :o2, 909306000 - tz.transition 1999, 4, :o3, 923220000 - tz.transition 1999, 10, :o2, 941360400 - tz.transition 2000, 4, :o3, 954669600 - tz.transition 2000, 10, :o2, 972810000 - tz.transition 2001, 4, :o3, 986119200 - tz.transition 2001, 10, :o2, 1004259600 - tz.transition 2002, 4, :o3, 1018173600 - tz.transition 2002, 10, :o2, 1035709200 - tz.transition 2003, 4, :o3, 1049623200 - tz.transition 2003, 10, :o2, 1067158800 - tz.transition 2004, 4, :o3, 1081072800 - tz.transition 2004, 10, :o2, 1099213200 - tz.transition 2005, 4, :o3, 1112522400 - tz.transition 2005, 10, :o2, 1130662800 - tz.transition 2006, 4, :o3, 1143972000 - tz.transition 2006, 10, :o2, 1162112400 - tz.transition 2007, 4, :o3, 1175421600 - tz.transition 2007, 10, :o2, 1193562000 - tz.transition 2008, 4, :o3, 1207476000 - tz.transition 2008, 10, :o2, 1225011600 - tz.transition 2009, 4, :o3, 1238925600 - tz.transition 2009, 10, :o2, 1256461200 - tz.transition 2010, 4, :o3, 1270375200 - tz.transition 2010, 10, :o2, 1288515600 - tz.transition 2011, 4, :o3, 1301824800 - tz.transition 2011, 10, :o2, 1319965200 - tz.transition 2012, 4, :o3, 1333274400 - tz.transition 2012, 10, :o2, 1351414800 - tz.transition 2013, 4, :o3, 1365328800 - tz.transition 2013, 10, :o2, 1382864400 - tz.transition 2014, 4, :o3, 1396778400 - tz.transition 2014, 10, :o2, 1414314000 - tz.transition 2015, 4, :o3, 1428228000 - tz.transition 2015, 10, :o2, 1445763600 - tz.transition 2016, 4, :o3, 1459677600 - tz.transition 2016, 10, :o2, 1477818000 - tz.transition 2017, 4, :o3, 1491127200 - tz.transition 2017, 10, :o2, 1509267600 - tz.transition 2018, 4, :o3, 1522576800 - tz.transition 2018, 10, :o2, 1540717200 - tz.transition 2019, 4, :o3, 1554631200 - tz.transition 2019, 10, :o2, 1572166800 - tz.transition 2020, 4, :o3, 1586080800 - tz.transition 2020, 10, :o2, 1603616400 - tz.transition 2021, 4, :o3, 1617530400 - tz.transition 2021, 10, :o2, 1635670800 - tz.transition 2022, 4, :o3, 1648980000 - tz.transition 2022, 10, :o2, 1667120400 - tz.transition 2023, 4, :o3, 1680429600 - tz.transition 2023, 10, :o2, 1698570000 - tz.transition 2024, 4, :o3, 1712484000 - tz.transition 2024, 10, :o2, 1730019600 - tz.transition 2025, 4, :o3, 1743933600 - tz.transition 2025, 10, :o2, 1761469200 - tz.transition 2026, 4, :o3, 1775383200 - tz.transition 2026, 10, :o2, 1792918800 - tz.transition 2027, 4, :o3, 1806832800 - tz.transition 2027, 10, :o2, 1824973200 - tz.transition 2028, 4, :o3, 1838282400 - tz.transition 2028, 10, :o2, 1856422800 - tz.transition 2029, 4, :o3, 1869732000 - tz.transition 2029, 10, :o2, 1887872400 - tz.transition 2030, 4, :o3, 1901786400 - tz.transition 2030, 10, :o2, 1919322000 - tz.transition 2031, 4, :o3, 1933236000 - tz.transition 2031, 10, :o2, 1950771600 - tz.transition 2032, 4, :o3, 1964685600 - tz.transition 2032, 10, :o2, 1982826000 - tz.transition 2033, 4, :o3, 1996135200 - tz.transition 2033, 10, :o2, 2014275600 - tz.transition 2034, 4, :o3, 2027584800 - tz.transition 2034, 10, :o2, 2045725200 - tz.transition 2035, 4, :o3, 2059034400 - tz.transition 2035, 10, :o2, 2077174800 - tz.transition 2036, 4, :o3, 2091088800 - tz.transition 2036, 10, :o2, 2108624400 - tz.transition 2037, 4, :o3, 2122538400 - tz.transition 2037, 10, :o2, 2140074000 - tz.transition 2038, 4, :o3, 29586215, 12 - tz.transition 2038, 10, :o2, 19725823, 8 - tz.transition 2039, 4, :o3, 29590583, 12 - tz.transition 2039, 10, :o2, 19728735, 8 - tz.transition 2040, 4, :o3, 29594951, 12 - tz.transition 2040, 10, :o2, 19731647, 8 - tz.transition 2041, 4, :o3, 29599403, 12 - tz.transition 2041, 10, :o2, 19734559, 8 - tz.transition 2042, 4, :o3, 29603771, 12 - tz.transition 2042, 10, :o2, 19737471, 8 - tz.transition 2043, 4, :o3, 29608139, 12 - tz.transition 2043, 10, :o2, 19740383, 8 - tz.transition 2044, 4, :o3, 29612507, 12 - tz.transition 2044, 10, :o2, 19743351, 8 - tz.transition 2045, 4, :o3, 29616875, 12 - tz.transition 2045, 10, :o2, 19746263, 8 - tz.transition 2046, 4, :o3, 29621243, 12 - tz.transition 2046, 10, :o2, 19749175, 8 - tz.transition 2047, 4, :o3, 29625695, 12 - tz.transition 2047, 10, :o2, 19752087, 8 - tz.transition 2048, 4, :o3, 29630063, 12 - tz.transition 2048, 10, :o2, 19754999, 8 - tz.transition 2049, 4, :o3, 29634431, 12 - tz.transition 2049, 10, :o2, 19757967, 8 - tz.transition 2050, 4, :o3, 29638799, 12 - tz.transition 2050, 10, :o2, 19760879, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Almaty.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Almaty.rb deleted file mode 100644 index 9ee18970f1..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Almaty.rb +++ /dev/null @@ -1,67 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Almaty - include TimezoneDefinition - - timezone 'Asia/Almaty' do |tz| - tz.offset :o0, 18468, 0, :LMT - tz.offset :o1, 18000, 0, :ALMT - tz.offset :o2, 21600, 0, :ALMT - tz.offset :o3, 21600, 3600, :ALMST - - tz.transition 1924, 5, :o1, 1939125829, 800 - tz.transition 1930, 6, :o2, 58227559, 24 - tz.transition 1981, 3, :o3, 354909600 - tz.transition 1981, 9, :o2, 370717200 - tz.transition 1982, 3, :o3, 386445600 - tz.transition 1982, 9, :o2, 402253200 - tz.transition 1983, 3, :o3, 417981600 - tz.transition 1983, 9, :o2, 433789200 - tz.transition 1984, 3, :o3, 449604000 - tz.transition 1984, 9, :o2, 465336000 - tz.transition 1985, 3, :o3, 481060800 - tz.transition 1985, 9, :o2, 496785600 - tz.transition 1986, 3, :o3, 512510400 - tz.transition 1986, 9, :o2, 528235200 - tz.transition 1987, 3, :o3, 543960000 - tz.transition 1987, 9, :o2, 559684800 - tz.transition 1988, 3, :o3, 575409600 - tz.transition 1988, 9, :o2, 591134400 - tz.transition 1989, 3, :o3, 606859200 - tz.transition 1989, 9, :o2, 622584000 - tz.transition 1990, 3, :o3, 638308800 - tz.transition 1990, 9, :o2, 654638400 - tz.transition 1992, 3, :o3, 701802000 - tz.transition 1992, 9, :o2, 717523200 - tz.transition 1993, 3, :o3, 733262400 - tz.transition 1993, 9, :o2, 748987200 - tz.transition 1994, 3, :o3, 764712000 - tz.transition 1994, 9, :o2, 780436800 - tz.transition 1995, 3, :o3, 796161600 - tz.transition 1995, 9, :o2, 811886400 - tz.transition 1996, 3, :o3, 828216000 - tz.transition 1996, 10, :o2, 846360000 - tz.transition 1997, 3, :o3, 859665600 - tz.transition 1997, 10, :o2, 877809600 - tz.transition 1998, 3, :o3, 891115200 - tz.transition 1998, 10, :o2, 909259200 - tz.transition 1999, 3, :o3, 922564800 - tz.transition 1999, 10, :o2, 941313600 - tz.transition 2000, 3, :o3, 954014400 - tz.transition 2000, 10, :o2, 972763200 - tz.transition 2001, 3, :o3, 985464000 - tz.transition 2001, 10, :o2, 1004212800 - tz.transition 2002, 3, :o3, 1017518400 - tz.transition 2002, 10, :o2, 1035662400 - tz.transition 2003, 3, :o3, 1048968000 - tz.transition 2003, 10, :o2, 1067112000 - tz.transition 2004, 3, :o3, 1080417600 - tz.transition 2004, 10, :o2, 1099166400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Baghdad.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Baghdad.rb deleted file mode 100644 index 774dca1587..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Baghdad.rb +++ /dev/null @@ -1,73 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Baghdad - include TimezoneDefinition - - timezone 'Asia/Baghdad' do |tz| - tz.offset :o0, 10660, 0, :LMT - tz.offset :o1, 10656, 0, :BMT - tz.offset :o2, 10800, 0, :AST - tz.offset :o3, 10800, 3600, :ADT - - tz.transition 1889, 12, :o1, 10417111387, 4320 - tz.transition 1917, 12, :o2, 726478313, 300 - tz.transition 1982, 4, :o3, 389048400 - tz.transition 1982, 9, :o2, 402264000 - tz.transition 1983, 3, :o3, 417906000 - tz.transition 1983, 9, :o2, 433800000 - tz.transition 1984, 3, :o3, 449614800 - tz.transition 1984, 9, :o2, 465422400 - tz.transition 1985, 3, :o3, 481150800 - tz.transition 1985, 9, :o2, 496792800 - tz.transition 1986, 3, :o3, 512517600 - tz.transition 1986, 9, :o2, 528242400 - tz.transition 1987, 3, :o3, 543967200 - tz.transition 1987, 9, :o2, 559692000 - tz.transition 1988, 3, :o3, 575416800 - tz.transition 1988, 9, :o2, 591141600 - tz.transition 1989, 3, :o3, 606866400 - tz.transition 1989, 9, :o2, 622591200 - tz.transition 1990, 3, :o3, 638316000 - tz.transition 1990, 9, :o2, 654645600 - tz.transition 1991, 4, :o3, 670464000 - tz.transition 1991, 10, :o2, 686275200 - tz.transition 1992, 4, :o3, 702086400 - tz.transition 1992, 10, :o2, 717897600 - tz.transition 1993, 4, :o3, 733622400 - tz.transition 1993, 10, :o2, 749433600 - tz.transition 1994, 4, :o3, 765158400 - tz.transition 1994, 10, :o2, 780969600 - tz.transition 1995, 4, :o3, 796694400 - tz.transition 1995, 10, :o2, 812505600 - tz.transition 1996, 4, :o3, 828316800 - tz.transition 1996, 10, :o2, 844128000 - tz.transition 1997, 4, :o3, 859852800 - tz.transition 1997, 10, :o2, 875664000 - tz.transition 1998, 4, :o3, 891388800 - tz.transition 1998, 10, :o2, 907200000 - tz.transition 1999, 4, :o3, 922924800 - tz.transition 1999, 10, :o2, 938736000 - tz.transition 2000, 4, :o3, 954547200 - tz.transition 2000, 10, :o2, 970358400 - tz.transition 2001, 4, :o3, 986083200 - tz.transition 2001, 10, :o2, 1001894400 - tz.transition 2002, 4, :o3, 1017619200 - tz.transition 2002, 10, :o2, 1033430400 - tz.transition 2003, 4, :o3, 1049155200 - tz.transition 2003, 10, :o2, 1064966400 - tz.transition 2004, 4, :o3, 1080777600 - tz.transition 2004, 10, :o2, 1096588800 - tz.transition 2005, 4, :o3, 1112313600 - tz.transition 2005, 10, :o2, 1128124800 - tz.transition 2006, 4, :o3, 1143849600 - tz.transition 2006, 10, :o2, 1159660800 - tz.transition 2007, 4, :o3, 1175385600 - tz.transition 2007, 10, :o2, 1191196800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Baku.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Baku.rb deleted file mode 100644 index e86340ebfa..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Baku.rb +++ /dev/null @@ -1,161 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Baku - include TimezoneDefinition - - timezone 'Asia/Baku' do |tz| - tz.offset :o0, 11964, 0, :LMT - tz.offset :o1, 10800, 0, :BAKT - tz.offset :o2, 14400, 0, :BAKT - tz.offset :o3, 14400, 3600, :BAKST - tz.offset :o4, 10800, 3600, :BAKST - tz.offset :o5, 10800, 3600, :AZST - tz.offset :o6, 10800, 0, :AZT - tz.offset :o7, 14400, 0, :AZT - tz.offset :o8, 14400, 3600, :AZST - - tz.transition 1924, 5, :o1, 17452133003, 7200 - tz.transition 1957, 2, :o2, 19487187, 8 - tz.transition 1981, 3, :o3, 354916800 - tz.transition 1981, 9, :o2, 370724400 - tz.transition 1982, 3, :o3, 386452800 - tz.transition 1982, 9, :o2, 402260400 - tz.transition 1983, 3, :o3, 417988800 - tz.transition 1983, 9, :o2, 433796400 - tz.transition 1984, 3, :o3, 449611200 - tz.transition 1984, 9, :o2, 465343200 - tz.transition 1985, 3, :o3, 481068000 - tz.transition 1985, 9, :o2, 496792800 - tz.transition 1986, 3, :o3, 512517600 - tz.transition 1986, 9, :o2, 528242400 - tz.transition 1987, 3, :o3, 543967200 - tz.transition 1987, 9, :o2, 559692000 - tz.transition 1988, 3, :o3, 575416800 - tz.transition 1988, 9, :o2, 591141600 - tz.transition 1989, 3, :o3, 606866400 - tz.transition 1989, 9, :o2, 622591200 - tz.transition 1990, 3, :o3, 638316000 - tz.transition 1990, 9, :o2, 654645600 - tz.transition 1991, 3, :o4, 670370400 - tz.transition 1991, 8, :o5, 683496000 - tz.transition 1991, 9, :o6, 686098800 - tz.transition 1992, 3, :o5, 701812800 - tz.transition 1992, 9, :o7, 717534000 - tz.transition 1996, 3, :o8, 828234000 - tz.transition 1996, 10, :o7, 846378000 - tz.transition 1997, 3, :o8, 859680000 - tz.transition 1997, 10, :o7, 877824000 - tz.transition 1998, 3, :o8, 891129600 - tz.transition 1998, 10, :o7, 909273600 - tz.transition 1999, 3, :o8, 922579200 - tz.transition 1999, 10, :o7, 941328000 - tz.transition 2000, 3, :o8, 954028800 - tz.transition 2000, 10, :o7, 972777600 - tz.transition 2001, 3, :o8, 985478400 - tz.transition 2001, 10, :o7, 1004227200 - tz.transition 2002, 3, :o8, 1017532800 - tz.transition 2002, 10, :o7, 1035676800 - tz.transition 2003, 3, :o8, 1048982400 - tz.transition 2003, 10, :o7, 1067126400 - tz.transition 2004, 3, :o8, 1080432000 - tz.transition 2004, 10, :o7, 1099180800 - tz.transition 2005, 3, :o8, 1111881600 - tz.transition 2005, 10, :o7, 1130630400 - tz.transition 2006, 3, :o8, 1143331200 - tz.transition 2006, 10, :o7, 1162080000 - tz.transition 2007, 3, :o8, 1174780800 - tz.transition 2007, 10, :o7, 1193529600 - tz.transition 2008, 3, :o8, 1206835200 - tz.transition 2008, 10, :o7, 1224979200 - tz.transition 2009, 3, :o8, 1238284800 - tz.transition 2009, 10, :o7, 1256428800 - tz.transition 2010, 3, :o8, 1269734400 - tz.transition 2010, 10, :o7, 1288483200 - tz.transition 2011, 3, :o8, 1301184000 - tz.transition 2011, 10, :o7, 1319932800 - tz.transition 2012, 3, :o8, 1332633600 - tz.transition 2012, 10, :o7, 1351382400 - tz.transition 2013, 3, :o8, 1364688000 - tz.transition 2013, 10, :o7, 1382832000 - tz.transition 2014, 3, :o8, 1396137600 - tz.transition 2014, 10, :o7, 1414281600 - tz.transition 2015, 3, :o8, 1427587200 - tz.transition 2015, 10, :o7, 1445731200 - tz.transition 2016, 3, :o8, 1459036800 - tz.transition 2016, 10, :o7, 1477785600 - tz.transition 2017, 3, :o8, 1490486400 - tz.transition 2017, 10, :o7, 1509235200 - tz.transition 2018, 3, :o8, 1521936000 - tz.transition 2018, 10, :o7, 1540684800 - tz.transition 2019, 3, :o8, 1553990400 - tz.transition 2019, 10, :o7, 1572134400 - tz.transition 2020, 3, :o8, 1585440000 - tz.transition 2020, 10, :o7, 1603584000 - tz.transition 2021, 3, :o8, 1616889600 - tz.transition 2021, 10, :o7, 1635638400 - tz.transition 2022, 3, :o8, 1648339200 - tz.transition 2022, 10, :o7, 1667088000 - tz.transition 2023, 3, :o8, 1679788800 - tz.transition 2023, 10, :o7, 1698537600 - tz.transition 2024, 3, :o8, 1711843200 - tz.transition 2024, 10, :o7, 1729987200 - tz.transition 2025, 3, :o8, 1743292800 - tz.transition 2025, 10, :o7, 1761436800 - tz.transition 2026, 3, :o8, 1774742400 - tz.transition 2026, 10, :o7, 1792886400 - tz.transition 2027, 3, :o8, 1806192000 - tz.transition 2027, 10, :o7, 1824940800 - tz.transition 2028, 3, :o8, 1837641600 - tz.transition 2028, 10, :o7, 1856390400 - tz.transition 2029, 3, :o8, 1869091200 - tz.transition 2029, 10, :o7, 1887840000 - tz.transition 2030, 3, :o8, 1901145600 - tz.transition 2030, 10, :o7, 1919289600 - tz.transition 2031, 3, :o8, 1932595200 - tz.transition 2031, 10, :o7, 1950739200 - tz.transition 2032, 3, :o8, 1964044800 - tz.transition 2032, 10, :o7, 1982793600 - tz.transition 2033, 3, :o8, 1995494400 - tz.transition 2033, 10, :o7, 2014243200 - tz.transition 2034, 3, :o8, 2026944000 - tz.transition 2034, 10, :o7, 2045692800 - tz.transition 2035, 3, :o8, 2058393600 - tz.transition 2035, 10, :o7, 2077142400 - tz.transition 2036, 3, :o8, 2090448000 - tz.transition 2036, 10, :o7, 2108592000 - tz.transition 2037, 3, :o8, 2121897600 - tz.transition 2037, 10, :o7, 2140041600 - tz.transition 2038, 3, :o8, 4931021, 2 - tz.transition 2038, 10, :o7, 4931455, 2 - tz.transition 2039, 3, :o8, 4931749, 2 - tz.transition 2039, 10, :o7, 4932183, 2 - tz.transition 2040, 3, :o8, 4932477, 2 - tz.transition 2040, 10, :o7, 4932911, 2 - tz.transition 2041, 3, :o8, 4933219, 2 - tz.transition 2041, 10, :o7, 4933639, 2 - tz.transition 2042, 3, :o8, 4933947, 2 - tz.transition 2042, 10, :o7, 4934367, 2 - tz.transition 2043, 3, :o8, 4934675, 2 - tz.transition 2043, 10, :o7, 4935095, 2 - tz.transition 2044, 3, :o8, 4935403, 2 - tz.transition 2044, 10, :o7, 4935837, 2 - tz.transition 2045, 3, :o8, 4936131, 2 - tz.transition 2045, 10, :o7, 4936565, 2 - tz.transition 2046, 3, :o8, 4936859, 2 - tz.transition 2046, 10, :o7, 4937293, 2 - tz.transition 2047, 3, :o8, 4937601, 2 - tz.transition 2047, 10, :o7, 4938021, 2 - tz.transition 2048, 3, :o8, 4938329, 2 - tz.transition 2048, 10, :o7, 4938749, 2 - tz.transition 2049, 3, :o8, 4939057, 2 - tz.transition 2049, 10, :o7, 4939491, 2 - tz.transition 2050, 3, :o8, 4939785, 2 - tz.transition 2050, 10, :o7, 4940219, 2 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Bangkok.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Bangkok.rb deleted file mode 100644 index 139194e5e5..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Bangkok.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Bangkok - include TimezoneDefinition - - timezone 'Asia/Bangkok' do |tz| - tz.offset :o0, 24124, 0, :LMT - tz.offset :o1, 24124, 0, :BMT - tz.offset :o2, 25200, 0, :ICT - - tz.transition 1879, 12, :o1, 52006648769, 21600 - tz.transition 1920, 3, :o2, 52324168769, 21600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Chongqing.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Chongqing.rb deleted file mode 100644 index 8c94b4ba86..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Chongqing.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Chongqing - include TimezoneDefinition - - timezone 'Asia/Chongqing' do |tz| - tz.offset :o0, 25580, 0, :LMT - tz.offset :o1, 25200, 0, :LONT - tz.offset :o2, 28800, 0, :CST - tz.offset :o3, 28800, 3600, :CDT - - tz.transition 1927, 12, :o1, 10477063601, 4320 - tz.transition 1980, 4, :o2, 325962000 - tz.transition 1986, 5, :o3, 515520000 - tz.transition 1986, 9, :o2, 527007600 - tz.transition 1987, 4, :o3, 545155200 - tz.transition 1987, 9, :o2, 558457200 - tz.transition 1988, 4, :o3, 576604800 - tz.transition 1988, 9, :o2, 589906800 - tz.transition 1989, 4, :o3, 608659200 - tz.transition 1989, 9, :o2, 621961200 - tz.transition 1990, 4, :o3, 640108800 - tz.transition 1990, 9, :o2, 653410800 - tz.transition 1991, 4, :o3, 671558400 - tz.transition 1991, 9, :o2, 684860400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Colombo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Colombo.rb deleted file mode 100644 index f6531fa819..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Colombo.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Colombo - include TimezoneDefinition - - timezone 'Asia/Colombo' do |tz| - tz.offset :o0, 19164, 0, :LMT - tz.offset :o1, 19172, 0, :MMT - tz.offset :o2, 19800, 0, :IST - tz.offset :o3, 19800, 1800, :IHST - tz.offset :o4, 19800, 3600, :IST - tz.offset :o5, 23400, 0, :LKT - tz.offset :o6, 21600, 0, :LKT - - tz.transition 1879, 12, :o1, 17335550003, 7200 - tz.transition 1905, 12, :o2, 52211763607, 21600 - tz.transition 1942, 1, :o3, 116657485, 48 - tz.transition 1942, 8, :o4, 9722413, 4 - tz.transition 1945, 10, :o2, 38907909, 16 - tz.transition 1996, 5, :o5, 832962600 - tz.transition 1996, 10, :o6, 846266400 - tz.transition 2006, 4, :o2, 1145039400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Dhaka.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Dhaka.rb deleted file mode 100644 index 46dce9a0d0..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Dhaka.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Dhaka - include TimezoneDefinition - - timezone 'Asia/Dhaka' do |tz| - tz.offset :o0, 21700, 0, :LMT - tz.offset :o1, 21200, 0, :HMT - tz.offset :o2, 23400, 0, :BURT - tz.offset :o3, 19800, 0, :IST - tz.offset :o4, 21600, 0, :DACT - tz.offset :o5, 21600, 0, :BDT - tz.offset :o6, 21600, 3600, :BDST - - tz.transition 1889, 12, :o1, 2083422167, 864 - tz.transition 1941, 9, :o2, 524937943, 216 - tz.transition 1942, 5, :o3, 116663723, 48 - tz.transition 1942, 8, :o2, 116668957, 48 - tz.transition 1951, 9, :o4, 116828123, 48 - tz.transition 1971, 3, :o5, 38772000 - tz.transition 2009, 6, :o6, 1245430800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Hong_Kong.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Hong_Kong.rb deleted file mode 100644 index f1edd75ac8..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Hong_Kong.rb +++ /dev/null @@ -1,87 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Hong_Kong - include TimezoneDefinition - - timezone 'Asia/Hong_Kong' do |tz| - tz.offset :o0, 27396, 0, :LMT - tz.offset :o1, 28800, 0, :HKT - tz.offset :o2, 28800, 3600, :HKST - - tz.transition 1904, 10, :o1, 5800279639, 2400 - tz.transition 1946, 4, :o2, 38910885, 16 - tz.transition 1946, 11, :o1, 116743453, 48 - tz.transition 1947, 4, :o2, 38916613, 16 - tz.transition 1947, 12, :o1, 116762365, 48 - tz.transition 1948, 5, :o2, 38922773, 16 - tz.transition 1948, 10, :o1, 116777053, 48 - tz.transition 1949, 4, :o2, 38928149, 16 - tz.transition 1949, 10, :o1, 116794525, 48 - tz.transition 1950, 4, :o2, 38933973, 16 - tz.transition 1950, 10, :o1, 116811997, 48 - tz.transition 1951, 3, :o2, 38939797, 16 - tz.transition 1951, 10, :o1, 116829469, 48 - tz.transition 1952, 4, :o2, 38945733, 16 - tz.transition 1952, 10, :o1, 116846941, 48 - tz.transition 1953, 4, :o2, 38951557, 16 - tz.transition 1953, 10, :o1, 116864749, 48 - tz.transition 1954, 3, :o2, 38957157, 16 - tz.transition 1954, 10, :o1, 116882221, 48 - tz.transition 1955, 3, :o2, 38962981, 16 - tz.transition 1955, 11, :o1, 116900029, 48 - tz.transition 1956, 3, :o2, 38968805, 16 - tz.transition 1956, 11, :o1, 116917501, 48 - tz.transition 1957, 3, :o2, 38974741, 16 - tz.transition 1957, 11, :o1, 116934973, 48 - tz.transition 1958, 3, :o2, 38980565, 16 - tz.transition 1958, 11, :o1, 116952445, 48 - tz.transition 1959, 3, :o2, 38986389, 16 - tz.transition 1959, 10, :o1, 116969917, 48 - tz.transition 1960, 3, :o2, 38992213, 16 - tz.transition 1960, 11, :o1, 116987725, 48 - tz.transition 1961, 3, :o2, 38998037, 16 - tz.transition 1961, 11, :o1, 117005197, 48 - tz.transition 1962, 3, :o2, 39003861, 16 - tz.transition 1962, 11, :o1, 117022669, 48 - tz.transition 1963, 3, :o2, 39009797, 16 - tz.transition 1963, 11, :o1, 117040141, 48 - tz.transition 1964, 3, :o2, 39015621, 16 - tz.transition 1964, 10, :o1, 117057613, 48 - tz.transition 1965, 4, :o2, 39021893, 16 - tz.transition 1965, 10, :o1, 117074413, 48 - tz.transition 1966, 4, :o2, 39027717, 16 - tz.transition 1966, 10, :o1, 117091885, 48 - tz.transition 1967, 4, :o2, 39033541, 16 - tz.transition 1967, 10, :o1, 117109693, 48 - tz.transition 1968, 4, :o2, 39039477, 16 - tz.transition 1968, 10, :o1, 117127165, 48 - tz.transition 1969, 4, :o2, 39045301, 16 - tz.transition 1969, 10, :o1, 117144637, 48 - tz.transition 1970, 4, :o2, 9315000 - tz.transition 1970, 10, :o1, 25036200 - tz.transition 1971, 4, :o2, 40764600 - tz.transition 1971, 10, :o1, 56485800 - tz.transition 1972, 4, :o2, 72214200 - tz.transition 1972, 10, :o1, 88540200 - tz.transition 1973, 4, :o2, 104268600 - tz.transition 1973, 10, :o1, 119989800 - tz.transition 1974, 4, :o2, 135718200 - tz.transition 1974, 10, :o1, 151439400 - tz.transition 1975, 4, :o2, 167167800 - tz.transition 1975, 10, :o1, 182889000 - tz.transition 1976, 4, :o2, 198617400 - tz.transition 1976, 10, :o1, 214338600 - tz.transition 1977, 4, :o2, 230067000 - tz.transition 1977, 10, :o1, 245788200 - tz.transition 1979, 5, :o2, 295385400 - tz.transition 1979, 10, :o1, 309292200 - tz.transition 1980, 5, :o2, 326835000 - tz.transition 1980, 10, :o1, 340741800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Irkutsk.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Irkutsk.rb deleted file mode 100644 index 2d47d9580b..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Irkutsk.rb +++ /dev/null @@ -1,165 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Irkutsk - include TimezoneDefinition - - timezone 'Asia/Irkutsk' do |tz| - tz.offset :o0, 25040, 0, :LMT - tz.offset :o1, 25040, 0, :IMT - tz.offset :o2, 25200, 0, :IRKT - tz.offset :o3, 28800, 0, :IRKT - tz.offset :o4, 28800, 3600, :IRKST - tz.offset :o5, 25200, 3600, :IRKST - - tz.transition 1879, 12, :o1, 2600332427, 1080 - tz.transition 1920, 1, :o2, 2616136067, 1080 - tz.transition 1930, 6, :o3, 58227557, 24 - tz.transition 1981, 3, :o4, 354902400 - tz.transition 1981, 9, :o3, 370710000 - tz.transition 1982, 3, :o4, 386438400 - tz.transition 1982, 9, :o3, 402246000 - tz.transition 1983, 3, :o4, 417974400 - tz.transition 1983, 9, :o3, 433782000 - tz.transition 1984, 3, :o4, 449596800 - tz.transition 1984, 9, :o3, 465328800 - tz.transition 1985, 3, :o4, 481053600 - tz.transition 1985, 9, :o3, 496778400 - tz.transition 1986, 3, :o4, 512503200 - tz.transition 1986, 9, :o3, 528228000 - tz.transition 1987, 3, :o4, 543952800 - tz.transition 1987, 9, :o3, 559677600 - tz.transition 1988, 3, :o4, 575402400 - tz.transition 1988, 9, :o3, 591127200 - tz.transition 1989, 3, :o4, 606852000 - tz.transition 1989, 9, :o3, 622576800 - tz.transition 1990, 3, :o4, 638301600 - tz.transition 1990, 9, :o3, 654631200 - tz.transition 1991, 3, :o5, 670356000 - tz.transition 1991, 9, :o2, 686084400 - tz.transition 1992, 1, :o3, 695761200 - tz.transition 1992, 3, :o4, 701794800 - tz.transition 1992, 9, :o3, 717516000 - tz.transition 1993, 3, :o4, 733255200 - tz.transition 1993, 9, :o3, 748980000 - tz.transition 1994, 3, :o4, 764704800 - tz.transition 1994, 9, :o3, 780429600 - tz.transition 1995, 3, :o4, 796154400 - tz.transition 1995, 9, :o3, 811879200 - tz.transition 1996, 3, :o4, 828208800 - tz.transition 1996, 10, :o3, 846352800 - tz.transition 1997, 3, :o4, 859658400 - tz.transition 1997, 10, :o3, 877802400 - tz.transition 1998, 3, :o4, 891108000 - tz.transition 1998, 10, :o3, 909252000 - tz.transition 1999, 3, :o4, 922557600 - tz.transition 1999, 10, :o3, 941306400 - tz.transition 2000, 3, :o4, 954007200 - tz.transition 2000, 10, :o3, 972756000 - tz.transition 2001, 3, :o4, 985456800 - tz.transition 2001, 10, :o3, 1004205600 - tz.transition 2002, 3, :o4, 1017511200 - tz.transition 2002, 10, :o3, 1035655200 - tz.transition 2003, 3, :o4, 1048960800 - tz.transition 2003, 10, :o3, 1067104800 - tz.transition 2004, 3, :o4, 1080410400 - tz.transition 2004, 10, :o3, 1099159200 - tz.transition 2005, 3, :o4, 1111860000 - tz.transition 2005, 10, :o3, 1130608800 - tz.transition 2006, 3, :o4, 1143309600 - tz.transition 2006, 10, :o3, 1162058400 - tz.transition 2007, 3, :o4, 1174759200 - tz.transition 2007, 10, :o3, 1193508000 - tz.transition 2008, 3, :o4, 1206813600 - tz.transition 2008, 10, :o3, 1224957600 - tz.transition 2009, 3, :o4, 1238263200 - tz.transition 2009, 10, :o3, 1256407200 - tz.transition 2010, 3, :o4, 1269712800 - tz.transition 2010, 10, :o3, 1288461600 - tz.transition 2011, 3, :o4, 1301162400 - tz.transition 2011, 10, :o3, 1319911200 - tz.transition 2012, 3, :o4, 1332612000 - tz.transition 2012, 10, :o3, 1351360800 - tz.transition 2013, 3, :o4, 1364666400 - tz.transition 2013, 10, :o3, 1382810400 - tz.transition 2014, 3, :o4, 1396116000 - tz.transition 2014, 10, :o3, 1414260000 - tz.transition 2015, 3, :o4, 1427565600 - tz.transition 2015, 10, :o3, 1445709600 - tz.transition 2016, 3, :o4, 1459015200 - tz.transition 2016, 10, :o3, 1477764000 - tz.transition 2017, 3, :o4, 1490464800 - tz.transition 2017, 10, :o3, 1509213600 - tz.transition 2018, 3, :o4, 1521914400 - tz.transition 2018, 10, :o3, 1540663200 - tz.transition 2019, 3, :o4, 1553968800 - tz.transition 2019, 10, :o3, 1572112800 - tz.transition 2020, 3, :o4, 1585418400 - tz.transition 2020, 10, :o3, 1603562400 - tz.transition 2021, 3, :o4, 1616868000 - tz.transition 2021, 10, :o3, 1635616800 - tz.transition 2022, 3, :o4, 1648317600 - tz.transition 2022, 10, :o3, 1667066400 - tz.transition 2023, 3, :o4, 1679767200 - tz.transition 2023, 10, :o3, 1698516000 - tz.transition 2024, 3, :o4, 1711821600 - tz.transition 2024, 10, :o3, 1729965600 - tz.transition 2025, 3, :o4, 1743271200 - tz.transition 2025, 10, :o3, 1761415200 - tz.transition 2026, 3, :o4, 1774720800 - tz.transition 2026, 10, :o3, 1792864800 - tz.transition 2027, 3, :o4, 1806170400 - tz.transition 2027, 10, :o3, 1824919200 - tz.transition 2028, 3, :o4, 1837620000 - tz.transition 2028, 10, :o3, 1856368800 - tz.transition 2029, 3, :o4, 1869069600 - tz.transition 2029, 10, :o3, 1887818400 - tz.transition 2030, 3, :o4, 1901124000 - tz.transition 2030, 10, :o3, 1919268000 - tz.transition 2031, 3, :o4, 1932573600 - tz.transition 2031, 10, :o3, 1950717600 - tz.transition 2032, 3, :o4, 1964023200 - tz.transition 2032, 10, :o3, 1982772000 - tz.transition 2033, 3, :o4, 1995472800 - tz.transition 2033, 10, :o3, 2014221600 - tz.transition 2034, 3, :o4, 2026922400 - tz.transition 2034, 10, :o3, 2045671200 - tz.transition 2035, 3, :o4, 2058372000 - tz.transition 2035, 10, :o3, 2077120800 - tz.transition 2036, 3, :o4, 2090426400 - tz.transition 2036, 10, :o3, 2108570400 - tz.transition 2037, 3, :o4, 2121876000 - tz.transition 2037, 10, :o3, 2140020000 - tz.transition 2038, 3, :o4, 9862041, 4 - tz.transition 2038, 10, :o3, 9862909, 4 - tz.transition 2039, 3, :o4, 9863497, 4 - tz.transition 2039, 10, :o3, 9864365, 4 - tz.transition 2040, 3, :o4, 9864953, 4 - tz.transition 2040, 10, :o3, 9865821, 4 - tz.transition 2041, 3, :o4, 9866437, 4 - tz.transition 2041, 10, :o3, 9867277, 4 - tz.transition 2042, 3, :o4, 9867893, 4 - tz.transition 2042, 10, :o3, 9868733, 4 - tz.transition 2043, 3, :o4, 9869349, 4 - tz.transition 2043, 10, :o3, 9870189, 4 - tz.transition 2044, 3, :o4, 9870805, 4 - tz.transition 2044, 10, :o3, 9871673, 4 - tz.transition 2045, 3, :o4, 9872261, 4 - tz.transition 2045, 10, :o3, 9873129, 4 - tz.transition 2046, 3, :o4, 9873717, 4 - tz.transition 2046, 10, :o3, 9874585, 4 - tz.transition 2047, 3, :o4, 9875201, 4 - tz.transition 2047, 10, :o3, 9876041, 4 - tz.transition 2048, 3, :o4, 9876657, 4 - tz.transition 2048, 10, :o3, 9877497, 4 - tz.transition 2049, 3, :o4, 9878113, 4 - tz.transition 2049, 10, :o3, 9878981, 4 - tz.transition 2050, 3, :o4, 9879569, 4 - tz.transition 2050, 10, :o3, 9880437, 4 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Jakarta.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Jakarta.rb deleted file mode 100644 index cc58fa173b..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Jakarta.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Jakarta - include TimezoneDefinition - - timezone 'Asia/Jakarta' do |tz| - tz.offset :o0, 25632, 0, :LMT - tz.offset :o1, 25632, 0, :JMT - tz.offset :o2, 26400, 0, :JAVT - tz.offset :o3, 27000, 0, :WIT - tz.offset :o4, 32400, 0, :JST - tz.offset :o5, 28800, 0, :WIT - tz.offset :o6, 25200, 0, :WIT - - tz.transition 1867, 8, :o1, 720956461, 300 - tz.transition 1923, 12, :o2, 87256267, 36 - tz.transition 1932, 10, :o3, 87372439, 36 - tz.transition 1942, 3, :o4, 38887059, 16 - tz.transition 1945, 9, :o3, 19453769, 8 - tz.transition 1948, 4, :o5, 38922755, 16 - tz.transition 1950, 4, :o3, 14600413, 6 - tz.transition 1963, 12, :o6, 39014323, 16 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Jerusalem.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Jerusalem.rb deleted file mode 100644 index 9b737b899e..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Jerusalem.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Jerusalem - include TimezoneDefinition - - timezone 'Asia/Jerusalem' do |tz| - tz.offset :o0, 8456, 0, :LMT - tz.offset :o1, 8440, 0, :JMT - tz.offset :o2, 7200, 0, :IST - tz.offset :o3, 7200, 3600, :IDT - tz.offset :o4, 7200, 7200, :IDDT - - tz.transition 1879, 12, :o1, 26003326343, 10800 - tz.transition 1917, 12, :o2, 5230643909, 2160 - tz.transition 1940, 5, :o3, 29157377, 12 - tz.transition 1942, 10, :o2, 19445315, 8 - tz.transition 1943, 4, :o3, 4861631, 2 - tz.transition 1943, 10, :o2, 19448235, 8 - tz.transition 1944, 3, :o3, 29174177, 12 - tz.transition 1944, 10, :o2, 19451163, 8 - tz.transition 1945, 4, :o3, 29178737, 12 - tz.transition 1945, 10, :o2, 58362251, 24 - tz.transition 1946, 4, :o3, 4863853, 2 - tz.transition 1946, 10, :o2, 19457003, 8 - tz.transition 1948, 5, :o4, 29192333, 12 - tz.transition 1948, 8, :o3, 7298386, 3 - tz.transition 1948, 10, :o2, 58388555, 24 - tz.transition 1949, 4, :o3, 29196449, 12 - tz.transition 1949, 10, :o2, 58397315, 24 - tz.transition 1950, 4, :o3, 29200649, 12 - tz.transition 1950, 9, :o2, 4867079, 2 - tz.transition 1951, 3, :o3, 29204849, 12 - tz.transition 1951, 11, :o2, 4867923, 2 - tz.transition 1952, 4, :o3, 4868245, 2 - tz.transition 1952, 10, :o2, 4868609, 2 - tz.transition 1953, 4, :o3, 4868959, 2 - tz.transition 1953, 9, :o2, 4869267, 2 - tz.transition 1954, 6, :o3, 29218877, 12 - tz.transition 1954, 9, :o2, 19479979, 8 - tz.transition 1955, 6, :o3, 4870539, 2 - tz.transition 1955, 9, :o2, 19482891, 8 - tz.transition 1956, 6, :o3, 29227529, 12 - tz.transition 1956, 9, :o2, 4871493, 2 - tz.transition 1957, 4, :o3, 4871915, 2 - tz.transition 1957, 9, :o2, 19488827, 8 - tz.transition 1974, 7, :o3, 142380000 - tz.transition 1974, 10, :o2, 150843600 - tz.transition 1975, 4, :o3, 167176800 - tz.transition 1975, 8, :o2, 178664400 - tz.transition 1985, 4, :o3, 482277600 - tz.transition 1985, 9, :o2, 495579600 - tz.transition 1986, 5, :o3, 516751200 - tz.transition 1986, 9, :o2, 526424400 - tz.transition 1987, 4, :o3, 545436000 - tz.transition 1987, 9, :o2, 558478800 - tz.transition 1988, 4, :o3, 576540000 - tz.transition 1988, 9, :o2, 589237200 - tz.transition 1989, 4, :o3, 609890400 - tz.transition 1989, 9, :o2, 620773200 - tz.transition 1990, 3, :o3, 638316000 - tz.transition 1990, 8, :o2, 651618000 - tz.transition 1991, 3, :o3, 669765600 - tz.transition 1991, 8, :o2, 683672400 - tz.transition 1992, 3, :o3, 701820000 - tz.transition 1992, 9, :o2, 715726800 - tz.transition 1993, 4, :o3, 733701600 - tz.transition 1993, 9, :o2, 747176400 - tz.transition 1994, 3, :o3, 765151200 - tz.transition 1994, 8, :o2, 778021200 - tz.transition 1995, 3, :o3, 796600800 - tz.transition 1995, 9, :o2, 810075600 - tz.transition 1996, 3, :o3, 826840800 - tz.transition 1996, 9, :o2, 842821200 - tz.transition 1997, 3, :o3, 858895200 - tz.transition 1997, 9, :o2, 874184400 - tz.transition 1998, 3, :o3, 890344800 - tz.transition 1998, 9, :o2, 905029200 - tz.transition 1999, 4, :o3, 923011200 - tz.transition 1999, 9, :o2, 936313200 - tz.transition 2000, 4, :o3, 955670400 - tz.transition 2000, 10, :o2, 970783200 - tz.transition 2001, 4, :o3, 986770800 - tz.transition 2001, 9, :o2, 1001282400 - tz.transition 2002, 3, :o3, 1017356400 - tz.transition 2002, 10, :o2, 1033941600 - tz.transition 2003, 3, :o3, 1048806000 - tz.transition 2003, 10, :o2, 1065132000 - tz.transition 2004, 4, :o3, 1081292400 - tz.transition 2004, 9, :o2, 1095804000 - tz.transition 2005, 4, :o3, 1112313600 - tz.transition 2005, 10, :o2, 1128812400 - tz.transition 2006, 3, :o3, 1143763200 - tz.transition 2006, 9, :o2, 1159657200 - tz.transition 2007, 3, :o3, 1175212800 - tz.transition 2007, 9, :o2, 1189897200 - tz.transition 2008, 3, :o3, 1206662400 - tz.transition 2008, 10, :o2, 1223161200 - tz.transition 2009, 3, :o3, 1238112000 - tz.transition 2009, 9, :o2, 1254006000 - tz.transition 2010, 3, :o3, 1269561600 - tz.transition 2010, 9, :o2, 1284246000 - tz.transition 2011, 4, :o3, 1301616000 - tz.transition 2011, 10, :o2, 1317510000 - tz.transition 2012, 3, :o3, 1333065600 - tz.transition 2012, 9, :o2, 1348354800 - tz.transition 2013, 3, :o3, 1364515200 - tz.transition 2013, 9, :o2, 1378594800 - tz.transition 2014, 3, :o3, 1395964800 - tz.transition 2014, 9, :o2, 1411858800 - tz.transition 2015, 3, :o3, 1427414400 - tz.transition 2015, 9, :o2, 1442703600 - tz.transition 2016, 4, :o3, 1459468800 - tz.transition 2016, 10, :o2, 1475967600 - tz.transition 2017, 3, :o3, 1490918400 - tz.transition 2017, 9, :o2, 1506207600 - tz.transition 2018, 3, :o3, 1522368000 - tz.transition 2018, 9, :o2, 1537052400 - tz.transition 2019, 3, :o3, 1553817600 - tz.transition 2019, 10, :o2, 1570316400 - tz.transition 2020, 3, :o3, 1585267200 - tz.transition 2020, 9, :o2, 1601161200 - tz.transition 2021, 3, :o3, 1616716800 - tz.transition 2021, 9, :o2, 1631401200 - tz.transition 2022, 4, :o3, 1648771200 - tz.transition 2022, 10, :o2, 1664665200 - tz.transition 2023, 3, :o3, 1680220800 - tz.transition 2023, 9, :o2, 1695510000 - tz.transition 2024, 3, :o3, 1711670400 - tz.transition 2024, 10, :o2, 1728169200 - tz.transition 2025, 3, :o3, 1743120000 - tz.transition 2025, 9, :o2, 1759014000 - tz.transition 2026, 3, :o3, 1774569600 - tz.transition 2026, 9, :o2, 1789858800 - tz.transition 2027, 3, :o3, 1806019200 - tz.transition 2027, 10, :o2, 1823122800 - tz.transition 2028, 3, :o3, 1838073600 - tz.transition 2028, 9, :o2, 1853362800 - tz.transition 2029, 3, :o3, 1869523200 - tz.transition 2029, 9, :o2, 1884207600 - tz.transition 2030, 3, :o3, 1900972800 - tz.transition 2030, 10, :o2, 1917471600 - tz.transition 2031, 3, :o3, 1932422400 - tz.transition 2031, 9, :o2, 1947711600 - tz.transition 2032, 3, :o3, 1963872000 - tz.transition 2032, 9, :o2, 1978556400 - tz.transition 2033, 4, :o3, 1995926400 - tz.transition 2033, 10, :o2, 2011820400 - tz.transition 2034, 3, :o3, 2027376000 - tz.transition 2034, 9, :o2, 2042060400 - tz.transition 2035, 3, :o3, 2058825600 - tz.transition 2035, 10, :o2, 2075324400 - tz.transition 2036, 3, :o3, 2090275200 - tz.transition 2036, 9, :o2, 2106169200 - tz.transition 2037, 3, :o3, 2121724800 - tz.transition 2037, 9, :o2, 2136409200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kabul.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kabul.rb deleted file mode 100644 index 669c09790a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kabul.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kabul - include TimezoneDefinition - - timezone 'Asia/Kabul' do |tz| - tz.offset :o0, 16608, 0, :LMT - tz.offset :o1, 14400, 0, :AFT - tz.offset :o2, 16200, 0, :AFT - - tz.transition 1889, 12, :o1, 2170231477, 900 - tz.transition 1944, 12, :o2, 7294369, 3 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kamchatka.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kamchatka.rb deleted file mode 100644 index 2f1690b3a9..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kamchatka.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kamchatka - include TimezoneDefinition - - timezone 'Asia/Kamchatka' do |tz| - tz.offset :o0, 38076, 0, :LMT - tz.offset :o1, 39600, 0, :PETT - tz.offset :o2, 43200, 0, :PETT - tz.offset :o3, 43200, 3600, :PETST - tz.offset :o4, 39600, 3600, :PETST - - tz.transition 1922, 11, :o1, 17448250027, 7200 - tz.transition 1930, 6, :o2, 58227553, 24 - tz.transition 1981, 3, :o3, 354888000 - tz.transition 1981, 9, :o2, 370695600 - tz.transition 1982, 3, :o3, 386424000 - tz.transition 1982, 9, :o2, 402231600 - tz.transition 1983, 3, :o3, 417960000 - tz.transition 1983, 9, :o2, 433767600 - tz.transition 1984, 3, :o3, 449582400 - tz.transition 1984, 9, :o2, 465314400 - tz.transition 1985, 3, :o3, 481039200 - tz.transition 1985, 9, :o2, 496764000 - tz.transition 1986, 3, :o3, 512488800 - tz.transition 1986, 9, :o2, 528213600 - tz.transition 1987, 3, :o3, 543938400 - tz.transition 1987, 9, :o2, 559663200 - tz.transition 1988, 3, :o3, 575388000 - tz.transition 1988, 9, :o2, 591112800 - tz.transition 1989, 3, :o3, 606837600 - tz.transition 1989, 9, :o2, 622562400 - tz.transition 1990, 3, :o3, 638287200 - tz.transition 1990, 9, :o2, 654616800 - tz.transition 1991, 3, :o4, 670341600 - tz.transition 1991, 9, :o1, 686070000 - tz.transition 1992, 1, :o2, 695746800 - tz.transition 1992, 3, :o3, 701780400 - tz.transition 1992, 9, :o2, 717501600 - tz.transition 1993, 3, :o3, 733240800 - tz.transition 1993, 9, :o2, 748965600 - tz.transition 1994, 3, :o3, 764690400 - tz.transition 1994, 9, :o2, 780415200 - tz.transition 1995, 3, :o3, 796140000 - tz.transition 1995, 9, :o2, 811864800 - tz.transition 1996, 3, :o3, 828194400 - tz.transition 1996, 10, :o2, 846338400 - tz.transition 1997, 3, :o3, 859644000 - tz.transition 1997, 10, :o2, 877788000 - tz.transition 1998, 3, :o3, 891093600 - tz.transition 1998, 10, :o2, 909237600 - tz.transition 1999, 3, :o3, 922543200 - tz.transition 1999, 10, :o2, 941292000 - tz.transition 2000, 3, :o3, 953992800 - tz.transition 2000, 10, :o2, 972741600 - tz.transition 2001, 3, :o3, 985442400 - tz.transition 2001, 10, :o2, 1004191200 - tz.transition 2002, 3, :o3, 1017496800 - tz.transition 2002, 10, :o2, 1035640800 - tz.transition 2003, 3, :o3, 1048946400 - tz.transition 2003, 10, :o2, 1067090400 - tz.transition 2004, 3, :o3, 1080396000 - tz.transition 2004, 10, :o2, 1099144800 - tz.transition 2005, 3, :o3, 1111845600 - tz.transition 2005, 10, :o2, 1130594400 - tz.transition 2006, 3, :o3, 1143295200 - tz.transition 2006, 10, :o2, 1162044000 - tz.transition 2007, 3, :o3, 1174744800 - tz.transition 2007, 10, :o2, 1193493600 - tz.transition 2008, 3, :o3, 1206799200 - tz.transition 2008, 10, :o2, 1224943200 - tz.transition 2009, 3, :o3, 1238248800 - tz.transition 2009, 10, :o2, 1256392800 - tz.transition 2010, 3, :o3, 1269698400 - tz.transition 2010, 10, :o2, 1288447200 - tz.transition 2011, 3, :o3, 1301148000 - tz.transition 2011, 10, :o2, 1319896800 - tz.transition 2012, 3, :o3, 1332597600 - tz.transition 2012, 10, :o2, 1351346400 - tz.transition 2013, 3, :o3, 1364652000 - tz.transition 2013, 10, :o2, 1382796000 - tz.transition 2014, 3, :o3, 1396101600 - tz.transition 2014, 10, :o2, 1414245600 - tz.transition 2015, 3, :o3, 1427551200 - tz.transition 2015, 10, :o2, 1445695200 - tz.transition 2016, 3, :o3, 1459000800 - tz.transition 2016, 10, :o2, 1477749600 - tz.transition 2017, 3, :o3, 1490450400 - tz.transition 2017, 10, :o2, 1509199200 - tz.transition 2018, 3, :o3, 1521900000 - tz.transition 2018, 10, :o2, 1540648800 - tz.transition 2019, 3, :o3, 1553954400 - tz.transition 2019, 10, :o2, 1572098400 - tz.transition 2020, 3, :o3, 1585404000 - tz.transition 2020, 10, :o2, 1603548000 - tz.transition 2021, 3, :o3, 1616853600 - tz.transition 2021, 10, :o2, 1635602400 - tz.transition 2022, 3, :o3, 1648303200 - tz.transition 2022, 10, :o2, 1667052000 - tz.transition 2023, 3, :o3, 1679752800 - tz.transition 2023, 10, :o2, 1698501600 - tz.transition 2024, 3, :o3, 1711807200 - tz.transition 2024, 10, :o2, 1729951200 - tz.transition 2025, 3, :o3, 1743256800 - tz.transition 2025, 10, :o2, 1761400800 - tz.transition 2026, 3, :o3, 1774706400 - tz.transition 2026, 10, :o2, 1792850400 - tz.transition 2027, 3, :o3, 1806156000 - tz.transition 2027, 10, :o2, 1824904800 - tz.transition 2028, 3, :o3, 1837605600 - tz.transition 2028, 10, :o2, 1856354400 - tz.transition 2029, 3, :o3, 1869055200 - tz.transition 2029, 10, :o2, 1887804000 - tz.transition 2030, 3, :o3, 1901109600 - tz.transition 2030, 10, :o2, 1919253600 - tz.transition 2031, 3, :o3, 1932559200 - tz.transition 2031, 10, :o2, 1950703200 - tz.transition 2032, 3, :o3, 1964008800 - tz.transition 2032, 10, :o2, 1982757600 - tz.transition 2033, 3, :o3, 1995458400 - tz.transition 2033, 10, :o2, 2014207200 - tz.transition 2034, 3, :o3, 2026908000 - tz.transition 2034, 10, :o2, 2045656800 - tz.transition 2035, 3, :o3, 2058357600 - tz.transition 2035, 10, :o2, 2077106400 - tz.transition 2036, 3, :o3, 2090412000 - tz.transition 2036, 10, :o2, 2108556000 - tz.transition 2037, 3, :o3, 2121861600 - tz.transition 2037, 10, :o2, 2140005600 - tz.transition 2038, 3, :o3, 29586121, 12 - tz.transition 2038, 10, :o2, 29588725, 12 - tz.transition 2039, 3, :o3, 29590489, 12 - tz.transition 2039, 10, :o2, 29593093, 12 - tz.transition 2040, 3, :o3, 29594857, 12 - tz.transition 2040, 10, :o2, 29597461, 12 - tz.transition 2041, 3, :o3, 29599309, 12 - tz.transition 2041, 10, :o2, 29601829, 12 - tz.transition 2042, 3, :o3, 29603677, 12 - tz.transition 2042, 10, :o2, 29606197, 12 - tz.transition 2043, 3, :o3, 29608045, 12 - tz.transition 2043, 10, :o2, 29610565, 12 - tz.transition 2044, 3, :o3, 29612413, 12 - tz.transition 2044, 10, :o2, 29615017, 12 - tz.transition 2045, 3, :o3, 29616781, 12 - tz.transition 2045, 10, :o2, 29619385, 12 - tz.transition 2046, 3, :o3, 29621149, 12 - tz.transition 2046, 10, :o2, 29623753, 12 - tz.transition 2047, 3, :o3, 29625601, 12 - tz.transition 2047, 10, :o2, 29628121, 12 - tz.transition 2048, 3, :o3, 29629969, 12 - tz.transition 2048, 10, :o2, 29632489, 12 - tz.transition 2049, 3, :o3, 29634337, 12 - tz.transition 2049, 10, :o2, 29636941, 12 - tz.transition 2050, 3, :o3, 29638705, 12 - tz.transition 2050, 10, :o2, 29641309, 12 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Karachi.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Karachi.rb deleted file mode 100644 index dfe02c5cf6..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Karachi.rb +++ /dev/null @@ -1,114 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Karachi - include TimezoneDefinition - - timezone 'Asia/Karachi' do |tz| - tz.offset :o0, 16092, 0, :LMT - tz.offset :o1, 19800, 0, :IST - tz.offset :o2, 19800, 3600, :IST - tz.offset :o3, 18000, 0, :KART - tz.offset :o4, 18000, 0, :PKT - tz.offset :o5, 18000, 3600, :PKST - - tz.transition 1906, 12, :o1, 1934061051, 800 - tz.transition 1942, 8, :o2, 116668957, 48 - tz.transition 1945, 10, :o1, 116723675, 48 - tz.transition 1951, 9, :o3, 116828125, 48 - tz.transition 1971, 3, :o4, 38775600 - tz.transition 2002, 4, :o5, 1018119660 - tz.transition 2002, 10, :o4, 1033840860 - tz.transition 2008, 5, :o5, 1212260400 - tz.transition 2008, 10, :o4, 1225476000 - tz.transition 2009, 4, :o5, 1239735600 - tz.transition 2009, 10, :o4, 1257012000 - tz.transition 2010, 4, :o5, 1271271600 - tz.transition 2010, 10, :o4, 1288548000 - tz.transition 2011, 4, :o5, 1302807600 - tz.transition 2011, 10, :o4, 1320084000 - tz.transition 2012, 4, :o5, 1334430000 - tz.transition 2012, 10, :o4, 1351706400 - tz.transition 2013, 4, :o5, 1365966000 - tz.transition 2013, 10, :o4, 1383242400 - tz.transition 2014, 4, :o5, 1397502000 - tz.transition 2014, 10, :o4, 1414778400 - tz.transition 2015, 4, :o5, 1429038000 - tz.transition 2015, 10, :o4, 1446314400 - tz.transition 2016, 4, :o5, 1460660400 - tz.transition 2016, 10, :o4, 1477936800 - tz.transition 2017, 4, :o5, 1492196400 - tz.transition 2017, 10, :o4, 1509472800 - tz.transition 2018, 4, :o5, 1523732400 - tz.transition 2018, 10, :o4, 1541008800 - tz.transition 2019, 4, :o5, 1555268400 - tz.transition 2019, 10, :o4, 1572544800 - tz.transition 2020, 4, :o5, 1586890800 - tz.transition 2020, 10, :o4, 1604167200 - tz.transition 2021, 4, :o5, 1618426800 - tz.transition 2021, 10, :o4, 1635703200 - tz.transition 2022, 4, :o5, 1649962800 - tz.transition 2022, 10, :o4, 1667239200 - tz.transition 2023, 4, :o5, 1681498800 - tz.transition 2023, 10, :o4, 1698775200 - tz.transition 2024, 4, :o5, 1713121200 - tz.transition 2024, 10, :o4, 1730397600 - tz.transition 2025, 4, :o5, 1744657200 - tz.transition 2025, 10, :o4, 1761933600 - tz.transition 2026, 4, :o5, 1776193200 - tz.transition 2026, 10, :o4, 1793469600 - tz.transition 2027, 4, :o5, 1807729200 - tz.transition 2027, 10, :o4, 1825005600 - tz.transition 2028, 4, :o5, 1839351600 - tz.transition 2028, 10, :o4, 1856628000 - tz.transition 2029, 4, :o5, 1870887600 - tz.transition 2029, 10, :o4, 1888164000 - tz.transition 2030, 4, :o5, 1902423600 - tz.transition 2030, 10, :o4, 1919700000 - tz.transition 2031, 4, :o5, 1933959600 - tz.transition 2031, 10, :o4, 1951236000 - tz.transition 2032, 4, :o5, 1965582000 - tz.transition 2032, 10, :o4, 1982858400 - tz.transition 2033, 4, :o5, 1997118000 - tz.transition 2033, 10, :o4, 2014394400 - tz.transition 2034, 4, :o5, 2028654000 - tz.transition 2034, 10, :o4, 2045930400 - tz.transition 2035, 4, :o5, 2060190000 - tz.transition 2035, 10, :o4, 2077466400 - tz.transition 2036, 4, :o5, 2091812400 - tz.transition 2036, 10, :o4, 2109088800 - tz.transition 2037, 4, :o5, 2123348400 - tz.transition 2037, 10, :o4, 2140624800 - tz.transition 2038, 4, :o5, 59172679, 24 - tz.transition 2038, 10, :o4, 9862913, 4 - tz.transition 2039, 4, :o5, 59181439, 24 - tz.transition 2039, 10, :o4, 9864373, 4 - tz.transition 2040, 4, :o5, 59190223, 24 - tz.transition 2040, 10, :o4, 9865837, 4 - tz.transition 2041, 4, :o5, 59198983, 24 - tz.transition 2041, 10, :o4, 9867297, 4 - tz.transition 2042, 4, :o5, 59207743, 24 - tz.transition 2042, 10, :o4, 9868757, 4 - tz.transition 2043, 4, :o5, 59216503, 24 - tz.transition 2043, 10, :o4, 9870217, 4 - tz.transition 2044, 4, :o5, 59225287, 24 - tz.transition 2044, 10, :o4, 9871681, 4 - tz.transition 2045, 4, :o5, 59234047, 24 - tz.transition 2045, 10, :o4, 9873141, 4 - tz.transition 2046, 4, :o5, 59242807, 24 - tz.transition 2046, 10, :o4, 9874601, 4 - tz.transition 2047, 4, :o5, 59251567, 24 - tz.transition 2047, 10, :o4, 9876061, 4 - tz.transition 2048, 4, :o5, 59260351, 24 - tz.transition 2048, 10, :o4, 9877525, 4 - tz.transition 2049, 4, :o5, 59269111, 24 - tz.transition 2049, 10, :o4, 9878985, 4 - tz.transition 2050, 4, :o5, 59277871, 24 - tz.transition 2050, 10, :o4, 9880445, 4 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kathmandu.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kathmandu.rb deleted file mode 100644 index 37b241612e..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kathmandu.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kathmandu - include TimezoneDefinition - - timezone 'Asia/Kathmandu' do |tz| - tz.offset :o0, 20476, 0, :LMT - tz.offset :o1, 19800, 0, :IST - tz.offset :o2, 20700, 0, :NPT - - tz.transition 1919, 12, :o1, 52322204081, 21600 - tz.transition 1985, 12, :o2, 504901800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kolkata.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kolkata.rb deleted file mode 100644 index 1b6ffbd59d..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kolkata.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kolkata - include TimezoneDefinition - - timezone 'Asia/Kolkata' do |tz| - tz.offset :o0, 21208, 0, :LMT - tz.offset :o1, 21200, 0, :HMT - tz.offset :o2, 23400, 0, :BURT - tz.offset :o3, 19800, 0, :IST - tz.offset :o4, 19800, 3600, :IST - - tz.transition 1879, 12, :o1, 26003324749, 10800 - tz.transition 1941, 9, :o2, 524937943, 216 - tz.transition 1942, 5, :o3, 116663723, 48 - tz.transition 1942, 8, :o4, 116668957, 48 - tz.transition 1945, 10, :o3, 116723675, 48 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Krasnoyarsk.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Krasnoyarsk.rb deleted file mode 100644 index d6c503c155..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Krasnoyarsk.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Krasnoyarsk - include TimezoneDefinition - - timezone 'Asia/Krasnoyarsk' do |tz| - tz.offset :o0, 22280, 0, :LMT - tz.offset :o1, 21600, 0, :KRAT - tz.offset :o2, 25200, 0, :KRAT - tz.offset :o3, 25200, 3600, :KRAST - tz.offset :o4, 21600, 3600, :KRAST - - tz.transition 1920, 1, :o1, 5232231163, 2160 - tz.transition 1930, 6, :o2, 9704593, 4 - tz.transition 1981, 3, :o3, 354906000 - tz.transition 1981, 9, :o2, 370713600 - tz.transition 1982, 3, :o3, 386442000 - tz.transition 1982, 9, :o2, 402249600 - tz.transition 1983, 3, :o3, 417978000 - tz.transition 1983, 9, :o2, 433785600 - tz.transition 1984, 3, :o3, 449600400 - tz.transition 1984, 9, :o2, 465332400 - tz.transition 1985, 3, :o3, 481057200 - tz.transition 1985, 9, :o2, 496782000 - tz.transition 1986, 3, :o3, 512506800 - tz.transition 1986, 9, :o2, 528231600 - tz.transition 1987, 3, :o3, 543956400 - tz.transition 1987, 9, :o2, 559681200 - tz.transition 1988, 3, :o3, 575406000 - tz.transition 1988, 9, :o2, 591130800 - tz.transition 1989, 3, :o3, 606855600 - tz.transition 1989, 9, :o2, 622580400 - tz.transition 1990, 3, :o3, 638305200 - tz.transition 1990, 9, :o2, 654634800 - tz.transition 1991, 3, :o4, 670359600 - tz.transition 1991, 9, :o1, 686088000 - tz.transition 1992, 1, :o2, 695764800 - tz.transition 1992, 3, :o3, 701798400 - tz.transition 1992, 9, :o2, 717519600 - tz.transition 1993, 3, :o3, 733258800 - tz.transition 1993, 9, :o2, 748983600 - tz.transition 1994, 3, :o3, 764708400 - tz.transition 1994, 9, :o2, 780433200 - tz.transition 1995, 3, :o3, 796158000 - tz.transition 1995, 9, :o2, 811882800 - tz.transition 1996, 3, :o3, 828212400 - tz.transition 1996, 10, :o2, 846356400 - tz.transition 1997, 3, :o3, 859662000 - tz.transition 1997, 10, :o2, 877806000 - tz.transition 1998, 3, :o3, 891111600 - tz.transition 1998, 10, :o2, 909255600 - tz.transition 1999, 3, :o3, 922561200 - tz.transition 1999, 10, :o2, 941310000 - tz.transition 2000, 3, :o3, 954010800 - tz.transition 2000, 10, :o2, 972759600 - tz.transition 2001, 3, :o3, 985460400 - tz.transition 2001, 10, :o2, 1004209200 - tz.transition 2002, 3, :o3, 1017514800 - tz.transition 2002, 10, :o2, 1035658800 - tz.transition 2003, 3, :o3, 1048964400 - tz.transition 2003, 10, :o2, 1067108400 - tz.transition 2004, 3, :o3, 1080414000 - tz.transition 2004, 10, :o2, 1099162800 - tz.transition 2005, 3, :o3, 1111863600 - tz.transition 2005, 10, :o2, 1130612400 - tz.transition 2006, 3, :o3, 1143313200 - tz.transition 2006, 10, :o2, 1162062000 - tz.transition 2007, 3, :o3, 1174762800 - tz.transition 2007, 10, :o2, 1193511600 - tz.transition 2008, 3, :o3, 1206817200 - tz.transition 2008, 10, :o2, 1224961200 - tz.transition 2009, 3, :o3, 1238266800 - tz.transition 2009, 10, :o2, 1256410800 - tz.transition 2010, 3, :o3, 1269716400 - tz.transition 2010, 10, :o2, 1288465200 - tz.transition 2011, 3, :o3, 1301166000 - tz.transition 2011, 10, :o2, 1319914800 - tz.transition 2012, 3, :o3, 1332615600 - tz.transition 2012, 10, :o2, 1351364400 - tz.transition 2013, 3, :o3, 1364670000 - tz.transition 2013, 10, :o2, 1382814000 - tz.transition 2014, 3, :o3, 1396119600 - tz.transition 2014, 10, :o2, 1414263600 - tz.transition 2015, 3, :o3, 1427569200 - tz.transition 2015, 10, :o2, 1445713200 - tz.transition 2016, 3, :o3, 1459018800 - tz.transition 2016, 10, :o2, 1477767600 - tz.transition 2017, 3, :o3, 1490468400 - tz.transition 2017, 10, :o2, 1509217200 - tz.transition 2018, 3, :o3, 1521918000 - tz.transition 2018, 10, :o2, 1540666800 - tz.transition 2019, 3, :o3, 1553972400 - tz.transition 2019, 10, :o2, 1572116400 - tz.transition 2020, 3, :o3, 1585422000 - tz.transition 2020, 10, :o2, 1603566000 - tz.transition 2021, 3, :o3, 1616871600 - tz.transition 2021, 10, :o2, 1635620400 - tz.transition 2022, 3, :o3, 1648321200 - tz.transition 2022, 10, :o2, 1667070000 - tz.transition 2023, 3, :o3, 1679770800 - tz.transition 2023, 10, :o2, 1698519600 - tz.transition 2024, 3, :o3, 1711825200 - tz.transition 2024, 10, :o2, 1729969200 - tz.transition 2025, 3, :o3, 1743274800 - tz.transition 2025, 10, :o2, 1761418800 - tz.transition 2026, 3, :o3, 1774724400 - tz.transition 2026, 10, :o2, 1792868400 - tz.transition 2027, 3, :o3, 1806174000 - tz.transition 2027, 10, :o2, 1824922800 - tz.transition 2028, 3, :o3, 1837623600 - tz.transition 2028, 10, :o2, 1856372400 - tz.transition 2029, 3, :o3, 1869073200 - tz.transition 2029, 10, :o2, 1887822000 - tz.transition 2030, 3, :o3, 1901127600 - tz.transition 2030, 10, :o2, 1919271600 - tz.transition 2031, 3, :o3, 1932577200 - tz.transition 2031, 10, :o2, 1950721200 - tz.transition 2032, 3, :o3, 1964026800 - tz.transition 2032, 10, :o2, 1982775600 - tz.transition 2033, 3, :o3, 1995476400 - tz.transition 2033, 10, :o2, 2014225200 - tz.transition 2034, 3, :o3, 2026926000 - tz.transition 2034, 10, :o2, 2045674800 - tz.transition 2035, 3, :o3, 2058375600 - tz.transition 2035, 10, :o2, 2077124400 - tz.transition 2036, 3, :o3, 2090430000 - tz.transition 2036, 10, :o2, 2108574000 - tz.transition 2037, 3, :o3, 2121879600 - tz.transition 2037, 10, :o2, 2140023600 - tz.transition 2038, 3, :o3, 59172247, 24 - tz.transition 2038, 10, :o2, 59177455, 24 - tz.transition 2039, 3, :o3, 59180983, 24 - tz.transition 2039, 10, :o2, 59186191, 24 - tz.transition 2040, 3, :o3, 59189719, 24 - tz.transition 2040, 10, :o2, 59194927, 24 - tz.transition 2041, 3, :o3, 59198623, 24 - tz.transition 2041, 10, :o2, 59203663, 24 - tz.transition 2042, 3, :o3, 59207359, 24 - tz.transition 2042, 10, :o2, 59212399, 24 - tz.transition 2043, 3, :o3, 59216095, 24 - tz.transition 2043, 10, :o2, 59221135, 24 - tz.transition 2044, 3, :o3, 59224831, 24 - tz.transition 2044, 10, :o2, 59230039, 24 - tz.transition 2045, 3, :o3, 59233567, 24 - tz.transition 2045, 10, :o2, 59238775, 24 - tz.transition 2046, 3, :o3, 59242303, 24 - tz.transition 2046, 10, :o2, 59247511, 24 - tz.transition 2047, 3, :o3, 59251207, 24 - tz.transition 2047, 10, :o2, 59256247, 24 - tz.transition 2048, 3, :o3, 59259943, 24 - tz.transition 2048, 10, :o2, 59264983, 24 - tz.transition 2049, 3, :o3, 59268679, 24 - tz.transition 2049, 10, :o2, 59273887, 24 - tz.transition 2050, 3, :o3, 59277415, 24 - tz.transition 2050, 10, :o2, 59282623, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb deleted file mode 100644 index 77a0c206fa..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb +++ /dev/null @@ -1,31 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kuala_Lumpur - include TimezoneDefinition - - timezone 'Asia/Kuala_Lumpur' do |tz| - tz.offset :o0, 24406, 0, :LMT - tz.offset :o1, 24925, 0, :SMT - tz.offset :o2, 25200, 0, :MALT - tz.offset :o3, 25200, 1200, :MALST - tz.offset :o4, 26400, 0, :MALT - tz.offset :o5, 27000, 0, :MALT - tz.offset :o6, 32400, 0, :JST - tz.offset :o7, 28800, 0, :MYT - - tz.transition 1900, 12, :o1, 104344641397, 43200 - tz.transition 1905, 5, :o2, 8353142363, 3456 - tz.transition 1932, 12, :o3, 58249757, 24 - tz.transition 1935, 12, :o4, 87414055, 36 - tz.transition 1941, 8, :o5, 87488575, 36 - tz.transition 1942, 2, :o6, 38886499, 16 - tz.transition 1945, 9, :o5, 19453681, 8 - tz.transition 1981, 12, :o7, 378664200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kuwait.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kuwait.rb deleted file mode 100644 index 5bd5283197..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Kuwait.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kuwait - include TimezoneDefinition - - timezone 'Asia/Kuwait' do |tz| - tz.offset :o0, 11516, 0, :LMT - tz.offset :o1, 10800, 0, :AST - - tz.transition 1949, 12, :o1, 52558899121, 21600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Magadan.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Magadan.rb deleted file mode 100644 index 302093693e..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Magadan.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Magadan - include TimezoneDefinition - - timezone 'Asia/Magadan' do |tz| - tz.offset :o0, 36192, 0, :LMT - tz.offset :o1, 36000, 0, :MAGT - tz.offset :o2, 39600, 0, :MAGT - tz.offset :o3, 39600, 3600, :MAGST - tz.offset :o4, 36000, 3600, :MAGST - - tz.transition 1924, 5, :o1, 2181516373, 900 - tz.transition 1930, 6, :o2, 29113777, 12 - tz.transition 1981, 3, :o3, 354891600 - tz.transition 1981, 9, :o2, 370699200 - tz.transition 1982, 3, :o3, 386427600 - tz.transition 1982, 9, :o2, 402235200 - tz.transition 1983, 3, :o3, 417963600 - tz.transition 1983, 9, :o2, 433771200 - tz.transition 1984, 3, :o3, 449586000 - tz.transition 1984, 9, :o2, 465318000 - tz.transition 1985, 3, :o3, 481042800 - tz.transition 1985, 9, :o2, 496767600 - tz.transition 1986, 3, :o3, 512492400 - tz.transition 1986, 9, :o2, 528217200 - tz.transition 1987, 3, :o3, 543942000 - tz.transition 1987, 9, :o2, 559666800 - tz.transition 1988, 3, :o3, 575391600 - tz.transition 1988, 9, :o2, 591116400 - tz.transition 1989, 3, :o3, 606841200 - tz.transition 1989, 9, :o2, 622566000 - tz.transition 1990, 3, :o3, 638290800 - tz.transition 1990, 9, :o2, 654620400 - tz.transition 1991, 3, :o4, 670345200 - tz.transition 1991, 9, :o1, 686073600 - tz.transition 1992, 1, :o2, 695750400 - tz.transition 1992, 3, :o3, 701784000 - tz.transition 1992, 9, :o2, 717505200 - tz.transition 1993, 3, :o3, 733244400 - tz.transition 1993, 9, :o2, 748969200 - tz.transition 1994, 3, :o3, 764694000 - tz.transition 1994, 9, :o2, 780418800 - tz.transition 1995, 3, :o3, 796143600 - tz.transition 1995, 9, :o2, 811868400 - tz.transition 1996, 3, :o3, 828198000 - tz.transition 1996, 10, :o2, 846342000 - tz.transition 1997, 3, :o3, 859647600 - tz.transition 1997, 10, :o2, 877791600 - tz.transition 1998, 3, :o3, 891097200 - tz.transition 1998, 10, :o2, 909241200 - tz.transition 1999, 3, :o3, 922546800 - tz.transition 1999, 10, :o2, 941295600 - tz.transition 2000, 3, :o3, 953996400 - tz.transition 2000, 10, :o2, 972745200 - tz.transition 2001, 3, :o3, 985446000 - tz.transition 2001, 10, :o2, 1004194800 - tz.transition 2002, 3, :o3, 1017500400 - tz.transition 2002, 10, :o2, 1035644400 - tz.transition 2003, 3, :o3, 1048950000 - tz.transition 2003, 10, :o2, 1067094000 - tz.transition 2004, 3, :o3, 1080399600 - tz.transition 2004, 10, :o2, 1099148400 - tz.transition 2005, 3, :o3, 1111849200 - tz.transition 2005, 10, :o2, 1130598000 - tz.transition 2006, 3, :o3, 1143298800 - tz.transition 2006, 10, :o2, 1162047600 - tz.transition 2007, 3, :o3, 1174748400 - tz.transition 2007, 10, :o2, 1193497200 - tz.transition 2008, 3, :o3, 1206802800 - tz.transition 2008, 10, :o2, 1224946800 - tz.transition 2009, 3, :o3, 1238252400 - tz.transition 2009, 10, :o2, 1256396400 - tz.transition 2010, 3, :o3, 1269702000 - tz.transition 2010, 10, :o2, 1288450800 - tz.transition 2011, 3, :o3, 1301151600 - tz.transition 2011, 10, :o2, 1319900400 - tz.transition 2012, 3, :o3, 1332601200 - tz.transition 2012, 10, :o2, 1351350000 - tz.transition 2013, 3, :o3, 1364655600 - tz.transition 2013, 10, :o2, 1382799600 - tz.transition 2014, 3, :o3, 1396105200 - tz.transition 2014, 10, :o2, 1414249200 - tz.transition 2015, 3, :o3, 1427554800 - tz.transition 2015, 10, :o2, 1445698800 - tz.transition 2016, 3, :o3, 1459004400 - tz.transition 2016, 10, :o2, 1477753200 - tz.transition 2017, 3, :o3, 1490454000 - tz.transition 2017, 10, :o2, 1509202800 - tz.transition 2018, 3, :o3, 1521903600 - tz.transition 2018, 10, :o2, 1540652400 - tz.transition 2019, 3, :o3, 1553958000 - tz.transition 2019, 10, :o2, 1572102000 - tz.transition 2020, 3, :o3, 1585407600 - tz.transition 2020, 10, :o2, 1603551600 - tz.transition 2021, 3, :o3, 1616857200 - tz.transition 2021, 10, :o2, 1635606000 - tz.transition 2022, 3, :o3, 1648306800 - tz.transition 2022, 10, :o2, 1667055600 - tz.transition 2023, 3, :o3, 1679756400 - tz.transition 2023, 10, :o2, 1698505200 - tz.transition 2024, 3, :o3, 1711810800 - tz.transition 2024, 10, :o2, 1729954800 - tz.transition 2025, 3, :o3, 1743260400 - tz.transition 2025, 10, :o2, 1761404400 - tz.transition 2026, 3, :o3, 1774710000 - tz.transition 2026, 10, :o2, 1792854000 - tz.transition 2027, 3, :o3, 1806159600 - tz.transition 2027, 10, :o2, 1824908400 - tz.transition 2028, 3, :o3, 1837609200 - tz.transition 2028, 10, :o2, 1856358000 - tz.transition 2029, 3, :o3, 1869058800 - tz.transition 2029, 10, :o2, 1887807600 - tz.transition 2030, 3, :o3, 1901113200 - tz.transition 2030, 10, :o2, 1919257200 - tz.transition 2031, 3, :o3, 1932562800 - tz.transition 2031, 10, :o2, 1950706800 - tz.transition 2032, 3, :o3, 1964012400 - tz.transition 2032, 10, :o2, 1982761200 - tz.transition 2033, 3, :o3, 1995462000 - tz.transition 2033, 10, :o2, 2014210800 - tz.transition 2034, 3, :o3, 2026911600 - tz.transition 2034, 10, :o2, 2045660400 - tz.transition 2035, 3, :o3, 2058361200 - tz.transition 2035, 10, :o2, 2077110000 - tz.transition 2036, 3, :o3, 2090415600 - tz.transition 2036, 10, :o2, 2108559600 - tz.transition 2037, 3, :o3, 2121865200 - tz.transition 2037, 10, :o2, 2140009200 - tz.transition 2038, 3, :o3, 19724081, 8 - tz.transition 2038, 10, :o2, 19725817, 8 - tz.transition 2039, 3, :o3, 19726993, 8 - tz.transition 2039, 10, :o2, 19728729, 8 - tz.transition 2040, 3, :o3, 19729905, 8 - tz.transition 2040, 10, :o2, 19731641, 8 - tz.transition 2041, 3, :o3, 19732873, 8 - tz.transition 2041, 10, :o2, 19734553, 8 - tz.transition 2042, 3, :o3, 19735785, 8 - tz.transition 2042, 10, :o2, 19737465, 8 - tz.transition 2043, 3, :o3, 19738697, 8 - tz.transition 2043, 10, :o2, 19740377, 8 - tz.transition 2044, 3, :o3, 19741609, 8 - tz.transition 2044, 10, :o2, 19743345, 8 - tz.transition 2045, 3, :o3, 19744521, 8 - tz.transition 2045, 10, :o2, 19746257, 8 - tz.transition 2046, 3, :o3, 19747433, 8 - tz.transition 2046, 10, :o2, 19749169, 8 - tz.transition 2047, 3, :o3, 19750401, 8 - tz.transition 2047, 10, :o2, 19752081, 8 - tz.transition 2048, 3, :o3, 19753313, 8 - tz.transition 2048, 10, :o2, 19754993, 8 - tz.transition 2049, 3, :o3, 19756225, 8 - tz.transition 2049, 10, :o2, 19757961, 8 - tz.transition 2050, 3, :o3, 19759137, 8 - tz.transition 2050, 10, :o2, 19760873, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Muscat.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Muscat.rb deleted file mode 100644 index 604f651dfa..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Muscat.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Muscat - include TimezoneDefinition - - timezone 'Asia/Muscat' do |tz| - tz.offset :o0, 14060, 0, :LMT - tz.offset :o1, 14400, 0, :GST - - tz.transition 1919, 12, :o1, 10464441137, 4320 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Novosibirsk.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Novosibirsk.rb deleted file mode 100644 index a4e7796e75..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Novosibirsk.rb +++ /dev/null @@ -1,164 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Novosibirsk - include TimezoneDefinition - - timezone 'Asia/Novosibirsk' do |tz| - tz.offset :o0, 19900, 0, :LMT - tz.offset :o1, 21600, 0, :NOVT - tz.offset :o2, 25200, 0, :NOVT - tz.offset :o3, 25200, 3600, :NOVST - tz.offset :o4, 21600, 3600, :NOVST - - tz.transition 1919, 12, :o1, 2092872833, 864 - tz.transition 1930, 6, :o2, 9704593, 4 - tz.transition 1981, 3, :o3, 354906000 - tz.transition 1981, 9, :o2, 370713600 - tz.transition 1982, 3, :o3, 386442000 - tz.transition 1982, 9, :o2, 402249600 - tz.transition 1983, 3, :o3, 417978000 - tz.transition 1983, 9, :o2, 433785600 - tz.transition 1984, 3, :o3, 449600400 - tz.transition 1984, 9, :o2, 465332400 - tz.transition 1985, 3, :o3, 481057200 - tz.transition 1985, 9, :o2, 496782000 - tz.transition 1986, 3, :o3, 512506800 - tz.transition 1986, 9, :o2, 528231600 - tz.transition 1987, 3, :o3, 543956400 - tz.transition 1987, 9, :o2, 559681200 - tz.transition 1988, 3, :o3, 575406000 - tz.transition 1988, 9, :o2, 591130800 - tz.transition 1989, 3, :o3, 606855600 - tz.transition 1989, 9, :o2, 622580400 - tz.transition 1990, 3, :o3, 638305200 - tz.transition 1990, 9, :o2, 654634800 - tz.transition 1991, 3, :o4, 670359600 - tz.transition 1991, 9, :o1, 686088000 - tz.transition 1992, 1, :o2, 695764800 - tz.transition 1992, 3, :o3, 701798400 - tz.transition 1992, 9, :o2, 717519600 - tz.transition 1993, 3, :o3, 733258800 - tz.transition 1993, 5, :o4, 738086400 - tz.transition 1993, 9, :o1, 748987200 - tz.transition 1994, 3, :o4, 764712000 - tz.transition 1994, 9, :o1, 780436800 - tz.transition 1995, 3, :o4, 796161600 - tz.transition 1995, 9, :o1, 811886400 - tz.transition 1996, 3, :o4, 828216000 - tz.transition 1996, 10, :o1, 846360000 - tz.transition 1997, 3, :o4, 859665600 - tz.transition 1997, 10, :o1, 877809600 - tz.transition 1998, 3, :o4, 891115200 - tz.transition 1998, 10, :o1, 909259200 - tz.transition 1999, 3, :o4, 922564800 - tz.transition 1999, 10, :o1, 941313600 - tz.transition 2000, 3, :o4, 954014400 - tz.transition 2000, 10, :o1, 972763200 - tz.transition 2001, 3, :o4, 985464000 - tz.transition 2001, 10, :o1, 1004212800 - tz.transition 2002, 3, :o4, 1017518400 - tz.transition 2002, 10, :o1, 1035662400 - tz.transition 2003, 3, :o4, 1048968000 - tz.transition 2003, 10, :o1, 1067112000 - tz.transition 2004, 3, :o4, 1080417600 - tz.transition 2004, 10, :o1, 1099166400 - tz.transition 2005, 3, :o4, 1111867200 - tz.transition 2005, 10, :o1, 1130616000 - tz.transition 2006, 3, :o4, 1143316800 - tz.transition 2006, 10, :o1, 1162065600 - tz.transition 2007, 3, :o4, 1174766400 - tz.transition 2007, 10, :o1, 1193515200 - tz.transition 2008, 3, :o4, 1206820800 - tz.transition 2008, 10, :o1, 1224964800 - tz.transition 2009, 3, :o4, 1238270400 - tz.transition 2009, 10, :o1, 1256414400 - tz.transition 2010, 3, :o4, 1269720000 - tz.transition 2010, 10, :o1, 1288468800 - tz.transition 2011, 3, :o4, 1301169600 - tz.transition 2011, 10, :o1, 1319918400 - tz.transition 2012, 3, :o4, 1332619200 - tz.transition 2012, 10, :o1, 1351368000 - tz.transition 2013, 3, :o4, 1364673600 - tz.transition 2013, 10, :o1, 1382817600 - tz.transition 2014, 3, :o4, 1396123200 - tz.transition 2014, 10, :o1, 1414267200 - tz.transition 2015, 3, :o4, 1427572800 - tz.transition 2015, 10, :o1, 1445716800 - tz.transition 2016, 3, :o4, 1459022400 - tz.transition 2016, 10, :o1, 1477771200 - tz.transition 2017, 3, :o4, 1490472000 - tz.transition 2017, 10, :o1, 1509220800 - tz.transition 2018, 3, :o4, 1521921600 - tz.transition 2018, 10, :o1, 1540670400 - tz.transition 2019, 3, :o4, 1553976000 - tz.transition 2019, 10, :o1, 1572120000 - tz.transition 2020, 3, :o4, 1585425600 - tz.transition 2020, 10, :o1, 1603569600 - tz.transition 2021, 3, :o4, 1616875200 - tz.transition 2021, 10, :o1, 1635624000 - tz.transition 2022, 3, :o4, 1648324800 - tz.transition 2022, 10, :o1, 1667073600 - tz.transition 2023, 3, :o4, 1679774400 - tz.transition 2023, 10, :o1, 1698523200 - tz.transition 2024, 3, :o4, 1711828800 - tz.transition 2024, 10, :o1, 1729972800 - tz.transition 2025, 3, :o4, 1743278400 - tz.transition 2025, 10, :o1, 1761422400 - tz.transition 2026, 3, :o4, 1774728000 - tz.transition 2026, 10, :o1, 1792872000 - tz.transition 2027, 3, :o4, 1806177600 - tz.transition 2027, 10, :o1, 1824926400 - tz.transition 2028, 3, :o4, 1837627200 - tz.transition 2028, 10, :o1, 1856376000 - tz.transition 2029, 3, :o4, 1869076800 - tz.transition 2029, 10, :o1, 1887825600 - tz.transition 2030, 3, :o4, 1901131200 - tz.transition 2030, 10, :o1, 1919275200 - tz.transition 2031, 3, :o4, 1932580800 - tz.transition 2031, 10, :o1, 1950724800 - tz.transition 2032, 3, :o4, 1964030400 - tz.transition 2032, 10, :o1, 1982779200 - tz.transition 2033, 3, :o4, 1995480000 - tz.transition 2033, 10, :o1, 2014228800 - tz.transition 2034, 3, :o4, 2026929600 - tz.transition 2034, 10, :o1, 2045678400 - tz.transition 2035, 3, :o4, 2058379200 - tz.transition 2035, 10, :o1, 2077128000 - tz.transition 2036, 3, :o4, 2090433600 - tz.transition 2036, 10, :o1, 2108577600 - tz.transition 2037, 3, :o4, 2121883200 - tz.transition 2037, 10, :o1, 2140027200 - tz.transition 2038, 3, :o4, 7396531, 3 - tz.transition 2038, 10, :o1, 7397182, 3 - tz.transition 2039, 3, :o4, 7397623, 3 - tz.transition 2039, 10, :o1, 7398274, 3 - tz.transition 2040, 3, :o4, 7398715, 3 - tz.transition 2040, 10, :o1, 7399366, 3 - tz.transition 2041, 3, :o4, 7399828, 3 - tz.transition 2041, 10, :o1, 7400458, 3 - tz.transition 2042, 3, :o4, 7400920, 3 - tz.transition 2042, 10, :o1, 7401550, 3 - tz.transition 2043, 3, :o4, 7402012, 3 - tz.transition 2043, 10, :o1, 7402642, 3 - tz.transition 2044, 3, :o4, 7403104, 3 - tz.transition 2044, 10, :o1, 7403755, 3 - tz.transition 2045, 3, :o4, 7404196, 3 - tz.transition 2045, 10, :o1, 7404847, 3 - tz.transition 2046, 3, :o4, 7405288, 3 - tz.transition 2046, 10, :o1, 7405939, 3 - tz.transition 2047, 3, :o4, 7406401, 3 - tz.transition 2047, 10, :o1, 7407031, 3 - tz.transition 2048, 3, :o4, 7407493, 3 - tz.transition 2048, 10, :o1, 7408123, 3 - tz.transition 2049, 3, :o4, 7408585, 3 - tz.transition 2049, 10, :o1, 7409236, 3 - tz.transition 2050, 3, :o4, 7409677, 3 - tz.transition 2050, 10, :o1, 7410328, 3 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Rangoon.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Rangoon.rb deleted file mode 100644 index 759b82d77a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Rangoon.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Rangoon - include TimezoneDefinition - - timezone 'Asia/Rangoon' do |tz| - tz.offset :o0, 23080, 0, :LMT - tz.offset :o1, 23076, 0, :RMT - tz.offset :o2, 23400, 0, :BURT - tz.offset :o3, 32400, 0, :JST - tz.offset :o4, 23400, 0, :MMT - - tz.transition 1879, 12, :o1, 5200664903, 2160 - tz.transition 1919, 12, :o2, 5813578159, 2400 - tz.transition 1942, 4, :o3, 116663051, 48 - tz.transition 1945, 5, :o4, 19452625, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Riyadh.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Riyadh.rb deleted file mode 100644 index 7add410620..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Riyadh.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Riyadh - include TimezoneDefinition - - timezone 'Asia/Riyadh' do |tz| - tz.offset :o0, 11212, 0, :LMT - tz.offset :o1, 10800, 0, :AST - - tz.transition 1949, 12, :o1, 52558899197, 21600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Seoul.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Seoul.rb deleted file mode 100644 index 795d2a75df..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Seoul.rb +++ /dev/null @@ -1,34 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Seoul - include TimezoneDefinition - - timezone 'Asia/Seoul' do |tz| - tz.offset :o0, 30472, 0, :LMT - tz.offset :o1, 30600, 0, :KST - tz.offset :o2, 32400, 0, :KST - tz.offset :o3, 28800, 0, :KST - tz.offset :o4, 28800, 3600, :KDT - tz.offset :o5, 32400, 3600, :KDT - - tz.transition 1889, 12, :o1, 26042775991, 10800 - tz.transition 1904, 11, :o2, 116007127, 48 - tz.transition 1927, 12, :o1, 19401969, 8 - tz.transition 1931, 12, :o2, 116481943, 48 - tz.transition 1954, 3, :o3, 19478577, 8 - tz.transition 1960, 5, :o4, 14622415, 6 - tz.transition 1960, 9, :o3, 19497521, 8 - tz.transition 1961, 8, :o1, 14625127, 6 - tz.transition 1968, 9, :o2, 117126247, 48 - tz.transition 1987, 5, :o5, 547570800 - tz.transition 1987, 10, :o2, 560872800 - tz.transition 1988, 5, :o5, 579020400 - tz.transition 1988, 10, :o2, 592322400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Shanghai.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Shanghai.rb deleted file mode 100644 index 34b13d59ae..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Shanghai.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Shanghai - include TimezoneDefinition - - timezone 'Asia/Shanghai' do |tz| - tz.offset :o0, 29152, 0, :LMT - tz.offset :o1, 28800, 0, :CST - tz.offset :o2, 28800, 3600, :CDT - - tz.transition 1927, 12, :o1, 6548164639, 2700 - tz.transition 1940, 6, :o2, 14578699, 6 - tz.transition 1940, 9, :o1, 19439225, 8 - tz.transition 1941, 3, :o2, 14580415, 6 - tz.transition 1941, 9, :o1, 19442145, 8 - tz.transition 1986, 5, :o2, 515520000 - tz.transition 1986, 9, :o1, 527007600 - tz.transition 1987, 4, :o2, 545155200 - tz.transition 1987, 9, :o1, 558457200 - tz.transition 1988, 4, :o2, 576604800 - tz.transition 1988, 9, :o1, 589906800 - tz.transition 1989, 4, :o2, 608659200 - tz.transition 1989, 9, :o1, 621961200 - tz.transition 1990, 4, :o2, 640108800 - tz.transition 1990, 9, :o1, 653410800 - tz.transition 1991, 4, :o2, 671558400 - tz.transition 1991, 9, :o1, 684860400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Singapore.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Singapore.rb deleted file mode 100644 index b323a78f74..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Singapore.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Singapore - include TimezoneDefinition - - timezone 'Asia/Singapore' do |tz| - tz.offset :o0, 24925, 0, :LMT - tz.offset :o1, 24925, 0, :SMT - tz.offset :o2, 25200, 0, :MALT - tz.offset :o3, 25200, 1200, :MALST - tz.offset :o4, 26400, 0, :MALT - tz.offset :o5, 27000, 0, :MALT - tz.offset :o6, 32400, 0, :JST - tz.offset :o7, 27000, 0, :SGT - tz.offset :o8, 28800, 0, :SGT - - tz.transition 1900, 12, :o1, 8347571291, 3456 - tz.transition 1905, 5, :o2, 8353142363, 3456 - tz.transition 1932, 12, :o3, 58249757, 24 - tz.transition 1935, 12, :o4, 87414055, 36 - tz.transition 1941, 8, :o5, 87488575, 36 - tz.transition 1942, 2, :o6, 38886499, 16 - tz.transition 1945, 9, :o5, 19453681, 8 - tz.transition 1965, 8, :o7, 39023699, 16 - tz.transition 1981, 12, :o8, 378664200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Taipei.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Taipei.rb deleted file mode 100644 index 3ba12108fb..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Taipei.rb +++ /dev/null @@ -1,59 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Taipei - include TimezoneDefinition - - timezone 'Asia/Taipei' do |tz| - tz.offset :o0, 29160, 0, :LMT - tz.offset :o1, 28800, 0, :CST - tz.offset :o2, 28800, 3600, :CDT - - tz.transition 1895, 12, :o1, 193084733, 80 - tz.transition 1945, 4, :o2, 14589457, 6 - tz.transition 1945, 9, :o1, 19453833, 8 - tz.transition 1946, 4, :o2, 14591647, 6 - tz.transition 1946, 9, :o1, 19456753, 8 - tz.transition 1947, 4, :o2, 14593837, 6 - tz.transition 1947, 9, :o1, 19459673, 8 - tz.transition 1948, 4, :o2, 14596033, 6 - tz.transition 1948, 9, :o1, 19462601, 8 - tz.transition 1949, 4, :o2, 14598223, 6 - tz.transition 1949, 9, :o1, 19465521, 8 - tz.transition 1950, 4, :o2, 14600413, 6 - tz.transition 1950, 9, :o1, 19468441, 8 - tz.transition 1951, 4, :o2, 14602603, 6 - tz.transition 1951, 9, :o1, 19471361, 8 - tz.transition 1952, 2, :o2, 14604433, 6 - tz.transition 1952, 10, :o1, 19474537, 8 - tz.transition 1953, 3, :o2, 14606809, 6 - tz.transition 1953, 10, :o1, 19477457, 8 - tz.transition 1954, 3, :o2, 14608999, 6 - tz.transition 1954, 10, :o1, 19480377, 8 - tz.transition 1955, 3, :o2, 14611189, 6 - tz.transition 1955, 9, :o1, 19483049, 8 - tz.transition 1956, 3, :o2, 14613385, 6 - tz.transition 1956, 9, :o1, 19485977, 8 - tz.transition 1957, 3, :o2, 14615575, 6 - tz.transition 1957, 9, :o1, 19488897, 8 - tz.transition 1958, 3, :o2, 14617765, 6 - tz.transition 1958, 9, :o1, 19491817, 8 - tz.transition 1959, 3, :o2, 14619955, 6 - tz.transition 1959, 9, :o1, 19494737, 8 - tz.transition 1960, 5, :o2, 14622517, 6 - tz.transition 1960, 9, :o1, 19497665, 8 - tz.transition 1961, 5, :o2, 14624707, 6 - tz.transition 1961, 9, :o1, 19500585, 8 - tz.transition 1974, 3, :o2, 133977600 - tz.transition 1974, 9, :o1, 149785200 - tz.transition 1975, 3, :o2, 165513600 - tz.transition 1975, 9, :o1, 181321200 - tz.transition 1980, 6, :o2, 331142400 - tz.transition 1980, 9, :o1, 339087600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tashkent.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tashkent.rb deleted file mode 100644 index c205c7934d..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tashkent.rb +++ /dev/null @@ -1,47 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Tashkent - include TimezoneDefinition - - timezone 'Asia/Tashkent' do |tz| - tz.offset :o0, 16632, 0, :LMT - tz.offset :o1, 18000, 0, :TAST - tz.offset :o2, 21600, 0, :TAST - tz.offset :o3, 21600, 3600, :TASST - tz.offset :o4, 18000, 3600, :TASST - tz.offset :o5, 18000, 3600, :UZST - tz.offset :o6, 18000, 0, :UZT - - tz.transition 1924, 5, :o1, 969562923, 400 - tz.transition 1930, 6, :o2, 58227559, 24 - tz.transition 1981, 3, :o3, 354909600 - tz.transition 1981, 9, :o2, 370717200 - tz.transition 1982, 3, :o3, 386445600 - tz.transition 1982, 9, :o2, 402253200 - tz.transition 1983, 3, :o3, 417981600 - tz.transition 1983, 9, :o2, 433789200 - tz.transition 1984, 3, :o3, 449604000 - tz.transition 1984, 9, :o2, 465336000 - tz.transition 1985, 3, :o3, 481060800 - tz.transition 1985, 9, :o2, 496785600 - tz.transition 1986, 3, :o3, 512510400 - tz.transition 1986, 9, :o2, 528235200 - tz.transition 1987, 3, :o3, 543960000 - tz.transition 1987, 9, :o2, 559684800 - tz.transition 1988, 3, :o3, 575409600 - tz.transition 1988, 9, :o2, 591134400 - tz.transition 1989, 3, :o3, 606859200 - tz.transition 1989, 9, :o2, 622584000 - tz.transition 1990, 3, :o3, 638308800 - tz.transition 1990, 9, :o2, 654638400 - tz.transition 1991, 3, :o4, 670363200 - tz.transition 1991, 8, :o5, 683661600 - tz.transition 1991, 9, :o6, 686091600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tbilisi.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tbilisi.rb deleted file mode 100644 index 15792a5651..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tbilisi.rb +++ /dev/null @@ -1,78 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Tbilisi - include TimezoneDefinition - - timezone 'Asia/Tbilisi' do |tz| - tz.offset :o0, 10756, 0, :LMT - tz.offset :o1, 10756, 0, :TBMT - tz.offset :o2, 10800, 0, :TBIT - tz.offset :o3, 14400, 0, :TBIT - tz.offset :o4, 14400, 3600, :TBIST - tz.offset :o5, 10800, 3600, :TBIST - tz.offset :o6, 10800, 3600, :GEST - tz.offset :o7, 10800, 0, :GET - tz.offset :o8, 14400, 0, :GET - tz.offset :o9, 14400, 3600, :GEST - - tz.transition 1879, 12, :o1, 52006652111, 21600 - tz.transition 1924, 5, :o2, 52356399311, 21600 - tz.transition 1957, 2, :o3, 19487187, 8 - tz.transition 1981, 3, :o4, 354916800 - tz.transition 1981, 9, :o3, 370724400 - tz.transition 1982, 3, :o4, 386452800 - tz.transition 1982, 9, :o3, 402260400 - tz.transition 1983, 3, :o4, 417988800 - tz.transition 1983, 9, :o3, 433796400 - tz.transition 1984, 3, :o4, 449611200 - tz.transition 1984, 9, :o3, 465343200 - tz.transition 1985, 3, :o4, 481068000 - tz.transition 1985, 9, :o3, 496792800 - tz.transition 1986, 3, :o4, 512517600 - tz.transition 1986, 9, :o3, 528242400 - tz.transition 1987, 3, :o4, 543967200 - tz.transition 1987, 9, :o3, 559692000 - tz.transition 1988, 3, :o4, 575416800 - tz.transition 1988, 9, :o3, 591141600 - tz.transition 1989, 3, :o4, 606866400 - tz.transition 1989, 9, :o3, 622591200 - tz.transition 1990, 3, :o4, 638316000 - tz.transition 1990, 9, :o3, 654645600 - tz.transition 1991, 3, :o5, 670370400 - tz.transition 1991, 4, :o6, 671140800 - tz.transition 1991, 9, :o7, 686098800 - tz.transition 1992, 3, :o6, 701816400 - tz.transition 1992, 9, :o7, 717537600 - tz.transition 1993, 3, :o6, 733266000 - tz.transition 1993, 9, :o7, 748987200 - tz.transition 1994, 3, :o6, 764715600 - tz.transition 1994, 9, :o8, 780436800 - tz.transition 1995, 3, :o9, 796161600 - tz.transition 1995, 9, :o8, 811882800 - tz.transition 1996, 3, :o9, 828216000 - tz.transition 1997, 3, :o9, 859662000 - tz.transition 1997, 10, :o8, 877806000 - tz.transition 1998, 3, :o9, 891115200 - tz.transition 1998, 10, :o8, 909255600 - tz.transition 1999, 3, :o9, 922564800 - tz.transition 1999, 10, :o8, 941310000 - tz.transition 2000, 3, :o9, 954014400 - tz.transition 2000, 10, :o8, 972759600 - tz.transition 2001, 3, :o9, 985464000 - tz.transition 2001, 10, :o8, 1004209200 - tz.transition 2002, 3, :o9, 1017518400 - tz.transition 2002, 10, :o8, 1035658800 - tz.transition 2003, 3, :o9, 1048968000 - tz.transition 2003, 10, :o8, 1067108400 - tz.transition 2004, 3, :o9, 1080417600 - tz.transition 2004, 6, :o6, 1088276400 - tz.transition 2004, 10, :o7, 1099177200 - tz.transition 2005, 3, :o8, 1111878000 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tehran.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tehran.rb deleted file mode 100644 index d8df964a46..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tehran.rb +++ /dev/null @@ -1,121 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Tehran - include TimezoneDefinition - - timezone 'Asia/Tehran' do |tz| - tz.offset :o0, 12344, 0, :LMT - tz.offset :o1, 12344, 0, :TMT - tz.offset :o2, 12600, 0, :IRST - tz.offset :o3, 14400, 0, :IRST - tz.offset :o4, 14400, 3600, :IRDT - tz.offset :o5, 12600, 3600, :IRDT - - tz.transition 1915, 12, :o1, 26145324257, 10800 - tz.transition 1945, 12, :o2, 26263670657, 10800 - tz.transition 1977, 10, :o3, 247177800 - tz.transition 1978, 3, :o4, 259272000 - tz.transition 1978, 10, :o3, 277758000 - tz.transition 1978, 12, :o2, 283982400 - tz.transition 1979, 3, :o5, 290809800 - tz.transition 1979, 9, :o2, 306531000 - tz.transition 1980, 3, :o5, 322432200 - tz.transition 1980, 9, :o2, 338499000 - tz.transition 1991, 5, :o5, 673216200 - tz.transition 1991, 9, :o2, 685481400 - tz.transition 1992, 3, :o5, 701209800 - tz.transition 1992, 9, :o2, 717103800 - tz.transition 1993, 3, :o5, 732745800 - tz.transition 1993, 9, :o2, 748639800 - tz.transition 1994, 3, :o5, 764281800 - tz.transition 1994, 9, :o2, 780175800 - tz.transition 1995, 3, :o5, 795817800 - tz.transition 1995, 9, :o2, 811711800 - tz.transition 1996, 3, :o5, 827353800 - tz.transition 1996, 9, :o2, 843247800 - tz.transition 1997, 3, :o5, 858976200 - tz.transition 1997, 9, :o2, 874870200 - tz.transition 1998, 3, :o5, 890512200 - tz.transition 1998, 9, :o2, 906406200 - tz.transition 1999, 3, :o5, 922048200 - tz.transition 1999, 9, :o2, 937942200 - tz.transition 2000, 3, :o5, 953584200 - tz.transition 2000, 9, :o2, 969478200 - tz.transition 2001, 3, :o5, 985206600 - tz.transition 2001, 9, :o2, 1001100600 - tz.transition 2002, 3, :o5, 1016742600 - tz.transition 2002, 9, :o2, 1032636600 - tz.transition 2003, 3, :o5, 1048278600 - tz.transition 2003, 9, :o2, 1064172600 - tz.transition 2004, 3, :o5, 1079814600 - tz.transition 2004, 9, :o2, 1095708600 - tz.transition 2005, 3, :o5, 1111437000 - tz.transition 2005, 9, :o2, 1127331000 - tz.transition 2008, 3, :o5, 1206045000 - tz.transition 2008, 9, :o2, 1221939000 - tz.transition 2009, 3, :o5, 1237667400 - tz.transition 2009, 9, :o2, 1253561400 - tz.transition 2010, 3, :o5, 1269203400 - tz.transition 2010, 9, :o2, 1285097400 - tz.transition 2011, 3, :o5, 1300739400 - tz.transition 2011, 9, :o2, 1316633400 - tz.transition 2012, 3, :o5, 1332275400 - tz.transition 2012, 9, :o2, 1348169400 - tz.transition 2013, 3, :o5, 1363897800 - tz.transition 2013, 9, :o2, 1379791800 - tz.transition 2014, 3, :o5, 1395433800 - tz.transition 2014, 9, :o2, 1411327800 - tz.transition 2015, 3, :o5, 1426969800 - tz.transition 2015, 9, :o2, 1442863800 - tz.transition 2016, 3, :o5, 1458505800 - tz.transition 2016, 9, :o2, 1474399800 - tz.transition 2017, 3, :o5, 1490128200 - tz.transition 2017, 9, :o2, 1506022200 - tz.transition 2018, 3, :o5, 1521664200 - tz.transition 2018, 9, :o2, 1537558200 - tz.transition 2019, 3, :o5, 1553200200 - tz.transition 2019, 9, :o2, 1569094200 - tz.transition 2020, 3, :o5, 1584736200 - tz.transition 2020, 9, :o2, 1600630200 - tz.transition 2021, 3, :o5, 1616358600 - tz.transition 2021, 9, :o2, 1632252600 - tz.transition 2022, 3, :o5, 1647894600 - tz.transition 2022, 9, :o2, 1663788600 - tz.transition 2023, 3, :o5, 1679430600 - tz.transition 2023, 9, :o2, 1695324600 - tz.transition 2024, 3, :o5, 1710966600 - tz.transition 2024, 9, :o2, 1726860600 - tz.transition 2025, 3, :o5, 1742589000 - tz.transition 2025, 9, :o2, 1758483000 - tz.transition 2026, 3, :o5, 1774125000 - tz.transition 2026, 9, :o2, 1790019000 - tz.transition 2027, 3, :o5, 1805661000 - tz.transition 2027, 9, :o2, 1821555000 - tz.transition 2028, 3, :o5, 1837197000 - tz.transition 2028, 9, :o2, 1853091000 - tz.transition 2029, 3, :o5, 1868733000 - tz.transition 2029, 9, :o2, 1884627000 - tz.transition 2030, 3, :o5, 1900355400 - tz.transition 2030, 9, :o2, 1916249400 - tz.transition 2031, 3, :o5, 1931891400 - tz.transition 2031, 9, :o2, 1947785400 - tz.transition 2032, 3, :o5, 1963427400 - tz.transition 2032, 9, :o2, 1979321400 - tz.transition 2033, 3, :o5, 1994963400 - tz.transition 2033, 9, :o2, 2010857400 - tz.transition 2034, 3, :o5, 2026585800 - tz.transition 2034, 9, :o2, 2042479800 - tz.transition 2035, 3, :o5, 2058121800 - tz.transition 2035, 9, :o2, 2074015800 - tz.transition 2036, 3, :o5, 2089657800 - tz.transition 2036, 9, :o2, 2105551800 - tz.transition 2037, 3, :o5, 2121193800 - tz.transition 2037, 9, :o2, 2137087800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tokyo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tokyo.rb deleted file mode 100644 index 51c9e16421..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Tokyo.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Tokyo - include TimezoneDefinition - - timezone 'Asia/Tokyo' do |tz| - tz.offset :o0, 33539, 0, :LMT - tz.offset :o1, 32400, 0, :JST - tz.offset :o2, 32400, 0, :CJT - tz.offset :o3, 32400, 3600, :JDT - - tz.transition 1887, 12, :o1, 19285097, 8 - tz.transition 1895, 12, :o2, 19308473, 8 - tz.transition 1937, 12, :o1, 19431193, 8 - tz.transition 1948, 5, :o3, 58384157, 24 - tz.transition 1948, 9, :o1, 14596831, 6 - tz.transition 1949, 4, :o3, 58392221, 24 - tz.transition 1949, 9, :o1, 14599015, 6 - tz.transition 1950, 5, :o3, 58401797, 24 - tz.transition 1950, 9, :o1, 14601199, 6 - tz.transition 1951, 5, :o3, 58410533, 24 - tz.transition 1951, 9, :o1, 14603383, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Ulaanbaatar.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Ulaanbaatar.rb deleted file mode 100644 index 2854f5c5fd..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Ulaanbaatar.rb +++ /dev/null @@ -1,65 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Ulaanbaatar - include TimezoneDefinition - - timezone 'Asia/Ulaanbaatar' do |tz| - tz.offset :o0, 25652, 0, :LMT - tz.offset :o1, 25200, 0, :ULAT - tz.offset :o2, 28800, 0, :ULAT - tz.offset :o3, 28800, 3600, :ULAST - - tz.transition 1905, 7, :o1, 52208457187, 21600 - tz.transition 1977, 12, :o2, 252435600 - tz.transition 1983, 3, :o3, 417974400 - tz.transition 1983, 9, :o2, 433782000 - tz.transition 1984, 3, :o3, 449596800 - tz.transition 1984, 9, :o2, 465318000 - tz.transition 1985, 3, :o3, 481046400 - tz.transition 1985, 9, :o2, 496767600 - tz.transition 1986, 3, :o3, 512496000 - tz.transition 1986, 9, :o2, 528217200 - tz.transition 1987, 3, :o3, 543945600 - tz.transition 1987, 9, :o2, 559666800 - tz.transition 1988, 3, :o3, 575395200 - tz.transition 1988, 9, :o2, 591116400 - tz.transition 1989, 3, :o3, 606844800 - tz.transition 1989, 9, :o2, 622566000 - tz.transition 1990, 3, :o3, 638294400 - tz.transition 1990, 9, :o2, 654620400 - tz.transition 1991, 3, :o3, 670348800 - tz.transition 1991, 9, :o2, 686070000 - tz.transition 1992, 3, :o3, 701798400 - tz.transition 1992, 9, :o2, 717519600 - tz.transition 1993, 3, :o3, 733248000 - tz.transition 1993, 9, :o2, 748969200 - tz.transition 1994, 3, :o3, 764697600 - tz.transition 1994, 9, :o2, 780418800 - tz.transition 1995, 3, :o3, 796147200 - tz.transition 1995, 9, :o2, 811868400 - tz.transition 1996, 3, :o3, 828201600 - tz.transition 1996, 9, :o2, 843922800 - tz.transition 1997, 3, :o3, 859651200 - tz.transition 1997, 9, :o2, 875372400 - tz.transition 1998, 3, :o3, 891100800 - tz.transition 1998, 9, :o2, 906822000 - tz.transition 2001, 4, :o3, 988394400 - tz.transition 2001, 9, :o2, 1001696400 - tz.transition 2002, 3, :o3, 1017424800 - tz.transition 2002, 9, :o2, 1033146000 - tz.transition 2003, 3, :o3, 1048874400 - tz.transition 2003, 9, :o2, 1064595600 - tz.transition 2004, 3, :o3, 1080324000 - tz.transition 2004, 9, :o2, 1096045200 - tz.transition 2005, 3, :o3, 1111773600 - tz.transition 2005, 9, :o2, 1127494800 - tz.transition 2006, 3, :o3, 1143223200 - tz.transition 2006, 9, :o2, 1159549200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Urumqi.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Urumqi.rb deleted file mode 100644 index d793ff1341..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Urumqi.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Urumqi - include TimezoneDefinition - - timezone 'Asia/Urumqi' do |tz| - tz.offset :o0, 21020, 0, :LMT - tz.offset :o1, 21600, 0, :URUT - tz.offset :o2, 28800, 0, :CST - tz.offset :o3, 28800, 3600, :CDT - - tz.transition 1927, 12, :o1, 10477063829, 4320 - tz.transition 1980, 4, :o2, 325965600 - tz.transition 1986, 5, :o3, 515520000 - tz.transition 1986, 9, :o2, 527007600 - tz.transition 1987, 4, :o3, 545155200 - tz.transition 1987, 9, :o2, 558457200 - tz.transition 1988, 4, :o3, 576604800 - tz.transition 1988, 9, :o2, 589906800 - tz.transition 1989, 4, :o3, 608659200 - tz.transition 1989, 9, :o2, 621961200 - tz.transition 1990, 4, :o3, 640108800 - tz.transition 1990, 9, :o2, 653410800 - tz.transition 1991, 4, :o3, 671558400 - tz.transition 1991, 9, :o2, 684860400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Vladivostok.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Vladivostok.rb deleted file mode 100644 index bd9e3d60ec..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Vladivostok.rb +++ /dev/null @@ -1,164 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Vladivostok - include TimezoneDefinition - - timezone 'Asia/Vladivostok' do |tz| - tz.offset :o0, 31664, 0, :LMT - tz.offset :o1, 32400, 0, :VLAT - tz.offset :o2, 36000, 0, :VLAT - tz.offset :o3, 36000, 3600, :VLAST - tz.offset :o4, 32400, 3600, :VLASST - tz.offset :o5, 32400, 0, :VLAST - - tz.transition 1922, 11, :o1, 13086214921, 5400 - tz.transition 1930, 6, :o2, 19409185, 8 - tz.transition 1981, 3, :o3, 354895200 - tz.transition 1981, 9, :o2, 370702800 - tz.transition 1982, 3, :o3, 386431200 - tz.transition 1982, 9, :o2, 402238800 - tz.transition 1983, 3, :o3, 417967200 - tz.transition 1983, 9, :o2, 433774800 - tz.transition 1984, 3, :o3, 449589600 - tz.transition 1984, 9, :o2, 465321600 - tz.transition 1985, 3, :o3, 481046400 - tz.transition 1985, 9, :o2, 496771200 - tz.transition 1986, 3, :o3, 512496000 - tz.transition 1986, 9, :o2, 528220800 - tz.transition 1987, 3, :o3, 543945600 - tz.transition 1987, 9, :o2, 559670400 - tz.transition 1988, 3, :o3, 575395200 - tz.transition 1988, 9, :o2, 591120000 - tz.transition 1989, 3, :o3, 606844800 - tz.transition 1989, 9, :o2, 622569600 - tz.transition 1990, 3, :o3, 638294400 - tz.transition 1990, 9, :o2, 654624000 - tz.transition 1991, 3, :o4, 670348800 - tz.transition 1991, 9, :o5, 686077200 - tz.transition 1992, 1, :o2, 695754000 - tz.transition 1992, 3, :o3, 701787600 - tz.transition 1992, 9, :o2, 717508800 - tz.transition 1993, 3, :o3, 733248000 - tz.transition 1993, 9, :o2, 748972800 - tz.transition 1994, 3, :o3, 764697600 - tz.transition 1994, 9, :o2, 780422400 - tz.transition 1995, 3, :o3, 796147200 - tz.transition 1995, 9, :o2, 811872000 - tz.transition 1996, 3, :o3, 828201600 - tz.transition 1996, 10, :o2, 846345600 - tz.transition 1997, 3, :o3, 859651200 - tz.transition 1997, 10, :o2, 877795200 - tz.transition 1998, 3, :o3, 891100800 - tz.transition 1998, 10, :o2, 909244800 - tz.transition 1999, 3, :o3, 922550400 - tz.transition 1999, 10, :o2, 941299200 - tz.transition 2000, 3, :o3, 954000000 - tz.transition 2000, 10, :o2, 972748800 - tz.transition 2001, 3, :o3, 985449600 - tz.transition 2001, 10, :o2, 1004198400 - tz.transition 2002, 3, :o3, 1017504000 - tz.transition 2002, 10, :o2, 1035648000 - tz.transition 2003, 3, :o3, 1048953600 - tz.transition 2003, 10, :o2, 1067097600 - tz.transition 2004, 3, :o3, 1080403200 - tz.transition 2004, 10, :o2, 1099152000 - tz.transition 2005, 3, :o3, 1111852800 - tz.transition 2005, 10, :o2, 1130601600 - tz.transition 2006, 3, :o3, 1143302400 - tz.transition 2006, 10, :o2, 1162051200 - tz.transition 2007, 3, :o3, 1174752000 - tz.transition 2007, 10, :o2, 1193500800 - tz.transition 2008, 3, :o3, 1206806400 - tz.transition 2008, 10, :o2, 1224950400 - tz.transition 2009, 3, :o3, 1238256000 - tz.transition 2009, 10, :o2, 1256400000 - tz.transition 2010, 3, :o3, 1269705600 - tz.transition 2010, 10, :o2, 1288454400 - tz.transition 2011, 3, :o3, 1301155200 - tz.transition 2011, 10, :o2, 1319904000 - tz.transition 2012, 3, :o3, 1332604800 - tz.transition 2012, 10, :o2, 1351353600 - tz.transition 2013, 3, :o3, 1364659200 - tz.transition 2013, 10, :o2, 1382803200 - tz.transition 2014, 3, :o3, 1396108800 - tz.transition 2014, 10, :o2, 1414252800 - tz.transition 2015, 3, :o3, 1427558400 - tz.transition 2015, 10, :o2, 1445702400 - tz.transition 2016, 3, :o3, 1459008000 - tz.transition 2016, 10, :o2, 1477756800 - tz.transition 2017, 3, :o3, 1490457600 - tz.transition 2017, 10, :o2, 1509206400 - tz.transition 2018, 3, :o3, 1521907200 - tz.transition 2018, 10, :o2, 1540656000 - tz.transition 2019, 3, :o3, 1553961600 - tz.transition 2019, 10, :o2, 1572105600 - tz.transition 2020, 3, :o3, 1585411200 - tz.transition 2020, 10, :o2, 1603555200 - tz.transition 2021, 3, :o3, 1616860800 - tz.transition 2021, 10, :o2, 1635609600 - tz.transition 2022, 3, :o3, 1648310400 - tz.transition 2022, 10, :o2, 1667059200 - tz.transition 2023, 3, :o3, 1679760000 - tz.transition 2023, 10, :o2, 1698508800 - tz.transition 2024, 3, :o3, 1711814400 - tz.transition 2024, 10, :o2, 1729958400 - tz.transition 2025, 3, :o3, 1743264000 - tz.transition 2025, 10, :o2, 1761408000 - tz.transition 2026, 3, :o3, 1774713600 - tz.transition 2026, 10, :o2, 1792857600 - tz.transition 2027, 3, :o3, 1806163200 - tz.transition 2027, 10, :o2, 1824912000 - tz.transition 2028, 3, :o3, 1837612800 - tz.transition 2028, 10, :o2, 1856361600 - tz.transition 2029, 3, :o3, 1869062400 - tz.transition 2029, 10, :o2, 1887811200 - tz.transition 2030, 3, :o3, 1901116800 - tz.transition 2030, 10, :o2, 1919260800 - tz.transition 2031, 3, :o3, 1932566400 - tz.transition 2031, 10, :o2, 1950710400 - tz.transition 2032, 3, :o3, 1964016000 - tz.transition 2032, 10, :o2, 1982764800 - tz.transition 2033, 3, :o3, 1995465600 - tz.transition 2033, 10, :o2, 2014214400 - tz.transition 2034, 3, :o3, 2026915200 - tz.transition 2034, 10, :o2, 2045664000 - tz.transition 2035, 3, :o3, 2058364800 - tz.transition 2035, 10, :o2, 2077113600 - tz.transition 2036, 3, :o3, 2090419200 - tz.transition 2036, 10, :o2, 2108563200 - tz.transition 2037, 3, :o3, 2121868800 - tz.transition 2037, 10, :o2, 2140012800 - tz.transition 2038, 3, :o3, 14793061, 6 - tz.transition 2038, 10, :o2, 14794363, 6 - tz.transition 2039, 3, :o3, 14795245, 6 - tz.transition 2039, 10, :o2, 14796547, 6 - tz.transition 2040, 3, :o3, 14797429, 6 - tz.transition 2040, 10, :o2, 14798731, 6 - tz.transition 2041, 3, :o3, 14799655, 6 - tz.transition 2041, 10, :o2, 14800915, 6 - tz.transition 2042, 3, :o3, 14801839, 6 - tz.transition 2042, 10, :o2, 14803099, 6 - tz.transition 2043, 3, :o3, 14804023, 6 - tz.transition 2043, 10, :o2, 14805283, 6 - tz.transition 2044, 3, :o3, 14806207, 6 - tz.transition 2044, 10, :o2, 14807509, 6 - tz.transition 2045, 3, :o3, 14808391, 6 - tz.transition 2045, 10, :o2, 14809693, 6 - tz.transition 2046, 3, :o3, 14810575, 6 - tz.transition 2046, 10, :o2, 14811877, 6 - tz.transition 2047, 3, :o3, 14812801, 6 - tz.transition 2047, 10, :o2, 14814061, 6 - tz.transition 2048, 3, :o3, 14814985, 6 - tz.transition 2048, 10, :o2, 14816245, 6 - tz.transition 2049, 3, :o3, 14817169, 6 - tz.transition 2049, 10, :o2, 14818471, 6 - tz.transition 2050, 3, :o3, 14819353, 6 - tz.transition 2050, 10, :o2, 14820655, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Yakutsk.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Yakutsk.rb deleted file mode 100644 index 56435a788f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Yakutsk.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Yakutsk - include TimezoneDefinition - - timezone 'Asia/Yakutsk' do |tz| - tz.offset :o0, 31120, 0, :LMT - tz.offset :o1, 28800, 0, :YAKT - tz.offset :o2, 32400, 0, :YAKT - tz.offset :o3, 32400, 3600, :YAKST - tz.offset :o4, 28800, 3600, :YAKST - - tz.transition 1919, 12, :o1, 2616091711, 1080 - tz.transition 1930, 6, :o2, 14556889, 6 - tz.transition 1981, 3, :o3, 354898800 - tz.transition 1981, 9, :o2, 370706400 - tz.transition 1982, 3, :o3, 386434800 - tz.transition 1982, 9, :o2, 402242400 - tz.transition 1983, 3, :o3, 417970800 - tz.transition 1983, 9, :o2, 433778400 - tz.transition 1984, 3, :o3, 449593200 - tz.transition 1984, 9, :o2, 465325200 - tz.transition 1985, 3, :o3, 481050000 - tz.transition 1985, 9, :o2, 496774800 - tz.transition 1986, 3, :o3, 512499600 - tz.transition 1986, 9, :o2, 528224400 - tz.transition 1987, 3, :o3, 543949200 - tz.transition 1987, 9, :o2, 559674000 - tz.transition 1988, 3, :o3, 575398800 - tz.transition 1988, 9, :o2, 591123600 - tz.transition 1989, 3, :o3, 606848400 - tz.transition 1989, 9, :o2, 622573200 - tz.transition 1990, 3, :o3, 638298000 - tz.transition 1990, 9, :o2, 654627600 - tz.transition 1991, 3, :o4, 670352400 - tz.transition 1991, 9, :o1, 686080800 - tz.transition 1992, 1, :o2, 695757600 - tz.transition 1992, 3, :o3, 701791200 - tz.transition 1992, 9, :o2, 717512400 - tz.transition 1993, 3, :o3, 733251600 - tz.transition 1993, 9, :o2, 748976400 - tz.transition 1994, 3, :o3, 764701200 - tz.transition 1994, 9, :o2, 780426000 - tz.transition 1995, 3, :o3, 796150800 - tz.transition 1995, 9, :o2, 811875600 - tz.transition 1996, 3, :o3, 828205200 - tz.transition 1996, 10, :o2, 846349200 - tz.transition 1997, 3, :o3, 859654800 - tz.transition 1997, 10, :o2, 877798800 - tz.transition 1998, 3, :o3, 891104400 - tz.transition 1998, 10, :o2, 909248400 - tz.transition 1999, 3, :o3, 922554000 - tz.transition 1999, 10, :o2, 941302800 - tz.transition 2000, 3, :o3, 954003600 - tz.transition 2000, 10, :o2, 972752400 - tz.transition 2001, 3, :o3, 985453200 - tz.transition 2001, 10, :o2, 1004202000 - tz.transition 2002, 3, :o3, 1017507600 - tz.transition 2002, 10, :o2, 1035651600 - tz.transition 2003, 3, :o3, 1048957200 - tz.transition 2003, 10, :o2, 1067101200 - tz.transition 2004, 3, :o3, 1080406800 - tz.transition 2004, 10, :o2, 1099155600 - tz.transition 2005, 3, :o3, 1111856400 - tz.transition 2005, 10, :o2, 1130605200 - tz.transition 2006, 3, :o3, 1143306000 - tz.transition 2006, 10, :o2, 1162054800 - tz.transition 2007, 3, :o3, 1174755600 - tz.transition 2007, 10, :o2, 1193504400 - tz.transition 2008, 3, :o3, 1206810000 - tz.transition 2008, 10, :o2, 1224954000 - tz.transition 2009, 3, :o3, 1238259600 - tz.transition 2009, 10, :o2, 1256403600 - tz.transition 2010, 3, :o3, 1269709200 - tz.transition 2010, 10, :o2, 1288458000 - tz.transition 2011, 3, :o3, 1301158800 - tz.transition 2011, 10, :o2, 1319907600 - tz.transition 2012, 3, :o3, 1332608400 - tz.transition 2012, 10, :o2, 1351357200 - tz.transition 2013, 3, :o3, 1364662800 - tz.transition 2013, 10, :o2, 1382806800 - tz.transition 2014, 3, :o3, 1396112400 - tz.transition 2014, 10, :o2, 1414256400 - tz.transition 2015, 3, :o3, 1427562000 - tz.transition 2015, 10, :o2, 1445706000 - tz.transition 2016, 3, :o3, 1459011600 - tz.transition 2016, 10, :o2, 1477760400 - tz.transition 2017, 3, :o3, 1490461200 - tz.transition 2017, 10, :o2, 1509210000 - tz.transition 2018, 3, :o3, 1521910800 - tz.transition 2018, 10, :o2, 1540659600 - tz.transition 2019, 3, :o3, 1553965200 - tz.transition 2019, 10, :o2, 1572109200 - tz.transition 2020, 3, :o3, 1585414800 - tz.transition 2020, 10, :o2, 1603558800 - tz.transition 2021, 3, :o3, 1616864400 - tz.transition 2021, 10, :o2, 1635613200 - tz.transition 2022, 3, :o3, 1648314000 - tz.transition 2022, 10, :o2, 1667062800 - tz.transition 2023, 3, :o3, 1679763600 - tz.transition 2023, 10, :o2, 1698512400 - tz.transition 2024, 3, :o3, 1711818000 - tz.transition 2024, 10, :o2, 1729962000 - tz.transition 2025, 3, :o3, 1743267600 - tz.transition 2025, 10, :o2, 1761411600 - tz.transition 2026, 3, :o3, 1774717200 - tz.transition 2026, 10, :o2, 1792861200 - tz.transition 2027, 3, :o3, 1806166800 - tz.transition 2027, 10, :o2, 1824915600 - tz.transition 2028, 3, :o3, 1837616400 - tz.transition 2028, 10, :o2, 1856365200 - tz.transition 2029, 3, :o3, 1869066000 - tz.transition 2029, 10, :o2, 1887814800 - tz.transition 2030, 3, :o3, 1901120400 - tz.transition 2030, 10, :o2, 1919264400 - tz.transition 2031, 3, :o3, 1932570000 - tz.transition 2031, 10, :o2, 1950714000 - tz.transition 2032, 3, :o3, 1964019600 - tz.transition 2032, 10, :o2, 1982768400 - tz.transition 2033, 3, :o3, 1995469200 - tz.transition 2033, 10, :o2, 2014218000 - tz.transition 2034, 3, :o3, 2026918800 - tz.transition 2034, 10, :o2, 2045667600 - tz.transition 2035, 3, :o3, 2058368400 - tz.transition 2035, 10, :o2, 2077117200 - tz.transition 2036, 3, :o3, 2090422800 - tz.transition 2036, 10, :o2, 2108566800 - tz.transition 2037, 3, :o3, 2121872400 - tz.transition 2037, 10, :o2, 2140016400 - tz.transition 2038, 3, :o3, 59172245, 24 - tz.transition 2038, 10, :o2, 59177453, 24 - tz.transition 2039, 3, :o3, 59180981, 24 - tz.transition 2039, 10, :o2, 59186189, 24 - tz.transition 2040, 3, :o3, 59189717, 24 - tz.transition 2040, 10, :o2, 59194925, 24 - tz.transition 2041, 3, :o3, 59198621, 24 - tz.transition 2041, 10, :o2, 59203661, 24 - tz.transition 2042, 3, :o3, 59207357, 24 - tz.transition 2042, 10, :o2, 59212397, 24 - tz.transition 2043, 3, :o3, 59216093, 24 - tz.transition 2043, 10, :o2, 59221133, 24 - tz.transition 2044, 3, :o3, 59224829, 24 - tz.transition 2044, 10, :o2, 59230037, 24 - tz.transition 2045, 3, :o3, 59233565, 24 - tz.transition 2045, 10, :o2, 59238773, 24 - tz.transition 2046, 3, :o3, 59242301, 24 - tz.transition 2046, 10, :o2, 59247509, 24 - tz.transition 2047, 3, :o3, 59251205, 24 - tz.transition 2047, 10, :o2, 59256245, 24 - tz.transition 2048, 3, :o3, 59259941, 24 - tz.transition 2048, 10, :o2, 59264981, 24 - tz.transition 2049, 3, :o3, 59268677, 24 - tz.transition 2049, 10, :o2, 59273885, 24 - tz.transition 2050, 3, :o3, 59277413, 24 - tz.transition 2050, 10, :o2, 59282621, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Yekaterinburg.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Yekaterinburg.rb deleted file mode 100644 index 8ef8df4a41..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Yekaterinburg.rb +++ /dev/null @@ -1,165 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Yekaterinburg - include TimezoneDefinition - - timezone 'Asia/Yekaterinburg' do |tz| - tz.offset :o0, 14544, 0, :LMT - tz.offset :o1, 14400, 0, :SVET - tz.offset :o2, 18000, 0, :SVET - tz.offset :o3, 18000, 3600, :SVEST - tz.offset :o4, 14400, 3600, :SVEST - tz.offset :o5, 18000, 0, :YEKT - tz.offset :o6, 18000, 3600, :YEKST - - tz.transition 1919, 7, :o1, 1453292699, 600 - tz.transition 1930, 6, :o2, 7278445, 3 - tz.transition 1981, 3, :o3, 354913200 - tz.transition 1981, 9, :o2, 370720800 - tz.transition 1982, 3, :o3, 386449200 - tz.transition 1982, 9, :o2, 402256800 - tz.transition 1983, 3, :o3, 417985200 - tz.transition 1983, 9, :o2, 433792800 - tz.transition 1984, 3, :o3, 449607600 - tz.transition 1984, 9, :o2, 465339600 - tz.transition 1985, 3, :o3, 481064400 - tz.transition 1985, 9, :o2, 496789200 - tz.transition 1986, 3, :o3, 512514000 - tz.transition 1986, 9, :o2, 528238800 - tz.transition 1987, 3, :o3, 543963600 - tz.transition 1987, 9, :o2, 559688400 - tz.transition 1988, 3, :o3, 575413200 - tz.transition 1988, 9, :o2, 591138000 - tz.transition 1989, 3, :o3, 606862800 - tz.transition 1989, 9, :o2, 622587600 - tz.transition 1990, 3, :o3, 638312400 - tz.transition 1990, 9, :o2, 654642000 - tz.transition 1991, 3, :o4, 670366800 - tz.transition 1991, 9, :o1, 686095200 - tz.transition 1992, 1, :o5, 695772000 - tz.transition 1992, 3, :o6, 701805600 - tz.transition 1992, 9, :o5, 717526800 - tz.transition 1993, 3, :o6, 733266000 - tz.transition 1993, 9, :o5, 748990800 - tz.transition 1994, 3, :o6, 764715600 - tz.transition 1994, 9, :o5, 780440400 - tz.transition 1995, 3, :o6, 796165200 - tz.transition 1995, 9, :o5, 811890000 - tz.transition 1996, 3, :o6, 828219600 - tz.transition 1996, 10, :o5, 846363600 - tz.transition 1997, 3, :o6, 859669200 - tz.transition 1997, 10, :o5, 877813200 - tz.transition 1998, 3, :o6, 891118800 - tz.transition 1998, 10, :o5, 909262800 - tz.transition 1999, 3, :o6, 922568400 - tz.transition 1999, 10, :o5, 941317200 - tz.transition 2000, 3, :o6, 954018000 - tz.transition 2000, 10, :o5, 972766800 - tz.transition 2001, 3, :o6, 985467600 - tz.transition 2001, 10, :o5, 1004216400 - tz.transition 2002, 3, :o6, 1017522000 - tz.transition 2002, 10, :o5, 1035666000 - tz.transition 2003, 3, :o6, 1048971600 - tz.transition 2003, 10, :o5, 1067115600 - tz.transition 2004, 3, :o6, 1080421200 - tz.transition 2004, 10, :o5, 1099170000 - tz.transition 2005, 3, :o6, 1111870800 - tz.transition 2005, 10, :o5, 1130619600 - tz.transition 2006, 3, :o6, 1143320400 - tz.transition 2006, 10, :o5, 1162069200 - tz.transition 2007, 3, :o6, 1174770000 - tz.transition 2007, 10, :o5, 1193518800 - tz.transition 2008, 3, :o6, 1206824400 - tz.transition 2008, 10, :o5, 1224968400 - tz.transition 2009, 3, :o6, 1238274000 - tz.transition 2009, 10, :o5, 1256418000 - tz.transition 2010, 3, :o6, 1269723600 - tz.transition 2010, 10, :o5, 1288472400 - tz.transition 2011, 3, :o6, 1301173200 - tz.transition 2011, 10, :o5, 1319922000 - tz.transition 2012, 3, :o6, 1332622800 - tz.transition 2012, 10, :o5, 1351371600 - tz.transition 2013, 3, :o6, 1364677200 - tz.transition 2013, 10, :o5, 1382821200 - tz.transition 2014, 3, :o6, 1396126800 - tz.transition 2014, 10, :o5, 1414270800 - tz.transition 2015, 3, :o6, 1427576400 - tz.transition 2015, 10, :o5, 1445720400 - tz.transition 2016, 3, :o6, 1459026000 - tz.transition 2016, 10, :o5, 1477774800 - tz.transition 2017, 3, :o6, 1490475600 - tz.transition 2017, 10, :o5, 1509224400 - tz.transition 2018, 3, :o6, 1521925200 - tz.transition 2018, 10, :o5, 1540674000 - tz.transition 2019, 3, :o6, 1553979600 - tz.transition 2019, 10, :o5, 1572123600 - tz.transition 2020, 3, :o6, 1585429200 - tz.transition 2020, 10, :o5, 1603573200 - tz.transition 2021, 3, :o6, 1616878800 - tz.transition 2021, 10, :o5, 1635627600 - tz.transition 2022, 3, :o6, 1648328400 - tz.transition 2022, 10, :o5, 1667077200 - tz.transition 2023, 3, :o6, 1679778000 - tz.transition 2023, 10, :o5, 1698526800 - tz.transition 2024, 3, :o6, 1711832400 - tz.transition 2024, 10, :o5, 1729976400 - tz.transition 2025, 3, :o6, 1743282000 - tz.transition 2025, 10, :o5, 1761426000 - tz.transition 2026, 3, :o6, 1774731600 - tz.transition 2026, 10, :o5, 1792875600 - tz.transition 2027, 3, :o6, 1806181200 - tz.transition 2027, 10, :o5, 1824930000 - tz.transition 2028, 3, :o6, 1837630800 - tz.transition 2028, 10, :o5, 1856379600 - tz.transition 2029, 3, :o6, 1869080400 - tz.transition 2029, 10, :o5, 1887829200 - tz.transition 2030, 3, :o6, 1901134800 - tz.transition 2030, 10, :o5, 1919278800 - tz.transition 2031, 3, :o6, 1932584400 - tz.transition 2031, 10, :o5, 1950728400 - tz.transition 2032, 3, :o6, 1964034000 - tz.transition 2032, 10, :o5, 1982782800 - tz.transition 2033, 3, :o6, 1995483600 - tz.transition 2033, 10, :o5, 2014232400 - tz.transition 2034, 3, :o6, 2026933200 - tz.transition 2034, 10, :o5, 2045682000 - tz.transition 2035, 3, :o6, 2058382800 - tz.transition 2035, 10, :o5, 2077131600 - tz.transition 2036, 3, :o6, 2090437200 - tz.transition 2036, 10, :o5, 2108581200 - tz.transition 2037, 3, :o6, 2121886800 - tz.transition 2037, 10, :o5, 2140030800 - tz.transition 2038, 3, :o6, 19724083, 8 - tz.transition 2038, 10, :o5, 19725819, 8 - tz.transition 2039, 3, :o6, 19726995, 8 - tz.transition 2039, 10, :o5, 19728731, 8 - tz.transition 2040, 3, :o6, 19729907, 8 - tz.transition 2040, 10, :o5, 19731643, 8 - tz.transition 2041, 3, :o6, 19732875, 8 - tz.transition 2041, 10, :o5, 19734555, 8 - tz.transition 2042, 3, :o6, 19735787, 8 - tz.transition 2042, 10, :o5, 19737467, 8 - tz.transition 2043, 3, :o6, 19738699, 8 - tz.transition 2043, 10, :o5, 19740379, 8 - tz.transition 2044, 3, :o6, 19741611, 8 - tz.transition 2044, 10, :o5, 19743347, 8 - tz.transition 2045, 3, :o6, 19744523, 8 - tz.transition 2045, 10, :o5, 19746259, 8 - tz.transition 2046, 3, :o6, 19747435, 8 - tz.transition 2046, 10, :o5, 19749171, 8 - tz.transition 2047, 3, :o6, 19750403, 8 - tz.transition 2047, 10, :o5, 19752083, 8 - tz.transition 2048, 3, :o6, 19753315, 8 - tz.transition 2048, 10, :o5, 19754995, 8 - tz.transition 2049, 3, :o6, 19756227, 8 - tz.transition 2049, 10, :o5, 19757963, 8 - tz.transition 2050, 3, :o6, 19759139, 8 - tz.transition 2050, 10, :o5, 19760875, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Yerevan.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Yerevan.rb deleted file mode 100644 index e7f160861f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Asia/Yerevan.rb +++ /dev/null @@ -1,165 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Yerevan - include TimezoneDefinition - - timezone 'Asia/Yerevan' do |tz| - tz.offset :o0, 10680, 0, :LMT - tz.offset :o1, 10800, 0, :YERT - tz.offset :o2, 14400, 0, :YERT - tz.offset :o3, 14400, 3600, :YERST - tz.offset :o4, 10800, 3600, :YERST - tz.offset :o5, 10800, 3600, :AMST - tz.offset :o6, 10800, 0, :AMT - tz.offset :o7, 14400, 0, :AMT - tz.offset :o8, 14400, 3600, :AMST - - tz.transition 1924, 5, :o1, 1745213311, 720 - tz.transition 1957, 2, :o2, 19487187, 8 - tz.transition 1981, 3, :o3, 354916800 - tz.transition 1981, 9, :o2, 370724400 - tz.transition 1982, 3, :o3, 386452800 - tz.transition 1982, 9, :o2, 402260400 - tz.transition 1983, 3, :o3, 417988800 - tz.transition 1983, 9, :o2, 433796400 - tz.transition 1984, 3, :o3, 449611200 - tz.transition 1984, 9, :o2, 465343200 - tz.transition 1985, 3, :o3, 481068000 - tz.transition 1985, 9, :o2, 496792800 - tz.transition 1986, 3, :o3, 512517600 - tz.transition 1986, 9, :o2, 528242400 - tz.transition 1987, 3, :o3, 543967200 - tz.transition 1987, 9, :o2, 559692000 - tz.transition 1988, 3, :o3, 575416800 - tz.transition 1988, 9, :o2, 591141600 - tz.transition 1989, 3, :o3, 606866400 - tz.transition 1989, 9, :o2, 622591200 - tz.transition 1990, 3, :o3, 638316000 - tz.transition 1990, 9, :o2, 654645600 - tz.transition 1991, 3, :o4, 670370400 - tz.transition 1991, 9, :o5, 685569600 - tz.transition 1991, 9, :o6, 686098800 - tz.transition 1992, 3, :o5, 701812800 - tz.transition 1992, 9, :o6, 717534000 - tz.transition 1993, 3, :o5, 733273200 - tz.transition 1993, 9, :o6, 748998000 - tz.transition 1994, 3, :o5, 764722800 - tz.transition 1994, 9, :o6, 780447600 - tz.transition 1995, 3, :o5, 796172400 - tz.transition 1995, 9, :o7, 811897200 - tz.transition 1997, 3, :o8, 859672800 - tz.transition 1997, 10, :o7, 877816800 - tz.transition 1998, 3, :o8, 891122400 - tz.transition 1998, 10, :o7, 909266400 - tz.transition 1999, 3, :o8, 922572000 - tz.transition 1999, 10, :o7, 941320800 - tz.transition 2000, 3, :o8, 954021600 - tz.transition 2000, 10, :o7, 972770400 - tz.transition 2001, 3, :o8, 985471200 - tz.transition 2001, 10, :o7, 1004220000 - tz.transition 2002, 3, :o8, 1017525600 - tz.transition 2002, 10, :o7, 1035669600 - tz.transition 2003, 3, :o8, 1048975200 - tz.transition 2003, 10, :o7, 1067119200 - tz.transition 2004, 3, :o8, 1080424800 - tz.transition 2004, 10, :o7, 1099173600 - tz.transition 2005, 3, :o8, 1111874400 - tz.transition 2005, 10, :o7, 1130623200 - tz.transition 2006, 3, :o8, 1143324000 - tz.transition 2006, 10, :o7, 1162072800 - tz.transition 2007, 3, :o8, 1174773600 - tz.transition 2007, 10, :o7, 1193522400 - tz.transition 2008, 3, :o8, 1206828000 - tz.transition 2008, 10, :o7, 1224972000 - tz.transition 2009, 3, :o8, 1238277600 - tz.transition 2009, 10, :o7, 1256421600 - tz.transition 2010, 3, :o8, 1269727200 - tz.transition 2010, 10, :o7, 1288476000 - tz.transition 2011, 3, :o8, 1301176800 - tz.transition 2011, 10, :o7, 1319925600 - tz.transition 2012, 3, :o8, 1332626400 - tz.transition 2012, 10, :o7, 1351375200 - tz.transition 2013, 3, :o8, 1364680800 - tz.transition 2013, 10, :o7, 1382824800 - tz.transition 2014, 3, :o8, 1396130400 - tz.transition 2014, 10, :o7, 1414274400 - tz.transition 2015, 3, :o8, 1427580000 - tz.transition 2015, 10, :o7, 1445724000 - tz.transition 2016, 3, :o8, 1459029600 - tz.transition 2016, 10, :o7, 1477778400 - tz.transition 2017, 3, :o8, 1490479200 - tz.transition 2017, 10, :o7, 1509228000 - tz.transition 2018, 3, :o8, 1521928800 - tz.transition 2018, 10, :o7, 1540677600 - tz.transition 2019, 3, :o8, 1553983200 - tz.transition 2019, 10, :o7, 1572127200 - tz.transition 2020, 3, :o8, 1585432800 - tz.transition 2020, 10, :o7, 1603576800 - tz.transition 2021, 3, :o8, 1616882400 - tz.transition 2021, 10, :o7, 1635631200 - tz.transition 2022, 3, :o8, 1648332000 - tz.transition 2022, 10, :o7, 1667080800 - tz.transition 2023, 3, :o8, 1679781600 - tz.transition 2023, 10, :o7, 1698530400 - tz.transition 2024, 3, :o8, 1711836000 - tz.transition 2024, 10, :o7, 1729980000 - tz.transition 2025, 3, :o8, 1743285600 - tz.transition 2025, 10, :o7, 1761429600 - tz.transition 2026, 3, :o8, 1774735200 - tz.transition 2026, 10, :o7, 1792879200 - tz.transition 2027, 3, :o8, 1806184800 - tz.transition 2027, 10, :o7, 1824933600 - tz.transition 2028, 3, :o8, 1837634400 - tz.transition 2028, 10, :o7, 1856383200 - tz.transition 2029, 3, :o8, 1869084000 - tz.transition 2029, 10, :o7, 1887832800 - tz.transition 2030, 3, :o8, 1901138400 - tz.transition 2030, 10, :o7, 1919282400 - tz.transition 2031, 3, :o8, 1932588000 - tz.transition 2031, 10, :o7, 1950732000 - tz.transition 2032, 3, :o8, 1964037600 - tz.transition 2032, 10, :o7, 1982786400 - tz.transition 2033, 3, :o8, 1995487200 - tz.transition 2033, 10, :o7, 2014236000 - tz.transition 2034, 3, :o8, 2026936800 - tz.transition 2034, 10, :o7, 2045685600 - tz.transition 2035, 3, :o8, 2058386400 - tz.transition 2035, 10, :o7, 2077135200 - tz.transition 2036, 3, :o8, 2090440800 - tz.transition 2036, 10, :o7, 2108584800 - tz.transition 2037, 3, :o8, 2121890400 - tz.transition 2037, 10, :o7, 2140034400 - tz.transition 2038, 3, :o8, 29586125, 12 - tz.transition 2038, 10, :o7, 29588729, 12 - tz.transition 2039, 3, :o8, 29590493, 12 - tz.transition 2039, 10, :o7, 29593097, 12 - tz.transition 2040, 3, :o8, 29594861, 12 - tz.transition 2040, 10, :o7, 29597465, 12 - tz.transition 2041, 3, :o8, 29599313, 12 - tz.transition 2041, 10, :o7, 29601833, 12 - tz.transition 2042, 3, :o8, 29603681, 12 - tz.transition 2042, 10, :o7, 29606201, 12 - tz.transition 2043, 3, :o8, 29608049, 12 - tz.transition 2043, 10, :o7, 29610569, 12 - tz.transition 2044, 3, :o8, 29612417, 12 - tz.transition 2044, 10, :o7, 29615021, 12 - tz.transition 2045, 3, :o8, 29616785, 12 - tz.transition 2045, 10, :o7, 29619389, 12 - tz.transition 2046, 3, :o8, 29621153, 12 - tz.transition 2046, 10, :o7, 29623757, 12 - tz.transition 2047, 3, :o8, 29625605, 12 - tz.transition 2047, 10, :o7, 29628125, 12 - tz.transition 2048, 3, :o8, 29629973, 12 - tz.transition 2048, 10, :o7, 29632493, 12 - tz.transition 2049, 3, :o8, 29634341, 12 - tz.transition 2049, 10, :o7, 29636945, 12 - tz.transition 2050, 3, :o8, 29638709, 12 - tz.transition 2050, 10, :o7, 29641313, 12 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Atlantic/Azores.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Atlantic/Azores.rb deleted file mode 100644 index 1bd16a75ac..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Atlantic/Azores.rb +++ /dev/null @@ -1,270 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Atlantic - module Azores - include TimezoneDefinition - - timezone 'Atlantic/Azores' do |tz| - tz.offset :o0, -6160, 0, :LMT - tz.offset :o1, -6872, 0, :HMT - tz.offset :o2, -7200, 0, :AZOT - tz.offset :o3, -7200, 3600, :AZOST - tz.offset :o4, -7200, 7200, :AZOMT - tz.offset :o5, -3600, 0, :AZOT - tz.offset :o6, -3600, 3600, :AZOST - tz.offset :o7, 0, 0, :WET - - tz.transition 1884, 1, :o1, 2601910697, 1080 - tz.transition 1911, 5, :o2, 26127150259, 10800 - tz.transition 1916, 6, :o3, 58104781, 24 - tz.transition 1916, 11, :o2, 29054023, 12 - tz.transition 1917, 3, :o3, 58110925, 24 - tz.transition 1917, 10, :o2, 58116397, 24 - tz.transition 1918, 3, :o3, 58119709, 24 - tz.transition 1918, 10, :o2, 58125157, 24 - tz.transition 1919, 3, :o3, 58128445, 24 - tz.transition 1919, 10, :o2, 58133917, 24 - tz.transition 1920, 3, :o3, 58137229, 24 - tz.transition 1920, 10, :o2, 58142701, 24 - tz.transition 1921, 3, :o3, 58145989, 24 - tz.transition 1921, 10, :o2, 58151461, 24 - tz.transition 1924, 4, :o3, 58173421, 24 - tz.transition 1924, 10, :o2, 58177765, 24 - tz.transition 1926, 4, :o3, 58190965, 24 - tz.transition 1926, 10, :o2, 58194997, 24 - tz.transition 1927, 4, :o3, 58199533, 24 - tz.transition 1927, 10, :o2, 58203733, 24 - tz.transition 1928, 4, :o3, 58208437, 24 - tz.transition 1928, 10, :o2, 58212637, 24 - tz.transition 1929, 4, :o3, 58217341, 24 - tz.transition 1929, 10, :o2, 58221373, 24 - tz.transition 1931, 4, :o3, 58234813, 24 - tz.transition 1931, 10, :o2, 58238845, 24 - tz.transition 1932, 4, :o3, 58243213, 24 - tz.transition 1932, 10, :o2, 58247581, 24 - tz.transition 1934, 4, :o3, 58260853, 24 - tz.transition 1934, 10, :o2, 58265221, 24 - tz.transition 1935, 3, :o3, 58269421, 24 - tz.transition 1935, 10, :o2, 58273957, 24 - tz.transition 1936, 4, :o3, 58278661, 24 - tz.transition 1936, 10, :o2, 58282693, 24 - tz.transition 1937, 4, :o3, 58287061, 24 - tz.transition 1937, 10, :o2, 58291429, 24 - tz.transition 1938, 3, :o3, 58295629, 24 - tz.transition 1938, 10, :o2, 58300165, 24 - tz.transition 1939, 4, :o3, 58304869, 24 - tz.transition 1939, 11, :o2, 58310077, 24 - tz.transition 1940, 2, :o3, 58312429, 24 - tz.transition 1940, 10, :o2, 58317805, 24 - tz.transition 1941, 4, :o3, 58322173, 24 - tz.transition 1941, 10, :o2, 58326565, 24 - tz.transition 1942, 3, :o3, 58330405, 24 - tz.transition 1942, 4, :o4, 4860951, 2 - tz.transition 1942, 8, :o3, 4861175, 2 - tz.transition 1942, 10, :o2, 58335781, 24 - tz.transition 1943, 3, :o3, 58339141, 24 - tz.transition 1943, 4, :o4, 4861665, 2 - tz.transition 1943, 8, :o3, 4861931, 2 - tz.transition 1943, 10, :o2, 58344685, 24 - tz.transition 1944, 3, :o3, 58347877, 24 - tz.transition 1944, 4, :o4, 4862407, 2 - tz.transition 1944, 8, :o3, 4862659, 2 - tz.transition 1944, 10, :o2, 58353421, 24 - tz.transition 1945, 3, :o3, 58356613, 24 - tz.transition 1945, 4, :o4, 4863135, 2 - tz.transition 1945, 8, :o3, 4863387, 2 - tz.transition 1945, 10, :o2, 58362157, 24 - tz.transition 1946, 4, :o3, 58366021, 24 - tz.transition 1946, 10, :o2, 58370389, 24 - tz.transition 1947, 4, :o3, 7296845, 3 - tz.transition 1947, 10, :o2, 7297391, 3 - tz.transition 1948, 4, :o3, 7297937, 3 - tz.transition 1948, 10, :o2, 7298483, 3 - tz.transition 1949, 4, :o3, 7299029, 3 - tz.transition 1949, 10, :o2, 7299575, 3 - tz.transition 1951, 4, :o3, 7301213, 3 - tz.transition 1951, 10, :o2, 7301780, 3 - tz.transition 1952, 4, :o3, 7302326, 3 - tz.transition 1952, 10, :o2, 7302872, 3 - tz.transition 1953, 4, :o3, 7303418, 3 - tz.transition 1953, 10, :o2, 7303964, 3 - tz.transition 1954, 4, :o3, 7304510, 3 - tz.transition 1954, 10, :o2, 7305056, 3 - tz.transition 1955, 4, :o3, 7305602, 3 - tz.transition 1955, 10, :o2, 7306148, 3 - tz.transition 1956, 4, :o3, 7306694, 3 - tz.transition 1956, 10, :o2, 7307261, 3 - tz.transition 1957, 4, :o3, 7307807, 3 - tz.transition 1957, 10, :o2, 7308353, 3 - tz.transition 1958, 4, :o3, 7308899, 3 - tz.transition 1958, 10, :o2, 7309445, 3 - tz.transition 1959, 4, :o3, 7309991, 3 - tz.transition 1959, 10, :o2, 7310537, 3 - tz.transition 1960, 4, :o3, 7311083, 3 - tz.transition 1960, 10, :o2, 7311629, 3 - tz.transition 1961, 4, :o3, 7312175, 3 - tz.transition 1961, 10, :o2, 7312721, 3 - tz.transition 1962, 4, :o3, 7313267, 3 - tz.transition 1962, 10, :o2, 7313834, 3 - tz.transition 1963, 4, :o3, 7314380, 3 - tz.transition 1963, 10, :o2, 7314926, 3 - tz.transition 1964, 4, :o3, 7315472, 3 - tz.transition 1964, 10, :o2, 7316018, 3 - tz.transition 1965, 4, :o3, 7316564, 3 - tz.transition 1965, 10, :o2, 7317110, 3 - tz.transition 1966, 4, :o5, 7317656, 3 - tz.transition 1977, 3, :o6, 228272400 - tz.transition 1977, 9, :o5, 243997200 - tz.transition 1978, 4, :o6, 260326800 - tz.transition 1978, 10, :o5, 276051600 - tz.transition 1979, 4, :o6, 291776400 - tz.transition 1979, 9, :o5, 307504800 - tz.transition 1980, 3, :o6, 323226000 - tz.transition 1980, 9, :o5, 338954400 - tz.transition 1981, 3, :o6, 354679200 - tz.transition 1981, 9, :o5, 370404000 - tz.transition 1982, 3, :o6, 386128800 - tz.transition 1982, 9, :o5, 401853600 - tz.transition 1983, 3, :o6, 417582000 - tz.transition 1983, 9, :o5, 433303200 - tz.transition 1984, 3, :o6, 449028000 - tz.transition 1984, 9, :o5, 465357600 - tz.transition 1985, 3, :o6, 481082400 - tz.transition 1985, 9, :o5, 496807200 - tz.transition 1986, 3, :o6, 512532000 - tz.transition 1986, 9, :o5, 528256800 - tz.transition 1987, 3, :o6, 543981600 - tz.transition 1987, 9, :o5, 559706400 - tz.transition 1988, 3, :o6, 575431200 - tz.transition 1988, 9, :o5, 591156000 - tz.transition 1989, 3, :o6, 606880800 - tz.transition 1989, 9, :o5, 622605600 - tz.transition 1990, 3, :o6, 638330400 - tz.transition 1990, 9, :o5, 654660000 - tz.transition 1991, 3, :o6, 670384800 - tz.transition 1991, 9, :o5, 686109600 - tz.transition 1992, 3, :o6, 701834400 - tz.transition 1992, 9, :o7, 717559200 - tz.transition 1993, 3, :o6, 733280400 - tz.transition 1993, 9, :o5, 749005200 - tz.transition 1994, 3, :o6, 764730000 - tz.transition 1994, 9, :o5, 780454800 - tz.transition 1995, 3, :o6, 796179600 - tz.transition 1995, 9, :o5, 811904400 - tz.transition 1996, 3, :o6, 828234000 - tz.transition 1996, 10, :o5, 846378000 - tz.transition 1997, 3, :o6, 859683600 - tz.transition 1997, 10, :o5, 877827600 - tz.transition 1998, 3, :o6, 891133200 - tz.transition 1998, 10, :o5, 909277200 - tz.transition 1999, 3, :o6, 922582800 - tz.transition 1999, 10, :o5, 941331600 - tz.transition 2000, 3, :o6, 954032400 - tz.transition 2000, 10, :o5, 972781200 - tz.transition 2001, 3, :o6, 985482000 - tz.transition 2001, 10, :o5, 1004230800 - tz.transition 2002, 3, :o6, 1017536400 - tz.transition 2002, 10, :o5, 1035680400 - tz.transition 2003, 3, :o6, 1048986000 - tz.transition 2003, 10, :o5, 1067130000 - tz.transition 2004, 3, :o6, 1080435600 - tz.transition 2004, 10, :o5, 1099184400 - tz.transition 2005, 3, :o6, 1111885200 - tz.transition 2005, 10, :o5, 1130634000 - tz.transition 2006, 3, :o6, 1143334800 - tz.transition 2006, 10, :o5, 1162083600 - tz.transition 2007, 3, :o6, 1174784400 - tz.transition 2007, 10, :o5, 1193533200 - tz.transition 2008, 3, :o6, 1206838800 - tz.transition 2008, 10, :o5, 1224982800 - tz.transition 2009, 3, :o6, 1238288400 - tz.transition 2009, 10, :o5, 1256432400 - tz.transition 2010, 3, :o6, 1269738000 - tz.transition 2010, 10, :o5, 1288486800 - tz.transition 2011, 3, :o6, 1301187600 - tz.transition 2011, 10, :o5, 1319936400 - tz.transition 2012, 3, :o6, 1332637200 - tz.transition 2012, 10, :o5, 1351386000 - tz.transition 2013, 3, :o6, 1364691600 - tz.transition 2013, 10, :o5, 1382835600 - tz.transition 2014, 3, :o6, 1396141200 - tz.transition 2014, 10, :o5, 1414285200 - tz.transition 2015, 3, :o6, 1427590800 - tz.transition 2015, 10, :o5, 1445734800 - tz.transition 2016, 3, :o6, 1459040400 - tz.transition 2016, 10, :o5, 1477789200 - tz.transition 2017, 3, :o6, 1490490000 - tz.transition 2017, 10, :o5, 1509238800 - tz.transition 2018, 3, :o6, 1521939600 - tz.transition 2018, 10, :o5, 1540688400 - tz.transition 2019, 3, :o6, 1553994000 - tz.transition 2019, 10, :o5, 1572138000 - tz.transition 2020, 3, :o6, 1585443600 - tz.transition 2020, 10, :o5, 1603587600 - tz.transition 2021, 3, :o6, 1616893200 - tz.transition 2021, 10, :o5, 1635642000 - tz.transition 2022, 3, :o6, 1648342800 - tz.transition 2022, 10, :o5, 1667091600 - tz.transition 2023, 3, :o6, 1679792400 - tz.transition 2023, 10, :o5, 1698541200 - tz.transition 2024, 3, :o6, 1711846800 - tz.transition 2024, 10, :o5, 1729990800 - tz.transition 2025, 3, :o6, 1743296400 - tz.transition 2025, 10, :o5, 1761440400 - tz.transition 2026, 3, :o6, 1774746000 - tz.transition 2026, 10, :o5, 1792890000 - tz.transition 2027, 3, :o6, 1806195600 - tz.transition 2027, 10, :o5, 1824944400 - tz.transition 2028, 3, :o6, 1837645200 - tz.transition 2028, 10, :o5, 1856394000 - tz.transition 2029, 3, :o6, 1869094800 - tz.transition 2029, 10, :o5, 1887843600 - tz.transition 2030, 3, :o6, 1901149200 - tz.transition 2030, 10, :o5, 1919293200 - tz.transition 2031, 3, :o6, 1932598800 - tz.transition 2031, 10, :o5, 1950742800 - tz.transition 2032, 3, :o6, 1964048400 - tz.transition 2032, 10, :o5, 1982797200 - tz.transition 2033, 3, :o6, 1995498000 - tz.transition 2033, 10, :o5, 2014246800 - tz.transition 2034, 3, :o6, 2026947600 - tz.transition 2034, 10, :o5, 2045696400 - tz.transition 2035, 3, :o6, 2058397200 - tz.transition 2035, 10, :o5, 2077146000 - tz.transition 2036, 3, :o6, 2090451600 - tz.transition 2036, 10, :o5, 2108595600 - tz.transition 2037, 3, :o6, 2121901200 - tz.transition 2037, 10, :o5, 2140045200 - tz.transition 2038, 3, :o6, 59172253, 24 - tz.transition 2038, 10, :o5, 59177461, 24 - tz.transition 2039, 3, :o6, 59180989, 24 - tz.transition 2039, 10, :o5, 59186197, 24 - tz.transition 2040, 3, :o6, 59189725, 24 - tz.transition 2040, 10, :o5, 59194933, 24 - tz.transition 2041, 3, :o6, 59198629, 24 - tz.transition 2041, 10, :o5, 59203669, 24 - tz.transition 2042, 3, :o6, 59207365, 24 - tz.transition 2042, 10, :o5, 59212405, 24 - tz.transition 2043, 3, :o6, 59216101, 24 - tz.transition 2043, 10, :o5, 59221141, 24 - tz.transition 2044, 3, :o6, 59224837, 24 - tz.transition 2044, 10, :o5, 59230045, 24 - tz.transition 2045, 3, :o6, 59233573, 24 - tz.transition 2045, 10, :o5, 59238781, 24 - tz.transition 2046, 3, :o6, 59242309, 24 - tz.transition 2046, 10, :o5, 59247517, 24 - tz.transition 2047, 3, :o6, 59251213, 24 - tz.transition 2047, 10, :o5, 59256253, 24 - tz.transition 2048, 3, :o6, 59259949, 24 - tz.transition 2048, 10, :o5, 59264989, 24 - tz.transition 2049, 3, :o6, 59268685, 24 - tz.transition 2049, 10, :o5, 59273893, 24 - tz.transition 2050, 3, :o6, 59277421, 24 - tz.transition 2050, 10, :o5, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Atlantic/Cape_Verde.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Atlantic/Cape_Verde.rb deleted file mode 100644 index 61c8c15043..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Atlantic/Cape_Verde.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Atlantic - module Cape_Verde - include TimezoneDefinition - - timezone 'Atlantic/Cape_Verde' do |tz| - tz.offset :o0, -5644, 0, :LMT - tz.offset :o1, -7200, 0, :CVT - tz.offset :o2, -7200, 3600, :CVST - tz.offset :o3, -3600, 0, :CVT - - tz.transition 1907, 1, :o1, 52219653811, 21600 - tz.transition 1942, 9, :o2, 29167243, 12 - tz.transition 1945, 10, :o1, 58361845, 24 - tz.transition 1975, 11, :o3, 186120000 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Atlantic/South_Georgia.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Atlantic/South_Georgia.rb deleted file mode 100644 index 6a4cbafb9f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Atlantic/South_Georgia.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Atlantic - module South_Georgia - include TimezoneDefinition - - timezone 'Atlantic/South_Georgia' do |tz| - tz.offset :o0, -8768, 0, :LMT - tz.offset :o1, -7200, 0, :GST - - tz.transition 1890, 1, :o1, 1627673806, 675 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Adelaide.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Adelaide.rb deleted file mode 100644 index c5d561cc1e..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Adelaide.rb +++ /dev/null @@ -1,187 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Adelaide - include TimezoneDefinition - - timezone 'Australia/Adelaide' do |tz| - tz.offset :o0, 33260, 0, :LMT - tz.offset :o1, 32400, 0, :CST - tz.offset :o2, 34200, 0, :CST - tz.offset :o3, 34200, 3600, :CST - - tz.transition 1895, 1, :o1, 10425132497, 4320 - tz.transition 1899, 4, :o2, 19318201, 8 - tz.transition 1916, 12, :o3, 3486569911, 1440 - tz.transition 1917, 3, :o2, 116222983, 48 - tz.transition 1941, 12, :o3, 38885763, 16 - tz.transition 1942, 3, :o2, 116661463, 48 - tz.transition 1942, 9, :o3, 38890067, 16 - tz.transition 1943, 3, :o2, 116678935, 48 - tz.transition 1943, 10, :o3, 38896003, 16 - tz.transition 1944, 3, :o2, 116696407, 48 - tz.transition 1971, 10, :o3, 57688200 - tz.transition 1972, 2, :o2, 67969800 - tz.transition 1972, 10, :o3, 89137800 - tz.transition 1973, 3, :o2, 100024200 - tz.transition 1973, 10, :o3, 120587400 - tz.transition 1974, 3, :o2, 131473800 - tz.transition 1974, 10, :o3, 152037000 - tz.transition 1975, 3, :o2, 162923400 - tz.transition 1975, 10, :o3, 183486600 - tz.transition 1976, 3, :o2, 194977800 - tz.transition 1976, 10, :o3, 215541000 - tz.transition 1977, 3, :o2, 226427400 - tz.transition 1977, 10, :o3, 246990600 - tz.transition 1978, 3, :o2, 257877000 - tz.transition 1978, 10, :o3, 278440200 - tz.transition 1979, 3, :o2, 289326600 - tz.transition 1979, 10, :o3, 309889800 - tz.transition 1980, 3, :o2, 320776200 - tz.transition 1980, 10, :o3, 341339400 - tz.transition 1981, 2, :o2, 352225800 - tz.transition 1981, 10, :o3, 372789000 - tz.transition 1982, 3, :o2, 384280200 - tz.transition 1982, 10, :o3, 404843400 - tz.transition 1983, 3, :o2, 415729800 - tz.transition 1983, 10, :o3, 436293000 - tz.transition 1984, 3, :o2, 447179400 - tz.transition 1984, 10, :o3, 467742600 - tz.transition 1985, 3, :o2, 478629000 - tz.transition 1985, 10, :o3, 499192200 - tz.transition 1986, 3, :o2, 511288200 - tz.transition 1986, 10, :o3, 530037000 - tz.transition 1987, 3, :o2, 542737800 - tz.transition 1987, 10, :o3, 562091400 - tz.transition 1988, 3, :o2, 574792200 - tz.transition 1988, 10, :o3, 594145800 - tz.transition 1989, 3, :o2, 606241800 - tz.transition 1989, 10, :o3, 625595400 - tz.transition 1990, 3, :o2, 637691400 - tz.transition 1990, 10, :o3, 657045000 - tz.transition 1991, 3, :o2, 667931400 - tz.transition 1991, 10, :o3, 688494600 - tz.transition 1992, 3, :o2, 701195400 - tz.transition 1992, 10, :o3, 719944200 - tz.transition 1993, 3, :o2, 731435400 - tz.transition 1993, 10, :o3, 751998600 - tz.transition 1994, 3, :o2, 764094600 - tz.transition 1994, 10, :o3, 783448200 - tz.transition 1995, 3, :o2, 796149000 - tz.transition 1995, 10, :o3, 814897800 - tz.transition 1996, 3, :o2, 828203400 - tz.transition 1996, 10, :o3, 846347400 - tz.transition 1997, 3, :o2, 859653000 - tz.transition 1997, 10, :o3, 877797000 - tz.transition 1998, 3, :o2, 891102600 - tz.transition 1998, 10, :o3, 909246600 - tz.transition 1999, 3, :o2, 922552200 - tz.transition 1999, 10, :o3, 941301000 - tz.transition 2000, 3, :o2, 954001800 - tz.transition 2000, 10, :o3, 972750600 - tz.transition 2001, 3, :o2, 985451400 - tz.transition 2001, 10, :o3, 1004200200 - tz.transition 2002, 3, :o2, 1017505800 - tz.transition 2002, 10, :o3, 1035649800 - tz.transition 2003, 3, :o2, 1048955400 - tz.transition 2003, 10, :o3, 1067099400 - tz.transition 2004, 3, :o2, 1080405000 - tz.transition 2004, 10, :o3, 1099153800 - tz.transition 2005, 3, :o2, 1111854600 - tz.transition 2005, 10, :o3, 1130603400 - tz.transition 2006, 4, :o2, 1143909000 - tz.transition 2006, 10, :o3, 1162053000 - tz.transition 2007, 3, :o2, 1174753800 - tz.transition 2007, 10, :o3, 1193502600 - tz.transition 2008, 4, :o2, 1207413000 - tz.transition 2008, 10, :o3, 1223137800 - tz.transition 2009, 4, :o2, 1238862600 - tz.transition 2009, 10, :o3, 1254587400 - tz.transition 2010, 4, :o2, 1270312200 - tz.transition 2010, 10, :o3, 1286037000 - tz.transition 2011, 4, :o2, 1301761800 - tz.transition 2011, 10, :o3, 1317486600 - tz.transition 2012, 3, :o2, 1333211400 - tz.transition 2012, 10, :o3, 1349541000 - tz.transition 2013, 4, :o2, 1365265800 - tz.transition 2013, 10, :o3, 1380990600 - tz.transition 2014, 4, :o2, 1396715400 - tz.transition 2014, 10, :o3, 1412440200 - tz.transition 2015, 4, :o2, 1428165000 - tz.transition 2015, 10, :o3, 1443889800 - tz.transition 2016, 4, :o2, 1459614600 - tz.transition 2016, 10, :o3, 1475339400 - tz.transition 2017, 4, :o2, 1491064200 - tz.transition 2017, 9, :o3, 1506789000 - tz.transition 2018, 3, :o2, 1522513800 - tz.transition 2018, 10, :o3, 1538843400 - tz.transition 2019, 4, :o2, 1554568200 - tz.transition 2019, 10, :o3, 1570293000 - tz.transition 2020, 4, :o2, 1586017800 - tz.transition 2020, 10, :o3, 1601742600 - tz.transition 2021, 4, :o2, 1617467400 - tz.transition 2021, 10, :o3, 1633192200 - tz.transition 2022, 4, :o2, 1648917000 - tz.transition 2022, 10, :o3, 1664641800 - tz.transition 2023, 4, :o2, 1680366600 - tz.transition 2023, 9, :o3, 1696091400 - tz.transition 2024, 4, :o2, 1712421000 - tz.transition 2024, 10, :o3, 1728145800 - tz.transition 2025, 4, :o2, 1743870600 - tz.transition 2025, 10, :o3, 1759595400 - tz.transition 2026, 4, :o2, 1775320200 - tz.transition 2026, 10, :o3, 1791045000 - tz.transition 2027, 4, :o2, 1806769800 - tz.transition 2027, 10, :o3, 1822494600 - tz.transition 2028, 4, :o2, 1838219400 - tz.transition 2028, 9, :o3, 1853944200 - tz.transition 2029, 3, :o2, 1869669000 - tz.transition 2029, 10, :o3, 1885998600 - tz.transition 2030, 4, :o2, 1901723400 - tz.transition 2030, 10, :o3, 1917448200 - tz.transition 2031, 4, :o2, 1933173000 - tz.transition 2031, 10, :o3, 1948897800 - tz.transition 2032, 4, :o2, 1964622600 - tz.transition 2032, 10, :o3, 1980347400 - tz.transition 2033, 4, :o2, 1996072200 - tz.transition 2033, 10, :o3, 2011797000 - tz.transition 2034, 4, :o2, 2027521800 - tz.transition 2034, 9, :o3, 2043246600 - tz.transition 2035, 3, :o2, 2058971400 - tz.transition 2035, 10, :o3, 2075301000 - tz.transition 2036, 4, :o2, 2091025800 - tz.transition 2036, 10, :o3, 2106750600 - tz.transition 2037, 4, :o2, 2122475400 - tz.transition 2037, 10, :o3, 2138200200 - tz.transition 2038, 4, :o2, 39448275, 16 - tz.transition 2038, 10, :o3, 39451187, 16 - tz.transition 2039, 4, :o2, 39454099, 16 - tz.transition 2039, 10, :o3, 39457011, 16 - tz.transition 2040, 3, :o2, 39459923, 16 - tz.transition 2040, 10, :o3, 39462947, 16 - tz.transition 2041, 4, :o2, 39465859, 16 - tz.transition 2041, 10, :o3, 39468771, 16 - tz.transition 2042, 4, :o2, 39471683, 16 - tz.transition 2042, 10, :o3, 39474595, 16 - tz.transition 2043, 4, :o2, 39477507, 16 - tz.transition 2043, 10, :o3, 39480419, 16 - tz.transition 2044, 4, :o2, 39483331, 16 - tz.transition 2044, 10, :o3, 39486243, 16 - tz.transition 2045, 4, :o2, 39489155, 16 - tz.transition 2045, 9, :o3, 39492067, 16 - tz.transition 2046, 3, :o2, 39494979, 16 - tz.transition 2046, 10, :o3, 39498003, 16 - tz.transition 2047, 4, :o2, 39500915, 16 - tz.transition 2047, 10, :o3, 39503827, 16 - tz.transition 2048, 4, :o2, 39506739, 16 - tz.transition 2048, 10, :o3, 39509651, 16 - tz.transition 2049, 4, :o2, 39512563, 16 - tz.transition 2049, 10, :o3, 39515475, 16 - tz.transition 2050, 4, :o2, 39518387, 16 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Brisbane.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Brisbane.rb deleted file mode 100644 index dd85ddae94..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Brisbane.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Brisbane - include TimezoneDefinition - - timezone 'Australia/Brisbane' do |tz| - tz.offset :o0, 36728, 0, :LMT - tz.offset :o1, 36000, 0, :EST - tz.offset :o2, 36000, 3600, :EST - - tz.transition 1894, 12, :o1, 26062496009, 10800 - tz.transition 1916, 12, :o2, 3486569881, 1440 - tz.transition 1917, 3, :o1, 19370497, 8 - tz.transition 1941, 12, :o2, 14582161, 6 - tz.transition 1942, 3, :o1, 19443577, 8 - tz.transition 1942, 9, :o2, 14583775, 6 - tz.transition 1943, 3, :o1, 19446489, 8 - tz.transition 1943, 10, :o2, 14586001, 6 - tz.transition 1944, 3, :o1, 19449401, 8 - tz.transition 1971, 10, :o2, 57686400 - tz.transition 1972, 2, :o1, 67968000 - tz.transition 1989, 10, :o2, 625593600 - tz.transition 1990, 3, :o1, 636480000 - tz.transition 1990, 10, :o2, 657043200 - tz.transition 1991, 3, :o1, 667929600 - tz.transition 1991, 10, :o2, 688492800 - tz.transition 1992, 2, :o1, 699379200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Darwin.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Darwin.rb deleted file mode 100644 index 17de88124d..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Darwin.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Darwin - include TimezoneDefinition - - timezone 'Australia/Darwin' do |tz| - tz.offset :o0, 31400, 0, :LMT - tz.offset :o1, 32400, 0, :CST - tz.offset :o2, 34200, 0, :CST - tz.offset :o3, 34200, 3600, :CST - - tz.transition 1895, 1, :o1, 1042513259, 432 - tz.transition 1899, 4, :o2, 19318201, 8 - tz.transition 1916, 12, :o3, 3486569911, 1440 - tz.transition 1917, 3, :o2, 116222983, 48 - tz.transition 1941, 12, :o3, 38885763, 16 - tz.transition 1942, 3, :o2, 116661463, 48 - tz.transition 1942, 9, :o3, 38890067, 16 - tz.transition 1943, 3, :o2, 116678935, 48 - tz.transition 1943, 10, :o3, 38896003, 16 - tz.transition 1944, 3, :o2, 116696407, 48 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Hobart.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Hobart.rb deleted file mode 100644 index 11384b9840..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Hobart.rb +++ /dev/null @@ -1,193 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Hobart - include TimezoneDefinition - - timezone 'Australia/Hobart' do |tz| - tz.offset :o0, 35356, 0, :LMT - tz.offset :o1, 36000, 0, :EST - tz.offset :o2, 36000, 3600, :EST - - tz.transition 1895, 8, :o1, 52130241161, 21600 - tz.transition 1916, 9, :o2, 14526823, 6 - tz.transition 1917, 3, :o1, 19370497, 8 - tz.transition 1941, 12, :o2, 14582161, 6 - tz.transition 1942, 3, :o1, 19443577, 8 - tz.transition 1942, 9, :o2, 14583775, 6 - tz.transition 1943, 3, :o1, 19446489, 8 - tz.transition 1943, 10, :o2, 14586001, 6 - tz.transition 1944, 3, :o1, 19449401, 8 - tz.transition 1967, 9, :o2, 14638585, 6 - tz.transition 1968, 3, :o1, 14639677, 6 - tz.transition 1968, 10, :o2, 14640937, 6 - tz.transition 1969, 3, :o1, 14641735, 6 - tz.transition 1969, 10, :o2, 14643121, 6 - tz.transition 1970, 3, :o1, 5673600 - tz.transition 1970, 10, :o2, 25632000 - tz.transition 1971, 3, :o1, 37728000 - tz.transition 1971, 10, :o2, 57686400 - tz.transition 1972, 2, :o1, 67968000 - tz.transition 1972, 10, :o2, 89136000 - tz.transition 1973, 3, :o1, 100022400 - tz.transition 1973, 10, :o2, 120585600 - tz.transition 1974, 3, :o1, 131472000 - tz.transition 1974, 10, :o2, 152035200 - tz.transition 1975, 3, :o1, 162921600 - tz.transition 1975, 10, :o2, 183484800 - tz.transition 1976, 3, :o1, 194976000 - tz.transition 1976, 10, :o2, 215539200 - tz.transition 1977, 3, :o1, 226425600 - tz.transition 1977, 10, :o2, 246988800 - tz.transition 1978, 3, :o1, 257875200 - tz.transition 1978, 10, :o2, 278438400 - tz.transition 1979, 3, :o1, 289324800 - tz.transition 1979, 10, :o2, 309888000 - tz.transition 1980, 3, :o1, 320774400 - tz.transition 1980, 10, :o2, 341337600 - tz.transition 1981, 2, :o1, 352224000 - tz.transition 1981, 10, :o2, 372787200 - tz.transition 1982, 3, :o1, 386092800 - tz.transition 1982, 10, :o2, 404841600 - tz.transition 1983, 3, :o1, 417542400 - tz.transition 1983, 10, :o2, 436291200 - tz.transition 1984, 3, :o1, 447177600 - tz.transition 1984, 10, :o2, 467740800 - tz.transition 1985, 3, :o1, 478627200 - tz.transition 1985, 10, :o2, 499190400 - tz.transition 1986, 3, :o1, 510076800 - tz.transition 1986, 10, :o2, 530035200 - tz.transition 1987, 3, :o1, 542736000 - tz.transition 1987, 10, :o2, 562089600 - tz.transition 1988, 3, :o1, 574790400 - tz.transition 1988, 10, :o2, 594144000 - tz.transition 1989, 3, :o1, 606240000 - tz.transition 1989, 10, :o2, 625593600 - tz.transition 1990, 3, :o1, 637689600 - tz.transition 1990, 10, :o2, 657043200 - tz.transition 1991, 3, :o1, 670348800 - tz.transition 1991, 10, :o2, 686678400 - tz.transition 1992, 3, :o1, 701798400 - tz.transition 1992, 10, :o2, 718128000 - tz.transition 1993, 3, :o1, 733248000 - tz.transition 1993, 10, :o2, 749577600 - tz.transition 1994, 3, :o1, 764697600 - tz.transition 1994, 10, :o2, 781027200 - tz.transition 1995, 3, :o1, 796147200 - tz.transition 1995, 9, :o2, 812476800 - tz.transition 1996, 3, :o1, 828201600 - tz.transition 1996, 10, :o2, 844531200 - tz.transition 1997, 3, :o1, 859651200 - tz.transition 1997, 10, :o2, 875980800 - tz.transition 1998, 3, :o1, 891100800 - tz.transition 1998, 10, :o2, 907430400 - tz.transition 1999, 3, :o1, 922550400 - tz.transition 1999, 10, :o2, 938880000 - tz.transition 2000, 3, :o1, 954000000 - tz.transition 2000, 8, :o2, 967305600 - tz.transition 2001, 3, :o1, 985449600 - tz.transition 2001, 10, :o2, 1002384000 - tz.transition 2002, 3, :o1, 1017504000 - tz.transition 2002, 10, :o2, 1033833600 - tz.transition 2003, 3, :o1, 1048953600 - tz.transition 2003, 10, :o2, 1065283200 - tz.transition 2004, 3, :o1, 1080403200 - tz.transition 2004, 10, :o2, 1096732800 - tz.transition 2005, 3, :o1, 1111852800 - tz.transition 2005, 10, :o2, 1128182400 - tz.transition 2006, 4, :o1, 1143907200 - tz.transition 2006, 9, :o2, 1159632000 - tz.transition 2007, 3, :o1, 1174752000 - tz.transition 2007, 10, :o2, 1191686400 - tz.transition 2008, 4, :o1, 1207411200 - tz.transition 2008, 10, :o2, 1223136000 - tz.transition 2009, 4, :o1, 1238860800 - tz.transition 2009, 10, :o2, 1254585600 - tz.transition 2010, 4, :o1, 1270310400 - tz.transition 2010, 10, :o2, 1286035200 - tz.transition 2011, 4, :o1, 1301760000 - tz.transition 2011, 10, :o2, 1317484800 - tz.transition 2012, 3, :o1, 1333209600 - tz.transition 2012, 10, :o2, 1349539200 - tz.transition 2013, 4, :o1, 1365264000 - tz.transition 2013, 10, :o2, 1380988800 - tz.transition 2014, 4, :o1, 1396713600 - tz.transition 2014, 10, :o2, 1412438400 - tz.transition 2015, 4, :o1, 1428163200 - tz.transition 2015, 10, :o2, 1443888000 - tz.transition 2016, 4, :o1, 1459612800 - tz.transition 2016, 10, :o2, 1475337600 - tz.transition 2017, 4, :o1, 1491062400 - tz.transition 2017, 9, :o2, 1506787200 - tz.transition 2018, 3, :o1, 1522512000 - tz.transition 2018, 10, :o2, 1538841600 - tz.transition 2019, 4, :o1, 1554566400 - tz.transition 2019, 10, :o2, 1570291200 - tz.transition 2020, 4, :o1, 1586016000 - tz.transition 2020, 10, :o2, 1601740800 - tz.transition 2021, 4, :o1, 1617465600 - tz.transition 2021, 10, :o2, 1633190400 - tz.transition 2022, 4, :o1, 1648915200 - tz.transition 2022, 10, :o2, 1664640000 - tz.transition 2023, 4, :o1, 1680364800 - tz.transition 2023, 9, :o2, 1696089600 - tz.transition 2024, 4, :o1, 1712419200 - tz.transition 2024, 10, :o2, 1728144000 - tz.transition 2025, 4, :o1, 1743868800 - tz.transition 2025, 10, :o2, 1759593600 - tz.transition 2026, 4, :o1, 1775318400 - tz.transition 2026, 10, :o2, 1791043200 - tz.transition 2027, 4, :o1, 1806768000 - tz.transition 2027, 10, :o2, 1822492800 - tz.transition 2028, 4, :o1, 1838217600 - tz.transition 2028, 9, :o2, 1853942400 - tz.transition 2029, 3, :o1, 1869667200 - tz.transition 2029, 10, :o2, 1885996800 - tz.transition 2030, 4, :o1, 1901721600 - tz.transition 2030, 10, :o2, 1917446400 - tz.transition 2031, 4, :o1, 1933171200 - tz.transition 2031, 10, :o2, 1948896000 - tz.transition 2032, 4, :o1, 1964620800 - tz.transition 2032, 10, :o2, 1980345600 - tz.transition 2033, 4, :o1, 1996070400 - tz.transition 2033, 10, :o2, 2011795200 - tz.transition 2034, 4, :o1, 2027520000 - tz.transition 2034, 9, :o2, 2043244800 - tz.transition 2035, 3, :o1, 2058969600 - tz.transition 2035, 10, :o2, 2075299200 - tz.transition 2036, 4, :o1, 2091024000 - tz.transition 2036, 10, :o2, 2106748800 - tz.transition 2037, 4, :o1, 2122473600 - tz.transition 2037, 10, :o2, 2138198400 - tz.transition 2038, 4, :o1, 14793103, 6 - tz.transition 2038, 10, :o2, 14794195, 6 - tz.transition 2039, 4, :o1, 14795287, 6 - tz.transition 2039, 10, :o2, 14796379, 6 - tz.transition 2040, 3, :o1, 14797471, 6 - tz.transition 2040, 10, :o2, 14798605, 6 - tz.transition 2041, 4, :o1, 14799697, 6 - tz.transition 2041, 10, :o2, 14800789, 6 - tz.transition 2042, 4, :o1, 14801881, 6 - tz.transition 2042, 10, :o2, 14802973, 6 - tz.transition 2043, 4, :o1, 14804065, 6 - tz.transition 2043, 10, :o2, 14805157, 6 - tz.transition 2044, 4, :o1, 14806249, 6 - tz.transition 2044, 10, :o2, 14807341, 6 - tz.transition 2045, 4, :o1, 14808433, 6 - tz.transition 2045, 9, :o2, 14809525, 6 - tz.transition 2046, 3, :o1, 14810617, 6 - tz.transition 2046, 10, :o2, 14811751, 6 - tz.transition 2047, 4, :o1, 14812843, 6 - tz.transition 2047, 10, :o2, 14813935, 6 - tz.transition 2048, 4, :o1, 14815027, 6 - tz.transition 2048, 10, :o2, 14816119, 6 - tz.transition 2049, 4, :o1, 14817211, 6 - tz.transition 2049, 10, :o2, 14818303, 6 - tz.transition 2050, 4, :o1, 14819395, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Melbourne.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Melbourne.rb deleted file mode 100644 index c1304488ea..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Melbourne.rb +++ /dev/null @@ -1,185 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Melbourne - include TimezoneDefinition - - timezone 'Australia/Melbourne' do |tz| - tz.offset :o0, 34792, 0, :LMT - tz.offset :o1, 36000, 0, :EST - tz.offset :o2, 36000, 3600, :EST - - tz.transition 1895, 1, :o1, 26062831051, 10800 - tz.transition 1916, 12, :o2, 3486569881, 1440 - tz.transition 1917, 3, :o1, 19370497, 8 - tz.transition 1941, 12, :o2, 14582161, 6 - tz.transition 1942, 3, :o1, 19443577, 8 - tz.transition 1942, 9, :o2, 14583775, 6 - tz.transition 1943, 3, :o1, 19446489, 8 - tz.transition 1943, 10, :o2, 14586001, 6 - tz.transition 1944, 3, :o1, 19449401, 8 - tz.transition 1971, 10, :o2, 57686400 - tz.transition 1972, 2, :o1, 67968000 - tz.transition 1972, 10, :o2, 89136000 - tz.transition 1973, 3, :o1, 100022400 - tz.transition 1973, 10, :o2, 120585600 - tz.transition 1974, 3, :o1, 131472000 - tz.transition 1974, 10, :o2, 152035200 - tz.transition 1975, 3, :o1, 162921600 - tz.transition 1975, 10, :o2, 183484800 - tz.transition 1976, 3, :o1, 194976000 - tz.transition 1976, 10, :o2, 215539200 - tz.transition 1977, 3, :o1, 226425600 - tz.transition 1977, 10, :o2, 246988800 - tz.transition 1978, 3, :o1, 257875200 - tz.transition 1978, 10, :o2, 278438400 - tz.transition 1979, 3, :o1, 289324800 - tz.transition 1979, 10, :o2, 309888000 - tz.transition 1980, 3, :o1, 320774400 - tz.transition 1980, 10, :o2, 341337600 - tz.transition 1981, 2, :o1, 352224000 - tz.transition 1981, 10, :o2, 372787200 - tz.transition 1982, 3, :o1, 384278400 - tz.transition 1982, 10, :o2, 404841600 - tz.transition 1983, 3, :o1, 415728000 - tz.transition 1983, 10, :o2, 436291200 - tz.transition 1984, 3, :o1, 447177600 - tz.transition 1984, 10, :o2, 467740800 - tz.transition 1985, 3, :o1, 478627200 - tz.transition 1985, 10, :o2, 499190400 - tz.transition 1986, 3, :o1, 511286400 - tz.transition 1986, 10, :o2, 530035200 - tz.transition 1987, 3, :o1, 542736000 - tz.transition 1987, 10, :o2, 561484800 - tz.transition 1988, 3, :o1, 574790400 - tz.transition 1988, 10, :o2, 594144000 - tz.transition 1989, 3, :o1, 606240000 - tz.transition 1989, 10, :o2, 625593600 - tz.transition 1990, 3, :o1, 637689600 - tz.transition 1990, 10, :o2, 657043200 - tz.transition 1991, 3, :o1, 667929600 - tz.transition 1991, 10, :o2, 688492800 - tz.transition 1992, 2, :o1, 699379200 - tz.transition 1992, 10, :o2, 719942400 - tz.transition 1993, 3, :o1, 731433600 - tz.transition 1993, 10, :o2, 751996800 - tz.transition 1994, 3, :o1, 762883200 - tz.transition 1994, 10, :o2, 783446400 - tz.transition 1995, 3, :o1, 796147200 - tz.transition 1995, 10, :o2, 814896000 - tz.transition 1996, 3, :o1, 828201600 - tz.transition 1996, 10, :o2, 846345600 - tz.transition 1997, 3, :o1, 859651200 - tz.transition 1997, 10, :o2, 877795200 - tz.transition 1998, 3, :o1, 891100800 - tz.transition 1998, 10, :o2, 909244800 - tz.transition 1999, 3, :o1, 922550400 - tz.transition 1999, 10, :o2, 941299200 - tz.transition 2000, 3, :o1, 954000000 - tz.transition 2000, 8, :o2, 967305600 - tz.transition 2001, 3, :o1, 985449600 - tz.transition 2001, 10, :o2, 1004198400 - tz.transition 2002, 3, :o1, 1017504000 - tz.transition 2002, 10, :o2, 1035648000 - tz.transition 2003, 3, :o1, 1048953600 - tz.transition 2003, 10, :o2, 1067097600 - tz.transition 2004, 3, :o1, 1080403200 - tz.transition 2004, 10, :o2, 1099152000 - tz.transition 2005, 3, :o1, 1111852800 - tz.transition 2005, 10, :o2, 1130601600 - tz.transition 2006, 4, :o1, 1143907200 - tz.transition 2006, 10, :o2, 1162051200 - tz.transition 2007, 3, :o1, 1174752000 - tz.transition 2007, 10, :o2, 1193500800 - tz.transition 2008, 4, :o1, 1207411200 - tz.transition 2008, 10, :o2, 1223136000 - tz.transition 2009, 4, :o1, 1238860800 - tz.transition 2009, 10, :o2, 1254585600 - tz.transition 2010, 4, :o1, 1270310400 - tz.transition 2010, 10, :o2, 1286035200 - tz.transition 2011, 4, :o1, 1301760000 - tz.transition 2011, 10, :o2, 1317484800 - tz.transition 2012, 3, :o1, 1333209600 - tz.transition 2012, 10, :o2, 1349539200 - tz.transition 2013, 4, :o1, 1365264000 - tz.transition 2013, 10, :o2, 1380988800 - tz.transition 2014, 4, :o1, 1396713600 - tz.transition 2014, 10, :o2, 1412438400 - tz.transition 2015, 4, :o1, 1428163200 - tz.transition 2015, 10, :o2, 1443888000 - tz.transition 2016, 4, :o1, 1459612800 - tz.transition 2016, 10, :o2, 1475337600 - tz.transition 2017, 4, :o1, 1491062400 - tz.transition 2017, 9, :o2, 1506787200 - tz.transition 2018, 3, :o1, 1522512000 - tz.transition 2018, 10, :o2, 1538841600 - tz.transition 2019, 4, :o1, 1554566400 - tz.transition 2019, 10, :o2, 1570291200 - tz.transition 2020, 4, :o1, 1586016000 - tz.transition 2020, 10, :o2, 1601740800 - tz.transition 2021, 4, :o1, 1617465600 - tz.transition 2021, 10, :o2, 1633190400 - tz.transition 2022, 4, :o1, 1648915200 - tz.transition 2022, 10, :o2, 1664640000 - tz.transition 2023, 4, :o1, 1680364800 - tz.transition 2023, 9, :o2, 1696089600 - tz.transition 2024, 4, :o1, 1712419200 - tz.transition 2024, 10, :o2, 1728144000 - tz.transition 2025, 4, :o1, 1743868800 - tz.transition 2025, 10, :o2, 1759593600 - tz.transition 2026, 4, :o1, 1775318400 - tz.transition 2026, 10, :o2, 1791043200 - tz.transition 2027, 4, :o1, 1806768000 - tz.transition 2027, 10, :o2, 1822492800 - tz.transition 2028, 4, :o1, 1838217600 - tz.transition 2028, 9, :o2, 1853942400 - tz.transition 2029, 3, :o1, 1869667200 - tz.transition 2029, 10, :o2, 1885996800 - tz.transition 2030, 4, :o1, 1901721600 - tz.transition 2030, 10, :o2, 1917446400 - tz.transition 2031, 4, :o1, 1933171200 - tz.transition 2031, 10, :o2, 1948896000 - tz.transition 2032, 4, :o1, 1964620800 - tz.transition 2032, 10, :o2, 1980345600 - tz.transition 2033, 4, :o1, 1996070400 - tz.transition 2033, 10, :o2, 2011795200 - tz.transition 2034, 4, :o1, 2027520000 - tz.transition 2034, 9, :o2, 2043244800 - tz.transition 2035, 3, :o1, 2058969600 - tz.transition 2035, 10, :o2, 2075299200 - tz.transition 2036, 4, :o1, 2091024000 - tz.transition 2036, 10, :o2, 2106748800 - tz.transition 2037, 4, :o1, 2122473600 - tz.transition 2037, 10, :o2, 2138198400 - tz.transition 2038, 4, :o1, 14793103, 6 - tz.transition 2038, 10, :o2, 14794195, 6 - tz.transition 2039, 4, :o1, 14795287, 6 - tz.transition 2039, 10, :o2, 14796379, 6 - tz.transition 2040, 3, :o1, 14797471, 6 - tz.transition 2040, 10, :o2, 14798605, 6 - tz.transition 2041, 4, :o1, 14799697, 6 - tz.transition 2041, 10, :o2, 14800789, 6 - tz.transition 2042, 4, :o1, 14801881, 6 - tz.transition 2042, 10, :o2, 14802973, 6 - tz.transition 2043, 4, :o1, 14804065, 6 - tz.transition 2043, 10, :o2, 14805157, 6 - tz.transition 2044, 4, :o1, 14806249, 6 - tz.transition 2044, 10, :o2, 14807341, 6 - tz.transition 2045, 4, :o1, 14808433, 6 - tz.transition 2045, 9, :o2, 14809525, 6 - tz.transition 2046, 3, :o1, 14810617, 6 - tz.transition 2046, 10, :o2, 14811751, 6 - tz.transition 2047, 4, :o1, 14812843, 6 - tz.transition 2047, 10, :o2, 14813935, 6 - tz.transition 2048, 4, :o1, 14815027, 6 - tz.transition 2048, 10, :o2, 14816119, 6 - tz.transition 2049, 4, :o1, 14817211, 6 - tz.transition 2049, 10, :o2, 14818303, 6 - tz.transition 2050, 4, :o1, 14819395, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Perth.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Perth.rb deleted file mode 100644 index d9e66f14a8..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Perth.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Perth - include TimezoneDefinition - - timezone 'Australia/Perth' do |tz| - tz.offset :o0, 27804, 0, :LMT - tz.offset :o1, 28800, 0, :WST - tz.offset :o2, 28800, 3600, :WST - - tz.transition 1895, 11, :o1, 17377402883, 7200 - tz.transition 1916, 12, :o2, 3486570001, 1440 - tz.transition 1917, 3, :o1, 58111493, 24 - tz.transition 1941, 12, :o2, 9721441, 4 - tz.transition 1942, 3, :o1, 58330733, 24 - tz.transition 1942, 9, :o2, 9722517, 4 - tz.transition 1943, 3, :o1, 58339469, 24 - tz.transition 1974, 10, :o2, 152042400 - tz.transition 1975, 3, :o1, 162928800 - tz.transition 1983, 10, :o2, 436298400 - tz.transition 1984, 3, :o1, 447184800 - tz.transition 1991, 11, :o2, 690314400 - tz.transition 1992, 2, :o1, 699386400 - tz.transition 2006, 12, :o2, 1165082400 - tz.transition 2007, 3, :o1, 1174759200 - tz.transition 2007, 10, :o2, 1193508000 - tz.transition 2008, 3, :o1, 1206813600 - tz.transition 2008, 10, :o2, 1224957600 - tz.transition 2009, 3, :o1, 1238263200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Sydney.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Sydney.rb deleted file mode 100644 index 9062bd7c3c..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Australia/Sydney.rb +++ /dev/null @@ -1,185 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Sydney - include TimezoneDefinition - - timezone 'Australia/Sydney' do |tz| - tz.offset :o0, 36292, 0, :LMT - tz.offset :o1, 36000, 0, :EST - tz.offset :o2, 36000, 3600, :EST - - tz.transition 1895, 1, :o1, 52125661727, 21600 - tz.transition 1916, 12, :o2, 3486569881, 1440 - tz.transition 1917, 3, :o1, 19370497, 8 - tz.transition 1941, 12, :o2, 14582161, 6 - tz.transition 1942, 3, :o1, 19443577, 8 - tz.transition 1942, 9, :o2, 14583775, 6 - tz.transition 1943, 3, :o1, 19446489, 8 - tz.transition 1943, 10, :o2, 14586001, 6 - tz.transition 1944, 3, :o1, 19449401, 8 - tz.transition 1971, 10, :o2, 57686400 - tz.transition 1972, 2, :o1, 67968000 - tz.transition 1972, 10, :o2, 89136000 - tz.transition 1973, 3, :o1, 100022400 - tz.transition 1973, 10, :o2, 120585600 - tz.transition 1974, 3, :o1, 131472000 - tz.transition 1974, 10, :o2, 152035200 - tz.transition 1975, 3, :o1, 162921600 - tz.transition 1975, 10, :o2, 183484800 - tz.transition 1976, 3, :o1, 194976000 - tz.transition 1976, 10, :o2, 215539200 - tz.transition 1977, 3, :o1, 226425600 - tz.transition 1977, 10, :o2, 246988800 - tz.transition 1978, 3, :o1, 257875200 - tz.transition 1978, 10, :o2, 278438400 - tz.transition 1979, 3, :o1, 289324800 - tz.transition 1979, 10, :o2, 309888000 - tz.transition 1980, 3, :o1, 320774400 - tz.transition 1980, 10, :o2, 341337600 - tz.transition 1981, 2, :o1, 352224000 - tz.transition 1981, 10, :o2, 372787200 - tz.transition 1982, 4, :o1, 386697600 - tz.transition 1982, 10, :o2, 404841600 - tz.transition 1983, 3, :o1, 415728000 - tz.transition 1983, 10, :o2, 436291200 - tz.transition 1984, 3, :o1, 447177600 - tz.transition 1984, 10, :o2, 467740800 - tz.transition 1985, 3, :o1, 478627200 - tz.transition 1985, 10, :o2, 499190400 - tz.transition 1986, 3, :o1, 511286400 - tz.transition 1986, 10, :o2, 530035200 - tz.transition 1987, 3, :o1, 542736000 - tz.transition 1987, 10, :o2, 562089600 - tz.transition 1988, 3, :o1, 574790400 - tz.transition 1988, 10, :o2, 594144000 - tz.transition 1989, 3, :o1, 606240000 - tz.transition 1989, 10, :o2, 625593600 - tz.transition 1990, 3, :o1, 636480000 - tz.transition 1990, 10, :o2, 657043200 - tz.transition 1991, 3, :o1, 667929600 - tz.transition 1991, 10, :o2, 688492800 - tz.transition 1992, 2, :o1, 699379200 - tz.transition 1992, 10, :o2, 719942400 - tz.transition 1993, 3, :o1, 731433600 - tz.transition 1993, 10, :o2, 751996800 - tz.transition 1994, 3, :o1, 762883200 - tz.transition 1994, 10, :o2, 783446400 - tz.transition 1995, 3, :o1, 794332800 - tz.transition 1995, 10, :o2, 814896000 - tz.transition 1996, 3, :o1, 828201600 - tz.transition 1996, 10, :o2, 846345600 - tz.transition 1997, 3, :o1, 859651200 - tz.transition 1997, 10, :o2, 877795200 - tz.transition 1998, 3, :o1, 891100800 - tz.transition 1998, 10, :o2, 909244800 - tz.transition 1999, 3, :o1, 922550400 - tz.transition 1999, 10, :o2, 941299200 - tz.transition 2000, 3, :o1, 954000000 - tz.transition 2000, 8, :o2, 967305600 - tz.transition 2001, 3, :o1, 985449600 - tz.transition 2001, 10, :o2, 1004198400 - tz.transition 2002, 3, :o1, 1017504000 - tz.transition 2002, 10, :o2, 1035648000 - tz.transition 2003, 3, :o1, 1048953600 - tz.transition 2003, 10, :o2, 1067097600 - tz.transition 2004, 3, :o1, 1080403200 - tz.transition 2004, 10, :o2, 1099152000 - tz.transition 2005, 3, :o1, 1111852800 - tz.transition 2005, 10, :o2, 1130601600 - tz.transition 2006, 4, :o1, 1143907200 - tz.transition 2006, 10, :o2, 1162051200 - tz.transition 2007, 3, :o1, 1174752000 - tz.transition 2007, 10, :o2, 1193500800 - tz.transition 2008, 4, :o1, 1207411200 - tz.transition 2008, 10, :o2, 1223136000 - tz.transition 2009, 4, :o1, 1238860800 - tz.transition 2009, 10, :o2, 1254585600 - tz.transition 2010, 4, :o1, 1270310400 - tz.transition 2010, 10, :o2, 1286035200 - tz.transition 2011, 4, :o1, 1301760000 - tz.transition 2011, 10, :o2, 1317484800 - tz.transition 2012, 3, :o1, 1333209600 - tz.transition 2012, 10, :o2, 1349539200 - tz.transition 2013, 4, :o1, 1365264000 - tz.transition 2013, 10, :o2, 1380988800 - tz.transition 2014, 4, :o1, 1396713600 - tz.transition 2014, 10, :o2, 1412438400 - tz.transition 2015, 4, :o1, 1428163200 - tz.transition 2015, 10, :o2, 1443888000 - tz.transition 2016, 4, :o1, 1459612800 - tz.transition 2016, 10, :o2, 1475337600 - tz.transition 2017, 4, :o1, 1491062400 - tz.transition 2017, 9, :o2, 1506787200 - tz.transition 2018, 3, :o1, 1522512000 - tz.transition 2018, 10, :o2, 1538841600 - tz.transition 2019, 4, :o1, 1554566400 - tz.transition 2019, 10, :o2, 1570291200 - tz.transition 2020, 4, :o1, 1586016000 - tz.transition 2020, 10, :o2, 1601740800 - tz.transition 2021, 4, :o1, 1617465600 - tz.transition 2021, 10, :o2, 1633190400 - tz.transition 2022, 4, :o1, 1648915200 - tz.transition 2022, 10, :o2, 1664640000 - tz.transition 2023, 4, :o1, 1680364800 - tz.transition 2023, 9, :o2, 1696089600 - tz.transition 2024, 4, :o1, 1712419200 - tz.transition 2024, 10, :o2, 1728144000 - tz.transition 2025, 4, :o1, 1743868800 - tz.transition 2025, 10, :o2, 1759593600 - tz.transition 2026, 4, :o1, 1775318400 - tz.transition 2026, 10, :o2, 1791043200 - tz.transition 2027, 4, :o1, 1806768000 - tz.transition 2027, 10, :o2, 1822492800 - tz.transition 2028, 4, :o1, 1838217600 - tz.transition 2028, 9, :o2, 1853942400 - tz.transition 2029, 3, :o1, 1869667200 - tz.transition 2029, 10, :o2, 1885996800 - tz.transition 2030, 4, :o1, 1901721600 - tz.transition 2030, 10, :o2, 1917446400 - tz.transition 2031, 4, :o1, 1933171200 - tz.transition 2031, 10, :o2, 1948896000 - tz.transition 2032, 4, :o1, 1964620800 - tz.transition 2032, 10, :o2, 1980345600 - tz.transition 2033, 4, :o1, 1996070400 - tz.transition 2033, 10, :o2, 2011795200 - tz.transition 2034, 4, :o1, 2027520000 - tz.transition 2034, 9, :o2, 2043244800 - tz.transition 2035, 3, :o1, 2058969600 - tz.transition 2035, 10, :o2, 2075299200 - tz.transition 2036, 4, :o1, 2091024000 - tz.transition 2036, 10, :o2, 2106748800 - tz.transition 2037, 4, :o1, 2122473600 - tz.transition 2037, 10, :o2, 2138198400 - tz.transition 2038, 4, :o1, 14793103, 6 - tz.transition 2038, 10, :o2, 14794195, 6 - tz.transition 2039, 4, :o1, 14795287, 6 - tz.transition 2039, 10, :o2, 14796379, 6 - tz.transition 2040, 3, :o1, 14797471, 6 - tz.transition 2040, 10, :o2, 14798605, 6 - tz.transition 2041, 4, :o1, 14799697, 6 - tz.transition 2041, 10, :o2, 14800789, 6 - tz.transition 2042, 4, :o1, 14801881, 6 - tz.transition 2042, 10, :o2, 14802973, 6 - tz.transition 2043, 4, :o1, 14804065, 6 - tz.transition 2043, 10, :o2, 14805157, 6 - tz.transition 2044, 4, :o1, 14806249, 6 - tz.transition 2044, 10, :o2, 14807341, 6 - tz.transition 2045, 4, :o1, 14808433, 6 - tz.transition 2045, 9, :o2, 14809525, 6 - tz.transition 2046, 3, :o1, 14810617, 6 - tz.transition 2046, 10, :o2, 14811751, 6 - tz.transition 2047, 4, :o1, 14812843, 6 - tz.transition 2047, 10, :o2, 14813935, 6 - tz.transition 2048, 4, :o1, 14815027, 6 - tz.transition 2048, 10, :o2, 14816119, 6 - tz.transition 2049, 4, :o1, 14817211, 6 - tz.transition 2049, 10, :o2, 14818303, 6 - tz.transition 2050, 4, :o1, 14819395, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Etc/UTC.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Etc/UTC.rb deleted file mode 100644 index 28b2c6a04c..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Etc/UTC.rb +++ /dev/null @@ -1,16 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Etc - module UTC - include TimezoneDefinition - - timezone 'Etc/UTC' do |tz| - tz.offset :o0, 0, 0, :UTC - - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Amsterdam.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Amsterdam.rb deleted file mode 100644 index 2d0c95c4bc..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Amsterdam.rb +++ /dev/null @@ -1,228 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Amsterdam - include TimezoneDefinition - - timezone 'Europe/Amsterdam' do |tz| - tz.offset :o0, 1172, 0, :LMT - tz.offset :o1, 1172, 0, :AMT - tz.offset :o2, 1172, 3600, :NST - tz.offset :o3, 1200, 3600, :NEST - tz.offset :o4, 1200, 0, :NET - tz.offset :o5, 3600, 3600, :CEST - tz.offset :o6, 3600, 0, :CET - - tz.transition 1834, 12, :o1, 51651636907, 21600 - tz.transition 1916, 4, :o2, 52293264907, 21600 - tz.transition 1916, 9, :o1, 52296568807, 21600 - tz.transition 1917, 4, :o2, 52300826707, 21600 - tz.transition 1917, 9, :o1, 52304153107, 21600 - tz.transition 1918, 4, :o2, 52308386707, 21600 - tz.transition 1918, 9, :o1, 52312317907, 21600 - tz.transition 1919, 4, :o2, 52316400307, 21600 - tz.transition 1919, 9, :o1, 52320180307, 21600 - tz.transition 1920, 4, :o2, 52324262707, 21600 - tz.transition 1920, 9, :o1, 52328042707, 21600 - tz.transition 1921, 4, :o2, 52332125107, 21600 - tz.transition 1921, 9, :o1, 52335905107, 21600 - tz.transition 1922, 3, :o2, 52339814707, 21600 - tz.transition 1922, 10, :o1, 52344048307, 21600 - tz.transition 1923, 6, :o2, 52349145907, 21600 - tz.transition 1923, 10, :o1, 52351910707, 21600 - tz.transition 1924, 3, :o2, 52355690707, 21600 - tz.transition 1924, 10, :o1, 52359773107, 21600 - tz.transition 1925, 6, :o2, 52365021907, 21600 - tz.transition 1925, 10, :o1, 52367635507, 21600 - tz.transition 1926, 5, :o2, 52372452307, 21600 - tz.transition 1926, 10, :o1, 52375497907, 21600 - tz.transition 1927, 5, :o2, 52380336307, 21600 - tz.transition 1927, 10, :o1, 52383360307, 21600 - tz.transition 1928, 5, :o2, 52388241907, 21600 - tz.transition 1928, 10, :o1, 52391373907, 21600 - tz.transition 1929, 5, :o2, 52396125907, 21600 - tz.transition 1929, 10, :o1, 52399236307, 21600 - tz.transition 1930, 5, :o2, 52404009907, 21600 - tz.transition 1930, 10, :o1, 52407098707, 21600 - tz.transition 1931, 5, :o2, 52411893907, 21600 - tz.transition 1931, 10, :o1, 52414961107, 21600 - tz.transition 1932, 5, :o2, 52419950707, 21600 - tz.transition 1932, 10, :o1, 52422823507, 21600 - tz.transition 1933, 5, :o2, 52427683507, 21600 - tz.transition 1933, 10, :o1, 52430837107, 21600 - tz.transition 1934, 5, :o2, 52435567507, 21600 - tz.transition 1934, 10, :o1, 52438699507, 21600 - tz.transition 1935, 5, :o2, 52443451507, 21600 - tz.transition 1935, 10, :o1, 52446561907, 21600 - tz.transition 1936, 5, :o2, 52451357107, 21600 - tz.transition 1936, 10, :o1, 52454424307, 21600 - tz.transition 1937, 5, :o2, 52459392307, 21600 - tz.transition 1937, 6, :o3, 52460253607, 21600 - tz.transition 1937, 10, :o4, 174874289, 72 - tz.transition 1938, 5, :o3, 174890417, 72 - tz.transition 1938, 10, :o4, 174900497, 72 - tz.transition 1939, 5, :o3, 174916697, 72 - tz.transition 1939, 10, :o4, 174927209, 72 - tz.transition 1940, 5, :o5, 174943115, 72 - tz.transition 1942, 11, :o6, 58335973, 24 - tz.transition 1943, 3, :o5, 58339501, 24 - tz.transition 1943, 10, :o6, 58344037, 24 - tz.transition 1944, 4, :o5, 58348405, 24 - tz.transition 1944, 10, :o6, 58352773, 24 - tz.transition 1945, 4, :o5, 58357141, 24 - tz.transition 1945, 9, :o6, 58361149, 24 - tz.transition 1977, 4, :o5, 228877200 - tz.transition 1977, 9, :o6, 243997200 - tz.transition 1978, 4, :o5, 260326800 - tz.transition 1978, 10, :o6, 276051600 - tz.transition 1979, 4, :o5, 291776400 - tz.transition 1979, 9, :o6, 307501200 - tz.transition 1980, 4, :o5, 323830800 - tz.transition 1980, 9, :o6, 338950800 - tz.transition 1981, 3, :o5, 354675600 - tz.transition 1981, 9, :o6, 370400400 - tz.transition 1982, 3, :o5, 386125200 - tz.transition 1982, 9, :o6, 401850000 - tz.transition 1983, 3, :o5, 417574800 - tz.transition 1983, 9, :o6, 433299600 - tz.transition 1984, 3, :o5, 449024400 - tz.transition 1984, 9, :o6, 465354000 - tz.transition 1985, 3, :o5, 481078800 - tz.transition 1985, 9, :o6, 496803600 - tz.transition 1986, 3, :o5, 512528400 - tz.transition 1986, 9, :o6, 528253200 - tz.transition 1987, 3, :o5, 543978000 - tz.transition 1987, 9, :o6, 559702800 - tz.transition 1988, 3, :o5, 575427600 - tz.transition 1988, 9, :o6, 591152400 - tz.transition 1989, 3, :o5, 606877200 - tz.transition 1989, 9, :o6, 622602000 - tz.transition 1990, 3, :o5, 638326800 - tz.transition 1990, 9, :o6, 654656400 - tz.transition 1991, 3, :o5, 670381200 - tz.transition 1991, 9, :o6, 686106000 - tz.transition 1992, 3, :o5, 701830800 - tz.transition 1992, 9, :o6, 717555600 - tz.transition 1993, 3, :o5, 733280400 - tz.transition 1993, 9, :o6, 749005200 - tz.transition 1994, 3, :o5, 764730000 - tz.transition 1994, 9, :o6, 780454800 - tz.transition 1995, 3, :o5, 796179600 - tz.transition 1995, 9, :o6, 811904400 - tz.transition 1996, 3, :o5, 828234000 - tz.transition 1996, 10, :o6, 846378000 - tz.transition 1997, 3, :o5, 859683600 - tz.transition 1997, 10, :o6, 877827600 - tz.transition 1998, 3, :o5, 891133200 - tz.transition 1998, 10, :o6, 909277200 - tz.transition 1999, 3, :o5, 922582800 - tz.transition 1999, 10, :o6, 941331600 - tz.transition 2000, 3, :o5, 954032400 - tz.transition 2000, 10, :o6, 972781200 - tz.transition 2001, 3, :o5, 985482000 - tz.transition 2001, 10, :o6, 1004230800 - tz.transition 2002, 3, :o5, 1017536400 - tz.transition 2002, 10, :o6, 1035680400 - tz.transition 2003, 3, :o5, 1048986000 - tz.transition 2003, 10, :o6, 1067130000 - tz.transition 2004, 3, :o5, 1080435600 - tz.transition 2004, 10, :o6, 1099184400 - tz.transition 2005, 3, :o5, 1111885200 - tz.transition 2005, 10, :o6, 1130634000 - tz.transition 2006, 3, :o5, 1143334800 - tz.transition 2006, 10, :o6, 1162083600 - tz.transition 2007, 3, :o5, 1174784400 - tz.transition 2007, 10, :o6, 1193533200 - tz.transition 2008, 3, :o5, 1206838800 - tz.transition 2008, 10, :o6, 1224982800 - tz.transition 2009, 3, :o5, 1238288400 - tz.transition 2009, 10, :o6, 1256432400 - tz.transition 2010, 3, :o5, 1269738000 - tz.transition 2010, 10, :o6, 1288486800 - tz.transition 2011, 3, :o5, 1301187600 - tz.transition 2011, 10, :o6, 1319936400 - tz.transition 2012, 3, :o5, 1332637200 - tz.transition 2012, 10, :o6, 1351386000 - tz.transition 2013, 3, :o5, 1364691600 - tz.transition 2013, 10, :o6, 1382835600 - tz.transition 2014, 3, :o5, 1396141200 - tz.transition 2014, 10, :o6, 1414285200 - tz.transition 2015, 3, :o5, 1427590800 - tz.transition 2015, 10, :o6, 1445734800 - tz.transition 2016, 3, :o5, 1459040400 - tz.transition 2016, 10, :o6, 1477789200 - tz.transition 2017, 3, :o5, 1490490000 - tz.transition 2017, 10, :o6, 1509238800 - tz.transition 2018, 3, :o5, 1521939600 - tz.transition 2018, 10, :o6, 1540688400 - tz.transition 2019, 3, :o5, 1553994000 - tz.transition 2019, 10, :o6, 1572138000 - tz.transition 2020, 3, :o5, 1585443600 - tz.transition 2020, 10, :o6, 1603587600 - tz.transition 2021, 3, :o5, 1616893200 - tz.transition 2021, 10, :o6, 1635642000 - tz.transition 2022, 3, :o5, 1648342800 - tz.transition 2022, 10, :o6, 1667091600 - tz.transition 2023, 3, :o5, 1679792400 - tz.transition 2023, 10, :o6, 1698541200 - tz.transition 2024, 3, :o5, 1711846800 - tz.transition 2024, 10, :o6, 1729990800 - tz.transition 2025, 3, :o5, 1743296400 - tz.transition 2025, 10, :o6, 1761440400 - tz.transition 2026, 3, :o5, 1774746000 - tz.transition 2026, 10, :o6, 1792890000 - tz.transition 2027, 3, :o5, 1806195600 - tz.transition 2027, 10, :o6, 1824944400 - tz.transition 2028, 3, :o5, 1837645200 - tz.transition 2028, 10, :o6, 1856394000 - tz.transition 2029, 3, :o5, 1869094800 - tz.transition 2029, 10, :o6, 1887843600 - tz.transition 2030, 3, :o5, 1901149200 - tz.transition 2030, 10, :o6, 1919293200 - tz.transition 2031, 3, :o5, 1932598800 - tz.transition 2031, 10, :o6, 1950742800 - tz.transition 2032, 3, :o5, 1964048400 - tz.transition 2032, 10, :o6, 1982797200 - tz.transition 2033, 3, :o5, 1995498000 - tz.transition 2033, 10, :o6, 2014246800 - tz.transition 2034, 3, :o5, 2026947600 - tz.transition 2034, 10, :o6, 2045696400 - tz.transition 2035, 3, :o5, 2058397200 - tz.transition 2035, 10, :o6, 2077146000 - tz.transition 2036, 3, :o5, 2090451600 - tz.transition 2036, 10, :o6, 2108595600 - tz.transition 2037, 3, :o5, 2121901200 - tz.transition 2037, 10, :o6, 2140045200 - tz.transition 2038, 3, :o5, 59172253, 24 - tz.transition 2038, 10, :o6, 59177461, 24 - tz.transition 2039, 3, :o5, 59180989, 24 - tz.transition 2039, 10, :o6, 59186197, 24 - tz.transition 2040, 3, :o5, 59189725, 24 - tz.transition 2040, 10, :o6, 59194933, 24 - tz.transition 2041, 3, :o5, 59198629, 24 - tz.transition 2041, 10, :o6, 59203669, 24 - tz.transition 2042, 3, :o5, 59207365, 24 - tz.transition 2042, 10, :o6, 59212405, 24 - tz.transition 2043, 3, :o5, 59216101, 24 - tz.transition 2043, 10, :o6, 59221141, 24 - tz.transition 2044, 3, :o5, 59224837, 24 - tz.transition 2044, 10, :o6, 59230045, 24 - tz.transition 2045, 3, :o5, 59233573, 24 - tz.transition 2045, 10, :o6, 59238781, 24 - tz.transition 2046, 3, :o5, 59242309, 24 - tz.transition 2046, 10, :o6, 59247517, 24 - tz.transition 2047, 3, :o5, 59251213, 24 - tz.transition 2047, 10, :o6, 59256253, 24 - tz.transition 2048, 3, :o5, 59259949, 24 - tz.transition 2048, 10, :o6, 59264989, 24 - tz.transition 2049, 3, :o5, 59268685, 24 - tz.transition 2049, 10, :o6, 59273893, 24 - tz.transition 2050, 3, :o5, 59277421, 24 - tz.transition 2050, 10, :o6, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Athens.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Athens.rb deleted file mode 100644 index 4e21e535ca..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Athens.rb +++ /dev/null @@ -1,185 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Athens - include TimezoneDefinition - - timezone 'Europe/Athens' do |tz| - tz.offset :o0, 5692, 0, :LMT - tz.offset :o1, 5692, 0, :AMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 7200, 3600, :EEST - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 3600, 0, :CET - - tz.transition 1895, 9, :o1, 52130529377, 21600 - tz.transition 1916, 7, :o2, 3268447787, 1350 - tz.transition 1932, 7, :o3, 29122745, 12 - tz.transition 1932, 8, :o2, 19415611, 8 - tz.transition 1941, 4, :o3, 29161097, 12 - tz.transition 1941, 4, :o4, 19440915, 8 - tz.transition 1942, 11, :o5, 58335973, 24 - tz.transition 1943, 3, :o4, 58339523, 24 - tz.transition 1943, 10, :o5, 29172017, 12 - tz.transition 1944, 4, :o2, 58348427, 24 - tz.transition 1952, 6, :o3, 29210333, 12 - tz.transition 1952, 11, :o2, 19474547, 8 - tz.transition 1975, 4, :o3, 166485600 - tz.transition 1975, 11, :o2, 186184800 - tz.transition 1976, 4, :o3, 198028800 - tz.transition 1976, 10, :o2, 213753600 - tz.transition 1977, 4, :o3, 228873600 - tz.transition 1977, 9, :o2, 244080000 - tz.transition 1978, 4, :o3, 260323200 - tz.transition 1978, 9, :o2, 275446800 - tz.transition 1979, 4, :o3, 291798000 - tz.transition 1979, 9, :o2, 307407600 - tz.transition 1980, 3, :o3, 323388000 - tz.transition 1980, 9, :o2, 338936400 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Belgrade.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Belgrade.rb deleted file mode 100644 index 4dbd893d75..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Belgrade.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Belgrade - include TimezoneDefinition - - timezone 'Europe/Belgrade' do |tz| - tz.offset :o0, 4920, 0, :LMT - tz.offset :o1, 3600, 0, :CET - tz.offset :o2, 3600, 3600, :CEST - - tz.transition 1883, 12, :o1, 1734607039, 720 - tz.transition 1941, 4, :o2, 29161241, 12 - tz.transition 1942, 11, :o1, 58335973, 24 - tz.transition 1943, 3, :o2, 58339501, 24 - tz.transition 1943, 10, :o1, 58344037, 24 - tz.transition 1944, 4, :o2, 58348405, 24 - tz.transition 1944, 10, :o1, 58352773, 24 - tz.transition 1945, 5, :o2, 58358005, 24 - tz.transition 1945, 9, :o1, 58361149, 24 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o1, 717555600 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 9, :o1, 749005200 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 9, :o1, 780454800 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 9, :o1, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Berlin.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Berlin.rb deleted file mode 100644 index 721054236c..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Berlin.rb +++ /dev/null @@ -1,188 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Berlin - include TimezoneDefinition - - timezone 'Europe/Berlin' do |tz| - tz.offset :o0, 3208, 0, :LMT - tz.offset :o1, 3600, 0, :CET - tz.offset :o2, 3600, 3600, :CEST - tz.offset :o3, 3600, 7200, :CEMT - - tz.transition 1893, 3, :o1, 26055588199, 10800 - tz.transition 1916, 4, :o2, 29051813, 12 - tz.transition 1916, 9, :o1, 58107299, 24 - tz.transition 1917, 4, :o2, 58112029, 24 - tz.transition 1917, 9, :o1, 58115725, 24 - tz.transition 1918, 4, :o2, 58120765, 24 - tz.transition 1918, 9, :o1, 58124461, 24 - tz.transition 1940, 4, :o2, 58313293, 24 - tz.transition 1942, 11, :o1, 58335973, 24 - tz.transition 1943, 3, :o2, 58339501, 24 - tz.transition 1943, 10, :o1, 58344037, 24 - tz.transition 1944, 4, :o2, 58348405, 24 - tz.transition 1944, 10, :o1, 58352773, 24 - tz.transition 1945, 4, :o2, 58357141, 24 - tz.transition 1945, 5, :o3, 4863199, 2 - tz.transition 1945, 9, :o2, 4863445, 2 - tz.transition 1945, 11, :o1, 58362661, 24 - tz.transition 1946, 4, :o2, 58366189, 24 - tz.transition 1946, 10, :o1, 58370413, 24 - tz.transition 1947, 4, :o2, 29187379, 12 - tz.transition 1947, 5, :o3, 58375597, 24 - tz.transition 1947, 6, :o2, 4864731, 2 - tz.transition 1947, 10, :o1, 58379125, 24 - tz.transition 1948, 4, :o2, 58383829, 24 - tz.transition 1948, 10, :o1, 58387861, 24 - tz.transition 1949, 4, :o2, 58392397, 24 - tz.transition 1949, 10, :o1, 58396597, 24 - tz.transition 1980, 4, :o2, 323830800 - tz.transition 1980, 9, :o1, 338950800 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 9, :o1, 370400400 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 9, :o1, 401850000 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o1, 717555600 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 9, :o1, 749005200 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 9, :o1, 780454800 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 9, :o1, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Bratislava.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Bratislava.rb deleted file mode 100644 index 7a731a0b6a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Bratislava.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Bratislava - include TimezoneDefinition - - linked_timezone 'Europe/Bratislava', 'Europe/Prague' - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Brussels.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Brussels.rb deleted file mode 100644 index 6b0a242944..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Brussels.rb +++ /dev/null @@ -1,232 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Brussels - include TimezoneDefinition - - timezone 'Europe/Brussels' do |tz| - tz.offset :o0, 1050, 0, :LMT - tz.offset :o1, 1050, 0, :BMT - tz.offset :o2, 0, 0, :WET - tz.offset :o3, 3600, 0, :CET - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 0, 3600, :WEST - - tz.transition 1879, 12, :o1, 1386844121, 576 - tz.transition 1892, 5, :o2, 1389438713, 576 - tz.transition 1914, 11, :o3, 4840889, 2 - tz.transition 1916, 4, :o4, 58103627, 24 - tz.transition 1916, 9, :o3, 58107299, 24 - tz.transition 1917, 4, :o4, 58112029, 24 - tz.transition 1917, 9, :o3, 58115725, 24 - tz.transition 1918, 4, :o4, 58120765, 24 - tz.transition 1918, 9, :o3, 58124461, 24 - tz.transition 1918, 11, :o2, 58125815, 24 - tz.transition 1919, 3, :o5, 58128467, 24 - tz.transition 1919, 10, :o2, 58133675, 24 - tz.transition 1920, 2, :o5, 58136867, 24 - tz.transition 1920, 10, :o2, 58142915, 24 - tz.transition 1921, 3, :o5, 58146323, 24 - tz.transition 1921, 10, :o2, 58151723, 24 - tz.transition 1922, 3, :o5, 58155347, 24 - tz.transition 1922, 10, :o2, 58160051, 24 - tz.transition 1923, 4, :o5, 58164755, 24 - tz.transition 1923, 10, :o2, 58168787, 24 - tz.transition 1924, 3, :o5, 58172987, 24 - tz.transition 1924, 10, :o2, 58177523, 24 - tz.transition 1925, 4, :o5, 58181891, 24 - tz.transition 1925, 10, :o2, 58186259, 24 - tz.transition 1926, 4, :o5, 58190963, 24 - tz.transition 1926, 10, :o2, 58194995, 24 - tz.transition 1927, 4, :o5, 58199531, 24 - tz.transition 1927, 10, :o2, 58203731, 24 - tz.transition 1928, 4, :o5, 58208435, 24 - tz.transition 1928, 10, :o2, 29106319, 12 - tz.transition 1929, 4, :o5, 29108671, 12 - tz.transition 1929, 10, :o2, 29110687, 12 - tz.transition 1930, 4, :o5, 29112955, 12 - tz.transition 1930, 10, :o2, 29115055, 12 - tz.transition 1931, 4, :o5, 29117407, 12 - tz.transition 1931, 10, :o2, 29119423, 12 - tz.transition 1932, 4, :o5, 29121607, 12 - tz.transition 1932, 10, :o2, 29123791, 12 - tz.transition 1933, 3, :o5, 29125891, 12 - tz.transition 1933, 10, :o2, 29128243, 12 - tz.transition 1934, 4, :o5, 29130427, 12 - tz.transition 1934, 10, :o2, 29132611, 12 - tz.transition 1935, 3, :o5, 29134711, 12 - tz.transition 1935, 10, :o2, 29136979, 12 - tz.transition 1936, 4, :o5, 29139331, 12 - tz.transition 1936, 10, :o2, 29141347, 12 - tz.transition 1937, 4, :o5, 29143531, 12 - tz.transition 1937, 10, :o2, 29145715, 12 - tz.transition 1938, 3, :o5, 29147815, 12 - tz.transition 1938, 10, :o2, 29150083, 12 - tz.transition 1939, 4, :o5, 29152435, 12 - tz.transition 1939, 11, :o2, 29155039, 12 - tz.transition 1940, 2, :o5, 29156215, 12 - tz.transition 1940, 5, :o4, 29157235, 12 - tz.transition 1942, 11, :o3, 58335973, 24 - tz.transition 1943, 3, :o4, 58339501, 24 - tz.transition 1943, 10, :o3, 58344037, 24 - tz.transition 1944, 4, :o4, 58348405, 24 - tz.transition 1944, 9, :o3, 58352413, 24 - tz.transition 1945, 4, :o4, 58357141, 24 - tz.transition 1945, 9, :o3, 58361149, 24 - tz.transition 1946, 5, :o4, 58367029, 24 - tz.transition 1946, 10, :o3, 58370413, 24 - tz.transition 1977, 4, :o4, 228877200 - tz.transition 1977, 9, :o3, 243997200 - tz.transition 1978, 4, :o4, 260326800 - tz.transition 1978, 10, :o3, 276051600 - tz.transition 1979, 4, :o4, 291776400 - tz.transition 1979, 9, :o3, 307501200 - tz.transition 1980, 4, :o4, 323830800 - tz.transition 1980, 9, :o3, 338950800 - tz.transition 1981, 3, :o4, 354675600 - tz.transition 1981, 9, :o3, 370400400 - tz.transition 1982, 3, :o4, 386125200 - tz.transition 1982, 9, :o3, 401850000 - tz.transition 1983, 3, :o4, 417574800 - tz.transition 1983, 9, :o3, 433299600 - tz.transition 1984, 3, :o4, 449024400 - tz.transition 1984, 9, :o3, 465354000 - tz.transition 1985, 3, :o4, 481078800 - tz.transition 1985, 9, :o3, 496803600 - tz.transition 1986, 3, :o4, 512528400 - tz.transition 1986, 9, :o3, 528253200 - tz.transition 1987, 3, :o4, 543978000 - tz.transition 1987, 9, :o3, 559702800 - tz.transition 1988, 3, :o4, 575427600 - tz.transition 1988, 9, :o3, 591152400 - tz.transition 1989, 3, :o4, 606877200 - tz.transition 1989, 9, :o3, 622602000 - tz.transition 1990, 3, :o4, 638326800 - tz.transition 1990, 9, :o3, 654656400 - tz.transition 1991, 3, :o4, 670381200 - tz.transition 1991, 9, :o3, 686106000 - tz.transition 1992, 3, :o4, 701830800 - tz.transition 1992, 9, :o3, 717555600 - tz.transition 1993, 3, :o4, 733280400 - tz.transition 1993, 9, :o3, 749005200 - tz.transition 1994, 3, :o4, 764730000 - tz.transition 1994, 9, :o3, 780454800 - tz.transition 1995, 3, :o4, 796179600 - tz.transition 1995, 9, :o3, 811904400 - tz.transition 1996, 3, :o4, 828234000 - tz.transition 1996, 10, :o3, 846378000 - tz.transition 1997, 3, :o4, 859683600 - tz.transition 1997, 10, :o3, 877827600 - tz.transition 1998, 3, :o4, 891133200 - tz.transition 1998, 10, :o3, 909277200 - tz.transition 1999, 3, :o4, 922582800 - tz.transition 1999, 10, :o3, 941331600 - tz.transition 2000, 3, :o4, 954032400 - tz.transition 2000, 10, :o3, 972781200 - tz.transition 2001, 3, :o4, 985482000 - tz.transition 2001, 10, :o3, 1004230800 - tz.transition 2002, 3, :o4, 1017536400 - tz.transition 2002, 10, :o3, 1035680400 - tz.transition 2003, 3, :o4, 1048986000 - tz.transition 2003, 10, :o3, 1067130000 - tz.transition 2004, 3, :o4, 1080435600 - tz.transition 2004, 10, :o3, 1099184400 - tz.transition 2005, 3, :o4, 1111885200 - tz.transition 2005, 10, :o3, 1130634000 - tz.transition 2006, 3, :o4, 1143334800 - tz.transition 2006, 10, :o3, 1162083600 - tz.transition 2007, 3, :o4, 1174784400 - tz.transition 2007, 10, :o3, 1193533200 - tz.transition 2008, 3, :o4, 1206838800 - tz.transition 2008, 10, :o3, 1224982800 - tz.transition 2009, 3, :o4, 1238288400 - tz.transition 2009, 10, :o3, 1256432400 - tz.transition 2010, 3, :o4, 1269738000 - tz.transition 2010, 10, :o3, 1288486800 - tz.transition 2011, 3, :o4, 1301187600 - tz.transition 2011, 10, :o3, 1319936400 - tz.transition 2012, 3, :o4, 1332637200 - tz.transition 2012, 10, :o3, 1351386000 - tz.transition 2013, 3, :o4, 1364691600 - tz.transition 2013, 10, :o3, 1382835600 - tz.transition 2014, 3, :o4, 1396141200 - tz.transition 2014, 10, :o3, 1414285200 - tz.transition 2015, 3, :o4, 1427590800 - tz.transition 2015, 10, :o3, 1445734800 - tz.transition 2016, 3, :o4, 1459040400 - tz.transition 2016, 10, :o3, 1477789200 - tz.transition 2017, 3, :o4, 1490490000 - tz.transition 2017, 10, :o3, 1509238800 - tz.transition 2018, 3, :o4, 1521939600 - tz.transition 2018, 10, :o3, 1540688400 - tz.transition 2019, 3, :o4, 1553994000 - tz.transition 2019, 10, :o3, 1572138000 - tz.transition 2020, 3, :o4, 1585443600 - tz.transition 2020, 10, :o3, 1603587600 - tz.transition 2021, 3, :o4, 1616893200 - tz.transition 2021, 10, :o3, 1635642000 - tz.transition 2022, 3, :o4, 1648342800 - tz.transition 2022, 10, :o3, 1667091600 - tz.transition 2023, 3, :o4, 1679792400 - tz.transition 2023, 10, :o3, 1698541200 - tz.transition 2024, 3, :o4, 1711846800 - tz.transition 2024, 10, :o3, 1729990800 - tz.transition 2025, 3, :o4, 1743296400 - tz.transition 2025, 10, :o3, 1761440400 - tz.transition 2026, 3, :o4, 1774746000 - tz.transition 2026, 10, :o3, 1792890000 - tz.transition 2027, 3, :o4, 1806195600 - tz.transition 2027, 10, :o3, 1824944400 - tz.transition 2028, 3, :o4, 1837645200 - tz.transition 2028, 10, :o3, 1856394000 - tz.transition 2029, 3, :o4, 1869094800 - tz.transition 2029, 10, :o3, 1887843600 - tz.transition 2030, 3, :o4, 1901149200 - tz.transition 2030, 10, :o3, 1919293200 - tz.transition 2031, 3, :o4, 1932598800 - tz.transition 2031, 10, :o3, 1950742800 - tz.transition 2032, 3, :o4, 1964048400 - tz.transition 2032, 10, :o3, 1982797200 - tz.transition 2033, 3, :o4, 1995498000 - tz.transition 2033, 10, :o3, 2014246800 - tz.transition 2034, 3, :o4, 2026947600 - tz.transition 2034, 10, :o3, 2045696400 - tz.transition 2035, 3, :o4, 2058397200 - tz.transition 2035, 10, :o3, 2077146000 - tz.transition 2036, 3, :o4, 2090451600 - tz.transition 2036, 10, :o3, 2108595600 - tz.transition 2037, 3, :o4, 2121901200 - tz.transition 2037, 10, :o3, 2140045200 - tz.transition 2038, 3, :o4, 59172253, 24 - tz.transition 2038, 10, :o3, 59177461, 24 - tz.transition 2039, 3, :o4, 59180989, 24 - tz.transition 2039, 10, :o3, 59186197, 24 - tz.transition 2040, 3, :o4, 59189725, 24 - tz.transition 2040, 10, :o3, 59194933, 24 - tz.transition 2041, 3, :o4, 59198629, 24 - tz.transition 2041, 10, :o3, 59203669, 24 - tz.transition 2042, 3, :o4, 59207365, 24 - tz.transition 2042, 10, :o3, 59212405, 24 - tz.transition 2043, 3, :o4, 59216101, 24 - tz.transition 2043, 10, :o3, 59221141, 24 - tz.transition 2044, 3, :o4, 59224837, 24 - tz.transition 2044, 10, :o3, 59230045, 24 - tz.transition 2045, 3, :o4, 59233573, 24 - tz.transition 2045, 10, :o3, 59238781, 24 - tz.transition 2046, 3, :o4, 59242309, 24 - tz.transition 2046, 10, :o3, 59247517, 24 - tz.transition 2047, 3, :o4, 59251213, 24 - tz.transition 2047, 10, :o3, 59256253, 24 - tz.transition 2048, 3, :o4, 59259949, 24 - tz.transition 2048, 10, :o3, 59264989, 24 - tz.transition 2049, 3, :o4, 59268685, 24 - tz.transition 2049, 10, :o3, 59273893, 24 - tz.transition 2050, 3, :o4, 59277421, 24 - tz.transition 2050, 10, :o3, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Bucharest.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Bucharest.rb deleted file mode 100644 index 521c3c932e..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Bucharest.rb +++ /dev/null @@ -1,181 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Bucharest - include TimezoneDefinition - - timezone 'Europe/Bucharest' do |tz| - tz.offset :o0, 6264, 0, :LMT - tz.offset :o1, 6264, 0, :BMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 7200, 3600, :EEST - - tz.transition 1891, 9, :o1, 964802571, 400 - tz.transition 1931, 7, :o2, 970618571, 400 - tz.transition 1932, 5, :o3, 29122181, 12 - tz.transition 1932, 10, :o2, 29123789, 12 - tz.transition 1933, 4, :o3, 29125973, 12 - tz.transition 1933, 9, :o2, 29128157, 12 - tz.transition 1934, 4, :o3, 29130425, 12 - tz.transition 1934, 10, :o2, 29132609, 12 - tz.transition 1935, 4, :o3, 29134793, 12 - tz.transition 1935, 10, :o2, 29136977, 12 - tz.transition 1936, 4, :o3, 29139161, 12 - tz.transition 1936, 10, :o2, 29141345, 12 - tz.transition 1937, 4, :o3, 29143529, 12 - tz.transition 1937, 10, :o2, 29145713, 12 - tz.transition 1938, 4, :o3, 29147897, 12 - tz.transition 1938, 10, :o2, 29150081, 12 - tz.transition 1939, 4, :o3, 29152265, 12 - tz.transition 1939, 9, :o2, 29154449, 12 - tz.transition 1979, 5, :o3, 296604000 - tz.transition 1979, 9, :o2, 307486800 - tz.transition 1980, 4, :o3, 323816400 - tz.transition 1980, 9, :o2, 338940000 - tz.transition 1981, 3, :o3, 354672000 - tz.transition 1981, 9, :o2, 370396800 - tz.transition 1982, 3, :o3, 386121600 - tz.transition 1982, 9, :o2, 401846400 - tz.transition 1983, 3, :o3, 417571200 - tz.transition 1983, 9, :o2, 433296000 - tz.transition 1984, 3, :o3, 449020800 - tz.transition 1984, 9, :o2, 465350400 - tz.transition 1985, 3, :o3, 481075200 - tz.transition 1985, 9, :o2, 496800000 - tz.transition 1986, 3, :o3, 512524800 - tz.transition 1986, 9, :o2, 528249600 - tz.transition 1987, 3, :o3, 543974400 - tz.transition 1987, 9, :o2, 559699200 - tz.transition 1988, 3, :o3, 575424000 - tz.transition 1988, 9, :o2, 591148800 - tz.transition 1989, 3, :o3, 606873600 - tz.transition 1989, 9, :o2, 622598400 - tz.transition 1990, 3, :o3, 638323200 - tz.transition 1990, 9, :o2, 654652800 - tz.transition 1991, 3, :o3, 670370400 - tz.transition 1991, 9, :o2, 686095200 - tz.transition 1992, 3, :o3, 701820000 - tz.transition 1992, 9, :o2, 717544800 - tz.transition 1993, 3, :o3, 733269600 - tz.transition 1993, 9, :o2, 748994400 - tz.transition 1994, 3, :o3, 764719200 - tz.transition 1994, 9, :o2, 780440400 - tz.transition 1995, 3, :o3, 796168800 - tz.transition 1995, 9, :o2, 811890000 - tz.transition 1996, 3, :o3, 828223200 - tz.transition 1996, 10, :o2, 846363600 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Budapest.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Budapest.rb deleted file mode 100644 index 1f3a9738b7..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Budapest.rb +++ /dev/null @@ -1,197 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Budapest - include TimezoneDefinition - - timezone 'Europe/Budapest' do |tz| - tz.offset :o0, 4580, 0, :LMT - tz.offset :o1, 3600, 0, :CET - tz.offset :o2, 3600, 3600, :CEST - - tz.transition 1890, 9, :o1, 10418291051, 4320 - tz.transition 1916, 4, :o2, 29051813, 12 - tz.transition 1916, 9, :o1, 58107299, 24 - tz.transition 1917, 4, :o2, 58112029, 24 - tz.transition 1917, 9, :o1, 58115725, 24 - tz.transition 1918, 4, :o2, 29060215, 12 - tz.transition 1918, 9, :o1, 58124773, 24 - tz.transition 1919, 4, :o2, 29064763, 12 - tz.transition 1919, 9, :o1, 58133197, 24 - tz.transition 1920, 4, :o2, 29069035, 12 - tz.transition 1920, 9, :o1, 58142341, 24 - tz.transition 1941, 4, :o2, 58322173, 24 - tz.transition 1942, 11, :o1, 58335973, 24 - tz.transition 1943, 3, :o2, 58339501, 24 - tz.transition 1943, 10, :o1, 58344037, 24 - tz.transition 1944, 4, :o2, 58348405, 24 - tz.transition 1944, 10, :o1, 58352773, 24 - tz.transition 1945, 5, :o2, 29178929, 12 - tz.transition 1945, 11, :o1, 29181149, 12 - tz.transition 1946, 3, :o2, 58365853, 24 - tz.transition 1946, 10, :o1, 58370389, 24 - tz.transition 1947, 4, :o2, 58374757, 24 - tz.transition 1947, 10, :o1, 58379125, 24 - tz.transition 1948, 4, :o2, 58383493, 24 - tz.transition 1948, 10, :o1, 58387861, 24 - tz.transition 1949, 4, :o2, 58392397, 24 - tz.transition 1949, 10, :o1, 58396597, 24 - tz.transition 1950, 4, :o2, 58401325, 24 - tz.transition 1950, 10, :o1, 58405861, 24 - tz.transition 1954, 5, :o2, 58437251, 24 - tz.transition 1954, 10, :o1, 29220221, 12 - tz.transition 1955, 5, :o2, 58446011, 24 - tz.transition 1955, 10, :o1, 29224601, 12 - tz.transition 1956, 6, :o2, 58455059, 24 - tz.transition 1956, 9, :o1, 29228957, 12 - tz.transition 1957, 6, :o2, 4871983, 2 - tz.transition 1957, 9, :o1, 58466653, 24 - tz.transition 1980, 4, :o2, 323827200 - tz.transition 1980, 9, :o1, 338950800 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 9, :o1, 370400400 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 9, :o1, 401850000 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o1, 717555600 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 9, :o1, 749005200 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 9, :o1, 780454800 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 9, :o1, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Copenhagen.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Copenhagen.rb deleted file mode 100644 index 47cbaf14a7..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Copenhagen.rb +++ /dev/null @@ -1,179 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Copenhagen - include TimezoneDefinition - - timezone 'Europe/Copenhagen' do |tz| - tz.offset :o0, 3020, 0, :LMT - tz.offset :o1, 3020, 0, :CMT - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - - tz.transition 1889, 12, :o1, 10417111769, 4320 - tz.transition 1893, 12, :o2, 10423423289, 4320 - tz.transition 1916, 5, :o3, 29051981, 12 - tz.transition 1916, 9, :o2, 19369099, 8 - tz.transition 1940, 5, :o3, 58314347, 24 - tz.transition 1942, 11, :o2, 58335973, 24 - tz.transition 1943, 3, :o3, 58339501, 24 - tz.transition 1943, 10, :o2, 58344037, 24 - tz.transition 1944, 4, :o3, 58348405, 24 - tz.transition 1944, 10, :o2, 58352773, 24 - tz.transition 1945, 4, :o3, 58357141, 24 - tz.transition 1945, 8, :o2, 58360381, 24 - tz.transition 1946, 5, :o3, 58366597, 24 - tz.transition 1946, 9, :o2, 58369549, 24 - tz.transition 1947, 5, :o3, 58375429, 24 - tz.transition 1947, 8, :o2, 58377781, 24 - tz.transition 1948, 5, :o3, 58384333, 24 - tz.transition 1948, 8, :o2, 58386517, 24 - tz.transition 1980, 4, :o3, 323830800 - tz.transition 1980, 9, :o2, 338950800 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Dublin.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Dublin.rb deleted file mode 100644 index 0560bb5436..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Dublin.rb +++ /dev/null @@ -1,276 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Dublin - include TimezoneDefinition - - timezone 'Europe/Dublin' do |tz| - tz.offset :o0, -1500, 0, :LMT - tz.offset :o1, -1521, 0, :DMT - tz.offset :o2, -1521, 3600, :IST - tz.offset :o3, 0, 0, :GMT - tz.offset :o4, 0, 3600, :BST - tz.offset :o5, 0, 3600, :IST - tz.offset :o6, 3600, 0, :IST - - tz.transition 1880, 8, :o1, 693483701, 288 - tz.transition 1916, 5, :o2, 7747214723, 3200 - tz.transition 1916, 10, :o3, 7747640323, 3200 - tz.transition 1917, 4, :o4, 29055919, 12 - tz.transition 1917, 9, :o3, 29057863, 12 - tz.transition 1918, 3, :o4, 29060119, 12 - tz.transition 1918, 9, :o3, 29062399, 12 - tz.transition 1919, 3, :o4, 29064571, 12 - tz.transition 1919, 9, :o3, 29066767, 12 - tz.transition 1920, 3, :o4, 29068939, 12 - tz.transition 1920, 10, :o3, 29071471, 12 - tz.transition 1921, 4, :o4, 29073391, 12 - tz.transition 1921, 10, :o3, 29075587, 12 - tz.transition 1922, 3, :o5, 29077675, 12 - tz.transition 1922, 10, :o3, 29080027, 12 - tz.transition 1923, 4, :o5, 29082379, 12 - tz.transition 1923, 9, :o3, 29084143, 12 - tz.transition 1924, 4, :o5, 29086663, 12 - tz.transition 1924, 9, :o3, 29088595, 12 - tz.transition 1925, 4, :o5, 29091115, 12 - tz.transition 1925, 10, :o3, 29093131, 12 - tz.transition 1926, 4, :o5, 29095483, 12 - tz.transition 1926, 10, :o3, 29097499, 12 - tz.transition 1927, 4, :o5, 29099767, 12 - tz.transition 1927, 10, :o3, 29101867, 12 - tz.transition 1928, 4, :o5, 29104303, 12 - tz.transition 1928, 10, :o3, 29106319, 12 - tz.transition 1929, 4, :o5, 29108671, 12 - tz.transition 1929, 10, :o3, 29110687, 12 - tz.transition 1930, 4, :o5, 29112955, 12 - tz.transition 1930, 10, :o3, 29115055, 12 - tz.transition 1931, 4, :o5, 29117407, 12 - tz.transition 1931, 10, :o3, 29119423, 12 - tz.transition 1932, 4, :o5, 29121775, 12 - tz.transition 1932, 10, :o3, 29123791, 12 - tz.transition 1933, 4, :o5, 29126059, 12 - tz.transition 1933, 10, :o3, 29128243, 12 - tz.transition 1934, 4, :o5, 29130595, 12 - tz.transition 1934, 10, :o3, 29132611, 12 - tz.transition 1935, 4, :o5, 29134879, 12 - tz.transition 1935, 10, :o3, 29136979, 12 - tz.transition 1936, 4, :o5, 29139331, 12 - tz.transition 1936, 10, :o3, 29141347, 12 - tz.transition 1937, 4, :o5, 29143699, 12 - tz.transition 1937, 10, :o3, 29145715, 12 - tz.transition 1938, 4, :o5, 29147983, 12 - tz.transition 1938, 10, :o3, 29150083, 12 - tz.transition 1939, 4, :o5, 29152435, 12 - tz.transition 1939, 11, :o3, 29155039, 12 - tz.transition 1940, 2, :o5, 29156215, 12 - tz.transition 1946, 10, :o3, 58370389, 24 - tz.transition 1947, 3, :o5, 29187127, 12 - tz.transition 1947, 11, :o3, 58379797, 24 - tz.transition 1948, 4, :o5, 29191915, 12 - tz.transition 1948, 10, :o3, 29194267, 12 - tz.transition 1949, 4, :o5, 29196115, 12 - tz.transition 1949, 10, :o3, 29198635, 12 - tz.transition 1950, 4, :o5, 29200651, 12 - tz.transition 1950, 10, :o3, 29202919, 12 - tz.transition 1951, 4, :o5, 29205019, 12 - tz.transition 1951, 10, :o3, 29207287, 12 - tz.transition 1952, 4, :o5, 29209471, 12 - tz.transition 1952, 10, :o3, 29211739, 12 - tz.transition 1953, 4, :o5, 29213839, 12 - tz.transition 1953, 10, :o3, 29215855, 12 - tz.transition 1954, 4, :o5, 29218123, 12 - tz.transition 1954, 10, :o3, 29220223, 12 - tz.transition 1955, 4, :o5, 29222575, 12 - tz.transition 1955, 10, :o3, 29224591, 12 - tz.transition 1956, 4, :o5, 29227027, 12 - tz.transition 1956, 10, :o3, 29229043, 12 - tz.transition 1957, 4, :o5, 29231311, 12 - tz.transition 1957, 10, :o3, 29233411, 12 - tz.transition 1958, 4, :o5, 29235763, 12 - tz.transition 1958, 10, :o3, 29237779, 12 - tz.transition 1959, 4, :o5, 29240131, 12 - tz.transition 1959, 10, :o3, 29242147, 12 - tz.transition 1960, 4, :o5, 29244415, 12 - tz.transition 1960, 10, :o3, 29246515, 12 - tz.transition 1961, 3, :o5, 29248615, 12 - tz.transition 1961, 10, :o3, 29251219, 12 - tz.transition 1962, 3, :o5, 29252983, 12 - tz.transition 1962, 10, :o3, 29255587, 12 - tz.transition 1963, 3, :o5, 29257435, 12 - tz.transition 1963, 10, :o3, 29259955, 12 - tz.transition 1964, 3, :o5, 29261719, 12 - tz.transition 1964, 10, :o3, 29264323, 12 - tz.transition 1965, 3, :o5, 29266087, 12 - tz.transition 1965, 10, :o3, 29268691, 12 - tz.transition 1966, 3, :o5, 29270455, 12 - tz.transition 1966, 10, :o3, 29273059, 12 - tz.transition 1967, 3, :o5, 29274823, 12 - tz.transition 1967, 10, :o3, 29277511, 12 - tz.transition 1968, 2, :o5, 29278855, 12 - tz.transition 1968, 10, :o6, 58563755, 24 - tz.transition 1971, 10, :o3, 57722400 - tz.transition 1972, 3, :o5, 69818400 - tz.transition 1972, 10, :o3, 89172000 - tz.transition 1973, 3, :o5, 101268000 - tz.transition 1973, 10, :o3, 120621600 - tz.transition 1974, 3, :o5, 132717600 - tz.transition 1974, 10, :o3, 152071200 - tz.transition 1975, 3, :o5, 164167200 - tz.transition 1975, 10, :o3, 183520800 - tz.transition 1976, 3, :o5, 196221600 - tz.transition 1976, 10, :o3, 214970400 - tz.transition 1977, 3, :o5, 227671200 - tz.transition 1977, 10, :o3, 246420000 - tz.transition 1978, 3, :o5, 259120800 - tz.transition 1978, 10, :o3, 278474400 - tz.transition 1979, 3, :o5, 290570400 - tz.transition 1979, 10, :o3, 309924000 - tz.transition 1980, 3, :o5, 322020000 - tz.transition 1980, 10, :o3, 341373600 - tz.transition 1981, 3, :o5, 354675600 - tz.transition 1981, 10, :o3, 372819600 - tz.transition 1982, 3, :o5, 386125200 - tz.transition 1982, 10, :o3, 404269200 - tz.transition 1983, 3, :o5, 417574800 - tz.transition 1983, 10, :o3, 435718800 - tz.transition 1984, 3, :o5, 449024400 - tz.transition 1984, 10, :o3, 467773200 - tz.transition 1985, 3, :o5, 481078800 - tz.transition 1985, 10, :o3, 499222800 - tz.transition 1986, 3, :o5, 512528400 - tz.transition 1986, 10, :o3, 530672400 - tz.transition 1987, 3, :o5, 543978000 - tz.transition 1987, 10, :o3, 562122000 - tz.transition 1988, 3, :o5, 575427600 - tz.transition 1988, 10, :o3, 593571600 - tz.transition 1989, 3, :o5, 606877200 - tz.transition 1989, 10, :o3, 625626000 - tz.transition 1990, 3, :o5, 638326800 - tz.transition 1990, 10, :o3, 657075600 - tz.transition 1991, 3, :o5, 670381200 - tz.transition 1991, 10, :o3, 688525200 - tz.transition 1992, 3, :o5, 701830800 - tz.transition 1992, 10, :o3, 719974800 - tz.transition 1993, 3, :o5, 733280400 - tz.transition 1993, 10, :o3, 751424400 - tz.transition 1994, 3, :o5, 764730000 - tz.transition 1994, 10, :o3, 782874000 - tz.transition 1995, 3, :o5, 796179600 - tz.transition 1995, 10, :o3, 814323600 - tz.transition 1996, 3, :o5, 828234000 - tz.transition 1996, 10, :o3, 846378000 - tz.transition 1997, 3, :o5, 859683600 - tz.transition 1997, 10, :o3, 877827600 - tz.transition 1998, 3, :o5, 891133200 - tz.transition 1998, 10, :o3, 909277200 - tz.transition 1999, 3, :o5, 922582800 - tz.transition 1999, 10, :o3, 941331600 - tz.transition 2000, 3, :o5, 954032400 - tz.transition 2000, 10, :o3, 972781200 - tz.transition 2001, 3, :o5, 985482000 - tz.transition 2001, 10, :o3, 1004230800 - tz.transition 2002, 3, :o5, 1017536400 - tz.transition 2002, 10, :o3, 1035680400 - tz.transition 2003, 3, :o5, 1048986000 - tz.transition 2003, 10, :o3, 1067130000 - tz.transition 2004, 3, :o5, 1080435600 - tz.transition 2004, 10, :o3, 1099184400 - tz.transition 2005, 3, :o5, 1111885200 - tz.transition 2005, 10, :o3, 1130634000 - tz.transition 2006, 3, :o5, 1143334800 - tz.transition 2006, 10, :o3, 1162083600 - tz.transition 2007, 3, :o5, 1174784400 - tz.transition 2007, 10, :o3, 1193533200 - tz.transition 2008, 3, :o5, 1206838800 - tz.transition 2008, 10, :o3, 1224982800 - tz.transition 2009, 3, :o5, 1238288400 - tz.transition 2009, 10, :o3, 1256432400 - tz.transition 2010, 3, :o5, 1269738000 - tz.transition 2010, 10, :o3, 1288486800 - tz.transition 2011, 3, :o5, 1301187600 - tz.transition 2011, 10, :o3, 1319936400 - tz.transition 2012, 3, :o5, 1332637200 - tz.transition 2012, 10, :o3, 1351386000 - tz.transition 2013, 3, :o5, 1364691600 - tz.transition 2013, 10, :o3, 1382835600 - tz.transition 2014, 3, :o5, 1396141200 - tz.transition 2014, 10, :o3, 1414285200 - tz.transition 2015, 3, :o5, 1427590800 - tz.transition 2015, 10, :o3, 1445734800 - tz.transition 2016, 3, :o5, 1459040400 - tz.transition 2016, 10, :o3, 1477789200 - tz.transition 2017, 3, :o5, 1490490000 - tz.transition 2017, 10, :o3, 1509238800 - tz.transition 2018, 3, :o5, 1521939600 - tz.transition 2018, 10, :o3, 1540688400 - tz.transition 2019, 3, :o5, 1553994000 - tz.transition 2019, 10, :o3, 1572138000 - tz.transition 2020, 3, :o5, 1585443600 - tz.transition 2020, 10, :o3, 1603587600 - tz.transition 2021, 3, :o5, 1616893200 - tz.transition 2021, 10, :o3, 1635642000 - tz.transition 2022, 3, :o5, 1648342800 - tz.transition 2022, 10, :o3, 1667091600 - tz.transition 2023, 3, :o5, 1679792400 - tz.transition 2023, 10, :o3, 1698541200 - tz.transition 2024, 3, :o5, 1711846800 - tz.transition 2024, 10, :o3, 1729990800 - tz.transition 2025, 3, :o5, 1743296400 - tz.transition 2025, 10, :o3, 1761440400 - tz.transition 2026, 3, :o5, 1774746000 - tz.transition 2026, 10, :o3, 1792890000 - tz.transition 2027, 3, :o5, 1806195600 - tz.transition 2027, 10, :o3, 1824944400 - tz.transition 2028, 3, :o5, 1837645200 - tz.transition 2028, 10, :o3, 1856394000 - tz.transition 2029, 3, :o5, 1869094800 - tz.transition 2029, 10, :o3, 1887843600 - tz.transition 2030, 3, :o5, 1901149200 - tz.transition 2030, 10, :o3, 1919293200 - tz.transition 2031, 3, :o5, 1932598800 - tz.transition 2031, 10, :o3, 1950742800 - tz.transition 2032, 3, :o5, 1964048400 - tz.transition 2032, 10, :o3, 1982797200 - tz.transition 2033, 3, :o5, 1995498000 - tz.transition 2033, 10, :o3, 2014246800 - tz.transition 2034, 3, :o5, 2026947600 - tz.transition 2034, 10, :o3, 2045696400 - tz.transition 2035, 3, :o5, 2058397200 - tz.transition 2035, 10, :o3, 2077146000 - tz.transition 2036, 3, :o5, 2090451600 - tz.transition 2036, 10, :o3, 2108595600 - tz.transition 2037, 3, :o5, 2121901200 - tz.transition 2037, 10, :o3, 2140045200 - tz.transition 2038, 3, :o5, 59172253, 24 - tz.transition 2038, 10, :o3, 59177461, 24 - tz.transition 2039, 3, :o5, 59180989, 24 - tz.transition 2039, 10, :o3, 59186197, 24 - tz.transition 2040, 3, :o5, 59189725, 24 - tz.transition 2040, 10, :o3, 59194933, 24 - tz.transition 2041, 3, :o5, 59198629, 24 - tz.transition 2041, 10, :o3, 59203669, 24 - tz.transition 2042, 3, :o5, 59207365, 24 - tz.transition 2042, 10, :o3, 59212405, 24 - tz.transition 2043, 3, :o5, 59216101, 24 - tz.transition 2043, 10, :o3, 59221141, 24 - tz.transition 2044, 3, :o5, 59224837, 24 - tz.transition 2044, 10, :o3, 59230045, 24 - tz.transition 2045, 3, :o5, 59233573, 24 - tz.transition 2045, 10, :o3, 59238781, 24 - tz.transition 2046, 3, :o5, 59242309, 24 - tz.transition 2046, 10, :o3, 59247517, 24 - tz.transition 2047, 3, :o5, 59251213, 24 - tz.transition 2047, 10, :o3, 59256253, 24 - tz.transition 2048, 3, :o5, 59259949, 24 - tz.transition 2048, 10, :o3, 59264989, 24 - tz.transition 2049, 3, :o5, 59268685, 24 - tz.transition 2049, 10, :o3, 59273893, 24 - tz.transition 2050, 3, :o5, 59277421, 24 - tz.transition 2050, 10, :o3, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Helsinki.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Helsinki.rb deleted file mode 100644 index 13a806bcc7..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Helsinki.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Helsinki - include TimezoneDefinition - - timezone 'Europe/Helsinki' do |tz| - tz.offset :o0, 5992, 0, :LMT - tz.offset :o1, 5992, 0, :HMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 7200, 3600, :EEST - - tz.transition 1878, 5, :o1, 25997062651, 10800 - tz.transition 1921, 4, :o2, 26166352651, 10800 - tz.transition 1942, 4, :o3, 29165429, 12 - tz.transition 1942, 10, :o2, 19445083, 8 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Istanbul.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Istanbul.rb deleted file mode 100644 index 8306c47536..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Istanbul.rb +++ /dev/null @@ -1,218 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Istanbul - include TimezoneDefinition - - timezone 'Europe/Istanbul' do |tz| - tz.offset :o0, 6952, 0, :LMT - tz.offset :o1, 7016, 0, :IMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 7200, 3600, :EEST - tz.offset :o4, 10800, 3600, :TRST - tz.offset :o5, 10800, 0, :TRT - - tz.transition 1879, 12, :o1, 26003326531, 10800 - tz.transition 1910, 9, :o2, 26124610523, 10800 - tz.transition 1916, 4, :o3, 29051813, 12 - tz.transition 1916, 9, :o2, 19369099, 8 - tz.transition 1920, 3, :o3, 29068937, 12 - tz.transition 1920, 10, :o2, 19380979, 8 - tz.transition 1921, 4, :o3, 29073389, 12 - tz.transition 1921, 10, :o2, 19383723, 8 - tz.transition 1922, 3, :o3, 29077673, 12 - tz.transition 1922, 10, :o2, 19386683, 8 - tz.transition 1924, 5, :o3, 29087021, 12 - tz.transition 1924, 9, :o2, 19392475, 8 - tz.transition 1925, 4, :o3, 29091257, 12 - tz.transition 1925, 9, :o2, 19395395, 8 - tz.transition 1940, 6, :o3, 29157725, 12 - tz.transition 1940, 10, :o2, 19439259, 8 - tz.transition 1940, 11, :o3, 29159573, 12 - tz.transition 1941, 9, :o2, 19442067, 8 - tz.transition 1942, 3, :o3, 29165405, 12 - tz.transition 1942, 10, :o2, 19445315, 8 - tz.transition 1945, 4, :o3, 29178569, 12 - tz.transition 1945, 10, :o2, 19453891, 8 - tz.transition 1946, 5, :o3, 29183669, 12 - tz.transition 1946, 9, :o2, 19456755, 8 - tz.transition 1947, 4, :o3, 29187545, 12 - tz.transition 1947, 10, :o2, 19459707, 8 - tz.transition 1948, 4, :o3, 29191913, 12 - tz.transition 1948, 10, :o2, 19462619, 8 - tz.transition 1949, 4, :o3, 29196197, 12 - tz.transition 1949, 10, :o2, 19465531, 8 - tz.transition 1950, 4, :o3, 29200685, 12 - tz.transition 1950, 10, :o2, 19468499, 8 - tz.transition 1951, 4, :o3, 29205101, 12 - tz.transition 1951, 10, :o2, 19471419, 8 - tz.transition 1962, 7, :o3, 29254325, 12 - tz.transition 1962, 10, :o2, 19503563, 8 - tz.transition 1964, 5, :o3, 29262365, 12 - tz.transition 1964, 9, :o2, 19509355, 8 - tz.transition 1970, 5, :o3, 10533600 - tz.transition 1970, 10, :o2, 23835600 - tz.transition 1971, 5, :o3, 41983200 - tz.transition 1971, 10, :o2, 55285200 - tz.transition 1972, 5, :o3, 74037600 - tz.transition 1972, 10, :o2, 87339600 - tz.transition 1973, 6, :o3, 107910000 - tz.transition 1973, 11, :o2, 121219200 - tz.transition 1974, 3, :o3, 133920000 - tz.transition 1974, 11, :o2, 152676000 - tz.transition 1975, 3, :o3, 165362400 - tz.transition 1975, 10, :o2, 183502800 - tz.transition 1976, 5, :o3, 202428000 - tz.transition 1976, 10, :o2, 215557200 - tz.transition 1977, 4, :o3, 228866400 - tz.transition 1977, 10, :o2, 245797200 - tz.transition 1978, 4, :o3, 260316000 - tz.transition 1978, 10, :o4, 277246800 - tz.transition 1979, 10, :o5, 308779200 - tz.transition 1980, 4, :o4, 323827200 - tz.transition 1980, 10, :o5, 340228800 - tz.transition 1981, 3, :o4, 354672000 - tz.transition 1981, 10, :o5, 371678400 - tz.transition 1982, 3, :o4, 386121600 - tz.transition 1982, 10, :o5, 403128000 - tz.transition 1983, 7, :o4, 428446800 - tz.transition 1983, 10, :o5, 433886400 - tz.transition 1985, 4, :o3, 482792400 - tz.transition 1985, 9, :o2, 496702800 - tz.transition 1986, 3, :o3, 512524800 - tz.transition 1986, 9, :o2, 528249600 - tz.transition 1987, 3, :o3, 543974400 - tz.transition 1987, 9, :o2, 559699200 - tz.transition 1988, 3, :o3, 575424000 - tz.transition 1988, 9, :o2, 591148800 - tz.transition 1989, 3, :o3, 606873600 - tz.transition 1989, 9, :o2, 622598400 - tz.transition 1990, 3, :o3, 638323200 - tz.transition 1990, 9, :o2, 654652800 - tz.transition 1991, 3, :o3, 670374000 - tz.transition 1991, 9, :o2, 686098800 - tz.transition 1992, 3, :o3, 701823600 - tz.transition 1992, 9, :o2, 717548400 - tz.transition 1993, 3, :o3, 733273200 - tz.transition 1993, 9, :o2, 748998000 - tz.transition 1994, 3, :o3, 764722800 - tz.transition 1994, 9, :o2, 780447600 - tz.transition 1995, 3, :o3, 796172400 - tz.transition 1995, 9, :o2, 811897200 - tz.transition 1996, 3, :o3, 828226800 - tz.transition 1996, 10, :o2, 846370800 - tz.transition 1997, 3, :o3, 859676400 - tz.transition 1997, 10, :o2, 877820400 - tz.transition 1998, 3, :o3, 891126000 - tz.transition 1998, 10, :o2, 909270000 - tz.transition 1999, 3, :o3, 922575600 - tz.transition 1999, 10, :o2, 941324400 - tz.transition 2000, 3, :o3, 954025200 - tz.transition 2000, 10, :o2, 972774000 - tz.transition 2001, 3, :o3, 985474800 - tz.transition 2001, 10, :o2, 1004223600 - tz.transition 2002, 3, :o3, 1017529200 - tz.transition 2002, 10, :o2, 1035673200 - tz.transition 2003, 3, :o3, 1048978800 - tz.transition 2003, 10, :o2, 1067122800 - tz.transition 2004, 3, :o3, 1080428400 - tz.transition 2004, 10, :o2, 1099177200 - tz.transition 2005, 3, :o3, 1111878000 - tz.transition 2005, 10, :o2, 1130626800 - tz.transition 2006, 3, :o3, 1143327600 - tz.transition 2006, 10, :o2, 1162076400 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Kiev.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Kiev.rb deleted file mode 100644 index 513d3308be..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Kiev.rb +++ /dev/null @@ -1,168 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Kiev - include TimezoneDefinition - - timezone 'Europe/Kiev' do |tz| - tz.offset :o0, 7324, 0, :LMT - tz.offset :o1, 7324, 0, :KMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 10800, 0, :MSK - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 3600, 0, :CET - tz.offset :o6, 10800, 3600, :MSD - tz.offset :o7, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 52006652969, 21600 - tz.transition 1924, 5, :o2, 52356400169, 21600 - tz.transition 1930, 6, :o3, 29113781, 12 - tz.transition 1941, 9, :o4, 19442059, 8 - tz.transition 1942, 11, :o5, 58335973, 24 - tz.transition 1943, 3, :o4, 58339501, 24 - tz.transition 1943, 10, :o5, 58344037, 24 - tz.transition 1943, 11, :o3, 58344827, 24 - tz.transition 1981, 3, :o6, 354920400 - tz.transition 1981, 9, :o3, 370728000 - tz.transition 1982, 3, :o6, 386456400 - tz.transition 1982, 9, :o3, 402264000 - tz.transition 1983, 3, :o6, 417992400 - tz.transition 1983, 9, :o3, 433800000 - tz.transition 1984, 3, :o6, 449614800 - tz.transition 1984, 9, :o3, 465346800 - tz.transition 1985, 3, :o6, 481071600 - tz.transition 1985, 9, :o3, 496796400 - tz.transition 1986, 3, :o6, 512521200 - tz.transition 1986, 9, :o3, 528246000 - tz.transition 1987, 3, :o6, 543970800 - tz.transition 1987, 9, :o3, 559695600 - tz.transition 1988, 3, :o6, 575420400 - tz.transition 1988, 9, :o3, 591145200 - tz.transition 1989, 3, :o6, 606870000 - tz.transition 1989, 9, :o3, 622594800 - tz.transition 1990, 6, :o2, 646786800 - tz.transition 1992, 3, :o7, 701820000 - tz.transition 1992, 9, :o2, 717541200 - tz.transition 1993, 3, :o7, 733269600 - tz.transition 1993, 9, :o2, 748990800 - tz.transition 1994, 3, :o7, 764719200 - tz.transition 1994, 9, :o2, 780440400 - tz.transition 1995, 3, :o7, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o7, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o7, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o7, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o7, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o7, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o7, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o7, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o7, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o7, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o7, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o7, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o7, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o7, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o7, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o7, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o7, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o7, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o7, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o7, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o7, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o7, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o7, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o7, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o7, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o7, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o7, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o7, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o7, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o7, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o7, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o7, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o7, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o7, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o7, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o7, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o7, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o7, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o7, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o7, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o7, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o7, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o7, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o7, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o7, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o7, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o7, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o7, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o7, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o7, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o7, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o7, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o7, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o7, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o7, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o7, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Lisbon.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Lisbon.rb deleted file mode 100644 index 1c6d2a3d30..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Lisbon.rb +++ /dev/null @@ -1,268 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Lisbon - include TimezoneDefinition - - timezone 'Europe/Lisbon' do |tz| - tz.offset :o0, -2192, 0, :LMT - tz.offset :o1, 0, 0, :WET - tz.offset :o2, 0, 3600, :WEST - tz.offset :o3, 0, 7200, :WEMT - tz.offset :o4, 3600, 0, :CET - tz.offset :o5, 3600, 3600, :CEST - - tz.transition 1912, 1, :o1, 13064773637, 5400 - tz.transition 1916, 6, :o2, 58104779, 24 - tz.transition 1916, 11, :o1, 4842337, 2 - tz.transition 1917, 2, :o2, 58110923, 24 - tz.transition 1917, 10, :o1, 58116395, 24 - tz.transition 1918, 3, :o2, 58119707, 24 - tz.transition 1918, 10, :o1, 58125155, 24 - tz.transition 1919, 2, :o2, 58128443, 24 - tz.transition 1919, 10, :o1, 58133915, 24 - tz.transition 1920, 2, :o2, 58137227, 24 - tz.transition 1920, 10, :o1, 58142699, 24 - tz.transition 1921, 2, :o2, 58145987, 24 - tz.transition 1921, 10, :o1, 58151459, 24 - tz.transition 1924, 4, :o2, 58173419, 24 - tz.transition 1924, 10, :o1, 58177763, 24 - tz.transition 1926, 4, :o2, 58190963, 24 - tz.transition 1926, 10, :o1, 58194995, 24 - tz.transition 1927, 4, :o2, 58199531, 24 - tz.transition 1927, 10, :o1, 58203731, 24 - tz.transition 1928, 4, :o2, 58208435, 24 - tz.transition 1928, 10, :o1, 58212635, 24 - tz.transition 1929, 4, :o2, 58217339, 24 - tz.transition 1929, 10, :o1, 58221371, 24 - tz.transition 1931, 4, :o2, 58234811, 24 - tz.transition 1931, 10, :o1, 58238843, 24 - tz.transition 1932, 4, :o2, 58243211, 24 - tz.transition 1932, 10, :o1, 58247579, 24 - tz.transition 1934, 4, :o2, 58260851, 24 - tz.transition 1934, 10, :o1, 58265219, 24 - tz.transition 1935, 3, :o2, 58269419, 24 - tz.transition 1935, 10, :o1, 58273955, 24 - tz.transition 1936, 4, :o2, 58278659, 24 - tz.transition 1936, 10, :o1, 58282691, 24 - tz.transition 1937, 4, :o2, 58287059, 24 - tz.transition 1937, 10, :o1, 58291427, 24 - tz.transition 1938, 3, :o2, 58295627, 24 - tz.transition 1938, 10, :o1, 58300163, 24 - tz.transition 1939, 4, :o2, 58304867, 24 - tz.transition 1939, 11, :o1, 58310075, 24 - tz.transition 1940, 2, :o2, 58312427, 24 - tz.transition 1940, 10, :o1, 58317803, 24 - tz.transition 1941, 4, :o2, 58322171, 24 - tz.transition 1941, 10, :o1, 58326563, 24 - tz.transition 1942, 3, :o2, 58330403, 24 - tz.transition 1942, 4, :o3, 29165705, 12 - tz.transition 1942, 8, :o2, 29167049, 12 - tz.transition 1942, 10, :o1, 58335779, 24 - tz.transition 1943, 3, :o2, 58339139, 24 - tz.transition 1943, 4, :o3, 29169989, 12 - tz.transition 1943, 8, :o2, 29171585, 12 - tz.transition 1943, 10, :o1, 58344683, 24 - tz.transition 1944, 3, :o2, 58347875, 24 - tz.transition 1944, 4, :o3, 29174441, 12 - tz.transition 1944, 8, :o2, 29175953, 12 - tz.transition 1944, 10, :o1, 58353419, 24 - tz.transition 1945, 3, :o2, 58356611, 24 - tz.transition 1945, 4, :o3, 29178809, 12 - tz.transition 1945, 8, :o2, 29180321, 12 - tz.transition 1945, 10, :o1, 58362155, 24 - tz.transition 1946, 4, :o2, 58366019, 24 - tz.transition 1946, 10, :o1, 58370387, 24 - tz.transition 1947, 4, :o2, 29187379, 12 - tz.transition 1947, 10, :o1, 29189563, 12 - tz.transition 1948, 4, :o2, 29191747, 12 - tz.transition 1948, 10, :o1, 29193931, 12 - tz.transition 1949, 4, :o2, 29196115, 12 - tz.transition 1949, 10, :o1, 29198299, 12 - tz.transition 1951, 4, :o2, 29204851, 12 - tz.transition 1951, 10, :o1, 29207119, 12 - tz.transition 1952, 4, :o2, 29209303, 12 - tz.transition 1952, 10, :o1, 29211487, 12 - tz.transition 1953, 4, :o2, 29213671, 12 - tz.transition 1953, 10, :o1, 29215855, 12 - tz.transition 1954, 4, :o2, 29218039, 12 - tz.transition 1954, 10, :o1, 29220223, 12 - tz.transition 1955, 4, :o2, 29222407, 12 - tz.transition 1955, 10, :o1, 29224591, 12 - tz.transition 1956, 4, :o2, 29226775, 12 - tz.transition 1956, 10, :o1, 29229043, 12 - tz.transition 1957, 4, :o2, 29231227, 12 - tz.transition 1957, 10, :o1, 29233411, 12 - tz.transition 1958, 4, :o2, 29235595, 12 - tz.transition 1958, 10, :o1, 29237779, 12 - tz.transition 1959, 4, :o2, 29239963, 12 - tz.transition 1959, 10, :o1, 29242147, 12 - tz.transition 1960, 4, :o2, 29244331, 12 - tz.transition 1960, 10, :o1, 29246515, 12 - tz.transition 1961, 4, :o2, 29248699, 12 - tz.transition 1961, 10, :o1, 29250883, 12 - tz.transition 1962, 4, :o2, 29253067, 12 - tz.transition 1962, 10, :o1, 29255335, 12 - tz.transition 1963, 4, :o2, 29257519, 12 - tz.transition 1963, 10, :o1, 29259703, 12 - tz.transition 1964, 4, :o2, 29261887, 12 - tz.transition 1964, 10, :o1, 29264071, 12 - tz.transition 1965, 4, :o2, 29266255, 12 - tz.transition 1965, 10, :o1, 29268439, 12 - tz.transition 1966, 4, :o4, 29270623, 12 - tz.transition 1976, 9, :o1, 212544000 - tz.transition 1977, 3, :o2, 228268800 - tz.transition 1977, 9, :o1, 243993600 - tz.transition 1978, 4, :o2, 260323200 - tz.transition 1978, 10, :o1, 276048000 - tz.transition 1979, 4, :o2, 291772800 - tz.transition 1979, 9, :o1, 307501200 - tz.transition 1980, 3, :o2, 323222400 - tz.transition 1980, 9, :o1, 338950800 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 9, :o1, 370400400 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 9, :o1, 401850000 - tz.transition 1983, 3, :o2, 417578400 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o4, 717555600 - tz.transition 1993, 3, :o5, 733280400 - tz.transition 1993, 9, :o4, 749005200 - tz.transition 1994, 3, :o5, 764730000 - tz.transition 1994, 9, :o4, 780454800 - tz.transition 1995, 3, :o5, 796179600 - tz.transition 1995, 9, :o4, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Ljubljana.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Ljubljana.rb deleted file mode 100644 index a9828e6ef8..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Ljubljana.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Ljubljana - include TimezoneDefinition - - linked_timezone 'Europe/Ljubljana', 'Europe/Belgrade' - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/London.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/London.rb deleted file mode 100644 index 64ce41e900..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/London.rb +++ /dev/null @@ -1,288 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module London - include TimezoneDefinition - - timezone 'Europe/London' do |tz| - tz.offset :o0, -75, 0, :LMT - tz.offset :o1, 0, 0, :GMT - tz.offset :o2, 0, 3600, :BST - tz.offset :o3, 0, 7200, :BDST - tz.offset :o4, 3600, 0, :BST - - tz.transition 1847, 12, :o1, 2760187969, 1152 - tz.transition 1916, 5, :o2, 29052055, 12 - tz.transition 1916, 10, :o1, 29053651, 12 - tz.transition 1917, 4, :o2, 29055919, 12 - tz.transition 1917, 9, :o1, 29057863, 12 - tz.transition 1918, 3, :o2, 29060119, 12 - tz.transition 1918, 9, :o1, 29062399, 12 - tz.transition 1919, 3, :o2, 29064571, 12 - tz.transition 1919, 9, :o1, 29066767, 12 - tz.transition 1920, 3, :o2, 29068939, 12 - tz.transition 1920, 10, :o1, 29071471, 12 - tz.transition 1921, 4, :o2, 29073391, 12 - tz.transition 1921, 10, :o1, 29075587, 12 - tz.transition 1922, 3, :o2, 29077675, 12 - tz.transition 1922, 10, :o1, 29080027, 12 - tz.transition 1923, 4, :o2, 29082379, 12 - tz.transition 1923, 9, :o1, 29084143, 12 - tz.transition 1924, 4, :o2, 29086663, 12 - tz.transition 1924, 9, :o1, 29088595, 12 - tz.transition 1925, 4, :o2, 29091115, 12 - tz.transition 1925, 10, :o1, 29093131, 12 - tz.transition 1926, 4, :o2, 29095483, 12 - tz.transition 1926, 10, :o1, 29097499, 12 - tz.transition 1927, 4, :o2, 29099767, 12 - tz.transition 1927, 10, :o1, 29101867, 12 - tz.transition 1928, 4, :o2, 29104303, 12 - tz.transition 1928, 10, :o1, 29106319, 12 - tz.transition 1929, 4, :o2, 29108671, 12 - tz.transition 1929, 10, :o1, 29110687, 12 - tz.transition 1930, 4, :o2, 29112955, 12 - tz.transition 1930, 10, :o1, 29115055, 12 - tz.transition 1931, 4, :o2, 29117407, 12 - tz.transition 1931, 10, :o1, 29119423, 12 - tz.transition 1932, 4, :o2, 29121775, 12 - tz.transition 1932, 10, :o1, 29123791, 12 - tz.transition 1933, 4, :o2, 29126059, 12 - tz.transition 1933, 10, :o1, 29128243, 12 - tz.transition 1934, 4, :o2, 29130595, 12 - tz.transition 1934, 10, :o1, 29132611, 12 - tz.transition 1935, 4, :o2, 29134879, 12 - tz.transition 1935, 10, :o1, 29136979, 12 - tz.transition 1936, 4, :o2, 29139331, 12 - tz.transition 1936, 10, :o1, 29141347, 12 - tz.transition 1937, 4, :o2, 29143699, 12 - tz.transition 1937, 10, :o1, 29145715, 12 - tz.transition 1938, 4, :o2, 29147983, 12 - tz.transition 1938, 10, :o1, 29150083, 12 - tz.transition 1939, 4, :o2, 29152435, 12 - tz.transition 1939, 11, :o1, 29155039, 12 - tz.transition 1940, 2, :o2, 29156215, 12 - tz.transition 1941, 5, :o3, 58322845, 24 - tz.transition 1941, 8, :o2, 58325197, 24 - tz.transition 1942, 4, :o3, 58330909, 24 - tz.transition 1942, 8, :o2, 58333933, 24 - tz.transition 1943, 4, :o3, 58339645, 24 - tz.transition 1943, 8, :o2, 58342837, 24 - tz.transition 1944, 4, :o3, 58348381, 24 - tz.transition 1944, 9, :o2, 58352413, 24 - tz.transition 1945, 4, :o3, 58357141, 24 - tz.transition 1945, 7, :o2, 58359637, 24 - tz.transition 1945, 10, :o1, 29180827, 12 - tz.transition 1946, 4, :o2, 29183095, 12 - tz.transition 1946, 10, :o1, 29185195, 12 - tz.transition 1947, 3, :o2, 29187127, 12 - tz.transition 1947, 4, :o3, 58374925, 24 - tz.transition 1947, 8, :o2, 58377781, 24 - tz.transition 1947, 11, :o1, 29189899, 12 - tz.transition 1948, 3, :o2, 29191495, 12 - tz.transition 1948, 10, :o1, 29194267, 12 - tz.transition 1949, 4, :o2, 29196115, 12 - tz.transition 1949, 10, :o1, 29198635, 12 - tz.transition 1950, 4, :o2, 29200651, 12 - tz.transition 1950, 10, :o1, 29202919, 12 - tz.transition 1951, 4, :o2, 29205019, 12 - tz.transition 1951, 10, :o1, 29207287, 12 - tz.transition 1952, 4, :o2, 29209471, 12 - tz.transition 1952, 10, :o1, 29211739, 12 - tz.transition 1953, 4, :o2, 29213839, 12 - tz.transition 1953, 10, :o1, 29215855, 12 - tz.transition 1954, 4, :o2, 29218123, 12 - tz.transition 1954, 10, :o1, 29220223, 12 - tz.transition 1955, 4, :o2, 29222575, 12 - tz.transition 1955, 10, :o1, 29224591, 12 - tz.transition 1956, 4, :o2, 29227027, 12 - tz.transition 1956, 10, :o1, 29229043, 12 - tz.transition 1957, 4, :o2, 29231311, 12 - tz.transition 1957, 10, :o1, 29233411, 12 - tz.transition 1958, 4, :o2, 29235763, 12 - tz.transition 1958, 10, :o1, 29237779, 12 - tz.transition 1959, 4, :o2, 29240131, 12 - tz.transition 1959, 10, :o1, 29242147, 12 - tz.transition 1960, 4, :o2, 29244415, 12 - tz.transition 1960, 10, :o1, 29246515, 12 - tz.transition 1961, 3, :o2, 29248615, 12 - tz.transition 1961, 10, :o1, 29251219, 12 - tz.transition 1962, 3, :o2, 29252983, 12 - tz.transition 1962, 10, :o1, 29255587, 12 - tz.transition 1963, 3, :o2, 29257435, 12 - tz.transition 1963, 10, :o1, 29259955, 12 - tz.transition 1964, 3, :o2, 29261719, 12 - tz.transition 1964, 10, :o1, 29264323, 12 - tz.transition 1965, 3, :o2, 29266087, 12 - tz.transition 1965, 10, :o1, 29268691, 12 - tz.transition 1966, 3, :o2, 29270455, 12 - tz.transition 1966, 10, :o1, 29273059, 12 - tz.transition 1967, 3, :o2, 29274823, 12 - tz.transition 1967, 10, :o1, 29277511, 12 - tz.transition 1968, 2, :o2, 29278855, 12 - tz.transition 1968, 10, :o4, 58563755, 24 - tz.transition 1971, 10, :o1, 57722400 - tz.transition 1972, 3, :o2, 69818400 - tz.transition 1972, 10, :o1, 89172000 - tz.transition 1973, 3, :o2, 101268000 - tz.transition 1973, 10, :o1, 120621600 - tz.transition 1974, 3, :o2, 132717600 - tz.transition 1974, 10, :o1, 152071200 - tz.transition 1975, 3, :o2, 164167200 - tz.transition 1975, 10, :o1, 183520800 - tz.transition 1976, 3, :o2, 196221600 - tz.transition 1976, 10, :o1, 214970400 - tz.transition 1977, 3, :o2, 227671200 - tz.transition 1977, 10, :o1, 246420000 - tz.transition 1978, 3, :o2, 259120800 - tz.transition 1978, 10, :o1, 278474400 - tz.transition 1979, 3, :o2, 290570400 - tz.transition 1979, 10, :o1, 309924000 - tz.transition 1980, 3, :o2, 322020000 - tz.transition 1980, 10, :o1, 341373600 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 10, :o1, 372819600 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 10, :o1, 404269200 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 10, :o1, 435718800 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 10, :o1, 467773200 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 10, :o1, 499222800 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 10, :o1, 530672400 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 10, :o1, 562122000 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 10, :o1, 593571600 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 10, :o1, 625626000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 10, :o1, 657075600 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 10, :o1, 688525200 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 10, :o1, 719974800 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 10, :o1, 751424400 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 10, :o1, 782874000 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 10, :o1, 814323600 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Madrid.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Madrid.rb deleted file mode 100644 index 1fb568239a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Madrid.rb +++ /dev/null @@ -1,211 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Madrid - include TimezoneDefinition - - timezone 'Europe/Madrid' do |tz| - tz.offset :o0, -884, 0, :LMT - tz.offset :o1, 0, 0, :WET - tz.offset :o2, 0, 3600, :WEST - tz.offset :o3, 0, 7200, :WEMT - tz.offset :o4, 3600, 0, :CET - tz.offset :o5, 3600, 3600, :CEST - - tz.transition 1901, 1, :o1, 52172327021, 21600 - tz.transition 1917, 5, :o2, 58112507, 24 - tz.transition 1917, 10, :o1, 58116203, 24 - tz.transition 1918, 4, :o2, 58120787, 24 - tz.transition 1918, 10, :o1, 58124963, 24 - tz.transition 1919, 4, :o2, 58129307, 24 - tz.transition 1919, 10, :o1, 58133723, 24 - tz.transition 1924, 4, :o2, 58173419, 24 - tz.transition 1924, 10, :o1, 58177523, 24 - tz.transition 1926, 4, :o2, 58190963, 24 - tz.transition 1926, 10, :o1, 58194995, 24 - tz.transition 1927, 4, :o2, 58199531, 24 - tz.transition 1927, 10, :o1, 58203731, 24 - tz.transition 1928, 4, :o2, 58208435, 24 - tz.transition 1928, 10, :o1, 58212635, 24 - tz.transition 1929, 4, :o2, 58217339, 24 - tz.transition 1929, 10, :o1, 58221371, 24 - tz.transition 1937, 5, :o2, 58288235, 24 - tz.transition 1937, 10, :o1, 58291427, 24 - tz.transition 1938, 3, :o2, 58295531, 24 - tz.transition 1938, 10, :o1, 58300163, 24 - tz.transition 1939, 4, :o2, 58304867, 24 - tz.transition 1939, 10, :o1, 58309067, 24 - tz.transition 1940, 3, :o2, 58312931, 24 - tz.transition 1942, 5, :o3, 29165789, 12 - tz.transition 1942, 9, :o2, 29167253, 12 - tz.transition 1943, 4, :o3, 29169989, 12 - tz.transition 1943, 10, :o2, 29172017, 12 - tz.transition 1944, 4, :o3, 29174357, 12 - tz.transition 1944, 10, :o2, 29176493, 12 - tz.transition 1945, 4, :o3, 29178725, 12 - tz.transition 1945, 9, :o2, 58361483, 24 - tz.transition 1946, 4, :o3, 29183093, 12 - tz.transition 1946, 9, :o4, 29185121, 12 - tz.transition 1949, 4, :o5, 29196449, 12 - tz.transition 1949, 9, :o4, 58396547, 24 - tz.transition 1974, 4, :o5, 135122400 - tz.transition 1974, 10, :o4, 150246000 - tz.transition 1975, 4, :o5, 167176800 - tz.transition 1975, 10, :o4, 181695600 - tz.transition 1976, 3, :o5, 196812000 - tz.transition 1976, 9, :o4, 212540400 - tz.transition 1977, 4, :o5, 228866400 - tz.transition 1977, 9, :o4, 243990000 - tz.transition 1978, 4, :o5, 260402400 - tz.transition 1978, 9, :o4, 276044400 - tz.transition 1979, 4, :o5, 291776400 - tz.transition 1979, 9, :o4, 307501200 - tz.transition 1980, 4, :o5, 323830800 - tz.transition 1980, 9, :o4, 338950800 - tz.transition 1981, 3, :o5, 354675600 - tz.transition 1981, 9, :o4, 370400400 - tz.transition 1982, 3, :o5, 386125200 - tz.transition 1982, 9, :o4, 401850000 - tz.transition 1983, 3, :o5, 417574800 - tz.transition 1983, 9, :o4, 433299600 - tz.transition 1984, 3, :o5, 449024400 - tz.transition 1984, 9, :o4, 465354000 - tz.transition 1985, 3, :o5, 481078800 - tz.transition 1985, 9, :o4, 496803600 - tz.transition 1986, 3, :o5, 512528400 - tz.transition 1986, 9, :o4, 528253200 - tz.transition 1987, 3, :o5, 543978000 - tz.transition 1987, 9, :o4, 559702800 - tz.transition 1988, 3, :o5, 575427600 - tz.transition 1988, 9, :o4, 591152400 - tz.transition 1989, 3, :o5, 606877200 - tz.transition 1989, 9, :o4, 622602000 - tz.transition 1990, 3, :o5, 638326800 - tz.transition 1990, 9, :o4, 654656400 - tz.transition 1991, 3, :o5, 670381200 - tz.transition 1991, 9, :o4, 686106000 - tz.transition 1992, 3, :o5, 701830800 - tz.transition 1992, 9, :o4, 717555600 - tz.transition 1993, 3, :o5, 733280400 - tz.transition 1993, 9, :o4, 749005200 - tz.transition 1994, 3, :o5, 764730000 - tz.transition 1994, 9, :o4, 780454800 - tz.transition 1995, 3, :o5, 796179600 - tz.transition 1995, 9, :o4, 811904400 - tz.transition 1996, 3, :o5, 828234000 - tz.transition 1996, 10, :o4, 846378000 - tz.transition 1997, 3, :o5, 859683600 - tz.transition 1997, 10, :o4, 877827600 - tz.transition 1998, 3, :o5, 891133200 - tz.transition 1998, 10, :o4, 909277200 - tz.transition 1999, 3, :o5, 922582800 - tz.transition 1999, 10, :o4, 941331600 - tz.transition 2000, 3, :o5, 954032400 - tz.transition 2000, 10, :o4, 972781200 - tz.transition 2001, 3, :o5, 985482000 - tz.transition 2001, 10, :o4, 1004230800 - tz.transition 2002, 3, :o5, 1017536400 - tz.transition 2002, 10, :o4, 1035680400 - tz.transition 2003, 3, :o5, 1048986000 - tz.transition 2003, 10, :o4, 1067130000 - tz.transition 2004, 3, :o5, 1080435600 - tz.transition 2004, 10, :o4, 1099184400 - tz.transition 2005, 3, :o5, 1111885200 - tz.transition 2005, 10, :o4, 1130634000 - tz.transition 2006, 3, :o5, 1143334800 - tz.transition 2006, 10, :o4, 1162083600 - tz.transition 2007, 3, :o5, 1174784400 - tz.transition 2007, 10, :o4, 1193533200 - tz.transition 2008, 3, :o5, 1206838800 - tz.transition 2008, 10, :o4, 1224982800 - tz.transition 2009, 3, :o5, 1238288400 - tz.transition 2009, 10, :o4, 1256432400 - tz.transition 2010, 3, :o5, 1269738000 - tz.transition 2010, 10, :o4, 1288486800 - tz.transition 2011, 3, :o5, 1301187600 - tz.transition 2011, 10, :o4, 1319936400 - tz.transition 2012, 3, :o5, 1332637200 - tz.transition 2012, 10, :o4, 1351386000 - tz.transition 2013, 3, :o5, 1364691600 - tz.transition 2013, 10, :o4, 1382835600 - tz.transition 2014, 3, :o5, 1396141200 - tz.transition 2014, 10, :o4, 1414285200 - tz.transition 2015, 3, :o5, 1427590800 - tz.transition 2015, 10, :o4, 1445734800 - tz.transition 2016, 3, :o5, 1459040400 - tz.transition 2016, 10, :o4, 1477789200 - tz.transition 2017, 3, :o5, 1490490000 - tz.transition 2017, 10, :o4, 1509238800 - tz.transition 2018, 3, :o5, 1521939600 - tz.transition 2018, 10, :o4, 1540688400 - tz.transition 2019, 3, :o5, 1553994000 - tz.transition 2019, 10, :o4, 1572138000 - tz.transition 2020, 3, :o5, 1585443600 - tz.transition 2020, 10, :o4, 1603587600 - tz.transition 2021, 3, :o5, 1616893200 - tz.transition 2021, 10, :o4, 1635642000 - tz.transition 2022, 3, :o5, 1648342800 - tz.transition 2022, 10, :o4, 1667091600 - tz.transition 2023, 3, :o5, 1679792400 - tz.transition 2023, 10, :o4, 1698541200 - tz.transition 2024, 3, :o5, 1711846800 - tz.transition 2024, 10, :o4, 1729990800 - tz.transition 2025, 3, :o5, 1743296400 - tz.transition 2025, 10, :o4, 1761440400 - tz.transition 2026, 3, :o5, 1774746000 - tz.transition 2026, 10, :o4, 1792890000 - tz.transition 2027, 3, :o5, 1806195600 - tz.transition 2027, 10, :o4, 1824944400 - tz.transition 2028, 3, :o5, 1837645200 - tz.transition 2028, 10, :o4, 1856394000 - tz.transition 2029, 3, :o5, 1869094800 - tz.transition 2029, 10, :o4, 1887843600 - tz.transition 2030, 3, :o5, 1901149200 - tz.transition 2030, 10, :o4, 1919293200 - tz.transition 2031, 3, :o5, 1932598800 - tz.transition 2031, 10, :o4, 1950742800 - tz.transition 2032, 3, :o5, 1964048400 - tz.transition 2032, 10, :o4, 1982797200 - tz.transition 2033, 3, :o5, 1995498000 - tz.transition 2033, 10, :o4, 2014246800 - tz.transition 2034, 3, :o5, 2026947600 - tz.transition 2034, 10, :o4, 2045696400 - tz.transition 2035, 3, :o5, 2058397200 - tz.transition 2035, 10, :o4, 2077146000 - tz.transition 2036, 3, :o5, 2090451600 - tz.transition 2036, 10, :o4, 2108595600 - tz.transition 2037, 3, :o5, 2121901200 - tz.transition 2037, 10, :o4, 2140045200 - tz.transition 2038, 3, :o5, 59172253, 24 - tz.transition 2038, 10, :o4, 59177461, 24 - tz.transition 2039, 3, :o5, 59180989, 24 - tz.transition 2039, 10, :o4, 59186197, 24 - tz.transition 2040, 3, :o5, 59189725, 24 - tz.transition 2040, 10, :o4, 59194933, 24 - tz.transition 2041, 3, :o5, 59198629, 24 - tz.transition 2041, 10, :o4, 59203669, 24 - tz.transition 2042, 3, :o5, 59207365, 24 - tz.transition 2042, 10, :o4, 59212405, 24 - tz.transition 2043, 3, :o5, 59216101, 24 - tz.transition 2043, 10, :o4, 59221141, 24 - tz.transition 2044, 3, :o5, 59224837, 24 - tz.transition 2044, 10, :o4, 59230045, 24 - tz.transition 2045, 3, :o5, 59233573, 24 - tz.transition 2045, 10, :o4, 59238781, 24 - tz.transition 2046, 3, :o5, 59242309, 24 - tz.transition 2046, 10, :o4, 59247517, 24 - tz.transition 2047, 3, :o5, 59251213, 24 - tz.transition 2047, 10, :o4, 59256253, 24 - tz.transition 2048, 3, :o5, 59259949, 24 - tz.transition 2048, 10, :o4, 59264989, 24 - tz.transition 2049, 3, :o5, 59268685, 24 - tz.transition 2049, 10, :o4, 59273893, 24 - tz.transition 2050, 3, :o5, 59277421, 24 - tz.transition 2050, 10, :o4, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Minsk.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Minsk.rb deleted file mode 100644 index fa15816cc8..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Minsk.rb +++ /dev/null @@ -1,170 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Minsk - include TimezoneDefinition - - timezone 'Europe/Minsk' do |tz| - tz.offset :o0, 6616, 0, :LMT - tz.offset :o1, 6600, 0, :MMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 10800, 0, :MSK - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 3600, 0, :CET - tz.offset :o6, 10800, 3600, :MSD - tz.offset :o7, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 26003326573, 10800 - tz.transition 1924, 5, :o2, 349042669, 144 - tz.transition 1930, 6, :o3, 29113781, 12 - tz.transition 1941, 6, :o4, 19441387, 8 - tz.transition 1942, 11, :o5, 58335973, 24 - tz.transition 1943, 3, :o4, 58339501, 24 - tz.transition 1943, 10, :o5, 58344037, 24 - tz.transition 1944, 4, :o4, 58348405, 24 - tz.transition 1944, 7, :o3, 29175293, 12 - tz.transition 1981, 3, :o6, 354920400 - tz.transition 1981, 9, :o3, 370728000 - tz.transition 1982, 3, :o6, 386456400 - tz.transition 1982, 9, :o3, 402264000 - tz.transition 1983, 3, :o6, 417992400 - tz.transition 1983, 9, :o3, 433800000 - tz.transition 1984, 3, :o6, 449614800 - tz.transition 1984, 9, :o3, 465346800 - tz.transition 1985, 3, :o6, 481071600 - tz.transition 1985, 9, :o3, 496796400 - tz.transition 1986, 3, :o6, 512521200 - tz.transition 1986, 9, :o3, 528246000 - tz.transition 1987, 3, :o6, 543970800 - tz.transition 1987, 9, :o3, 559695600 - tz.transition 1988, 3, :o6, 575420400 - tz.transition 1988, 9, :o3, 591145200 - tz.transition 1989, 3, :o6, 606870000 - tz.transition 1989, 9, :o3, 622594800 - tz.transition 1991, 3, :o7, 670374000 - tz.transition 1991, 9, :o2, 686102400 - tz.transition 1992, 3, :o7, 701820000 - tz.transition 1992, 9, :o2, 717544800 - tz.transition 1993, 3, :o7, 733276800 - tz.transition 1993, 9, :o2, 749001600 - tz.transition 1994, 3, :o7, 764726400 - tz.transition 1994, 9, :o2, 780451200 - tz.transition 1995, 3, :o7, 796176000 - tz.transition 1995, 9, :o2, 811900800 - tz.transition 1996, 3, :o7, 828230400 - tz.transition 1996, 10, :o2, 846374400 - tz.transition 1997, 3, :o7, 859680000 - tz.transition 1997, 10, :o2, 877824000 - tz.transition 1998, 3, :o7, 891129600 - tz.transition 1998, 10, :o2, 909273600 - tz.transition 1999, 3, :o7, 922579200 - tz.transition 1999, 10, :o2, 941328000 - tz.transition 2000, 3, :o7, 954028800 - tz.transition 2000, 10, :o2, 972777600 - tz.transition 2001, 3, :o7, 985478400 - tz.transition 2001, 10, :o2, 1004227200 - tz.transition 2002, 3, :o7, 1017532800 - tz.transition 2002, 10, :o2, 1035676800 - tz.transition 2003, 3, :o7, 1048982400 - tz.transition 2003, 10, :o2, 1067126400 - tz.transition 2004, 3, :o7, 1080432000 - tz.transition 2004, 10, :o2, 1099180800 - tz.transition 2005, 3, :o7, 1111881600 - tz.transition 2005, 10, :o2, 1130630400 - tz.transition 2006, 3, :o7, 1143331200 - tz.transition 2006, 10, :o2, 1162080000 - tz.transition 2007, 3, :o7, 1174780800 - tz.transition 2007, 10, :o2, 1193529600 - tz.transition 2008, 3, :o7, 1206835200 - tz.transition 2008, 10, :o2, 1224979200 - tz.transition 2009, 3, :o7, 1238284800 - tz.transition 2009, 10, :o2, 1256428800 - tz.transition 2010, 3, :o7, 1269734400 - tz.transition 2010, 10, :o2, 1288483200 - tz.transition 2011, 3, :o7, 1301184000 - tz.transition 2011, 10, :o2, 1319932800 - tz.transition 2012, 3, :o7, 1332633600 - tz.transition 2012, 10, :o2, 1351382400 - tz.transition 2013, 3, :o7, 1364688000 - tz.transition 2013, 10, :o2, 1382832000 - tz.transition 2014, 3, :o7, 1396137600 - tz.transition 2014, 10, :o2, 1414281600 - tz.transition 2015, 3, :o7, 1427587200 - tz.transition 2015, 10, :o2, 1445731200 - tz.transition 2016, 3, :o7, 1459036800 - tz.transition 2016, 10, :o2, 1477785600 - tz.transition 2017, 3, :o7, 1490486400 - tz.transition 2017, 10, :o2, 1509235200 - tz.transition 2018, 3, :o7, 1521936000 - tz.transition 2018, 10, :o2, 1540684800 - tz.transition 2019, 3, :o7, 1553990400 - tz.transition 2019, 10, :o2, 1572134400 - tz.transition 2020, 3, :o7, 1585440000 - tz.transition 2020, 10, :o2, 1603584000 - tz.transition 2021, 3, :o7, 1616889600 - tz.transition 2021, 10, :o2, 1635638400 - tz.transition 2022, 3, :o7, 1648339200 - tz.transition 2022, 10, :o2, 1667088000 - tz.transition 2023, 3, :o7, 1679788800 - tz.transition 2023, 10, :o2, 1698537600 - tz.transition 2024, 3, :o7, 1711843200 - tz.transition 2024, 10, :o2, 1729987200 - tz.transition 2025, 3, :o7, 1743292800 - tz.transition 2025, 10, :o2, 1761436800 - tz.transition 2026, 3, :o7, 1774742400 - tz.transition 2026, 10, :o2, 1792886400 - tz.transition 2027, 3, :o7, 1806192000 - tz.transition 2027, 10, :o2, 1824940800 - tz.transition 2028, 3, :o7, 1837641600 - tz.transition 2028, 10, :o2, 1856390400 - tz.transition 2029, 3, :o7, 1869091200 - tz.transition 2029, 10, :o2, 1887840000 - tz.transition 2030, 3, :o7, 1901145600 - tz.transition 2030, 10, :o2, 1919289600 - tz.transition 2031, 3, :o7, 1932595200 - tz.transition 2031, 10, :o2, 1950739200 - tz.transition 2032, 3, :o7, 1964044800 - tz.transition 2032, 10, :o2, 1982793600 - tz.transition 2033, 3, :o7, 1995494400 - tz.transition 2033, 10, :o2, 2014243200 - tz.transition 2034, 3, :o7, 2026944000 - tz.transition 2034, 10, :o2, 2045692800 - tz.transition 2035, 3, :o7, 2058393600 - tz.transition 2035, 10, :o2, 2077142400 - tz.transition 2036, 3, :o7, 2090448000 - tz.transition 2036, 10, :o2, 2108592000 - tz.transition 2037, 3, :o7, 2121897600 - tz.transition 2037, 10, :o2, 2140041600 - tz.transition 2038, 3, :o7, 4931021, 2 - tz.transition 2038, 10, :o2, 4931455, 2 - tz.transition 2039, 3, :o7, 4931749, 2 - tz.transition 2039, 10, :o2, 4932183, 2 - tz.transition 2040, 3, :o7, 4932477, 2 - tz.transition 2040, 10, :o2, 4932911, 2 - tz.transition 2041, 3, :o7, 4933219, 2 - tz.transition 2041, 10, :o2, 4933639, 2 - tz.transition 2042, 3, :o7, 4933947, 2 - tz.transition 2042, 10, :o2, 4934367, 2 - tz.transition 2043, 3, :o7, 4934675, 2 - tz.transition 2043, 10, :o2, 4935095, 2 - tz.transition 2044, 3, :o7, 4935403, 2 - tz.transition 2044, 10, :o2, 4935837, 2 - tz.transition 2045, 3, :o7, 4936131, 2 - tz.transition 2045, 10, :o2, 4936565, 2 - tz.transition 2046, 3, :o7, 4936859, 2 - tz.transition 2046, 10, :o2, 4937293, 2 - tz.transition 2047, 3, :o7, 4937601, 2 - tz.transition 2047, 10, :o2, 4938021, 2 - tz.transition 2048, 3, :o7, 4938329, 2 - tz.transition 2048, 10, :o2, 4938749, 2 - tz.transition 2049, 3, :o7, 4939057, 2 - tz.transition 2049, 10, :o2, 4939491, 2 - tz.transition 2050, 3, :o7, 4939785, 2 - tz.transition 2050, 10, :o2, 4940219, 2 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Moscow.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Moscow.rb deleted file mode 100644 index ef269b675b..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Moscow.rb +++ /dev/null @@ -1,181 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Moscow - include TimezoneDefinition - - timezone 'Europe/Moscow' do |tz| - tz.offset :o0, 9020, 0, :LMT - tz.offset :o1, 9000, 0, :MMT - tz.offset :o2, 9048, 0, :MMT - tz.offset :o3, 9048, 3600, :MST - tz.offset :o4, 9048, 7200, :MDST - tz.offset :o5, 10800, 3600, :MSD - tz.offset :o6, 10800, 0, :MSK - tz.offset :o7, 10800, 7200, :MSD - tz.offset :o8, 7200, 0, :EET - tz.offset :o9, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 10401330509, 4320 - tz.transition 1916, 7, :o2, 116210275, 48 - tz.transition 1917, 7, :o3, 8717080873, 3600 - tz.transition 1917, 12, :o2, 8717725273, 3600 - tz.transition 1918, 5, :o4, 8718283123, 3600 - tz.transition 1918, 9, :o3, 8718668473, 3600 - tz.transition 1919, 5, :o4, 8719597123, 3600 - tz.transition 1919, 6, :o5, 8719705423, 3600 - tz.transition 1919, 8, :o6, 7266559, 3 - tz.transition 1921, 2, :o5, 7268206, 3 - tz.transition 1921, 3, :o7, 58146463, 24 - tz.transition 1921, 8, :o5, 58150399, 24 - tz.transition 1921, 9, :o6, 7268890, 3 - tz.transition 1922, 9, :o8, 19386627, 8 - tz.transition 1930, 6, :o6, 29113781, 12 - tz.transition 1981, 3, :o5, 354920400 - tz.transition 1981, 9, :o6, 370728000 - tz.transition 1982, 3, :o5, 386456400 - tz.transition 1982, 9, :o6, 402264000 - tz.transition 1983, 3, :o5, 417992400 - tz.transition 1983, 9, :o6, 433800000 - tz.transition 1984, 3, :o5, 449614800 - tz.transition 1984, 9, :o6, 465346800 - tz.transition 1985, 3, :o5, 481071600 - tz.transition 1985, 9, :o6, 496796400 - tz.transition 1986, 3, :o5, 512521200 - tz.transition 1986, 9, :o6, 528246000 - tz.transition 1987, 3, :o5, 543970800 - tz.transition 1987, 9, :o6, 559695600 - tz.transition 1988, 3, :o5, 575420400 - tz.transition 1988, 9, :o6, 591145200 - tz.transition 1989, 3, :o5, 606870000 - tz.transition 1989, 9, :o6, 622594800 - tz.transition 1990, 3, :o5, 638319600 - tz.transition 1990, 9, :o6, 654649200 - tz.transition 1991, 3, :o9, 670374000 - tz.transition 1991, 9, :o8, 686102400 - tz.transition 1992, 1, :o6, 695779200 - tz.transition 1992, 3, :o5, 701812800 - tz.transition 1992, 9, :o6, 717534000 - tz.transition 1993, 3, :o5, 733273200 - tz.transition 1993, 9, :o6, 748998000 - tz.transition 1994, 3, :o5, 764722800 - tz.transition 1994, 9, :o6, 780447600 - tz.transition 1995, 3, :o5, 796172400 - tz.transition 1995, 9, :o6, 811897200 - tz.transition 1996, 3, :o5, 828226800 - tz.transition 1996, 10, :o6, 846370800 - tz.transition 1997, 3, :o5, 859676400 - tz.transition 1997, 10, :o6, 877820400 - tz.transition 1998, 3, :o5, 891126000 - tz.transition 1998, 10, :o6, 909270000 - tz.transition 1999, 3, :o5, 922575600 - tz.transition 1999, 10, :o6, 941324400 - tz.transition 2000, 3, :o5, 954025200 - tz.transition 2000, 10, :o6, 972774000 - tz.transition 2001, 3, :o5, 985474800 - tz.transition 2001, 10, :o6, 1004223600 - tz.transition 2002, 3, :o5, 1017529200 - tz.transition 2002, 10, :o6, 1035673200 - tz.transition 2003, 3, :o5, 1048978800 - tz.transition 2003, 10, :o6, 1067122800 - tz.transition 2004, 3, :o5, 1080428400 - tz.transition 2004, 10, :o6, 1099177200 - tz.transition 2005, 3, :o5, 1111878000 - tz.transition 2005, 10, :o6, 1130626800 - tz.transition 2006, 3, :o5, 1143327600 - tz.transition 2006, 10, :o6, 1162076400 - tz.transition 2007, 3, :o5, 1174777200 - tz.transition 2007, 10, :o6, 1193526000 - tz.transition 2008, 3, :o5, 1206831600 - tz.transition 2008, 10, :o6, 1224975600 - tz.transition 2009, 3, :o5, 1238281200 - tz.transition 2009, 10, :o6, 1256425200 - tz.transition 2010, 3, :o5, 1269730800 - tz.transition 2010, 10, :o6, 1288479600 - tz.transition 2011, 3, :o5, 1301180400 - tz.transition 2011, 10, :o6, 1319929200 - tz.transition 2012, 3, :o5, 1332630000 - tz.transition 2012, 10, :o6, 1351378800 - tz.transition 2013, 3, :o5, 1364684400 - tz.transition 2013, 10, :o6, 1382828400 - tz.transition 2014, 3, :o5, 1396134000 - tz.transition 2014, 10, :o6, 1414278000 - tz.transition 2015, 3, :o5, 1427583600 - tz.transition 2015, 10, :o6, 1445727600 - tz.transition 2016, 3, :o5, 1459033200 - tz.transition 2016, 10, :o6, 1477782000 - tz.transition 2017, 3, :o5, 1490482800 - tz.transition 2017, 10, :o6, 1509231600 - tz.transition 2018, 3, :o5, 1521932400 - tz.transition 2018, 10, :o6, 1540681200 - tz.transition 2019, 3, :o5, 1553986800 - tz.transition 2019, 10, :o6, 1572130800 - tz.transition 2020, 3, :o5, 1585436400 - tz.transition 2020, 10, :o6, 1603580400 - tz.transition 2021, 3, :o5, 1616886000 - tz.transition 2021, 10, :o6, 1635634800 - tz.transition 2022, 3, :o5, 1648335600 - tz.transition 2022, 10, :o6, 1667084400 - tz.transition 2023, 3, :o5, 1679785200 - tz.transition 2023, 10, :o6, 1698534000 - tz.transition 2024, 3, :o5, 1711839600 - tz.transition 2024, 10, :o6, 1729983600 - tz.transition 2025, 3, :o5, 1743289200 - tz.transition 2025, 10, :o6, 1761433200 - tz.transition 2026, 3, :o5, 1774738800 - tz.transition 2026, 10, :o6, 1792882800 - tz.transition 2027, 3, :o5, 1806188400 - tz.transition 2027, 10, :o6, 1824937200 - tz.transition 2028, 3, :o5, 1837638000 - tz.transition 2028, 10, :o6, 1856386800 - tz.transition 2029, 3, :o5, 1869087600 - tz.transition 2029, 10, :o6, 1887836400 - tz.transition 2030, 3, :o5, 1901142000 - tz.transition 2030, 10, :o6, 1919286000 - tz.transition 2031, 3, :o5, 1932591600 - tz.transition 2031, 10, :o6, 1950735600 - tz.transition 2032, 3, :o5, 1964041200 - tz.transition 2032, 10, :o6, 1982790000 - tz.transition 2033, 3, :o5, 1995490800 - tz.transition 2033, 10, :o6, 2014239600 - tz.transition 2034, 3, :o5, 2026940400 - tz.transition 2034, 10, :o6, 2045689200 - tz.transition 2035, 3, :o5, 2058390000 - tz.transition 2035, 10, :o6, 2077138800 - tz.transition 2036, 3, :o5, 2090444400 - tz.transition 2036, 10, :o6, 2108588400 - tz.transition 2037, 3, :o5, 2121894000 - tz.transition 2037, 10, :o6, 2140038000 - tz.transition 2038, 3, :o5, 59172251, 24 - tz.transition 2038, 10, :o6, 59177459, 24 - tz.transition 2039, 3, :o5, 59180987, 24 - tz.transition 2039, 10, :o6, 59186195, 24 - tz.transition 2040, 3, :o5, 59189723, 24 - tz.transition 2040, 10, :o6, 59194931, 24 - tz.transition 2041, 3, :o5, 59198627, 24 - tz.transition 2041, 10, :o6, 59203667, 24 - tz.transition 2042, 3, :o5, 59207363, 24 - tz.transition 2042, 10, :o6, 59212403, 24 - tz.transition 2043, 3, :o5, 59216099, 24 - tz.transition 2043, 10, :o6, 59221139, 24 - tz.transition 2044, 3, :o5, 59224835, 24 - tz.transition 2044, 10, :o6, 59230043, 24 - tz.transition 2045, 3, :o5, 59233571, 24 - tz.transition 2045, 10, :o6, 59238779, 24 - tz.transition 2046, 3, :o5, 59242307, 24 - tz.transition 2046, 10, :o6, 59247515, 24 - tz.transition 2047, 3, :o5, 59251211, 24 - tz.transition 2047, 10, :o6, 59256251, 24 - tz.transition 2048, 3, :o5, 59259947, 24 - tz.transition 2048, 10, :o6, 59264987, 24 - tz.transition 2049, 3, :o5, 59268683, 24 - tz.transition 2049, 10, :o6, 59273891, 24 - tz.transition 2050, 3, :o5, 59277419, 24 - tz.transition 2050, 10, :o6, 59282627, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Paris.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Paris.rb deleted file mode 100644 index e3236c0ba1..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Paris.rb +++ /dev/null @@ -1,232 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Paris - include TimezoneDefinition - - timezone 'Europe/Paris' do |tz| - tz.offset :o0, 561, 0, :LMT - tz.offset :o1, 561, 0, :PMT - tz.offset :o2, 0, 0, :WET - tz.offset :o3, 0, 3600, :WEST - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 3600, 0, :CET - tz.offset :o6, 0, 7200, :WEMT - - tz.transition 1891, 3, :o1, 69460027033, 28800 - tz.transition 1911, 3, :o2, 69670267033, 28800 - tz.transition 1916, 6, :o3, 58104707, 24 - tz.transition 1916, 10, :o2, 58107323, 24 - tz.transition 1917, 3, :o3, 58111499, 24 - tz.transition 1917, 10, :o2, 58116227, 24 - tz.transition 1918, 3, :o3, 58119899, 24 - tz.transition 1918, 10, :o2, 58124963, 24 - tz.transition 1919, 3, :o3, 58128467, 24 - tz.transition 1919, 10, :o2, 58133699, 24 - tz.transition 1920, 2, :o3, 58136867, 24 - tz.transition 1920, 10, :o2, 58142915, 24 - tz.transition 1921, 3, :o3, 58146323, 24 - tz.transition 1921, 10, :o2, 58151723, 24 - tz.transition 1922, 3, :o3, 58155347, 24 - tz.transition 1922, 10, :o2, 58160051, 24 - tz.transition 1923, 5, :o3, 58165595, 24 - tz.transition 1923, 10, :o2, 58168787, 24 - tz.transition 1924, 3, :o3, 58172987, 24 - tz.transition 1924, 10, :o2, 58177523, 24 - tz.transition 1925, 4, :o3, 58181891, 24 - tz.transition 1925, 10, :o2, 58186259, 24 - tz.transition 1926, 4, :o3, 58190963, 24 - tz.transition 1926, 10, :o2, 58194995, 24 - tz.transition 1927, 4, :o3, 58199531, 24 - tz.transition 1927, 10, :o2, 58203731, 24 - tz.transition 1928, 4, :o3, 58208435, 24 - tz.transition 1928, 10, :o2, 58212635, 24 - tz.transition 1929, 4, :o3, 58217339, 24 - tz.transition 1929, 10, :o2, 58221371, 24 - tz.transition 1930, 4, :o3, 58225907, 24 - tz.transition 1930, 10, :o2, 58230107, 24 - tz.transition 1931, 4, :o3, 58234811, 24 - tz.transition 1931, 10, :o2, 58238843, 24 - tz.transition 1932, 4, :o3, 58243211, 24 - tz.transition 1932, 10, :o2, 58247579, 24 - tz.transition 1933, 3, :o3, 58251779, 24 - tz.transition 1933, 10, :o2, 58256483, 24 - tz.transition 1934, 4, :o3, 58260851, 24 - tz.transition 1934, 10, :o2, 58265219, 24 - tz.transition 1935, 3, :o3, 58269419, 24 - tz.transition 1935, 10, :o2, 58273955, 24 - tz.transition 1936, 4, :o3, 58278659, 24 - tz.transition 1936, 10, :o2, 58282691, 24 - tz.transition 1937, 4, :o3, 58287059, 24 - tz.transition 1937, 10, :o2, 58291427, 24 - tz.transition 1938, 3, :o3, 58295627, 24 - tz.transition 1938, 10, :o2, 58300163, 24 - tz.transition 1939, 4, :o3, 58304867, 24 - tz.transition 1939, 11, :o2, 58310075, 24 - tz.transition 1940, 2, :o3, 29156215, 12 - tz.transition 1940, 6, :o4, 29157545, 12 - tz.transition 1942, 11, :o5, 58335973, 24 - tz.transition 1943, 3, :o4, 58339501, 24 - tz.transition 1943, 10, :o5, 58344037, 24 - tz.transition 1944, 4, :o4, 58348405, 24 - tz.transition 1944, 8, :o6, 29175929, 12 - tz.transition 1944, 10, :o3, 58352915, 24 - tz.transition 1945, 4, :o6, 58357141, 24 - tz.transition 1945, 9, :o5, 58361149, 24 - tz.transition 1976, 3, :o4, 196819200 - tz.transition 1976, 9, :o5, 212540400 - tz.transition 1977, 4, :o4, 228877200 - tz.transition 1977, 9, :o5, 243997200 - tz.transition 1978, 4, :o4, 260326800 - tz.transition 1978, 10, :o5, 276051600 - tz.transition 1979, 4, :o4, 291776400 - tz.transition 1979, 9, :o5, 307501200 - tz.transition 1980, 4, :o4, 323830800 - tz.transition 1980, 9, :o5, 338950800 - tz.transition 1981, 3, :o4, 354675600 - tz.transition 1981, 9, :o5, 370400400 - tz.transition 1982, 3, :o4, 386125200 - tz.transition 1982, 9, :o5, 401850000 - tz.transition 1983, 3, :o4, 417574800 - tz.transition 1983, 9, :o5, 433299600 - tz.transition 1984, 3, :o4, 449024400 - tz.transition 1984, 9, :o5, 465354000 - tz.transition 1985, 3, :o4, 481078800 - tz.transition 1985, 9, :o5, 496803600 - tz.transition 1986, 3, :o4, 512528400 - tz.transition 1986, 9, :o5, 528253200 - tz.transition 1987, 3, :o4, 543978000 - tz.transition 1987, 9, :o5, 559702800 - tz.transition 1988, 3, :o4, 575427600 - tz.transition 1988, 9, :o5, 591152400 - tz.transition 1989, 3, :o4, 606877200 - tz.transition 1989, 9, :o5, 622602000 - tz.transition 1990, 3, :o4, 638326800 - tz.transition 1990, 9, :o5, 654656400 - tz.transition 1991, 3, :o4, 670381200 - tz.transition 1991, 9, :o5, 686106000 - tz.transition 1992, 3, :o4, 701830800 - tz.transition 1992, 9, :o5, 717555600 - tz.transition 1993, 3, :o4, 733280400 - tz.transition 1993, 9, :o5, 749005200 - tz.transition 1994, 3, :o4, 764730000 - tz.transition 1994, 9, :o5, 780454800 - tz.transition 1995, 3, :o4, 796179600 - tz.transition 1995, 9, :o5, 811904400 - tz.transition 1996, 3, :o4, 828234000 - tz.transition 1996, 10, :o5, 846378000 - tz.transition 1997, 3, :o4, 859683600 - tz.transition 1997, 10, :o5, 877827600 - tz.transition 1998, 3, :o4, 891133200 - tz.transition 1998, 10, :o5, 909277200 - tz.transition 1999, 3, :o4, 922582800 - tz.transition 1999, 10, :o5, 941331600 - tz.transition 2000, 3, :o4, 954032400 - tz.transition 2000, 10, :o5, 972781200 - tz.transition 2001, 3, :o4, 985482000 - tz.transition 2001, 10, :o5, 1004230800 - tz.transition 2002, 3, :o4, 1017536400 - tz.transition 2002, 10, :o5, 1035680400 - tz.transition 2003, 3, :o4, 1048986000 - tz.transition 2003, 10, :o5, 1067130000 - tz.transition 2004, 3, :o4, 1080435600 - tz.transition 2004, 10, :o5, 1099184400 - tz.transition 2005, 3, :o4, 1111885200 - tz.transition 2005, 10, :o5, 1130634000 - tz.transition 2006, 3, :o4, 1143334800 - tz.transition 2006, 10, :o5, 1162083600 - tz.transition 2007, 3, :o4, 1174784400 - tz.transition 2007, 10, :o5, 1193533200 - tz.transition 2008, 3, :o4, 1206838800 - tz.transition 2008, 10, :o5, 1224982800 - tz.transition 2009, 3, :o4, 1238288400 - tz.transition 2009, 10, :o5, 1256432400 - tz.transition 2010, 3, :o4, 1269738000 - tz.transition 2010, 10, :o5, 1288486800 - tz.transition 2011, 3, :o4, 1301187600 - tz.transition 2011, 10, :o5, 1319936400 - tz.transition 2012, 3, :o4, 1332637200 - tz.transition 2012, 10, :o5, 1351386000 - tz.transition 2013, 3, :o4, 1364691600 - tz.transition 2013, 10, :o5, 1382835600 - tz.transition 2014, 3, :o4, 1396141200 - tz.transition 2014, 10, :o5, 1414285200 - tz.transition 2015, 3, :o4, 1427590800 - tz.transition 2015, 10, :o5, 1445734800 - tz.transition 2016, 3, :o4, 1459040400 - tz.transition 2016, 10, :o5, 1477789200 - tz.transition 2017, 3, :o4, 1490490000 - tz.transition 2017, 10, :o5, 1509238800 - tz.transition 2018, 3, :o4, 1521939600 - tz.transition 2018, 10, :o5, 1540688400 - tz.transition 2019, 3, :o4, 1553994000 - tz.transition 2019, 10, :o5, 1572138000 - tz.transition 2020, 3, :o4, 1585443600 - tz.transition 2020, 10, :o5, 1603587600 - tz.transition 2021, 3, :o4, 1616893200 - tz.transition 2021, 10, :o5, 1635642000 - tz.transition 2022, 3, :o4, 1648342800 - tz.transition 2022, 10, :o5, 1667091600 - tz.transition 2023, 3, :o4, 1679792400 - tz.transition 2023, 10, :o5, 1698541200 - tz.transition 2024, 3, :o4, 1711846800 - tz.transition 2024, 10, :o5, 1729990800 - tz.transition 2025, 3, :o4, 1743296400 - tz.transition 2025, 10, :o5, 1761440400 - tz.transition 2026, 3, :o4, 1774746000 - tz.transition 2026, 10, :o5, 1792890000 - tz.transition 2027, 3, :o4, 1806195600 - tz.transition 2027, 10, :o5, 1824944400 - tz.transition 2028, 3, :o4, 1837645200 - tz.transition 2028, 10, :o5, 1856394000 - tz.transition 2029, 3, :o4, 1869094800 - tz.transition 2029, 10, :o5, 1887843600 - tz.transition 2030, 3, :o4, 1901149200 - tz.transition 2030, 10, :o5, 1919293200 - tz.transition 2031, 3, :o4, 1932598800 - tz.transition 2031, 10, :o5, 1950742800 - tz.transition 2032, 3, :o4, 1964048400 - tz.transition 2032, 10, :o5, 1982797200 - tz.transition 2033, 3, :o4, 1995498000 - tz.transition 2033, 10, :o5, 2014246800 - tz.transition 2034, 3, :o4, 2026947600 - tz.transition 2034, 10, :o5, 2045696400 - tz.transition 2035, 3, :o4, 2058397200 - tz.transition 2035, 10, :o5, 2077146000 - tz.transition 2036, 3, :o4, 2090451600 - tz.transition 2036, 10, :o5, 2108595600 - tz.transition 2037, 3, :o4, 2121901200 - tz.transition 2037, 10, :o5, 2140045200 - tz.transition 2038, 3, :o4, 59172253, 24 - tz.transition 2038, 10, :o5, 59177461, 24 - tz.transition 2039, 3, :o4, 59180989, 24 - tz.transition 2039, 10, :o5, 59186197, 24 - tz.transition 2040, 3, :o4, 59189725, 24 - tz.transition 2040, 10, :o5, 59194933, 24 - tz.transition 2041, 3, :o4, 59198629, 24 - tz.transition 2041, 10, :o5, 59203669, 24 - tz.transition 2042, 3, :o4, 59207365, 24 - tz.transition 2042, 10, :o5, 59212405, 24 - tz.transition 2043, 3, :o4, 59216101, 24 - tz.transition 2043, 10, :o5, 59221141, 24 - tz.transition 2044, 3, :o4, 59224837, 24 - tz.transition 2044, 10, :o5, 59230045, 24 - tz.transition 2045, 3, :o4, 59233573, 24 - tz.transition 2045, 10, :o5, 59238781, 24 - tz.transition 2046, 3, :o4, 59242309, 24 - tz.transition 2046, 10, :o5, 59247517, 24 - tz.transition 2047, 3, :o4, 59251213, 24 - tz.transition 2047, 10, :o5, 59256253, 24 - tz.transition 2048, 3, :o4, 59259949, 24 - tz.transition 2048, 10, :o5, 59264989, 24 - tz.transition 2049, 3, :o4, 59268685, 24 - tz.transition 2049, 10, :o5, 59273893, 24 - tz.transition 2050, 3, :o4, 59277421, 24 - tz.transition 2050, 10, :o5, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Prague.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Prague.rb deleted file mode 100644 index bcabee96c1..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Prague.rb +++ /dev/null @@ -1,187 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Prague - include TimezoneDefinition - - timezone 'Europe/Prague' do |tz| - tz.offset :o0, 3464, 0, :LMT - tz.offset :o1, 3464, 0, :PMT - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - - tz.transition 1849, 12, :o1, 25884991367, 10800 - tz.transition 1891, 9, :o2, 26049669767, 10800 - tz.transition 1916, 4, :o3, 29051813, 12 - tz.transition 1916, 9, :o2, 58107299, 24 - tz.transition 1917, 4, :o3, 58112029, 24 - tz.transition 1917, 9, :o2, 58115725, 24 - tz.transition 1918, 4, :o3, 58120765, 24 - tz.transition 1918, 9, :o2, 58124461, 24 - tz.transition 1940, 4, :o3, 58313293, 24 - tz.transition 1942, 11, :o2, 58335973, 24 - tz.transition 1943, 3, :o3, 58339501, 24 - tz.transition 1943, 10, :o2, 58344037, 24 - tz.transition 1944, 4, :o3, 58348405, 24 - tz.transition 1944, 9, :o2, 58352413, 24 - tz.transition 1945, 4, :o3, 58357285, 24 - tz.transition 1945, 11, :o2, 58362661, 24 - tz.transition 1946, 5, :o3, 58366717, 24 - tz.transition 1946, 10, :o2, 58370389, 24 - tz.transition 1947, 4, :o3, 58375093, 24 - tz.transition 1947, 10, :o2, 58379125, 24 - tz.transition 1948, 4, :o3, 58383829, 24 - tz.transition 1948, 10, :o2, 58387861, 24 - tz.transition 1949, 4, :o3, 58392373, 24 - tz.transition 1949, 10, :o2, 58396597, 24 - tz.transition 1979, 4, :o3, 291776400 - tz.transition 1979, 9, :o2, 307501200 - tz.transition 1980, 4, :o3, 323830800 - tz.transition 1980, 9, :o2, 338950800 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Riga.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Riga.rb deleted file mode 100644 index 784837f758..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Riga.rb +++ /dev/null @@ -1,176 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Riga - include TimezoneDefinition - - timezone 'Europe/Riga' do |tz| - tz.offset :o0, 5784, 0, :LMT - tz.offset :o1, 5784, 0, :RMT - tz.offset :o2, 5784, 3600, :LST - tz.offset :o3, 7200, 0, :EET - tz.offset :o4, 10800, 0, :MSK - tz.offset :o5, 3600, 3600, :CEST - tz.offset :o6, 3600, 0, :CET - tz.offset :o7, 10800, 3600, :MSD - tz.offset :o8, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 8667775559, 3600 - tz.transition 1918, 4, :o2, 8718114659, 3600 - tz.transition 1918, 9, :o1, 8718669059, 3600 - tz.transition 1919, 4, :o2, 8719378259, 3600 - tz.transition 1919, 5, :o1, 8719561859, 3600 - tz.transition 1926, 5, :o3, 8728727159, 3600 - tz.transition 1940, 8, :o4, 29158157, 12 - tz.transition 1941, 6, :o5, 19441411, 8 - tz.transition 1942, 11, :o6, 58335973, 24 - tz.transition 1943, 3, :o5, 58339501, 24 - tz.transition 1943, 10, :o6, 58344037, 24 - tz.transition 1944, 4, :o5, 58348405, 24 - tz.transition 1944, 10, :o6, 58352773, 24 - tz.transition 1944, 10, :o4, 58353035, 24 - tz.transition 1981, 3, :o7, 354920400 - tz.transition 1981, 9, :o4, 370728000 - tz.transition 1982, 3, :o7, 386456400 - tz.transition 1982, 9, :o4, 402264000 - tz.transition 1983, 3, :o7, 417992400 - tz.transition 1983, 9, :o4, 433800000 - tz.transition 1984, 3, :o7, 449614800 - tz.transition 1984, 9, :o4, 465346800 - tz.transition 1985, 3, :o7, 481071600 - tz.transition 1985, 9, :o4, 496796400 - tz.transition 1986, 3, :o7, 512521200 - tz.transition 1986, 9, :o4, 528246000 - tz.transition 1987, 3, :o7, 543970800 - tz.transition 1987, 9, :o4, 559695600 - tz.transition 1988, 3, :o7, 575420400 - tz.transition 1988, 9, :o4, 591145200 - tz.transition 1989, 3, :o8, 606870000 - tz.transition 1989, 9, :o3, 622598400 - tz.transition 1990, 3, :o8, 638323200 - tz.transition 1990, 9, :o3, 654652800 - tz.transition 1991, 3, :o8, 670377600 - tz.transition 1991, 9, :o3, 686102400 - tz.transition 1992, 3, :o8, 701827200 - tz.transition 1992, 9, :o3, 717552000 - tz.transition 1993, 3, :o8, 733276800 - tz.transition 1993, 9, :o3, 749001600 - tz.transition 1994, 3, :o8, 764726400 - tz.transition 1994, 9, :o3, 780451200 - tz.transition 1995, 3, :o8, 796176000 - tz.transition 1995, 9, :o3, 811900800 - tz.transition 1996, 3, :o8, 828230400 - tz.transition 1996, 9, :o3, 843955200 - tz.transition 1997, 3, :o8, 859683600 - tz.transition 1997, 10, :o3, 877827600 - tz.transition 1998, 3, :o8, 891133200 - tz.transition 1998, 10, :o3, 909277200 - tz.transition 1999, 3, :o8, 922582800 - tz.transition 1999, 10, :o3, 941331600 - tz.transition 2001, 3, :o8, 985482000 - tz.transition 2001, 10, :o3, 1004230800 - tz.transition 2002, 3, :o8, 1017536400 - tz.transition 2002, 10, :o3, 1035680400 - tz.transition 2003, 3, :o8, 1048986000 - tz.transition 2003, 10, :o3, 1067130000 - tz.transition 2004, 3, :o8, 1080435600 - tz.transition 2004, 10, :o3, 1099184400 - tz.transition 2005, 3, :o8, 1111885200 - tz.transition 2005, 10, :o3, 1130634000 - tz.transition 2006, 3, :o8, 1143334800 - tz.transition 2006, 10, :o3, 1162083600 - tz.transition 2007, 3, :o8, 1174784400 - tz.transition 2007, 10, :o3, 1193533200 - tz.transition 2008, 3, :o8, 1206838800 - tz.transition 2008, 10, :o3, 1224982800 - tz.transition 2009, 3, :o8, 1238288400 - tz.transition 2009, 10, :o3, 1256432400 - tz.transition 2010, 3, :o8, 1269738000 - tz.transition 2010, 10, :o3, 1288486800 - tz.transition 2011, 3, :o8, 1301187600 - tz.transition 2011, 10, :o3, 1319936400 - tz.transition 2012, 3, :o8, 1332637200 - tz.transition 2012, 10, :o3, 1351386000 - tz.transition 2013, 3, :o8, 1364691600 - tz.transition 2013, 10, :o3, 1382835600 - tz.transition 2014, 3, :o8, 1396141200 - tz.transition 2014, 10, :o3, 1414285200 - tz.transition 2015, 3, :o8, 1427590800 - tz.transition 2015, 10, :o3, 1445734800 - tz.transition 2016, 3, :o8, 1459040400 - tz.transition 2016, 10, :o3, 1477789200 - tz.transition 2017, 3, :o8, 1490490000 - tz.transition 2017, 10, :o3, 1509238800 - tz.transition 2018, 3, :o8, 1521939600 - tz.transition 2018, 10, :o3, 1540688400 - tz.transition 2019, 3, :o8, 1553994000 - tz.transition 2019, 10, :o3, 1572138000 - tz.transition 2020, 3, :o8, 1585443600 - tz.transition 2020, 10, :o3, 1603587600 - tz.transition 2021, 3, :o8, 1616893200 - tz.transition 2021, 10, :o3, 1635642000 - tz.transition 2022, 3, :o8, 1648342800 - tz.transition 2022, 10, :o3, 1667091600 - tz.transition 2023, 3, :o8, 1679792400 - tz.transition 2023, 10, :o3, 1698541200 - tz.transition 2024, 3, :o8, 1711846800 - tz.transition 2024, 10, :o3, 1729990800 - tz.transition 2025, 3, :o8, 1743296400 - tz.transition 2025, 10, :o3, 1761440400 - tz.transition 2026, 3, :o8, 1774746000 - tz.transition 2026, 10, :o3, 1792890000 - tz.transition 2027, 3, :o8, 1806195600 - tz.transition 2027, 10, :o3, 1824944400 - tz.transition 2028, 3, :o8, 1837645200 - tz.transition 2028, 10, :o3, 1856394000 - tz.transition 2029, 3, :o8, 1869094800 - tz.transition 2029, 10, :o3, 1887843600 - tz.transition 2030, 3, :o8, 1901149200 - tz.transition 2030, 10, :o3, 1919293200 - tz.transition 2031, 3, :o8, 1932598800 - tz.transition 2031, 10, :o3, 1950742800 - tz.transition 2032, 3, :o8, 1964048400 - tz.transition 2032, 10, :o3, 1982797200 - tz.transition 2033, 3, :o8, 1995498000 - tz.transition 2033, 10, :o3, 2014246800 - tz.transition 2034, 3, :o8, 2026947600 - tz.transition 2034, 10, :o3, 2045696400 - tz.transition 2035, 3, :o8, 2058397200 - tz.transition 2035, 10, :o3, 2077146000 - tz.transition 2036, 3, :o8, 2090451600 - tz.transition 2036, 10, :o3, 2108595600 - tz.transition 2037, 3, :o8, 2121901200 - tz.transition 2037, 10, :o3, 2140045200 - tz.transition 2038, 3, :o8, 59172253, 24 - tz.transition 2038, 10, :o3, 59177461, 24 - tz.transition 2039, 3, :o8, 59180989, 24 - tz.transition 2039, 10, :o3, 59186197, 24 - tz.transition 2040, 3, :o8, 59189725, 24 - tz.transition 2040, 10, :o3, 59194933, 24 - tz.transition 2041, 3, :o8, 59198629, 24 - tz.transition 2041, 10, :o3, 59203669, 24 - tz.transition 2042, 3, :o8, 59207365, 24 - tz.transition 2042, 10, :o3, 59212405, 24 - tz.transition 2043, 3, :o8, 59216101, 24 - tz.transition 2043, 10, :o3, 59221141, 24 - tz.transition 2044, 3, :o8, 59224837, 24 - tz.transition 2044, 10, :o3, 59230045, 24 - tz.transition 2045, 3, :o8, 59233573, 24 - tz.transition 2045, 10, :o3, 59238781, 24 - tz.transition 2046, 3, :o8, 59242309, 24 - tz.transition 2046, 10, :o3, 59247517, 24 - tz.transition 2047, 3, :o8, 59251213, 24 - tz.transition 2047, 10, :o3, 59256253, 24 - tz.transition 2048, 3, :o8, 59259949, 24 - tz.transition 2048, 10, :o3, 59264989, 24 - tz.transition 2049, 3, :o8, 59268685, 24 - tz.transition 2049, 10, :o3, 59273893, 24 - tz.transition 2050, 3, :o8, 59277421, 24 - tz.transition 2050, 10, :o3, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Rome.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Rome.rb deleted file mode 100644 index aa7b43d9d2..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Rome.rb +++ /dev/null @@ -1,215 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Rome - include TimezoneDefinition - - timezone 'Europe/Rome' do |tz| - tz.offset :o0, 2996, 0, :LMT - tz.offset :o1, 2996, 0, :RMT - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - - tz.transition 1866, 9, :o1, 51901915651, 21600 - tz.transition 1893, 10, :o2, 52115798851, 21600 - tz.transition 1916, 6, :o3, 58104419, 24 - tz.transition 1916, 9, :o2, 58107299, 24 - tz.transition 1917, 3, :o3, 58111667, 24 - tz.transition 1917, 9, :o2, 58116035, 24 - tz.transition 1918, 3, :o3, 58119899, 24 - tz.transition 1918, 10, :o2, 58124939, 24 - tz.transition 1919, 3, :o3, 58128467, 24 - tz.transition 1919, 10, :o2, 58133675, 24 - tz.transition 1920, 3, :o3, 58137707, 24 - tz.transition 1920, 9, :o2, 58142075, 24 - tz.transition 1940, 6, :o3, 58315091, 24 - tz.transition 1942, 11, :o2, 58335973, 24 - tz.transition 1943, 3, :o3, 58339501, 24 - tz.transition 1943, 10, :o2, 58344037, 24 - tz.transition 1944, 4, :o3, 58348405, 24 - tz.transition 1944, 9, :o2, 58352411, 24 - tz.transition 1945, 4, :o3, 58357141, 24 - tz.transition 1945, 9, :o2, 58361123, 24 - tz.transition 1946, 3, :o3, 58365517, 24 - tz.transition 1946, 10, :o2, 58370389, 24 - tz.transition 1947, 3, :o3, 58374251, 24 - tz.transition 1947, 10, :o2, 58379123, 24 - tz.transition 1948, 2, :o3, 58382653, 24 - tz.transition 1948, 10, :o2, 58387861, 24 - tz.transition 1966, 5, :o3, 58542419, 24 - tz.transition 1966, 9, :o2, 29272721, 12 - tz.transition 1967, 5, :o3, 58551323, 24 - tz.transition 1967, 9, :o2, 29277089, 12 - tz.transition 1968, 5, :o3, 58560059, 24 - tz.transition 1968, 9, :o2, 29281457, 12 - tz.transition 1969, 5, :o3, 58568963, 24 - tz.transition 1969, 9, :o2, 29285909, 12 - tz.transition 1970, 5, :o3, 12956400 - tz.transition 1970, 9, :o2, 23234400 - tz.transition 1971, 5, :o3, 43801200 - tz.transition 1971, 9, :o2, 54687600 - tz.transition 1972, 5, :o3, 75855600 - tz.transition 1972, 9, :o2, 86738400 - tz.transition 1973, 6, :o3, 107910000 - tz.transition 1973, 9, :o2, 118188000 - tz.transition 1974, 5, :o3, 138754800 - tz.transition 1974, 9, :o2, 149637600 - tz.transition 1975, 5, :o3, 170809200 - tz.transition 1975, 9, :o2, 181090800 - tz.transition 1976, 5, :o3, 202258800 - tz.transition 1976, 9, :o2, 212540400 - tz.transition 1977, 5, :o3, 233103600 - tz.transition 1977, 9, :o2, 243990000 - tz.transition 1978, 5, :o3, 265158000 - tz.transition 1978, 9, :o2, 276044400 - tz.transition 1979, 5, :o3, 296607600 - tz.transition 1979, 9, :o2, 307494000 - tz.transition 1980, 4, :o3, 323830800 - tz.transition 1980, 9, :o2, 338950800 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Sarajevo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Sarajevo.rb deleted file mode 100644 index 068c5fe6ad..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Sarajevo.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Sarajevo - include TimezoneDefinition - - linked_timezone 'Europe/Sarajevo', 'Europe/Belgrade' - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Skopje.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Skopje.rb deleted file mode 100644 index 10b71f285e..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Skopje.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Skopje - include TimezoneDefinition - - linked_timezone 'Europe/Skopje', 'Europe/Belgrade' - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Sofia.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Sofia.rb deleted file mode 100644 index 38a70eceb9..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Sofia.rb +++ /dev/null @@ -1,173 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Sofia - include TimezoneDefinition - - timezone 'Europe/Sofia' do |tz| - tz.offset :o0, 5596, 0, :LMT - tz.offset :o1, 7016, 0, :IMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 3600, 0, :CET - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 52006653401, 21600 - tz.transition 1894, 11, :o2, 26062154123, 10800 - tz.transition 1942, 11, :o3, 58335973, 24 - tz.transition 1943, 3, :o4, 58339501, 24 - tz.transition 1943, 10, :o3, 58344037, 24 - tz.transition 1944, 4, :o4, 58348405, 24 - tz.transition 1944, 10, :o3, 58352773, 24 - tz.transition 1945, 4, :o2, 29178571, 12 - tz.transition 1979, 3, :o5, 291762000 - tz.transition 1979, 9, :o2, 307576800 - tz.transition 1980, 4, :o5, 323816400 - tz.transition 1980, 9, :o2, 339026400 - tz.transition 1981, 4, :o5, 355266000 - tz.transition 1981, 9, :o2, 370393200 - tz.transition 1982, 4, :o5, 386715600 - tz.transition 1982, 9, :o2, 401846400 - tz.transition 1983, 3, :o5, 417571200 - tz.transition 1983, 9, :o2, 433296000 - tz.transition 1984, 3, :o5, 449020800 - tz.transition 1984, 9, :o2, 465350400 - tz.transition 1985, 3, :o5, 481075200 - tz.transition 1985, 9, :o2, 496800000 - tz.transition 1986, 3, :o5, 512524800 - tz.transition 1986, 9, :o2, 528249600 - tz.transition 1987, 3, :o5, 543974400 - tz.transition 1987, 9, :o2, 559699200 - tz.transition 1988, 3, :o5, 575424000 - tz.transition 1988, 9, :o2, 591148800 - tz.transition 1989, 3, :o5, 606873600 - tz.transition 1989, 9, :o2, 622598400 - tz.transition 1990, 3, :o5, 638323200 - tz.transition 1990, 9, :o2, 654652800 - tz.transition 1991, 3, :o5, 670370400 - tz.transition 1991, 9, :o2, 686091600 - tz.transition 1992, 3, :o5, 701820000 - tz.transition 1992, 9, :o2, 717541200 - tz.transition 1993, 3, :o5, 733269600 - tz.transition 1993, 9, :o2, 748990800 - tz.transition 1994, 3, :o5, 764719200 - tz.transition 1994, 9, :o2, 780440400 - tz.transition 1995, 3, :o5, 796168800 - tz.transition 1995, 9, :o2, 811890000 - tz.transition 1996, 3, :o5, 828223200 - tz.transition 1996, 10, :o2, 846363600 - tz.transition 1997, 3, :o5, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o5, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o5, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o5, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o5, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o5, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o5, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o5, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o5, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o5, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o5, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o5, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o5, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o5, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o5, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o5, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o5, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o5, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o5, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o5, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o5, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o5, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o5, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o5, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o5, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o5, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o5, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o5, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o5, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o5, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o5, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o5, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o5, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o5, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o5, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o5, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o5, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o5, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o5, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o5, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o5, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o5, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o5, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o5, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o5, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o5, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o5, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o5, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o5, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o5, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o5, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o5, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o5, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o5, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Stockholm.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Stockholm.rb deleted file mode 100644 index 43db70fa61..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Stockholm.rb +++ /dev/null @@ -1,165 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Stockholm - include TimezoneDefinition - - timezone 'Europe/Stockholm' do |tz| - tz.offset :o0, 4332, 0, :LMT - tz.offset :o1, 3614, 0, :SET - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - - tz.transition 1878, 12, :o1, 17332923239, 7200 - tz.transition 1899, 12, :o2, 104328883793, 43200 - tz.transition 1916, 5, :o3, 29051981, 12 - tz.transition 1916, 9, :o2, 58107299, 24 - tz.transition 1980, 4, :o3, 323830800 - tz.transition 1980, 9, :o2, 338950800 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Tallinn.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Tallinn.rb deleted file mode 100644 index de5a8569f3..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Tallinn.rb +++ /dev/null @@ -1,172 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Tallinn - include TimezoneDefinition - - timezone 'Europe/Tallinn' do |tz| - tz.offset :o0, 5940, 0, :LMT - tz.offset :o1, 5940, 0, :TMT - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - tz.offset :o4, 7200, 0, :EET - tz.offset :o5, 10800, 0, :MSK - tz.offset :o6, 10800, 3600, :MSD - tz.offset :o7, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 385234469, 160 - tz.transition 1918, 1, :o2, 387460069, 160 - tz.transition 1918, 4, :o3, 58120765, 24 - tz.transition 1918, 9, :o2, 58124461, 24 - tz.transition 1919, 6, :o1, 58131371, 24 - tz.transition 1921, 4, :o4, 387649669, 160 - tz.transition 1940, 8, :o5, 29158169, 12 - tz.transition 1941, 9, :o3, 19442019, 8 - tz.transition 1942, 11, :o2, 58335973, 24 - tz.transition 1943, 3, :o3, 58339501, 24 - tz.transition 1943, 10, :o2, 58344037, 24 - tz.transition 1944, 4, :o3, 58348405, 24 - tz.transition 1944, 9, :o5, 29176265, 12 - tz.transition 1981, 3, :o6, 354920400 - tz.transition 1981, 9, :o5, 370728000 - tz.transition 1982, 3, :o6, 386456400 - tz.transition 1982, 9, :o5, 402264000 - tz.transition 1983, 3, :o6, 417992400 - tz.transition 1983, 9, :o5, 433800000 - tz.transition 1984, 3, :o6, 449614800 - tz.transition 1984, 9, :o5, 465346800 - tz.transition 1985, 3, :o6, 481071600 - tz.transition 1985, 9, :o5, 496796400 - tz.transition 1986, 3, :o6, 512521200 - tz.transition 1986, 9, :o5, 528246000 - tz.transition 1987, 3, :o6, 543970800 - tz.transition 1987, 9, :o5, 559695600 - tz.transition 1988, 3, :o6, 575420400 - tz.transition 1988, 9, :o5, 591145200 - tz.transition 1989, 3, :o7, 606870000 - tz.transition 1989, 9, :o4, 622598400 - tz.transition 1990, 3, :o7, 638323200 - tz.transition 1990, 9, :o4, 654652800 - tz.transition 1991, 3, :o7, 670377600 - tz.transition 1991, 9, :o4, 686102400 - tz.transition 1992, 3, :o7, 701827200 - tz.transition 1992, 9, :o4, 717552000 - tz.transition 1993, 3, :o7, 733276800 - tz.transition 1993, 9, :o4, 749001600 - tz.transition 1994, 3, :o7, 764726400 - tz.transition 1994, 9, :o4, 780451200 - tz.transition 1995, 3, :o7, 796176000 - tz.transition 1995, 9, :o4, 811900800 - tz.transition 1996, 3, :o7, 828230400 - tz.transition 1996, 10, :o4, 846374400 - tz.transition 1997, 3, :o7, 859680000 - tz.transition 1997, 10, :o4, 877824000 - tz.transition 1998, 3, :o7, 891129600 - tz.transition 1998, 10, :o4, 909277200 - tz.transition 1999, 3, :o7, 922582800 - tz.transition 1999, 10, :o4, 941331600 - tz.transition 2002, 3, :o7, 1017536400 - tz.transition 2002, 10, :o4, 1035680400 - tz.transition 2003, 3, :o7, 1048986000 - tz.transition 2003, 10, :o4, 1067130000 - tz.transition 2004, 3, :o7, 1080435600 - tz.transition 2004, 10, :o4, 1099184400 - tz.transition 2005, 3, :o7, 1111885200 - tz.transition 2005, 10, :o4, 1130634000 - tz.transition 2006, 3, :o7, 1143334800 - tz.transition 2006, 10, :o4, 1162083600 - tz.transition 2007, 3, :o7, 1174784400 - tz.transition 2007, 10, :o4, 1193533200 - tz.transition 2008, 3, :o7, 1206838800 - tz.transition 2008, 10, :o4, 1224982800 - tz.transition 2009, 3, :o7, 1238288400 - tz.transition 2009, 10, :o4, 1256432400 - tz.transition 2010, 3, :o7, 1269738000 - tz.transition 2010, 10, :o4, 1288486800 - tz.transition 2011, 3, :o7, 1301187600 - tz.transition 2011, 10, :o4, 1319936400 - tz.transition 2012, 3, :o7, 1332637200 - tz.transition 2012, 10, :o4, 1351386000 - tz.transition 2013, 3, :o7, 1364691600 - tz.transition 2013, 10, :o4, 1382835600 - tz.transition 2014, 3, :o7, 1396141200 - tz.transition 2014, 10, :o4, 1414285200 - tz.transition 2015, 3, :o7, 1427590800 - tz.transition 2015, 10, :o4, 1445734800 - tz.transition 2016, 3, :o7, 1459040400 - tz.transition 2016, 10, :o4, 1477789200 - tz.transition 2017, 3, :o7, 1490490000 - tz.transition 2017, 10, :o4, 1509238800 - tz.transition 2018, 3, :o7, 1521939600 - tz.transition 2018, 10, :o4, 1540688400 - tz.transition 2019, 3, :o7, 1553994000 - tz.transition 2019, 10, :o4, 1572138000 - tz.transition 2020, 3, :o7, 1585443600 - tz.transition 2020, 10, :o4, 1603587600 - tz.transition 2021, 3, :o7, 1616893200 - tz.transition 2021, 10, :o4, 1635642000 - tz.transition 2022, 3, :o7, 1648342800 - tz.transition 2022, 10, :o4, 1667091600 - tz.transition 2023, 3, :o7, 1679792400 - tz.transition 2023, 10, :o4, 1698541200 - tz.transition 2024, 3, :o7, 1711846800 - tz.transition 2024, 10, :o4, 1729990800 - tz.transition 2025, 3, :o7, 1743296400 - tz.transition 2025, 10, :o4, 1761440400 - tz.transition 2026, 3, :o7, 1774746000 - tz.transition 2026, 10, :o4, 1792890000 - tz.transition 2027, 3, :o7, 1806195600 - tz.transition 2027, 10, :o4, 1824944400 - tz.transition 2028, 3, :o7, 1837645200 - tz.transition 2028, 10, :o4, 1856394000 - tz.transition 2029, 3, :o7, 1869094800 - tz.transition 2029, 10, :o4, 1887843600 - tz.transition 2030, 3, :o7, 1901149200 - tz.transition 2030, 10, :o4, 1919293200 - tz.transition 2031, 3, :o7, 1932598800 - tz.transition 2031, 10, :o4, 1950742800 - tz.transition 2032, 3, :o7, 1964048400 - tz.transition 2032, 10, :o4, 1982797200 - tz.transition 2033, 3, :o7, 1995498000 - tz.transition 2033, 10, :o4, 2014246800 - tz.transition 2034, 3, :o7, 2026947600 - tz.transition 2034, 10, :o4, 2045696400 - tz.transition 2035, 3, :o7, 2058397200 - tz.transition 2035, 10, :o4, 2077146000 - tz.transition 2036, 3, :o7, 2090451600 - tz.transition 2036, 10, :o4, 2108595600 - tz.transition 2037, 3, :o7, 2121901200 - tz.transition 2037, 10, :o4, 2140045200 - tz.transition 2038, 3, :o7, 59172253, 24 - tz.transition 2038, 10, :o4, 59177461, 24 - tz.transition 2039, 3, :o7, 59180989, 24 - tz.transition 2039, 10, :o4, 59186197, 24 - tz.transition 2040, 3, :o7, 59189725, 24 - tz.transition 2040, 10, :o4, 59194933, 24 - tz.transition 2041, 3, :o7, 59198629, 24 - tz.transition 2041, 10, :o4, 59203669, 24 - tz.transition 2042, 3, :o7, 59207365, 24 - tz.transition 2042, 10, :o4, 59212405, 24 - tz.transition 2043, 3, :o7, 59216101, 24 - tz.transition 2043, 10, :o4, 59221141, 24 - tz.transition 2044, 3, :o7, 59224837, 24 - tz.transition 2044, 10, :o4, 59230045, 24 - tz.transition 2045, 3, :o7, 59233573, 24 - tz.transition 2045, 10, :o4, 59238781, 24 - tz.transition 2046, 3, :o7, 59242309, 24 - tz.transition 2046, 10, :o4, 59247517, 24 - tz.transition 2047, 3, :o7, 59251213, 24 - tz.transition 2047, 10, :o4, 59256253, 24 - tz.transition 2048, 3, :o7, 59259949, 24 - tz.transition 2048, 10, :o4, 59264989, 24 - tz.transition 2049, 3, :o7, 59268685, 24 - tz.transition 2049, 10, :o4, 59273893, 24 - tz.transition 2050, 3, :o7, 59277421, 24 - tz.transition 2050, 10, :o4, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Vienna.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Vienna.rb deleted file mode 100644 index 990aabab66..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Vienna.rb +++ /dev/null @@ -1,183 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Vienna - include TimezoneDefinition - - timezone 'Europe/Vienna' do |tz| - tz.offset :o0, 3920, 0, :LMT - tz.offset :o1, 3600, 0, :CET - tz.offset :o2, 3600, 3600, :CEST - - tz.transition 1893, 3, :o1, 2605558811, 1080 - tz.transition 1916, 4, :o2, 29051813, 12 - tz.transition 1916, 9, :o1, 58107299, 24 - tz.transition 1917, 4, :o2, 58112029, 24 - tz.transition 1917, 9, :o1, 58115725, 24 - tz.transition 1918, 4, :o2, 58120765, 24 - tz.transition 1918, 9, :o1, 58124461, 24 - tz.transition 1920, 4, :o2, 58138069, 24 - tz.transition 1920, 9, :o1, 58141933, 24 - tz.transition 1940, 4, :o2, 58313293, 24 - tz.transition 1942, 11, :o1, 58335973, 24 - tz.transition 1943, 3, :o2, 58339501, 24 - tz.transition 1943, 10, :o1, 58344037, 24 - tz.transition 1944, 4, :o2, 58348405, 24 - tz.transition 1944, 10, :o1, 58352773, 24 - tz.transition 1945, 4, :o2, 58357141, 24 - tz.transition 1945, 4, :o1, 58357381, 24 - tz.transition 1946, 4, :o2, 58366189, 24 - tz.transition 1946, 10, :o1, 58370389, 24 - tz.transition 1947, 4, :o2, 58374757, 24 - tz.transition 1947, 10, :o1, 58379125, 24 - tz.transition 1948, 4, :o2, 58383829, 24 - tz.transition 1948, 10, :o1, 58387861, 24 - tz.transition 1980, 4, :o2, 323823600 - tz.transition 1980, 9, :o1, 338940000 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 9, :o1, 370400400 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 9, :o1, 401850000 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o1, 717555600 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 9, :o1, 749005200 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 9, :o1, 780454800 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 9, :o1, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Vilnius.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Vilnius.rb deleted file mode 100644 index d89d095a75..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Vilnius.rb +++ /dev/null @@ -1,170 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Vilnius - include TimezoneDefinition - - timezone 'Europe/Vilnius' do |tz| - tz.offset :o0, 6076, 0, :LMT - tz.offset :o1, 5040, 0, :WMT - tz.offset :o2, 5736, 0, :KMT - tz.offset :o3, 3600, 0, :CET - tz.offset :o4, 7200, 0, :EET - tz.offset :o5, 10800, 0, :MSK - tz.offset :o6, 3600, 3600, :CEST - tz.offset :o7, 10800, 3600, :MSD - tz.offset :o8, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 52006653281, 21600 - tz.transition 1916, 12, :o2, 290547533, 120 - tz.transition 1919, 10, :o3, 8720069161, 3600 - tz.transition 1920, 7, :o4, 58140419, 24 - tz.transition 1920, 10, :o3, 29071277, 12 - tz.transition 1940, 8, :o5, 58316267, 24 - tz.transition 1941, 6, :o6, 19441355, 8 - tz.transition 1942, 11, :o3, 58335973, 24 - tz.transition 1943, 3, :o6, 58339501, 24 - tz.transition 1943, 10, :o3, 58344037, 24 - tz.transition 1944, 4, :o6, 58348405, 24 - tz.transition 1944, 7, :o5, 29175641, 12 - tz.transition 1981, 3, :o7, 354920400 - tz.transition 1981, 9, :o5, 370728000 - tz.transition 1982, 3, :o7, 386456400 - tz.transition 1982, 9, :o5, 402264000 - tz.transition 1983, 3, :o7, 417992400 - tz.transition 1983, 9, :o5, 433800000 - tz.transition 1984, 3, :o7, 449614800 - tz.transition 1984, 9, :o5, 465346800 - tz.transition 1985, 3, :o7, 481071600 - tz.transition 1985, 9, :o5, 496796400 - tz.transition 1986, 3, :o7, 512521200 - tz.transition 1986, 9, :o5, 528246000 - tz.transition 1987, 3, :o7, 543970800 - tz.transition 1987, 9, :o5, 559695600 - tz.transition 1988, 3, :o7, 575420400 - tz.transition 1988, 9, :o5, 591145200 - tz.transition 1989, 3, :o7, 606870000 - tz.transition 1989, 9, :o5, 622594800 - tz.transition 1990, 3, :o7, 638319600 - tz.transition 1990, 9, :o5, 654649200 - tz.transition 1991, 3, :o8, 670374000 - tz.transition 1991, 9, :o4, 686102400 - tz.transition 1992, 3, :o8, 701827200 - tz.transition 1992, 9, :o4, 717552000 - tz.transition 1993, 3, :o8, 733276800 - tz.transition 1993, 9, :o4, 749001600 - tz.transition 1994, 3, :o8, 764726400 - tz.transition 1994, 9, :o4, 780451200 - tz.transition 1995, 3, :o8, 796176000 - tz.transition 1995, 9, :o4, 811900800 - tz.transition 1996, 3, :o8, 828230400 - tz.transition 1996, 10, :o4, 846374400 - tz.transition 1997, 3, :o8, 859680000 - tz.transition 1997, 10, :o4, 877824000 - tz.transition 1998, 3, :o6, 891133200 - tz.transition 1998, 10, :o3, 909277200 - tz.transition 1999, 3, :o6, 922582800 - tz.transition 1999, 10, :o4, 941331600 - tz.transition 2003, 3, :o8, 1048986000 - tz.transition 2003, 10, :o4, 1067130000 - tz.transition 2004, 3, :o8, 1080435600 - tz.transition 2004, 10, :o4, 1099184400 - tz.transition 2005, 3, :o8, 1111885200 - tz.transition 2005, 10, :o4, 1130634000 - tz.transition 2006, 3, :o8, 1143334800 - tz.transition 2006, 10, :o4, 1162083600 - tz.transition 2007, 3, :o8, 1174784400 - tz.transition 2007, 10, :o4, 1193533200 - tz.transition 2008, 3, :o8, 1206838800 - tz.transition 2008, 10, :o4, 1224982800 - tz.transition 2009, 3, :o8, 1238288400 - tz.transition 2009, 10, :o4, 1256432400 - tz.transition 2010, 3, :o8, 1269738000 - tz.transition 2010, 10, :o4, 1288486800 - tz.transition 2011, 3, :o8, 1301187600 - tz.transition 2011, 10, :o4, 1319936400 - tz.transition 2012, 3, :o8, 1332637200 - tz.transition 2012, 10, :o4, 1351386000 - tz.transition 2013, 3, :o8, 1364691600 - tz.transition 2013, 10, :o4, 1382835600 - tz.transition 2014, 3, :o8, 1396141200 - tz.transition 2014, 10, :o4, 1414285200 - tz.transition 2015, 3, :o8, 1427590800 - tz.transition 2015, 10, :o4, 1445734800 - tz.transition 2016, 3, :o8, 1459040400 - tz.transition 2016, 10, :o4, 1477789200 - tz.transition 2017, 3, :o8, 1490490000 - tz.transition 2017, 10, :o4, 1509238800 - tz.transition 2018, 3, :o8, 1521939600 - tz.transition 2018, 10, :o4, 1540688400 - tz.transition 2019, 3, :o8, 1553994000 - tz.transition 2019, 10, :o4, 1572138000 - tz.transition 2020, 3, :o8, 1585443600 - tz.transition 2020, 10, :o4, 1603587600 - tz.transition 2021, 3, :o8, 1616893200 - tz.transition 2021, 10, :o4, 1635642000 - tz.transition 2022, 3, :o8, 1648342800 - tz.transition 2022, 10, :o4, 1667091600 - tz.transition 2023, 3, :o8, 1679792400 - tz.transition 2023, 10, :o4, 1698541200 - tz.transition 2024, 3, :o8, 1711846800 - tz.transition 2024, 10, :o4, 1729990800 - tz.transition 2025, 3, :o8, 1743296400 - tz.transition 2025, 10, :o4, 1761440400 - tz.transition 2026, 3, :o8, 1774746000 - tz.transition 2026, 10, :o4, 1792890000 - tz.transition 2027, 3, :o8, 1806195600 - tz.transition 2027, 10, :o4, 1824944400 - tz.transition 2028, 3, :o8, 1837645200 - tz.transition 2028, 10, :o4, 1856394000 - tz.transition 2029, 3, :o8, 1869094800 - tz.transition 2029, 10, :o4, 1887843600 - tz.transition 2030, 3, :o8, 1901149200 - tz.transition 2030, 10, :o4, 1919293200 - tz.transition 2031, 3, :o8, 1932598800 - tz.transition 2031, 10, :o4, 1950742800 - tz.transition 2032, 3, :o8, 1964048400 - tz.transition 2032, 10, :o4, 1982797200 - tz.transition 2033, 3, :o8, 1995498000 - tz.transition 2033, 10, :o4, 2014246800 - tz.transition 2034, 3, :o8, 2026947600 - tz.transition 2034, 10, :o4, 2045696400 - tz.transition 2035, 3, :o8, 2058397200 - tz.transition 2035, 10, :o4, 2077146000 - tz.transition 2036, 3, :o8, 2090451600 - tz.transition 2036, 10, :o4, 2108595600 - tz.transition 2037, 3, :o8, 2121901200 - tz.transition 2037, 10, :o4, 2140045200 - tz.transition 2038, 3, :o8, 59172253, 24 - tz.transition 2038, 10, :o4, 59177461, 24 - tz.transition 2039, 3, :o8, 59180989, 24 - tz.transition 2039, 10, :o4, 59186197, 24 - tz.transition 2040, 3, :o8, 59189725, 24 - tz.transition 2040, 10, :o4, 59194933, 24 - tz.transition 2041, 3, :o8, 59198629, 24 - tz.transition 2041, 10, :o4, 59203669, 24 - tz.transition 2042, 3, :o8, 59207365, 24 - tz.transition 2042, 10, :o4, 59212405, 24 - tz.transition 2043, 3, :o8, 59216101, 24 - tz.transition 2043, 10, :o4, 59221141, 24 - tz.transition 2044, 3, :o8, 59224837, 24 - tz.transition 2044, 10, :o4, 59230045, 24 - tz.transition 2045, 3, :o8, 59233573, 24 - tz.transition 2045, 10, :o4, 59238781, 24 - tz.transition 2046, 3, :o8, 59242309, 24 - tz.transition 2046, 10, :o4, 59247517, 24 - tz.transition 2047, 3, :o8, 59251213, 24 - tz.transition 2047, 10, :o4, 59256253, 24 - tz.transition 2048, 3, :o8, 59259949, 24 - tz.transition 2048, 10, :o4, 59264989, 24 - tz.transition 2049, 3, :o8, 59268685, 24 - tz.transition 2049, 10, :o4, 59273893, 24 - tz.transition 2050, 3, :o8, 59277421, 24 - tz.transition 2050, 10, :o4, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Warsaw.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Warsaw.rb deleted file mode 100644 index 7fa51c2691..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Warsaw.rb +++ /dev/null @@ -1,212 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Warsaw - include TimezoneDefinition - - timezone 'Europe/Warsaw' do |tz| - tz.offset :o0, 5040, 0, :LMT - tz.offset :o1, 5040, 0, :WMT - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - tz.offset :o4, 7200, 0, :EET - tz.offset :o5, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 288925853, 120 - tz.transition 1915, 8, :o2, 290485733, 120 - tz.transition 1916, 4, :o3, 29051813, 12 - tz.transition 1916, 9, :o2, 58107299, 24 - tz.transition 1917, 4, :o3, 58112029, 24 - tz.transition 1917, 9, :o2, 58115725, 24 - tz.transition 1918, 4, :o3, 58120765, 24 - tz.transition 1918, 9, :o4, 58124461, 24 - tz.transition 1919, 4, :o5, 4844127, 2 - tz.transition 1919, 9, :o4, 4844435, 2 - tz.transition 1922, 5, :o2, 29078477, 12 - tz.transition 1940, 6, :o3, 58315285, 24 - tz.transition 1942, 11, :o2, 58335973, 24 - tz.transition 1943, 3, :o3, 58339501, 24 - tz.transition 1943, 10, :o2, 58344037, 24 - tz.transition 1944, 4, :o3, 58348405, 24 - tz.transition 1944, 10, :o2, 4862735, 2 - tz.transition 1945, 4, :o3, 58357787, 24 - tz.transition 1945, 10, :o2, 29181125, 12 - tz.transition 1946, 4, :o3, 58366187, 24 - tz.transition 1946, 10, :o2, 58370413, 24 - tz.transition 1947, 5, :o3, 58375429, 24 - tz.transition 1947, 10, :o2, 58379125, 24 - tz.transition 1948, 4, :o3, 58383829, 24 - tz.transition 1948, 10, :o2, 58387861, 24 - tz.transition 1949, 4, :o3, 58392397, 24 - tz.transition 1949, 10, :o2, 58396597, 24 - tz.transition 1957, 6, :o3, 4871983, 2 - tz.transition 1957, 9, :o2, 4872221, 2 - tz.transition 1958, 3, :o3, 4872585, 2 - tz.transition 1958, 9, :o2, 4872949, 2 - tz.transition 1959, 5, :o3, 4873439, 2 - tz.transition 1959, 10, :o2, 4873691, 2 - tz.transition 1960, 4, :o3, 4874055, 2 - tz.transition 1960, 10, :o2, 4874419, 2 - tz.transition 1961, 5, :o3, 4874895, 2 - tz.transition 1961, 10, :o2, 4875147, 2 - tz.transition 1962, 5, :o3, 4875623, 2 - tz.transition 1962, 9, :o2, 4875875, 2 - tz.transition 1963, 5, :o3, 4876351, 2 - tz.transition 1963, 9, :o2, 4876603, 2 - tz.transition 1964, 5, :o3, 4877093, 2 - tz.transition 1964, 9, :o2, 4877331, 2 - tz.transition 1977, 4, :o3, 228873600 - tz.transition 1977, 9, :o2, 243993600 - tz.transition 1978, 4, :o3, 260323200 - tz.transition 1978, 10, :o2, 276048000 - tz.transition 1979, 4, :o3, 291772800 - tz.transition 1979, 9, :o2, 307497600 - tz.transition 1980, 4, :o3, 323827200 - tz.transition 1980, 9, :o2, 338947200 - tz.transition 1981, 3, :o3, 354672000 - tz.transition 1981, 9, :o2, 370396800 - tz.transition 1982, 3, :o3, 386121600 - tz.transition 1982, 9, :o2, 401846400 - tz.transition 1983, 3, :o3, 417571200 - tz.transition 1983, 9, :o2, 433296000 - tz.transition 1984, 3, :o3, 449020800 - tz.transition 1984, 9, :o2, 465350400 - tz.transition 1985, 3, :o3, 481075200 - tz.transition 1985, 9, :o2, 496800000 - tz.transition 1986, 3, :o3, 512524800 - tz.transition 1986, 9, :o2, 528249600 - tz.transition 1987, 3, :o3, 543974400 - tz.transition 1987, 9, :o2, 559699200 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Zagreb.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Zagreb.rb deleted file mode 100644 index ecdd903d28..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Europe/Zagreb.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Zagreb - include TimezoneDefinition - - linked_timezone 'Europe/Zagreb', 'Europe/Belgrade' - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Auckland.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Auckland.rb deleted file mode 100644 index a524fd6b6b..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Auckland.rb +++ /dev/null @@ -1,202 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Auckland - include TimezoneDefinition - - timezone 'Pacific/Auckland' do |tz| - tz.offset :o0, 41944, 0, :LMT - tz.offset :o1, 41400, 0, :NZMT - tz.offset :o2, 41400, 3600, :NZST - tz.offset :o3, 41400, 1800, :NZST - tz.offset :o4, 43200, 0, :NZST - tz.offset :o5, 43200, 3600, :NZDT - - tz.transition 1868, 11, :o1, 25959290557, 10800 - tz.transition 1927, 11, :o2, 116409125, 48 - tz.transition 1928, 3, :o1, 38804945, 16 - tz.transition 1928, 10, :o3, 116425589, 48 - tz.transition 1929, 3, :o1, 29108245, 12 - tz.transition 1929, 10, :o3, 116443061, 48 - tz.transition 1930, 3, :o1, 29112613, 12 - tz.transition 1930, 10, :o3, 116460533, 48 - tz.transition 1931, 3, :o1, 29116981, 12 - tz.transition 1931, 10, :o3, 116478005, 48 - tz.transition 1932, 3, :o1, 29121433, 12 - tz.transition 1932, 10, :o3, 116495477, 48 - tz.transition 1933, 3, :o1, 29125801, 12 - tz.transition 1933, 10, :o3, 116512949, 48 - tz.transition 1934, 4, :o1, 29130673, 12 - tz.transition 1934, 9, :o3, 116530085, 48 - tz.transition 1935, 4, :o1, 29135041, 12 - tz.transition 1935, 9, :o3, 116547557, 48 - tz.transition 1936, 4, :o1, 29139409, 12 - tz.transition 1936, 9, :o3, 116565029, 48 - tz.transition 1937, 4, :o1, 29143777, 12 - tz.transition 1937, 9, :o3, 116582501, 48 - tz.transition 1938, 4, :o1, 29148145, 12 - tz.transition 1938, 9, :o3, 116599973, 48 - tz.transition 1939, 4, :o1, 29152597, 12 - tz.transition 1939, 9, :o3, 116617445, 48 - tz.transition 1940, 4, :o1, 29156965, 12 - tz.transition 1940, 9, :o3, 116635253, 48 - tz.transition 1945, 12, :o4, 2431821, 1 - tz.transition 1974, 11, :o5, 152632800 - tz.transition 1975, 2, :o4, 162309600 - tz.transition 1975, 10, :o5, 183477600 - tz.transition 1976, 3, :o4, 194968800 - tz.transition 1976, 10, :o5, 215532000 - tz.transition 1977, 3, :o4, 226418400 - tz.transition 1977, 10, :o5, 246981600 - tz.transition 1978, 3, :o4, 257868000 - tz.transition 1978, 10, :o5, 278431200 - tz.transition 1979, 3, :o4, 289317600 - tz.transition 1979, 10, :o5, 309880800 - tz.transition 1980, 3, :o4, 320767200 - tz.transition 1980, 10, :o5, 341330400 - tz.transition 1981, 2, :o4, 352216800 - tz.transition 1981, 10, :o5, 372780000 - tz.transition 1982, 3, :o4, 384271200 - tz.transition 1982, 10, :o5, 404834400 - tz.transition 1983, 3, :o4, 415720800 - tz.transition 1983, 10, :o5, 436284000 - tz.transition 1984, 3, :o4, 447170400 - tz.transition 1984, 10, :o5, 467733600 - tz.transition 1985, 3, :o4, 478620000 - tz.transition 1985, 10, :o5, 499183200 - tz.transition 1986, 3, :o4, 510069600 - tz.transition 1986, 10, :o5, 530632800 - tz.transition 1987, 2, :o4, 541519200 - tz.transition 1987, 10, :o5, 562082400 - tz.transition 1988, 3, :o4, 573573600 - tz.transition 1988, 10, :o5, 594136800 - tz.transition 1989, 3, :o4, 605023200 - tz.transition 1989, 10, :o5, 623772000 - tz.transition 1990, 3, :o4, 637682400 - tz.transition 1990, 10, :o5, 655221600 - tz.transition 1991, 3, :o4, 669132000 - tz.transition 1991, 10, :o5, 686671200 - tz.transition 1992, 3, :o4, 700581600 - tz.transition 1992, 10, :o5, 718120800 - tz.transition 1993, 3, :o4, 732636000 - tz.transition 1993, 10, :o5, 749570400 - tz.transition 1994, 3, :o4, 764085600 - tz.transition 1994, 10, :o5, 781020000 - tz.transition 1995, 3, :o4, 795535200 - tz.transition 1995, 9, :o5, 812469600 - tz.transition 1996, 3, :o4, 826984800 - tz.transition 1996, 10, :o5, 844524000 - tz.transition 1997, 3, :o4, 858434400 - tz.transition 1997, 10, :o5, 875973600 - tz.transition 1998, 3, :o4, 889884000 - tz.transition 1998, 10, :o5, 907423200 - tz.transition 1999, 3, :o4, 921938400 - tz.transition 1999, 10, :o5, 938872800 - tz.transition 2000, 3, :o4, 953388000 - tz.transition 2000, 9, :o5, 970322400 - tz.transition 2001, 3, :o4, 984837600 - tz.transition 2001, 10, :o5, 1002376800 - tz.transition 2002, 3, :o4, 1016287200 - tz.transition 2002, 10, :o5, 1033826400 - tz.transition 2003, 3, :o4, 1047736800 - tz.transition 2003, 10, :o5, 1065276000 - tz.transition 2004, 3, :o4, 1079791200 - tz.transition 2004, 10, :o5, 1096725600 - tz.transition 2005, 3, :o4, 1111240800 - tz.transition 2005, 10, :o5, 1128175200 - tz.transition 2006, 3, :o4, 1142690400 - tz.transition 2006, 9, :o5, 1159624800 - tz.transition 2007, 3, :o4, 1174140000 - tz.transition 2007, 9, :o5, 1191074400 - tz.transition 2008, 4, :o4, 1207404000 - tz.transition 2008, 9, :o5, 1222524000 - tz.transition 2009, 4, :o4, 1238853600 - tz.transition 2009, 9, :o5, 1253973600 - tz.transition 2010, 4, :o4, 1270303200 - tz.transition 2010, 9, :o5, 1285423200 - tz.transition 2011, 4, :o4, 1301752800 - tz.transition 2011, 9, :o5, 1316872800 - tz.transition 2012, 3, :o4, 1333202400 - tz.transition 2012, 9, :o5, 1348927200 - tz.transition 2013, 4, :o4, 1365256800 - tz.transition 2013, 9, :o5, 1380376800 - tz.transition 2014, 4, :o4, 1396706400 - tz.transition 2014, 9, :o5, 1411826400 - tz.transition 2015, 4, :o4, 1428156000 - tz.transition 2015, 9, :o5, 1443276000 - tz.transition 2016, 4, :o4, 1459605600 - tz.transition 2016, 9, :o5, 1474725600 - tz.transition 2017, 4, :o4, 1491055200 - tz.transition 2017, 9, :o5, 1506175200 - tz.transition 2018, 3, :o4, 1522504800 - tz.transition 2018, 9, :o5, 1538229600 - tz.transition 2019, 4, :o4, 1554559200 - tz.transition 2019, 9, :o5, 1569679200 - tz.transition 2020, 4, :o4, 1586008800 - tz.transition 2020, 9, :o5, 1601128800 - tz.transition 2021, 4, :o4, 1617458400 - tz.transition 2021, 9, :o5, 1632578400 - tz.transition 2022, 4, :o4, 1648908000 - tz.transition 2022, 9, :o5, 1664028000 - tz.transition 2023, 4, :o4, 1680357600 - tz.transition 2023, 9, :o5, 1695477600 - tz.transition 2024, 4, :o4, 1712412000 - tz.transition 2024, 9, :o5, 1727532000 - tz.transition 2025, 4, :o4, 1743861600 - tz.transition 2025, 9, :o5, 1758981600 - tz.transition 2026, 4, :o4, 1775311200 - tz.transition 2026, 9, :o5, 1790431200 - tz.transition 2027, 4, :o4, 1806760800 - tz.transition 2027, 9, :o5, 1821880800 - tz.transition 2028, 4, :o4, 1838210400 - tz.transition 2028, 9, :o5, 1853330400 - tz.transition 2029, 3, :o4, 1869660000 - tz.transition 2029, 9, :o5, 1885384800 - tz.transition 2030, 4, :o4, 1901714400 - tz.transition 2030, 9, :o5, 1916834400 - tz.transition 2031, 4, :o4, 1933164000 - tz.transition 2031, 9, :o5, 1948284000 - tz.transition 2032, 4, :o4, 1964613600 - tz.transition 2032, 9, :o5, 1979733600 - tz.transition 2033, 4, :o4, 1996063200 - tz.transition 2033, 9, :o5, 2011183200 - tz.transition 2034, 4, :o4, 2027512800 - tz.transition 2034, 9, :o5, 2042632800 - tz.transition 2035, 3, :o4, 2058962400 - tz.transition 2035, 9, :o5, 2074687200 - tz.transition 2036, 4, :o4, 2091016800 - tz.transition 2036, 9, :o5, 2106136800 - tz.transition 2037, 4, :o4, 2122466400 - tz.transition 2037, 9, :o5, 2137586400 - tz.transition 2038, 4, :o4, 29586205, 12 - tz.transition 2038, 9, :o5, 29588305, 12 - tz.transition 2039, 4, :o4, 29590573, 12 - tz.transition 2039, 9, :o5, 29592673, 12 - tz.transition 2040, 3, :o4, 29594941, 12 - tz.transition 2040, 9, :o5, 29597125, 12 - tz.transition 2041, 4, :o4, 29599393, 12 - tz.transition 2041, 9, :o5, 29601493, 12 - tz.transition 2042, 4, :o4, 29603761, 12 - tz.transition 2042, 9, :o5, 29605861, 12 - tz.transition 2043, 4, :o4, 29608129, 12 - tz.transition 2043, 9, :o5, 29610229, 12 - tz.transition 2044, 4, :o4, 29612497, 12 - tz.transition 2044, 9, :o5, 29614597, 12 - tz.transition 2045, 4, :o4, 29616865, 12 - tz.transition 2045, 9, :o5, 29618965, 12 - tz.transition 2046, 3, :o4, 29621233, 12 - tz.transition 2046, 9, :o5, 29623417, 12 - tz.transition 2047, 4, :o4, 29625685, 12 - tz.transition 2047, 9, :o5, 29627785, 12 - tz.transition 2048, 4, :o4, 29630053, 12 - tz.transition 2048, 9, :o5, 29632153, 12 - tz.transition 2049, 4, :o4, 29634421, 12 - tz.transition 2049, 9, :o5, 29636521, 12 - tz.transition 2050, 4, :o4, 29638789, 12 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Fiji.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Fiji.rb deleted file mode 100644 index 5fe9bbd9a6..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Fiji.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Fiji - include TimezoneDefinition - - timezone 'Pacific/Fiji' do |tz| - tz.offset :o0, 42820, 0, :LMT - tz.offset :o1, 43200, 0, :FJT - tz.offset :o2, 43200, 3600, :FJST - - tz.transition 1915, 10, :o1, 10457838739, 4320 - tz.transition 1998, 10, :o2, 909842400 - tz.transition 1999, 2, :o1, 920124000 - tz.transition 1999, 11, :o2, 941896800 - tz.transition 2000, 2, :o1, 951573600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Guam.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Guam.rb deleted file mode 100644 index d4c1a0a682..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Guam.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Guam - include TimezoneDefinition - - timezone 'Pacific/Guam' do |tz| - tz.offset :o0, -51660, 0, :LMT - tz.offset :o1, 34740, 0, :LMT - tz.offset :o2, 36000, 0, :GST - tz.offset :o3, 36000, 0, :ChST - - tz.transition 1844, 12, :o1, 1149567407, 480 - tz.transition 1900, 12, :o2, 1159384847, 480 - tz.transition 2000, 12, :o3, 977493600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Honolulu.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Honolulu.rb deleted file mode 100644 index 204b226537..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Honolulu.rb +++ /dev/null @@ -1,28 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Honolulu - include TimezoneDefinition - - timezone 'Pacific/Honolulu' do |tz| - tz.offset :o0, -37886, 0, :LMT - tz.offset :o1, -37800, 0, :HST - tz.offset :o2, -37800, 3600, :HDT - tz.offset :o3, -37800, 3600, :HWT - tz.offset :o4, -37800, 3600, :HPT - tz.offset :o5, -36000, 0, :HST - - tz.transition 1900, 1, :o1, 104328926143, 43200 - tz.transition 1933, 4, :o2, 116505265, 48 - tz.transition 1933, 5, :o1, 116506271, 48 - tz.transition 1942, 2, :o3, 116659201, 48 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 116722991, 48 - tz.transition 1947, 6, :o5, 116752561, 48 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Majuro.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Majuro.rb deleted file mode 100644 index 32adad92c1..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Majuro.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Majuro - include TimezoneDefinition - - timezone 'Pacific/Majuro' do |tz| - tz.offset :o0, 41088, 0, :LMT - tz.offset :o1, 39600, 0, :MHT - tz.offset :o2, 43200, 0, :MHT - - tz.transition 1900, 12, :o1, 1086923261, 450 - tz.transition 1969, 9, :o2, 58571881, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Midway.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Midway.rb deleted file mode 100644 index 97784fcc10..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Midway.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Midway - include TimezoneDefinition - - timezone 'Pacific/Midway' do |tz| - tz.offset :o0, -42568, 0, :LMT - tz.offset :o1, -39600, 0, :NST - tz.offset :o2, -39600, 3600, :NDT - tz.offset :o3, -39600, 0, :BST - tz.offset :o4, -39600, 0, :SST - - tz.transition 1901, 1, :o1, 26086168721, 10800 - tz.transition 1956, 6, :o2, 58455071, 24 - tz.transition 1956, 9, :o1, 29228627, 12 - tz.transition 1967, 4, :o3, 58549967, 24 - tz.transition 1983, 11, :o4, 439038000 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Noumea.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Noumea.rb deleted file mode 100644 index 70173db8ab..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Noumea.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Noumea - include TimezoneDefinition - - timezone 'Pacific/Noumea' do |tz| - tz.offset :o0, 39948, 0, :LMT - tz.offset :o1, 39600, 0, :NCT - tz.offset :o2, 39600, 3600, :NCST - - tz.transition 1912, 1, :o1, 17419781071, 7200 - tz.transition 1977, 12, :o2, 250002000 - tz.transition 1978, 2, :o1, 257342400 - tz.transition 1978, 12, :o2, 281451600 - tz.transition 1979, 2, :o1, 288878400 - tz.transition 1996, 11, :o2, 849366000 - tz.transition 1997, 3, :o1, 857228400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Pago_Pago.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Pago_Pago.rb deleted file mode 100644 index c8fcd7d527..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Pago_Pago.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Pago_Pago - include TimezoneDefinition - - timezone 'Pacific/Pago_Pago' do |tz| - tz.offset :o0, 45432, 0, :LMT - tz.offset :o1, -40968, 0, :LMT - tz.offset :o2, -41400, 0, :SAMT - tz.offset :o3, -39600, 0, :NST - tz.offset :o4, -39600, 0, :BST - tz.offset :o5, -39600, 0, :SST - - tz.transition 1879, 7, :o1, 2889041969, 1200 - tz.transition 1911, 1, :o2, 2902845569, 1200 - tz.transition 1950, 1, :o3, 116797583, 48 - tz.transition 1967, 4, :o4, 58549967, 24 - tz.transition 1983, 11, :o5, 439038000 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Port_Moresby.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Port_Moresby.rb deleted file mode 100644 index f06cf6d54f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Port_Moresby.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Port_Moresby - include TimezoneDefinition - - timezone 'Pacific/Port_Moresby' do |tz| - tz.offset :o0, 35320, 0, :LMT - tz.offset :o1, 35312, 0, :PMMT - tz.offset :o2, 36000, 0, :PGT - - tz.transition 1879, 12, :o1, 5200664597, 2160 - tz.transition 1894, 12, :o2, 13031248093, 5400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Tongatapu.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Tongatapu.rb deleted file mode 100644 index 7578d92f38..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/definitions/Pacific/Tongatapu.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Tongatapu - include TimezoneDefinition - - timezone 'Pacific/Tongatapu' do |tz| - tz.offset :o0, 44360, 0, :LMT - tz.offset :o1, 44400, 0, :TOT - tz.offset :o2, 46800, 0, :TOT - tz.offset :o3, 46800, 3600, :TOST - - tz.transition 1900, 12, :o1, 5217231571, 2160 - tz.transition 1940, 12, :o2, 174959639, 72 - tz.transition 1999, 10, :o3, 939214800 - tz.transition 2000, 3, :o2, 953384400 - tz.transition 2000, 11, :o3, 973342800 - tz.transition 2001, 1, :o2, 980596800 - tz.transition 2001, 11, :o3, 1004792400 - tz.transition 2002, 1, :o2, 1012046400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/info_timezone.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/info_timezone.rb deleted file mode 100644 index 001303c594..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/info_timezone.rb +++ /dev/null @@ -1,52 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/timezone' - -module TZInfo - - # A Timezone based on a TimezoneInfo. - class InfoTimezone < Timezone #:nodoc: - - # Constructs a new InfoTimezone with a TimezoneInfo instance. - def self.new(info) - tz = super() - tz.send(:setup, info) - tz - end - - # The identifier of the timezone, e.g. "Europe/Paris". - def identifier - @info.identifier - end - - protected - # The TimezoneInfo for this Timezone. - def info - @info - end - - def setup(info) - @info = info - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/linked_timezone.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/linked_timezone.rb deleted file mode 100644 index f8ec4fca87..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/linked_timezone.rb +++ /dev/null @@ -1,51 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/info_timezone' - -module TZInfo - - class LinkedTimezone < InfoTimezone #:nodoc: - # Returns the TimezonePeriod for the given UTC time. utc can either be - # a DateTime, Time or integer timestamp (Time.to_i). Any timezone - # information in utc is ignored (it is treated as a UTC time). - # - # If no TimezonePeriod could be found, PeriodNotFound is raised. - def period_for_utc(utc) - @linked_timezone.period_for_utc(utc) - end - - # Returns the set of TimezonePeriod instances that are valid for the given - # local time as an array. If you just want a single period, use - # period_for_local instead and specify how abiguities should be resolved. - # Raises PeriodNotFound if no periods are found for the given time. - def periods_for_local(local) - @linked_timezone.periods_for_local(local) - end - - protected - def setup(info) - super(info) - @linked_timezone = Timezone.get(info.link_to_identifier) - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/linked_timezone_info.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/linked_timezone_info.rb deleted file mode 100644 index 8197ff3e81..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/linked_timezone_info.rb +++ /dev/null @@ -1,44 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/timezone_info' - -module TZInfo - # Represents a linked timezone defined in a data module. - class LinkedTimezoneInfo < TimezoneInfo #:nodoc: - - # The zone that provides the data (that this zone is an alias for). - attr_reader :link_to_identifier - - # Constructs a new TimezoneInfo with an identifier and the identifier - # of the zone linked to. - def initialize(identifier, link_to_identifier) - super(identifier) - @link_to_identifier = link_to_identifier - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #@identifier,#@link_to_identifier>" - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/offset_rationals.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/offset_rationals.rb deleted file mode 100644 index b1f10b2b63..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/offset_rationals.rb +++ /dev/null @@ -1,98 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'rational' -require 'tzinfo/ruby_core_support' - -module TZInfo - - # Provides a method for getting Rationals for a timezone offset in seconds. - # Pre-reduced rationals are returned for all the half-hour intervals between - # -14 and +14 hours to avoid having to call gcd at runtime. - module OffsetRationals #:nodoc: - @@rational_cache = { - -50400 => RubyCoreSupport.rational_new!(-7,12), - -48600 => RubyCoreSupport.rational_new!(-9,16), - -46800 => RubyCoreSupport.rational_new!(-13,24), - -45000 => RubyCoreSupport.rational_new!(-25,48), - -43200 => RubyCoreSupport.rational_new!(-1,2), - -41400 => RubyCoreSupport.rational_new!(-23,48), - -39600 => RubyCoreSupport.rational_new!(-11,24), - -37800 => RubyCoreSupport.rational_new!(-7,16), - -36000 => RubyCoreSupport.rational_new!(-5,12), - -34200 => RubyCoreSupport.rational_new!(-19,48), - -32400 => RubyCoreSupport.rational_new!(-3,8), - -30600 => RubyCoreSupport.rational_new!(-17,48), - -28800 => RubyCoreSupport.rational_new!(-1,3), - -27000 => RubyCoreSupport.rational_new!(-5,16), - -25200 => RubyCoreSupport.rational_new!(-7,24), - -23400 => RubyCoreSupport.rational_new!(-13,48), - -21600 => RubyCoreSupport.rational_new!(-1,4), - -19800 => RubyCoreSupport.rational_new!(-11,48), - -18000 => RubyCoreSupport.rational_new!(-5,24), - -16200 => RubyCoreSupport.rational_new!(-3,16), - -14400 => RubyCoreSupport.rational_new!(-1,6), - -12600 => RubyCoreSupport.rational_new!(-7,48), - -10800 => RubyCoreSupport.rational_new!(-1,8), - -9000 => RubyCoreSupport.rational_new!(-5,48), - -7200 => RubyCoreSupport.rational_new!(-1,12), - -5400 => RubyCoreSupport.rational_new!(-1,16), - -3600 => RubyCoreSupport.rational_new!(-1,24), - -1800 => RubyCoreSupport.rational_new!(-1,48), - 0 => RubyCoreSupport.rational_new!(0,1), - 1800 => RubyCoreSupport.rational_new!(1,48), - 3600 => RubyCoreSupport.rational_new!(1,24), - 5400 => RubyCoreSupport.rational_new!(1,16), - 7200 => RubyCoreSupport.rational_new!(1,12), - 9000 => RubyCoreSupport.rational_new!(5,48), - 10800 => RubyCoreSupport.rational_new!(1,8), - 12600 => RubyCoreSupport.rational_new!(7,48), - 14400 => RubyCoreSupport.rational_new!(1,6), - 16200 => RubyCoreSupport.rational_new!(3,16), - 18000 => RubyCoreSupport.rational_new!(5,24), - 19800 => RubyCoreSupport.rational_new!(11,48), - 21600 => RubyCoreSupport.rational_new!(1,4), - 23400 => RubyCoreSupport.rational_new!(13,48), - 25200 => RubyCoreSupport.rational_new!(7,24), - 27000 => RubyCoreSupport.rational_new!(5,16), - 28800 => RubyCoreSupport.rational_new!(1,3), - 30600 => RubyCoreSupport.rational_new!(17,48), - 32400 => RubyCoreSupport.rational_new!(3,8), - 34200 => RubyCoreSupport.rational_new!(19,48), - 36000 => RubyCoreSupport.rational_new!(5,12), - 37800 => RubyCoreSupport.rational_new!(7,16), - 39600 => RubyCoreSupport.rational_new!(11,24), - 41400 => RubyCoreSupport.rational_new!(23,48), - 43200 => RubyCoreSupport.rational_new!(1,2), - 45000 => RubyCoreSupport.rational_new!(25,48), - 46800 => RubyCoreSupport.rational_new!(13,24), - 48600 => RubyCoreSupport.rational_new!(9,16), - 50400 => RubyCoreSupport.rational_new!(7,12)} - - # Returns a Rational expressing the fraction of a day that offset in - # seconds represents (i.e. equivalent to Rational(offset, 86400)). - def rational_for_offset(offset) - @@rational_cache[offset] || Rational(offset, 86400) - end - module_function :rational_for_offset - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/ruby_core_support.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/ruby_core_support.rb deleted file mode 100644 index 9a0441206b..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/ruby_core_support.rb +++ /dev/null @@ -1,56 +0,0 @@ -#-- -# Copyright (c) 2008 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'date' -require 'rational' - -module TZInfo - - # Methods to support different versions of Ruby. - module RubyCoreSupport #:nodoc: - - # Use Rational.new! for performance reasons in Ruby 1.8. - # This has been removed from 1.9, but Rational performs better. - if Rational.respond_to? :new! - def self.rational_new!(numerator, denominator = 1) - Rational.new!(numerator, denominator) - end - else - def self.rational_new!(numerator, denominator = 1) - Rational(numerator, denominator) - end - end - - # Ruby 1.8.6 introduced new! and deprecated new0. - # Ruby 1.9.0 removed new0. - # We still need to support new0 for older versions of Ruby. - if DateTime.respond_to? :new! - def self.datetime_new!(ajd = 0, of = 0, sg = Date::ITALY) - DateTime.new!(ajd, of, sg) - end - else - def self.datetime_new!(ajd = 0, of = 0, sg = Date::ITALY) - DateTime.new0(ajd, of, sg) - end - end - end -end \ No newline at end of file diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/time_or_datetime.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/time_or_datetime.rb deleted file mode 100644 index 264517f3ee..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/time_or_datetime.rb +++ /dev/null @@ -1,292 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'date' -require 'time' -require 'tzinfo/offset_rationals' - -module TZInfo - # Used by TZInfo internally to represent either a Time, DateTime or integer - # timestamp (seconds since 1970-01-01 00:00:00). - class TimeOrDateTime #:nodoc: - include Comparable - - # Constructs a new TimeOrDateTime. timeOrDateTime can be a Time, DateTime - # or an integer. If using a Time or DateTime, any time zone information is - # ignored. - def initialize(timeOrDateTime) - @time = nil - @datetime = nil - @timestamp = nil - - if timeOrDateTime.is_a?(Time) - @time = timeOrDateTime - @time = Time.utc(@time.year, @time.mon, @time.mday, @time.hour, @time.min, @time.sec) unless @time.zone == 'UTC' - @orig = @time - elsif timeOrDateTime.is_a?(DateTime) - @datetime = timeOrDateTime - @datetime = @datetime.new_offset(0) unless @datetime.offset == 0 - @orig = @datetime - else - @timestamp = timeOrDateTime.to_i - @orig = @timestamp - end - end - - # Returns the time as a Time. - def to_time - unless @time - if @timestamp - @time = Time.at(@timestamp).utc - else - @time = Time.utc(year, mon, mday, hour, min, sec) - end - end - - @time - end - - # Returns the time as a DateTime. - def to_datetime - unless @datetime - @datetime = DateTime.new(year, mon, mday, hour, min, sec) - end - - @datetime - end - - # Returns the time as an integer timestamp. - def to_i - unless @timestamp - @timestamp = to_time.to_i - end - - @timestamp - end - - # Returns the time as the original time passed to new. - def to_orig - @orig - end - - # Returns a string representation of the TimeOrDateTime. - def to_s - if @orig.is_a?(Time) - "Time: #{@orig.to_s}" - elsif @orig.is_a?(DateTime) - "DateTime: #{@orig.to_s}" - else - "Timestamp: #{@orig.to_s}" - end - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #{@orig.inspect}>" - end - - # Returns the year. - def year - if @time - @time.year - elsif @datetime - @datetime.year - else - to_time.year - end - end - - # Returns the month of the year (1..12). - def mon - if @time - @time.mon - elsif @datetime - @datetime.mon - else - to_time.mon - end - end - alias :month :mon - - # Returns the day of the month (1..n). - def mday - if @time - @time.mday - elsif @datetime - @datetime.mday - else - to_time.mday - end - end - alias :day :mday - - # Returns the hour of the day (0..23). - def hour - if @time - @time.hour - elsif @datetime - @datetime.hour - else - to_time.hour - end - end - - # Returns the minute of the hour (0..59). - def min - if @time - @time.min - elsif @datetime - @datetime.min - else - to_time.min - end - end - - # Returns the second of the minute (0..60). (60 for a leap second). - def sec - if @time - @time.sec - elsif @datetime - @datetime.sec - else - to_time.sec - end - end - - # Compares this TimeOrDateTime with another Time, DateTime, integer - # timestamp or TimeOrDateTime. Returns -1, 0 or +1 depending whether the - # receiver is less than, equal to, or greater than timeOrDateTime. - # - # Milliseconds and smaller units are ignored in the comparison. - def <=>(timeOrDateTime) - if timeOrDateTime.is_a?(TimeOrDateTime) - orig = timeOrDateTime.to_orig - - if @orig.is_a?(DateTime) || orig.is_a?(DateTime) - # If either is a DateTime, assume it is there for a reason - # (i.e. for range). - to_datetime <=> timeOrDateTime.to_datetime - elsif orig.is_a?(Time) - to_time <=> timeOrDateTime.to_time - else - to_i <=> timeOrDateTime.to_i - end - elsif @orig.is_a?(DateTime) || timeOrDateTime.is_a?(DateTime) - # If either is a DateTime, assume it is there for a reason - # (i.e. for range). - to_datetime <=> TimeOrDateTime.wrap(timeOrDateTime).to_datetime - elsif timeOrDateTime.is_a?(Time) - to_time <=> timeOrDateTime - else - to_i <=> timeOrDateTime.to_i - end - end - - # Adds a number of seconds to the TimeOrDateTime. Returns a new - # TimeOrDateTime, preserving what the original constructed type was. - # If the original type is a Time and the resulting calculation goes out of - # range for Times, then an exception will be raised by the Time class. - def +(seconds) - if seconds == 0 - self - else - if @orig.is_a?(DateTime) - TimeOrDateTime.new(@orig + OffsetRationals.rational_for_offset(seconds)) - else - # + defined for Time and integer timestamps - TimeOrDateTime.new(@orig + seconds) - end - end - end - - # Subtracts a number of seconds from the TimeOrDateTime. Returns a new - # TimeOrDateTime, preserving what the original constructed type was. - # If the original type is a Time and the resulting calculation goes out of - # range for Times, then an exception will be raised by the Time class. - def -(seconds) - self + (-seconds) - end - - # Similar to the + operator, but for cases where adding would cause a - # timestamp or time to go out of the allowed range, converts to a DateTime - # based TimeOrDateTime. - def add_with_convert(seconds) - if seconds == 0 - self - else - if @orig.is_a?(DateTime) - TimeOrDateTime.new(@orig + OffsetRationals.rational_for_offset(seconds)) - else - # A Time or timestamp. - result = to_i + seconds - - if result < 0 || result > 2147483647 - result = TimeOrDateTime.new(to_datetime + OffsetRationals.rational_for_offset(seconds)) - else - result = TimeOrDateTime.new(@orig + seconds) - end - end - end - end - - # Returns true if todt represents the same time and was originally - # constructed with the same type (DateTime, Time or timestamp) as this - # TimeOrDateTime. - def eql?(todt) - todt.respond_to?(:to_orig) && to_orig.eql?(todt.to_orig) - end - - # Returns a hash of this TimeOrDateTime. - def hash - @orig.hash - end - - # If no block is given, returns a TimeOrDateTime wrapping the given - # timeOrDateTime. If a block is specified, a TimeOrDateTime is constructed - # and passed to the block. The result of the block must be a TimeOrDateTime. - # to_orig will be called on the result and the result of to_orig will be - # returned. - # - # timeOrDateTime can be a Time, DateTime, integer timestamp or TimeOrDateTime. - # If a TimeOrDateTime is passed in, no new TimeOrDateTime will be constructed, - # the passed in value will be used. - def self.wrap(timeOrDateTime) - t = timeOrDateTime.is_a?(TimeOrDateTime) ? timeOrDateTime : TimeOrDateTime.new(timeOrDateTime) - - if block_given? - t = yield t - - if timeOrDateTime.is_a?(TimeOrDateTime) - t - elsif timeOrDateTime.is_a?(Time) - t.to_time - elsif timeOrDateTime.is_a?(DateTime) - t.to_datetime - else - t.to_i - end - else - t - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone.rb deleted file mode 100644 index ef4ecd8ae1..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone.rb +++ /dev/null @@ -1,508 +0,0 @@ -#-- -# Copyright (c) 2005-2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'date' -# require 'tzinfo/country' -require 'tzinfo/time_or_datetime' -require 'tzinfo/timezone_period' - -module TZInfo - # Indicate a specified time in a local timezone has more than one - # possible time in UTC. This happens when switching from daylight savings time - # to normal time where the clocks are rolled back. Thrown by period_for_local - # and local_to_utc when using an ambiguous time and not specifying any - # means to resolve the ambiguity. - class AmbiguousTime < StandardError - end - - # Thrown to indicate that no TimezonePeriod matching a given time could be found. - class PeriodNotFound < StandardError - end - - # Thrown by Timezone#get if the identifier given is not valid. - class InvalidTimezoneIdentifier < StandardError - end - - # Thrown if an attempt is made to use a timezone created with Timezone.new(nil). - class UnknownTimezone < StandardError - end - - # Timezone is the base class of all timezones. It provides a factory method - # get to access timezones by identifier. Once a specific Timezone has been - # retrieved, DateTimes, Times and timestamps can be converted between the UTC - # and the local time for the zone. For example: - # - # tz = TZInfo::Timezone.get('America/New_York') - # puts tz.utc_to_local(DateTime.new(2005,8,29,15,35,0)).to_s - # puts tz.local_to_utc(Time.utc(2005,8,29,11,35,0)).to_s - # puts tz.utc_to_local(1125315300).to_s - # - # Each time conversion method returns an object of the same type it was - # passed. - # - # The timezone information all comes from the tz database - # (see http://www.twinsun.com/tz/tz-link.htm) - class Timezone - include Comparable - - # Cache of loaded zones by identifier to avoid using require if a zone - # has already been loaded. - @@loaded_zones = {} - - # Whether the timezones index has been loaded yet. - @@index_loaded = false - - # Returns a timezone by its identifier (e.g. "Europe/London", - # "America/Chicago" or "UTC"). - # - # Raises InvalidTimezoneIdentifier if the timezone couldn't be found. - def self.get(identifier) - instance = @@loaded_zones[identifier] - unless instance - raise InvalidTimezoneIdentifier, 'Invalid identifier' if identifier !~ /^[A-z0-9\+\-_]+(\/[A-z0-9\+\-_]+)*$/ - identifier = identifier.gsub(/-/, '__m__').gsub(/\+/, '__p__') - begin - # Use a temporary variable to avoid an rdoc warning - file = "tzinfo/definitions/#{identifier}".untaint - require file - - m = Definitions - identifier.split(/\//).each {|part| - m = m.const_get(part) - } - - info = m.get - - # Could make Timezone subclasses register an interest in an info - # type. Since there are currently only two however, there isn't - # much point. - if info.kind_of?(DataTimezoneInfo) - instance = DataTimezone.new(info) - elsif info.kind_of?(LinkedTimezoneInfo) - instance = LinkedTimezone.new(info) - else - raise InvalidTimezoneIdentifier, "No handler for info type #{info.class}" - end - - @@loaded_zones[instance.identifier] = instance - rescue LoadError, NameError => e - raise InvalidTimezoneIdentifier, e.message - end - end - - instance - end - - # Returns a proxy for the Timezone with the given identifier. The proxy - # will cause the real timezone to be loaded when an attempt is made to - # find a period or convert a time. get_proxy will not validate the - # identifier. If an invalid identifier is specified, no exception will be - # raised until the proxy is used. - def self.get_proxy(identifier) - TimezoneProxy.new(identifier) - end - - # If identifier is nil calls super(), otherwise calls get. An identfier - # should always be passed in when called externally. - def self.new(identifier = nil) - if identifier - get(identifier) - else - super() - end - end - - # Returns an array containing all the available Timezones. - # - # Returns TimezoneProxy objects to avoid the overhead of loading Timezone - # definitions until a conversion is actually required. - def self.all - get_proxies(all_identifiers) - end - - # Returns an array containing the identifiers of all the available - # Timezones. - def self.all_identifiers - load_index - Indexes::Timezones.timezones - end - - # Returns an array containing all the available Timezones that are based - # on data (are not links to other Timezones). - # - # Returns TimezoneProxy objects to avoid the overhead of loading Timezone - # definitions until a conversion is actually required. - def self.all_data_zones - get_proxies(all_data_zone_identifiers) - end - - # Returns an array containing the identifiers of all the available - # Timezones that are based on data (are not links to other Timezones).. - def self.all_data_zone_identifiers - load_index - Indexes::Timezones.data_timezones - end - - # Returns an array containing all the available Timezones that are links - # to other Timezones. - # - # Returns TimezoneProxy objects to avoid the overhead of loading Timezone - # definitions until a conversion is actually required. - def self.all_linked_zones - get_proxies(all_linked_zone_identifiers) - end - - # Returns an array containing the identifiers of all the available - # Timezones that are links to other Timezones. - def self.all_linked_zone_identifiers - load_index - Indexes::Timezones.linked_timezones - end - - # Returns all the Timezones defined for all Countries. This is not the - # complete set of Timezones as some are not country specific (e.g. - # 'Etc/GMT'). - # - # Returns TimezoneProxy objects to avoid the overhead of loading Timezone - # definitions until a conversion is actually required. - def self.all_country_zones - Country.all_codes.inject([]) {|zones,country| - zones += Country.get(country).zones - } - end - - # Returns all the zone identifiers defined for all Countries. This is not the - # complete set of zone identifiers as some are not country specific (e.g. - # 'Etc/GMT'). You can obtain a Timezone instance for a given identifier - # with the get method. - def self.all_country_zone_identifiers - Country.all_codes.inject([]) {|zones,country| - zones += Country.get(country).zone_identifiers - } - end - - # Returns all US Timezone instances. A shortcut for - # TZInfo::Country.get('US').zones. - # - # Returns TimezoneProxy objects to avoid the overhead of loading Timezone - # definitions until a conversion is actually required. - def self.us_zones - Country.get('US').zones - end - - # Returns all US zone identifiers. A shortcut for - # TZInfo::Country.get('US').zone_identifiers. - def self.us_zone_identifiers - Country.get('US').zone_identifiers - end - - # The identifier of the timezone, e.g. "Europe/Paris". - def identifier - raise UnknownTimezone, 'TZInfo::Timezone constructed directly' - end - - # An alias for identifier. - def name - # Don't use alias, as identifier gets overridden. - identifier - end - - # Returns a friendlier version of the identifier. - def to_s - friendly_identifier - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #{identifier}>" - end - - # Returns a friendlier version of the identifier. Set skip_first_part to - # omit the first part of the identifier (typically a region name) where - # there is more than one part. - # - # For example: - # - # Timezone.get('Europe/Paris').friendly_identifier(false) #=> "Europe - Paris" - # Timezone.get('Europe/Paris').friendly_identifier(true) #=> "Paris" - # Timezone.get('America/Indiana/Knox').friendly_identifier(false) #=> "America - Knox, Indiana" - # Timezone.get('America/Indiana/Knox').friendly_identifier(true) #=> "Knox, Indiana" - def friendly_identifier(skip_first_part = false) - parts = identifier.split('/') - if parts.empty? - # shouldn't happen - identifier - elsif parts.length == 1 - parts[0] - else - if skip_first_part - result = '' - else - result = parts[0] + ' - ' - end - - parts[1, parts.length - 1].reverse_each {|part| - part.gsub!(/_/, ' ') - - if part.index(/[a-z]/) - # Missing a space if a lower case followed by an upper case and the - # name isn't McXxxx. - part.gsub!(/([^M][a-z])([A-Z])/, '\1 \2') - part.gsub!(/([M][a-bd-z])([A-Z])/, '\1 \2') - - # Missing an apostrophe if two consecutive upper case characters. - part.gsub!(/([A-Z])([A-Z])/, '\1\'\2') - end - - result << part - result << ', ' - } - - result.slice!(result.length - 2, 2) - result - end - end - - # Returns the TimezonePeriod for the given UTC time. utc can either be - # a DateTime, Time or integer timestamp (Time.to_i). Any timezone - # information in utc is ignored (it is treated as a UTC time). - def period_for_utc(utc) - raise UnknownTimezone, 'TZInfo::Timezone constructed directly' - end - - # Returns the set of TimezonePeriod instances that are valid for the given - # local time as an array. If you just want a single period, use - # period_for_local instead and specify how ambiguities should be resolved. - # Returns an empty array if no periods are found for the given time. - def periods_for_local(local) - raise UnknownTimezone, 'TZInfo::Timezone constructed directly' - end - - # Returns the TimezonePeriod for the given local time. local can either be - # a DateTime, Time or integer timestamp (Time.to_i). Any timezone - # information in local is ignored (it is treated as a time in the current - # timezone). - # - # Warning: There are local times that have no equivalent UTC times (e.g. - # in the transition from standard time to daylight savings time). There are - # also local times that have more than one UTC equivalent (e.g. in the - # transition from daylight savings time to standard time). - # - # In the first case (no equivalent UTC time), a PeriodNotFound exception - # will be raised. - # - # In the second case (more than one equivalent UTC time), an AmbiguousTime - # exception will be raised unless the optional dst parameter or block - # handles the ambiguity. - # - # If the ambiguity is due to a transition from daylight savings time to - # standard time, the dst parameter can be used to select whether the - # daylight savings time or local time is used. For example, - # - # Timezone.get('America/New_York').period_for_local(DateTime.new(2004,10,31,1,30,0)) - # - # would raise an AmbiguousTime exception. - # - # Specifying dst=true would the daylight savings period from April to - # October 2004. Specifying dst=false would return the standard period - # from October 2004 to April 2005. - # - # If the dst parameter does not resolve the ambiguity, and a block is - # specified, it is called. The block must take a single parameter - an - # array of the periods that need to be resolved. The block can select and - # return a single period or return nil or an empty array - # to cause an AmbiguousTime exception to be raised. - def period_for_local(local, dst = nil) - results = periods_for_local(local) - - if results.empty? - raise PeriodNotFound - elsif results.size < 2 - results.first - else - # ambiguous result try to resolve - - if !dst.nil? - matches = results.find_all {|period| period.dst? == dst} - results = matches if !matches.empty? - end - - if results.size < 2 - results.first - else - # still ambiguous, try the block - - if block_given? - results = yield results - end - - if results.is_a?(TimezonePeriod) - results - elsif results && results.size == 1 - results.first - else - raise AmbiguousTime, "#{local} is an ambiguous local time." - end - end - end - end - - # Converts a time in UTC to the local timezone. utc can either be - # a DateTime, Time or timestamp (Time.to_i). The returned time has the same - # type as utc. Any timezone information in utc is ignored (it is treated as - # a UTC time). - def utc_to_local(utc) - TimeOrDateTime.wrap(utc) {|wrapped| - period_for_utc(wrapped).to_local(wrapped) - } - end - - # Converts a time in the local timezone to UTC. local can either be - # a DateTime, Time or timestamp (Time.to_i). The returned time has the same - # type as local. Any timezone information in local is ignored (it is treated - # as a local time). - # - # Warning: There are local times that have no equivalent UTC times (e.g. - # in the transition from standard time to daylight savings time). There are - # also local times that have more than one UTC equivalent (e.g. in the - # transition from daylight savings time to standard time). - # - # In the first case (no equivalent UTC time), a PeriodNotFound exception - # will be raised. - # - # In the second case (more than one equivalent UTC time), an AmbiguousTime - # exception will be raised unless the optional dst parameter or block - # handles the ambiguity. - # - # If the ambiguity is due to a transition from daylight savings time to - # standard time, the dst parameter can be used to select whether the - # daylight savings time or local time is used. For example, - # - # Timezone.get('America/New_York').local_to_utc(DateTime.new(2004,10,31,1,30,0)) - # - # would raise an AmbiguousTime exception. - # - # Specifying dst=true would return 2004-10-31 5:30:00. Specifying dst=false - # would return 2004-10-31 6:30:00. - # - # If the dst parameter does not resolve the ambiguity, and a block is - # specified, it is called. The block must take a single parameter - an - # array of the periods that need to be resolved. The block can return a - # single period to use to convert the time or return nil or an empty array - # to cause an AmbiguousTime exception to be raised. - def local_to_utc(local, dst = nil) - TimeOrDateTime.wrap(local) {|wrapped| - if block_given? - period = period_for_local(wrapped, dst) {|periods| yield periods } - else - period = period_for_local(wrapped, dst) - end - - period.to_utc(wrapped) - } - end - - # Returns the current time in the timezone as a Time. - def now - utc_to_local(Time.now.utc) - end - - # Returns the TimezonePeriod for the current time. - def current_period - period_for_utc(Time.now.utc) - end - - # Returns the current Time and TimezonePeriod as an array. The first element - # is the time, the second element is the period. - def current_period_and_time - utc = Time.now.utc - period = period_for_utc(utc) - [period.to_local(utc), period] - end - - alias :current_time_and_period :current_period_and_time - - # Converts a time in UTC to local time and returns it as a string - # according to the given format. The formatting is identical to - # Time.strftime and DateTime.strftime, except %Z is replaced with the - # timezone abbreviation for the specified time (for example, EST or EDT). - def strftime(format, utc = Time.now.utc) - period = period_for_utc(utc) - local = period.to_local(utc) - local = Time.at(local).utc unless local.kind_of?(Time) || local.kind_of?(DateTime) - abbreviation = period.abbreviation.to_s.gsub(/%/, '%%') - - format = format.gsub(/(.?)%Z/) do - if $1 == '%' - # return %%Z so the real strftime treats it as a literal %Z too - '%%Z' - else - "#$1#{abbreviation}" - end - end - - local.strftime(format) - end - - # Compares two Timezones based on their identifier. Returns -1 if tz is less - # than self, 0 if tz is equal to self and +1 if tz is greater than self. - def <=>(tz) - identifier <=> tz.identifier - end - - # Returns true if and only if the identifier of tz is equal to the - # identifier of this Timezone. - def eql?(tz) - self == tz - end - - # Returns a hash of this Timezone. - def hash - identifier.hash - end - - # Dumps this Timezone for marshalling. - def _dump(limit) - identifier - end - - # Loads a marshalled Timezone. - def self._load(data) - Timezone.get(data) - end - - private - # Loads in the index of timezones if it hasn't already been loaded. - def self.load_index - unless @@index_loaded - require 'tzinfo/indexes/timezones' - @@index_loaded = true - end - end - - # Returns an array of proxies corresponding to the given array of - # identifiers. - def self.get_proxies(identifiers) - identifiers.collect {|identifier| get_proxy(identifier)} - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_definition.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_definition.rb deleted file mode 100644 index 39ca8bfa53..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_definition.rb +++ /dev/null @@ -1,56 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/data_timezone_info' -require 'tzinfo/linked_timezone_info' - -module TZInfo - - # TimezoneDefinition is included into Timezone definition modules. - # TimezoneDefinition provides the methods for defining timezones. - module TimezoneDefinition #:nodoc: - # Add class methods to the includee. - def self.append_features(base) - super - base.extend(ClassMethods) - end - - # Class methods for inclusion. - module ClassMethods #:nodoc: - # Returns and yields a DataTimezoneInfo object to define a timezone. - def timezone(identifier) - yield @timezone = DataTimezoneInfo.new(identifier) - end - - # Defines a linked timezone. - def linked_timezone(identifier, link_to_identifier) - @timezone = LinkedTimezoneInfo.new(identifier, link_to_identifier) - end - - # Returns the last TimezoneInfo to be defined with timezone or - # linked_timezone. - def get - @timezone - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_info.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_info.rb deleted file mode 100644 index 68e38c35fb..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_info.rb +++ /dev/null @@ -1,40 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -module TZInfo - # Represents a timezone defined in a data module. - class TimezoneInfo #:nodoc: - - # The timezone identifier. - attr_reader :identifier - - # Constructs a new TimezoneInfo with an identifier. - def initialize(identifier) - @identifier = identifier - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #@identifier>" - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_offset_info.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_offset_info.rb deleted file mode 100644 index 6a0bbca46f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_offset_info.rb +++ /dev/null @@ -1,94 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -module TZInfo - # Represents an offset defined in a Timezone data file. - class TimezoneOffsetInfo #:nodoc: - # The base offset of the timezone from UTC in seconds. - attr_reader :utc_offset - - # The offset from standard time for the zone in seconds (i.e. non-zero if - # daylight savings is being observed). - attr_reader :std_offset - - # The total offset of this observance from UTC in seconds - # (utc_offset + std_offset). - attr_reader :utc_total_offset - - # The abbreviation that identifies this observance, e.g. "GMT" - # (Greenwich Mean Time) or "BST" (British Summer Time) for "Europe/London". The returned identifier is a - # symbol. - attr_reader :abbreviation - - # Constructs a new TimezoneOffsetInfo. utc_offset and std_offset are - # specified in seconds. - def initialize(utc_offset, std_offset, abbreviation) - @utc_offset = utc_offset - @std_offset = std_offset - @abbreviation = abbreviation - - @utc_total_offset = @utc_offset + @std_offset - end - - # True if std_offset is non-zero. - def dst? - @std_offset != 0 - end - - # Converts a UTC DateTime to local time based on the offset of this period. - def to_local(utc) - TimeOrDateTime.wrap(utc) {|wrapped| - wrapped + @utc_total_offset - } - end - - # Converts a local DateTime to UTC based on the offset of this period. - def to_utc(local) - TimeOrDateTime.wrap(local) {|wrapped| - wrapped - @utc_total_offset - } - end - - # Returns true if and only if toi has the same utc_offset, std_offset - # and abbreviation as this TimezoneOffsetInfo. - def ==(toi) - toi.respond_to?(:utc_offset) && toi.respond_to?(:std_offset) && toi.respond_to?(:abbreviation) && - utc_offset == toi.utc_offset && std_offset == toi.std_offset && abbreviation == toi.abbreviation - end - - # Returns true if and only if toi has the same utc_offset, std_offset - # and abbreviation as this TimezoneOffsetInfo. - def eql?(toi) - self == toi - end - - # Returns a hash of this TimezoneOffsetInfo. - def hash - utc_offset.hash ^ std_offset.hash ^ abbreviation.hash - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #@utc_offset,#@std_offset,#@abbreviation>" - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_period.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_period.rb deleted file mode 100644 index 00888fcfdc..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_period.rb +++ /dev/null @@ -1,198 +0,0 @@ -#-- -# Copyright (c) 2005-2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/offset_rationals' -require 'tzinfo/time_or_datetime' - -module TZInfo - # A period of time in a timezone where the same offset from UTC applies. - # - # All the methods that take times accept instances of Time, DateTime or - # integer timestamps. - class TimezonePeriod - # The TimezoneTransitionInfo that defines the start of this TimezonePeriod - # (may be nil if unbounded). - attr_reader :start_transition - - # The TimezoneTransitionInfo that defines the end of this TimezonePeriod - # (may be nil if unbounded). - attr_reader :end_transition - - # The TimezoneOffsetInfo for this period. - attr_reader :offset - - # Initializes a new TimezonePeriod. - def initialize(start_transition, end_transition, offset = nil) - @start_transition = start_transition - @end_transition = end_transition - - if offset - raise ArgumentError, 'Offset specified with transitions' if @start_transition || @end_transition - @offset = offset - else - if @start_transition - @offset = @start_transition.offset - elsif @end_transition - @offset = @end_transition.previous_offset - else - raise ArgumentError, 'No offset specified and no transitions to determine it from' - end - end - - @utc_total_offset_rational = nil - end - - # Base offset of the timezone from UTC (seconds). - def utc_offset - @offset.utc_offset - end - - # Offset from the local time where daylight savings is in effect (seconds). - # E.g.: utc_offset could be -5 hours. Normally, std_offset would be 0. - # During daylight savings, std_offset would typically become +1 hours. - def std_offset - @offset.std_offset - end - - # The identifier of this period, e.g. "GMT" (Greenwich Mean Time) or "BST" - # (British Summer Time) for "Europe/London". The returned identifier is a - # symbol. - def abbreviation - @offset.abbreviation - end - alias :zone_identifier :abbreviation - - # Total offset from UTC (seconds). Equal to utc_offset + std_offset. - def utc_total_offset - @offset.utc_total_offset - end - - # Total offset from UTC (days). Result is a Rational. - def utc_total_offset_rational - unless @utc_total_offset_rational - @utc_total_offset_rational = OffsetRationals.rational_for_offset(utc_total_offset) - end - @utc_total_offset_rational - end - - # The start time of the period in UTC as a DateTime. May be nil if unbounded. - def utc_start - @start_transition ? @start_transition.at.to_datetime : nil - end - - # The end time of the period in UTC as a DateTime. May be nil if unbounded. - def utc_end - @end_transition ? @end_transition.at.to_datetime : nil - end - - # The start time of the period in local time as a DateTime. May be nil if - # unbounded. - def local_start - @start_transition ? @start_transition.local_start.to_datetime : nil - end - - # The end time of the period in local time as a DateTime. May be nil if - # unbounded. - def local_end - @end_transition ? @end_transition.local_end.to_datetime : nil - end - - # true if daylight savings is in effect for this period; otherwise false. - def dst? - @offset.dst? - end - - # true if this period is valid for the given UTC DateTime; otherwise false. - def valid_for_utc?(utc) - utc_after_start?(utc) && utc_before_end?(utc) - end - - # true if the given UTC DateTime is after the start of the period - # (inclusive); otherwise false. - def utc_after_start?(utc) - !@start_transition || @start_transition.at <= utc - end - - # true if the given UTC DateTime is before the end of the period - # (exclusive); otherwise false. - def utc_before_end?(utc) - !@end_transition || @end_transition.at > utc - end - - # true if this period is valid for the given local DateTime; otherwise false. - def valid_for_local?(local) - local_after_start?(local) && local_before_end?(local) - end - - # true if the given local DateTime is after the start of the period - # (inclusive); otherwise false. - def local_after_start?(local) - !@start_transition || @start_transition.local_start <= local - end - - # true if the given local DateTime is before the end of the period - # (exclusive); otherwise false. - def local_before_end?(local) - !@end_transition || @end_transition.local_end > local - end - - # Converts a UTC DateTime to local time based on the offset of this period. - def to_local(utc) - @offset.to_local(utc) - end - - # Converts a local DateTime to UTC based on the offset of this period. - def to_utc(local) - @offset.to_utc(local) - end - - # Returns true if this TimezonePeriod is equal to p. This compares the - # start_transition, end_transition and offset using ==. - def ==(p) - p.respond_to?(:start_transition) && p.respond_to?(:end_transition) && - p.respond_to?(:offset) && start_transition == p.start_transition && - end_transition == p.end_transition && offset == p.offset - end - - # Returns true if this TimezonePeriods is equal to p. This compares the - # start_transition, end_transition and offset using eql? - def eql?(p) - p.respond_to?(:start_transition) && p.respond_to?(:end_transition) && - p.respond_to?(:offset) && start_transition.eql?(p.start_transition) && - end_transition.eql?(p.end_transition) && offset.eql?(p.offset) - end - - # Returns a hash of this TimezonePeriod. - def hash - result = @start_transition.hash ^ @end_transition.hash - result ^= @offset.hash unless @start_transition || @end_transition - result - end - - # Returns internal object state as a programmer-readable string. - def inspect - result = "#<#{self.class}: #{@start_transition.inspect},#{@end_transition.inspect}" - result << ",#{@offset.inspect}>" unless @start_transition || @end_transition - result + '>' - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_transition_info.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_transition_info.rb deleted file mode 100644 index 6b0669cc4a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.15/lib/tzinfo/timezone_transition_info.rb +++ /dev/null @@ -1,129 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'date' -require 'tzinfo/time_or_datetime' - -module TZInfo - # Represents an offset defined in a Timezone data file. - class TimezoneTransitionInfo #:nodoc: - # The offset this transition changes to (a TimezoneOffsetInfo instance). - attr_reader :offset - - # The offset this transition changes from (a TimezoneOffsetInfo instance). - attr_reader :previous_offset - - # The numerator of the DateTime if the transition time is defined as a - # DateTime, otherwise the transition time as a timestamp. - attr_reader :numerator_or_time - protected :numerator_or_time - - # Either the denominotor of the DateTime if the transition time is defined - # as a DateTime, otherwise nil. - attr_reader :denominator - protected :denominator - - # Creates a new TimezoneTransitionInfo with the given offset, - # previous_offset (both TimezoneOffsetInfo instances) and UTC time. - # if denominator is nil, numerator_or_time is treated as a number of - # seconds since the epoch. If denominator is specified numerator_or_time - # and denominator are used to create a DateTime as follows: - # - # DateTime.new!(Rational.send(:new!, numerator_or_time, denominator), 0, Date::ITALY) - # - # For performance reasons, the numerator and denominator must be specified - # in their lowest form. - def initialize(offset, previous_offset, numerator_or_time, denominator = nil) - @offset = offset - @previous_offset = previous_offset - @numerator_or_time = numerator_or_time - @denominator = denominator - - @at = nil - @local_end = nil - @local_start = nil - end - - # A TimeOrDateTime instance representing the UTC time when this transition - # occurs. - def at - unless @at - unless @denominator - @at = TimeOrDateTime.new(@numerator_or_time) - else - r = RubyCoreSupport.rational_new!(@numerator_or_time, @denominator) - dt = RubyCoreSupport.datetime_new!(r, 0, Date::ITALY) - @at = TimeOrDateTime.new(dt) - end - end - - @at - end - - # A TimeOrDateTime instance representing the local time when this transition - # causes the previous observance to end (calculated from at using - # previous_offset). - def local_end - @local_end = at.add_with_convert(@previous_offset.utc_total_offset) unless @local_end - @local_end - end - - # A TimeOrDateTime instance representing the local time when this transition - # causes the next observance to start (calculated from at using offset). - def local_start - @local_start = at.add_with_convert(@offset.utc_total_offset) unless @local_start - @local_start - end - - # Returns true if this TimezoneTransitionInfo is equal to the given - # TimezoneTransitionInfo. Two TimezoneTransitionInfo instances are - # considered to be equal by == if offset, previous_offset and at are all - # equal. - def ==(tti) - tti.respond_to?(:offset) && tti.respond_to?(:previous_offset) && tti.respond_to?(:at) && - offset == tti.offset && previous_offset == tti.previous_offset && at == tti.at - end - - # Returns true if this TimezoneTransitionInfo is equal to the given - # TimezoneTransitionInfo. Two TimezoneTransitionInfo instances are - # considered to be equal by eql? if offset, previous_offset, - # numerator_or_time and denominator are all equal. This is stronger than ==, - # which just requires the at times to be equal regardless of how they were - # originally specified. - def eql?(tti) - tti.respond_to?(:offset) && tti.respond_to?(:previous_offset) && - tti.respond_to?(:numerator_or_time) && tti.respond_to?(:denominator) && - offset == tti.offset && previous_offset == tti.previous_offset && - numerator_or_time == tti.numerator_or_time && denominator == tti.denominator - end - - # Returns a hash of this TimezoneTransitionInfo instance. - def hash - @offset.hash ^ @previous_offset.hash ^ @numerator_or_time.hash ^ @denominator.hash - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #{at.inspect},#{@offset.inspect}>" - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo.rb new file mode 100644 index 0000000000..c8bdbeec5d --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo.rb @@ -0,0 +1,33 @@ +#-- +# Copyright (c) 2005-2006 Philip Ross +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#++ + +# Add the directory containing this file to the start of the load path if it +# isn't there already. +$:.unshift(File.dirname(__FILE__)) unless + $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) + +require 'tzinfo/timezone' +# require 'tzinfo/country' +# require 'tzinfo/tzdataparser' +# require 'tzinfo/timezone_proxy' +require 'tzinfo/data_timezone' +require 'tzinfo/linked_timezone' \ No newline at end of file diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone.rb new file mode 100644 index 0000000000..5eccbdf0db --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone.rb @@ -0,0 +1,47 @@ +#-- +# Copyright (c) 2006 Philip Ross +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#++ + +require 'tzinfo/info_timezone' + +module TZInfo + + # A Timezone based on a DataTimezoneInfo. + class DataTimezone < InfoTimezone #:nodoc: + + # Returns the TimezonePeriod for the given UTC time. utc can either be + # a DateTime, Time or integer timestamp (Time.to_i). Any timezone + # information in utc is ignored (it is treated as a UTC time). + # + # If no TimezonePeriod could be found, PeriodNotFound is raised. + def period_for_utc(utc) + info.period_for_utc(utc) + end + + # Returns the set of TimezonePeriod instances that are valid for the given + # local time as an array. If you just want a single period, use + # period_for_local instead and specify how abiguities should be resolved. + # Raises PeriodNotFound if no periods are found for the given time. + def periods_for_local(local) + info.periods_for_local(local) + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone_info.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone_info.rb new file mode 100644 index 0000000000..a45d94554b --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone_info.rb @@ -0,0 +1,228 @@ +#-- +# Copyright (c) 2006 Philip Ross +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#++ + +require 'tzinfo/time_or_datetime' +require 'tzinfo/timezone_info' +require 'tzinfo/timezone_offset_info' +require 'tzinfo/timezone_period' +require 'tzinfo/timezone_transition_info' + +module TZInfo + # Thrown if no offsets have been defined when calling period_for_utc or + # periods_for_local. Indicates an error in the timezone data. + class NoOffsetsDefined < StandardError + end + + # Represents a (non-linked) timezone defined in a data module. + class DataTimezoneInfo < TimezoneInfo #:nodoc: + + # Constructs a new TimezoneInfo with its identifier. + def initialize(identifier) + super(identifier) + @offsets = {} + @transitions = [] + @previous_offset = nil + @transitions_index = nil + end + + # Defines a offset. The id uniquely identifies this offset within the + # timezone. utc_offset and std_offset define the offset in seconds of + # standard time from UTC and daylight savings from standard time + # respectively. abbreviation describes the timezone offset (e.g. GMT, BST, + # EST or EDT). + # + # The first offset to be defined is treated as the offset that applies + # until the first transition. This will usually be in Local Mean Time (LMT). + # + # ArgumentError will be raised if the id is already defined. + def offset(id, utc_offset, std_offset, abbreviation) + raise ArgumentError, 'Offset already defined' if @offsets.has_key?(id) + + offset = TimezoneOffsetInfo.new(utc_offset, std_offset, abbreviation) + @offsets[id] = offset + @previous_offset = offset unless @previous_offset + end + + # Defines a transition. Transitions must be defined in chronological order. + # ArgumentError will be raised if a transition is added out of order. + # offset_id refers to an id defined with offset. ArgumentError will be + # raised if the offset_id cannot be found. numerator_or_time and + # denomiator specify the time the transition occurs as. See + # TimezoneTransitionInfo for more detail about specifying times. + def transition(year, month, offset_id, numerator_or_time, denominator = nil) + offset = @offsets[offset_id] + raise ArgumentError, 'Offset not found' unless offset + + if @transitions_index + if year < @last_year || (year == @last_year && month < @last_month) + raise ArgumentError, 'Transitions must be increasing date order' + end + + # Record the position of the first transition with this index. + index = transition_index(year, month) + @transitions_index[index] ||= @transitions.length + + # Fill in any gaps + (index - 1).downto(0) do |i| + break if @transitions_index[i] + @transitions_index[i] = @transitions.length + end + else + @transitions_index = [@transitions.length] + @start_year = year + @start_month = month + end + + @transitions << TimezoneTransitionInfo.new(offset, @previous_offset, + numerator_or_time, denominator) + @last_year = year + @last_month = month + @previous_offset = offset + end + + # Returns the TimezonePeriod for the given UTC time. + # Raises NoOffsetsDefined if no offsets have been defined. + def period_for_utc(utc) + unless @transitions.empty? + utc = TimeOrDateTime.wrap(utc) + index = transition_index(utc.year, utc.mon) + + start_transition = nil + start = transition_before_end(index) + if start + start.downto(0) do |i| + if @transitions[i].at <= utc + start_transition = @transitions[i] + break + end + end + end + + end_transition = nil + start = transition_after_start(index) + if start + start.upto(@transitions.length - 1) do |i| + if @transitions[i].at > utc + end_transition = @transitions[i] + break + end + end + end + + if start_transition || end_transition + TimezonePeriod.new(start_transition, end_transition) + else + # Won't happen since there are transitions. Must always find one + # transition that is either >= or < the specified time. + raise 'No transitions found in search' + end + else + raise NoOffsetsDefined, 'No offsets have been defined' unless @previous_offset + TimezonePeriod.new(nil, nil, @previous_offset) + end + end + + # Returns the set of TimezonePeriods for the given local time as an array. + # Results returned are ordered by increasing UTC start date. + # Returns an empty array if no periods are found for the given time. + # Raises NoOffsetsDefined if no offsets have been defined. + def periods_for_local(local) + unless @transitions.empty? + local = TimeOrDateTime.wrap(local) + index = transition_index(local.year, local.mon) + + result = [] + + start_index = transition_after_start(index - 1) + if start_index && @transitions[start_index].local_end > local + if start_index > 0 + if @transitions[start_index - 1].local_start <= local + result << TimezonePeriod.new(@transitions[start_index - 1], @transitions[start_index]) + end + else + result << TimezonePeriod.new(nil, @transitions[start_index]) + end + end + + end_index = transition_before_end(index + 1) + + if end_index + start_index = end_index unless start_index + + start_index.upto(transition_before_end(index + 1)) do |i| + if @transitions[i].local_start <= local + if i + 1 < @transitions.length + if @transitions[i + 1].local_end > local + result << TimezonePeriod.new(@transitions[i], @transitions[i + 1]) + end + else + result << TimezonePeriod.new(@transitions[i], nil) + end + end + end + end + + result + else + raise NoOffsetsDefined, 'No offsets have been defined' unless @previous_offset + [TimezonePeriod.new(nil, nil, @previous_offset)] + end + end + + private + # Returns the index into the @transitions_index array for a given year + # and month. + def transition_index(year, month) + index = (year - @start_year) * 2 + index += 1 if month > 6 + index -= 1 if @start_month > 6 + index + end + + # Returns the index into @transitions of the first transition that occurs + # on or after the start of the given index into @transitions_index. + # Returns nil if there are no such transitions. + def transition_after_start(index) + if index >= @transitions_index.length + nil + else + index = 0 if index < 0 + @transitions_index[index] + end + end + + # Returns the index into @transitions of the first transition that occurs + # before the end of the given index into @transitions_index. + # Returns nil if there are no such transitions. + def transition_before_end(index) + index = index + 1 + + if index <= 0 + nil + elsif index >= @transitions_index.length + @transitions.length - 1 + else + @transitions_index[index] - 1 + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Algiers.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Algiers.rb new file mode 100644 index 0000000000..8c5f25577f --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Algiers.rb @@ -0,0 +1,55 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Africa + module Algiers + include TimezoneDefinition + + timezone 'Africa/Algiers' do |tz| + tz.offset :o0, 732, 0, :LMT + tz.offset :o1, 561, 0, :PMT + tz.offset :o2, 0, 0, :WET + tz.offset :o3, 0, 3600, :WEST + tz.offset :o4, 3600, 0, :CET + tz.offset :o5, 3600, 3600, :CEST + + tz.transition 1891, 3, :o1, 2170625843, 900 + tz.transition 1911, 3, :o2, 69670267013, 28800 + tz.transition 1916, 6, :o3, 58104707, 24 + tz.transition 1916, 10, :o2, 58107323, 24 + tz.transition 1917, 3, :o3, 58111499, 24 + tz.transition 1917, 10, :o2, 58116227, 24 + tz.transition 1918, 3, :o3, 58119899, 24 + tz.transition 1918, 10, :o2, 58124963, 24 + tz.transition 1919, 3, :o3, 58128467, 24 + tz.transition 1919, 10, :o2, 58133699, 24 + tz.transition 1920, 2, :o3, 58136867, 24 + tz.transition 1920, 10, :o2, 58142915, 24 + tz.transition 1921, 3, :o3, 58146323, 24 + tz.transition 1921, 6, :o2, 58148699, 24 + tz.transition 1939, 9, :o3, 58308443, 24 + tz.transition 1939, 11, :o2, 4859173, 2 + tz.transition 1940, 2, :o4, 29156215, 12 + tz.transition 1944, 4, :o5, 58348405, 24 + tz.transition 1944, 10, :o4, 4862743, 2 + tz.transition 1945, 4, :o5, 58357141, 24 + tz.transition 1945, 9, :o4, 58361147, 24 + tz.transition 1946, 10, :o2, 58370411, 24 + tz.transition 1956, 1, :o4, 4871003, 2 + tz.transition 1963, 4, :o2, 58515203, 24 + tz.transition 1971, 4, :o3, 41468400 + tz.transition 1971, 9, :o2, 54774000 + tz.transition 1977, 5, :o3, 231724800 + tz.transition 1977, 10, :o4, 246236400 + tz.transition 1978, 3, :o5, 259545600 + tz.transition 1978, 9, :o4, 275274000 + tz.transition 1979, 10, :o2, 309740400 + tz.transition 1980, 4, :o3, 325468800 + tz.transition 1980, 10, :o2, 341802000 + tz.transition 1981, 5, :o4, 357523200 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Cairo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Cairo.rb new file mode 100644 index 0000000000..b7ed8e8244 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Cairo.rb @@ -0,0 +1,219 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Africa + module Cairo + include TimezoneDefinition + + timezone 'Africa/Cairo' do |tz| + tz.offset :o0, 7500, 0, :LMT + tz.offset :o1, 7200, 0, :EET + tz.offset :o2, 7200, 3600, :EEST + + tz.transition 1900, 9, :o1, 695604503, 288 + tz.transition 1940, 7, :o2, 29157905, 12 + tz.transition 1940, 9, :o1, 19439227, 8 + tz.transition 1941, 4, :o2, 29161193, 12 + tz.transition 1941, 9, :o1, 19442027, 8 + tz.transition 1942, 3, :o2, 29165405, 12 + tz.transition 1942, 10, :o1, 19445275, 8 + tz.transition 1943, 3, :o2, 29169785, 12 + tz.transition 1943, 10, :o1, 19448235, 8 + tz.transition 1944, 3, :o2, 29174177, 12 + tz.transition 1944, 10, :o1, 19451163, 8 + tz.transition 1945, 4, :o2, 29178737, 12 + tz.transition 1945, 10, :o1, 19454083, 8 + tz.transition 1957, 5, :o2, 29231621, 12 + tz.transition 1957, 9, :o1, 19488899, 8 + tz.transition 1958, 4, :o2, 29235893, 12 + tz.transition 1958, 9, :o1, 19491819, 8 + tz.transition 1959, 4, :o2, 58480547, 24 + tz.transition 1959, 9, :o1, 4873683, 2 + tz.transition 1960, 4, :o2, 58489331, 24 + tz.transition 1960, 9, :o1, 4874415, 2 + tz.transition 1961, 4, :o2, 58498091, 24 + tz.transition 1961, 9, :o1, 4875145, 2 + tz.transition 1962, 4, :o2, 58506851, 24 + tz.transition 1962, 9, :o1, 4875875, 2 + tz.transition 1963, 4, :o2, 58515611, 24 + tz.transition 1963, 9, :o1, 4876605, 2 + tz.transition 1964, 4, :o2, 58524395, 24 + tz.transition 1964, 9, :o1, 4877337, 2 + tz.transition 1965, 4, :o2, 58533155, 24 + tz.transition 1965, 9, :o1, 4878067, 2 + tz.transition 1966, 4, :o2, 58541915, 24 + tz.transition 1966, 10, :o1, 4878799, 2 + tz.transition 1967, 4, :o2, 58550675, 24 + tz.transition 1967, 10, :o1, 4879529, 2 + tz.transition 1968, 4, :o2, 58559459, 24 + tz.transition 1968, 10, :o1, 4880261, 2 + tz.transition 1969, 4, :o2, 58568219, 24 + tz.transition 1969, 10, :o1, 4880991, 2 + tz.transition 1970, 4, :o2, 10364400 + tz.transition 1970, 10, :o1, 23587200 + tz.transition 1971, 4, :o2, 41900400 + tz.transition 1971, 10, :o1, 55123200 + tz.transition 1972, 4, :o2, 73522800 + tz.transition 1972, 10, :o1, 86745600 + tz.transition 1973, 4, :o2, 105058800 + tz.transition 1973, 10, :o1, 118281600 + tz.transition 1974, 4, :o2, 136594800 + tz.transition 1974, 10, :o1, 149817600 + tz.transition 1975, 4, :o2, 168130800 + tz.transition 1975, 10, :o1, 181353600 + tz.transition 1976, 4, :o2, 199753200 + tz.transition 1976, 10, :o1, 212976000 + tz.transition 1977, 4, :o2, 231289200 + tz.transition 1977, 10, :o1, 244512000 + tz.transition 1978, 4, :o2, 262825200 + tz.transition 1978, 10, :o1, 276048000 + tz.transition 1979, 4, :o2, 294361200 + tz.transition 1979, 10, :o1, 307584000 + tz.transition 1980, 4, :o2, 325983600 + tz.transition 1980, 10, :o1, 339206400 + tz.transition 1981, 4, :o2, 357519600 + tz.transition 1981, 10, :o1, 370742400 + tz.transition 1982, 7, :o2, 396399600 + tz.transition 1982, 10, :o1, 402278400 + tz.transition 1983, 7, :o2, 426812400 + tz.transition 1983, 10, :o1, 433814400 + tz.transition 1984, 4, :o2, 452214000 + tz.transition 1984, 10, :o1, 465436800 + tz.transition 1985, 4, :o2, 483750000 + tz.transition 1985, 10, :o1, 496972800 + tz.transition 1986, 4, :o2, 515286000 + tz.transition 1986, 10, :o1, 528508800 + tz.transition 1987, 4, :o2, 546822000 + tz.transition 1987, 10, :o1, 560044800 + tz.transition 1988, 4, :o2, 578444400 + tz.transition 1988, 10, :o1, 591667200 + tz.transition 1989, 5, :o2, 610412400 + tz.transition 1989, 10, :o1, 623203200 + tz.transition 1990, 4, :o2, 641516400 + tz.transition 1990, 10, :o1, 654739200 + tz.transition 1991, 4, :o2, 673052400 + tz.transition 1991, 10, :o1, 686275200 + tz.transition 1992, 4, :o2, 704674800 + tz.transition 1992, 10, :o1, 717897600 + tz.transition 1993, 4, :o2, 736210800 + tz.transition 1993, 10, :o1, 749433600 + tz.transition 1994, 4, :o2, 767746800 + tz.transition 1994, 10, :o1, 780969600 + tz.transition 1995, 4, :o2, 799020000 + tz.transition 1995, 9, :o1, 812322000 + tz.transition 1996, 4, :o2, 830469600 + tz.transition 1996, 9, :o1, 843771600 + tz.transition 1997, 4, :o2, 861919200 + tz.transition 1997, 9, :o1, 875221200 + tz.transition 1998, 4, :o2, 893368800 + tz.transition 1998, 9, :o1, 906670800 + tz.transition 1999, 4, :o2, 925423200 + tz.transition 1999, 9, :o1, 938725200 + tz.transition 2000, 4, :o2, 956872800 + tz.transition 2000, 9, :o1, 970174800 + tz.transition 2001, 4, :o2, 988322400 + tz.transition 2001, 9, :o1, 1001624400 + tz.transition 2002, 4, :o2, 1019772000 + tz.transition 2002, 9, :o1, 1033074000 + tz.transition 2003, 4, :o2, 1051221600 + tz.transition 2003, 9, :o1, 1064523600 + tz.transition 2004, 4, :o2, 1083276000 + tz.transition 2004, 9, :o1, 1096578000 + tz.transition 2005, 4, :o2, 1114725600 + tz.transition 2005, 9, :o1, 1128027600 + tz.transition 2006, 4, :o2, 1146175200 + tz.transition 2006, 9, :o1, 1158872400 + tz.transition 2007, 4, :o2, 1177624800 + tz.transition 2007, 9, :o1, 1189112400 + tz.transition 2008, 4, :o2, 1209074400 + tz.transition 2008, 8, :o1, 1219957200 + tz.transition 2009, 4, :o2, 1240524000 + tz.transition 2009, 8, :o1, 1250802000 + tz.transition 2010, 4, :o2, 1272578400 + tz.transition 2010, 9, :o1, 1285880400 + tz.transition 2011, 4, :o2, 1304028000 + tz.transition 2011, 9, :o1, 1317330000 + tz.transition 2012, 4, :o2, 1335477600 + tz.transition 2012, 9, :o1, 1348779600 + tz.transition 2013, 4, :o2, 1366927200 + tz.transition 2013, 9, :o1, 1380229200 + tz.transition 2014, 4, :o2, 1398376800 + tz.transition 2014, 9, :o1, 1411678800 + tz.transition 2015, 4, :o2, 1429826400 + tz.transition 2015, 9, :o1, 1443128400 + tz.transition 2016, 4, :o2, 1461880800 + tz.transition 2016, 9, :o1, 1475182800 + tz.transition 2017, 4, :o2, 1493330400 + tz.transition 2017, 9, :o1, 1506632400 + tz.transition 2018, 4, :o2, 1524780000 + tz.transition 2018, 9, :o1, 1538082000 + tz.transition 2019, 4, :o2, 1556229600 + tz.transition 2019, 9, :o1, 1569531600 + tz.transition 2020, 4, :o2, 1587679200 + tz.transition 2020, 9, :o1, 1600981200 + tz.transition 2021, 4, :o2, 1619733600 + tz.transition 2021, 9, :o1, 1633035600 + tz.transition 2022, 4, :o2, 1651183200 + tz.transition 2022, 9, :o1, 1664485200 + tz.transition 2023, 4, :o2, 1682632800 + tz.transition 2023, 9, :o1, 1695934800 + tz.transition 2024, 4, :o2, 1714082400 + tz.transition 2024, 9, :o1, 1727384400 + tz.transition 2025, 4, :o2, 1745532000 + tz.transition 2025, 9, :o1, 1758834000 + tz.transition 2026, 4, :o2, 1776981600 + tz.transition 2026, 9, :o1, 1790283600 + tz.transition 2027, 4, :o2, 1809036000 + tz.transition 2027, 9, :o1, 1822338000 + tz.transition 2028, 4, :o2, 1840485600 + tz.transition 2028, 9, :o1, 1853787600 + tz.transition 2029, 4, :o2, 1871935200 + tz.transition 2029, 9, :o1, 1885237200 + tz.transition 2030, 4, :o2, 1903384800 + tz.transition 2030, 9, :o1, 1916686800 + tz.transition 2031, 4, :o2, 1934834400 + tz.transition 2031, 9, :o1, 1948136400 + tz.transition 2032, 4, :o2, 1966888800 + tz.transition 2032, 9, :o1, 1980190800 + tz.transition 2033, 4, :o2, 1998338400 + tz.transition 2033, 9, :o1, 2011640400 + tz.transition 2034, 4, :o2, 2029788000 + tz.transition 2034, 9, :o1, 2043090000 + tz.transition 2035, 4, :o2, 2061237600 + tz.transition 2035, 9, :o1, 2074539600 + tz.transition 2036, 4, :o2, 2092687200 + tz.transition 2036, 9, :o1, 2105989200 + tz.transition 2037, 4, :o2, 2124136800 + tz.transition 2037, 9, :o1, 2137438800 + tz.transition 2038, 4, :o2, 29586521, 12 + tz.transition 2038, 9, :o1, 19725579, 8 + tz.transition 2039, 4, :o2, 29590889, 12 + tz.transition 2039, 9, :o1, 19728491, 8 + tz.transition 2040, 4, :o2, 29595257, 12 + tz.transition 2040, 9, :o1, 19731403, 8 + tz.transition 2041, 4, :o2, 29599625, 12 + tz.transition 2041, 9, :o1, 19734315, 8 + tz.transition 2042, 4, :o2, 29603993, 12 + tz.transition 2042, 9, :o1, 19737227, 8 + tz.transition 2043, 4, :o2, 29608361, 12 + tz.transition 2043, 9, :o1, 19740139, 8 + tz.transition 2044, 4, :o2, 29612813, 12 + tz.transition 2044, 9, :o1, 19743107, 8 + tz.transition 2045, 4, :o2, 29617181, 12 + tz.transition 2045, 9, :o1, 19746019, 8 + tz.transition 2046, 4, :o2, 29621549, 12 + tz.transition 2046, 9, :o1, 19748931, 8 + tz.transition 2047, 4, :o2, 29625917, 12 + tz.transition 2047, 9, :o1, 19751843, 8 + tz.transition 2048, 4, :o2, 29630285, 12 + tz.transition 2048, 9, :o1, 19754755, 8 + tz.transition 2049, 4, :o2, 29634737, 12 + tz.transition 2049, 9, :o1, 19757723, 8 + tz.transition 2050, 4, :o2, 29639105, 12 + tz.transition 2050, 9, :o1, 19760635, 8 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Casablanca.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Casablanca.rb new file mode 100644 index 0000000000..18d73c93a0 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Casablanca.rb @@ -0,0 +1,42 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Africa + module Casablanca + include TimezoneDefinition + + timezone 'Africa/Casablanca' do |tz| + tz.offset :o0, -1820, 0, :LMT + tz.offset :o1, 0, 0, :WET + tz.offset :o2, 0, 3600, :WEST + tz.offset :o3, 3600, 0, :CET + + tz.transition 1913, 10, :o1, 10454687371, 4320 + tz.transition 1939, 9, :o2, 4859037, 2 + tz.transition 1939, 11, :o1, 58310075, 24 + tz.transition 1940, 2, :o2, 4859369, 2 + tz.transition 1945, 11, :o1, 58362659, 24 + tz.transition 1950, 6, :o2, 4866887, 2 + tz.transition 1950, 10, :o1, 58406003, 24 + tz.transition 1967, 6, :o2, 2439645, 1 + tz.transition 1967, 9, :o1, 58554347, 24 + tz.transition 1974, 6, :o2, 141264000 + tz.transition 1974, 8, :o1, 147222000 + tz.transition 1976, 5, :o2, 199756800 + tz.transition 1976, 7, :o1, 207702000 + tz.transition 1977, 5, :o2, 231292800 + tz.transition 1977, 9, :o1, 244249200 + tz.transition 1978, 6, :o2, 265507200 + tz.transition 1978, 8, :o1, 271033200 + tz.transition 1984, 3, :o3, 448243200 + tz.transition 1985, 12, :o1, 504918000 + tz.transition 2008, 6, :o2, 1212278400 + tz.transition 2008, 8, :o1, 1220223600 + tz.transition 2009, 6, :o2, 1243814400 + tz.transition 2009, 8, :o1, 1250809200 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Harare.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Harare.rb new file mode 100644 index 0000000000..070c95ae0f --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Harare.rb @@ -0,0 +1,18 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Africa + module Harare + include TimezoneDefinition + + timezone 'Africa/Harare' do |tz| + tz.offset :o0, 7452, 0, :LMT + tz.offset :o1, 7200, 0, :CAT + + tz.transition 1903, 2, :o1, 1932939531, 800 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Johannesburg.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Johannesburg.rb new file mode 100644 index 0000000000..f0af0d8e33 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Johannesburg.rb @@ -0,0 +1,25 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Africa + module Johannesburg + include TimezoneDefinition + + timezone 'Africa/Johannesburg' do |tz| + tz.offset :o0, 6720, 0, :LMT + tz.offset :o1, 5400, 0, :SAST + tz.offset :o2, 7200, 0, :SAST + tz.offset :o3, 7200, 3600, :SAST + + tz.transition 1892, 2, :o1, 108546139, 45 + tz.transition 1903, 2, :o2, 38658791, 16 + tz.transition 1942, 9, :o3, 4861245, 2 + tz.transition 1943, 3, :o2, 58339307, 24 + tz.transition 1943, 9, :o3, 4861973, 2 + tz.transition 1944, 3, :o2, 58348043, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Monrovia.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Monrovia.rb new file mode 100644 index 0000000000..40e711fa44 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Monrovia.rb @@ -0,0 +1,22 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Africa + module Monrovia + include TimezoneDefinition + + timezone 'Africa/Monrovia' do |tz| + tz.offset :o0, -2588, 0, :LMT + tz.offset :o1, -2588, 0, :MMT + tz.offset :o2, -2670, 0, :LRT + tz.offset :o3, 0, 0, :GMT + + tz.transition 1882, 1, :o1, 52022445047, 21600 + tz.transition 1919, 3, :o2, 52315600247, 21600 + tz.transition 1972, 5, :o3, 73529070 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Nairobi.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Nairobi.rb new file mode 100644 index 0000000000..7b0a2f43be --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Nairobi.rb @@ -0,0 +1,23 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Africa + module Nairobi + include TimezoneDefinition + + timezone 'Africa/Nairobi' do |tz| + tz.offset :o0, 8836, 0, :LMT + tz.offset :o1, 10800, 0, :EAT + tz.offset :o2, 9000, 0, :BEAT + tz.offset :o3, 9885, 0, :BEAUT + + tz.transition 1928, 6, :o1, 52389253391, 21600 + tz.transition 1929, 12, :o2, 19407819, 8 + tz.transition 1939, 12, :o3, 116622211, 48 + tz.transition 1959, 12, :o1, 14036742061, 5760 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Argentina/Buenos_Aires.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Argentina/Buenos_Aires.rb new file mode 100644 index 0000000000..307f9546de --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Argentina/Buenos_Aires.rb @@ -0,0 +1,84 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Argentina + module Buenos_Aires + include TimezoneDefinition + + timezone 'America/Argentina/Buenos_Aires' do |tz| + tz.offset :o0, -14028, 0, :LMT + tz.offset :o1, -15408, 0, :CMT + tz.offset :o2, -14400, 0, :ART + tz.offset :o3, -14400, 3600, :ARST + tz.offset :o4, -10800, 0, :ART + tz.offset :o5, -10800, 3600, :ARST + + tz.transition 1894, 10, :o1, 17374555169, 7200 + tz.transition 1920, 5, :o2, 1453467407, 600 + tz.transition 1930, 12, :o3, 7278935, 3 + tz.transition 1931, 4, :o2, 19411461, 8 + tz.transition 1931, 10, :o3, 7279889, 3 + tz.transition 1932, 3, :o2, 19414141, 8 + tz.transition 1932, 11, :o3, 7281038, 3 + tz.transition 1933, 3, :o2, 19417061, 8 + tz.transition 1933, 11, :o3, 7282133, 3 + tz.transition 1934, 3, :o2, 19419981, 8 + tz.transition 1934, 11, :o3, 7283228, 3 + tz.transition 1935, 3, :o2, 19422901, 8 + tz.transition 1935, 11, :o3, 7284323, 3 + tz.transition 1936, 3, :o2, 19425829, 8 + tz.transition 1936, 11, :o3, 7285421, 3 + tz.transition 1937, 3, :o2, 19428749, 8 + tz.transition 1937, 11, :o3, 7286516, 3 + tz.transition 1938, 3, :o2, 19431669, 8 + tz.transition 1938, 11, :o3, 7287611, 3 + tz.transition 1939, 3, :o2, 19434589, 8 + tz.transition 1939, 11, :o3, 7288706, 3 + tz.transition 1940, 3, :o2, 19437517, 8 + tz.transition 1940, 7, :o3, 7289435, 3 + tz.transition 1941, 6, :o2, 19441285, 8 + tz.transition 1941, 10, :o3, 7290848, 3 + tz.transition 1943, 8, :o2, 19447501, 8 + tz.transition 1943, 10, :o3, 7293038, 3 + tz.transition 1946, 3, :o2, 19455045, 8 + tz.transition 1946, 10, :o3, 7296284, 3 + tz.transition 1963, 10, :o2, 19506429, 8 + tz.transition 1963, 12, :o3, 7315136, 3 + tz.transition 1964, 3, :o2, 19507645, 8 + tz.transition 1964, 10, :o3, 7316051, 3 + tz.transition 1965, 3, :o2, 19510565, 8 + tz.transition 1965, 10, :o3, 7317146, 3 + tz.transition 1966, 3, :o2, 19513485, 8 + tz.transition 1966, 10, :o3, 7318241, 3 + tz.transition 1967, 4, :o2, 19516661, 8 + tz.transition 1967, 10, :o3, 7319294, 3 + tz.transition 1968, 4, :o2, 19519629, 8 + tz.transition 1968, 10, :o3, 7320407, 3 + tz.transition 1969, 4, :o2, 19522541, 8 + tz.transition 1969, 10, :o4, 7321499, 3 + tz.transition 1974, 1, :o5, 128142000 + tz.transition 1974, 5, :o4, 136605600 + tz.transition 1988, 12, :o5, 596948400 + tz.transition 1989, 3, :o4, 605066400 + tz.transition 1989, 10, :o5, 624423600 + tz.transition 1990, 3, :o4, 636516000 + tz.transition 1990, 10, :o5, 656478000 + tz.transition 1991, 3, :o4, 667965600 + tz.transition 1991, 10, :o5, 687927600 + tz.transition 1992, 3, :o4, 699415200 + tz.transition 1992, 10, :o5, 719377200 + tz.transition 1993, 3, :o4, 731469600 + tz.transition 1999, 10, :o3, 938919600 + tz.transition 2000, 3, :o4, 952052400 + tz.transition 2007, 12, :o5, 1198983600 + tz.transition 2008, 3, :o4, 1205632800 + tz.transition 2008, 10, :o5, 1224385200 + tz.transition 2009, 3, :o4, 1237082400 + end + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Bogota.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Bogota.rb new file mode 100644 index 0000000000..ef96435c6a --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Bogota.rb @@ -0,0 +1,23 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Bogota + include TimezoneDefinition + + timezone 'America/Bogota' do |tz| + tz.offset :o0, -17780, 0, :LMT + tz.offset :o1, -17780, 0, :BMT + tz.offset :o2, -18000, 0, :COT + tz.offset :o3, -18000, 3600, :COST + + tz.transition 1884, 3, :o1, 10407954409, 4320 + tz.transition 1914, 11, :o2, 10456385929, 4320 + tz.transition 1992, 5, :o3, 704869200 + tz.transition 1993, 4, :o2, 733896000 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Caracas.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Caracas.rb new file mode 100644 index 0000000000..27392a540a --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Caracas.rb @@ -0,0 +1,23 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Caracas + include TimezoneDefinition + + timezone 'America/Caracas' do |tz| + tz.offset :o0, -16064, 0, :LMT + tz.offset :o1, -16060, 0, :CMT + tz.offset :o2, -16200, 0, :VET + tz.offset :o3, -14400, 0, :VET + + tz.transition 1890, 1, :o1, 1627673863, 675 + tz.transition 1912, 2, :o2, 10452001043, 4320 + tz.transition 1965, 1, :o3, 39020187, 16 + tz.transition 2007, 12, :o2, 1197183600 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chicago.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chicago.rb new file mode 100644 index 0000000000..0996857cf0 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chicago.rb @@ -0,0 +1,283 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Chicago + include TimezoneDefinition + + timezone 'America/Chicago' do |tz| + tz.offset :o0, -21036, 0, :LMT + tz.offset :o1, -21600, 0, :CST + tz.offset :o2, -21600, 3600, :CDT + tz.offset :o3, -18000, 0, :EST + tz.offset :o4, -21600, 3600, :CWT + tz.offset :o5, -21600, 3600, :CPT + + tz.transition 1883, 11, :o1, 9636533, 4 + tz.transition 1918, 3, :o2, 14530103, 6 + tz.transition 1918, 10, :o1, 58125451, 24 + tz.transition 1919, 3, :o2, 14532287, 6 + tz.transition 1919, 10, :o1, 58134187, 24 + tz.transition 1920, 6, :o2, 14534933, 6 + tz.transition 1920, 10, :o1, 58143091, 24 + tz.transition 1921, 3, :o2, 14536655, 6 + tz.transition 1921, 10, :o1, 58151827, 24 + tz.transition 1922, 4, :o2, 14539049, 6 + tz.transition 1922, 9, :o1, 58159723, 24 + tz.transition 1923, 4, :o2, 14541233, 6 + tz.transition 1923, 9, :o1, 58168627, 24 + tz.transition 1924, 4, :o2, 14543417, 6 + tz.transition 1924, 9, :o1, 58177363, 24 + tz.transition 1925, 4, :o2, 14545601, 6 + tz.transition 1925, 9, :o1, 58186099, 24 + tz.transition 1926, 4, :o2, 14547785, 6 + tz.transition 1926, 9, :o1, 58194835, 24 + tz.transition 1927, 4, :o2, 14549969, 6 + tz.transition 1927, 9, :o1, 58203571, 24 + tz.transition 1928, 4, :o2, 14552195, 6 + tz.transition 1928, 9, :o1, 58212475, 24 + tz.transition 1929, 4, :o2, 14554379, 6 + tz.transition 1929, 9, :o1, 58221211, 24 + tz.transition 1930, 4, :o2, 14556563, 6 + tz.transition 1930, 9, :o1, 58229947, 24 + tz.transition 1931, 4, :o2, 14558747, 6 + tz.transition 1931, 9, :o1, 58238683, 24 + tz.transition 1932, 4, :o2, 14560931, 6 + tz.transition 1932, 9, :o1, 58247419, 24 + tz.transition 1933, 4, :o2, 14563157, 6 + tz.transition 1933, 9, :o1, 58256155, 24 + tz.transition 1934, 4, :o2, 14565341, 6 + tz.transition 1934, 9, :o1, 58265059, 24 + tz.transition 1935, 4, :o2, 14567525, 6 + tz.transition 1935, 9, :o1, 58273795, 24 + tz.transition 1936, 3, :o3, 14569373, 6 + tz.transition 1936, 11, :o1, 58283707, 24 + tz.transition 1937, 4, :o2, 14571893, 6 + tz.transition 1937, 9, :o1, 58291267, 24 + tz.transition 1938, 4, :o2, 14574077, 6 + tz.transition 1938, 9, :o1, 58300003, 24 + tz.transition 1939, 4, :o2, 14576303, 6 + tz.transition 1939, 9, :o1, 58308739, 24 + tz.transition 1940, 4, :o2, 14578487, 6 + tz.transition 1940, 9, :o1, 58317643, 24 + tz.transition 1941, 4, :o2, 14580671, 6 + tz.transition 1941, 9, :o1, 58326379, 24 + tz.transition 1942, 2, :o4, 14582399, 6 + tz.transition 1945, 8, :o5, 58360379, 24 + tz.transition 1945, 9, :o1, 58361491, 24 + tz.transition 1946, 4, :o2, 14591633, 6 + tz.transition 1946, 9, :o1, 58370227, 24 + tz.transition 1947, 4, :o2, 14593817, 6 + tz.transition 1947, 9, :o1, 58378963, 24 + tz.transition 1948, 4, :o2, 14596001, 6 + tz.transition 1948, 9, :o1, 58387699, 24 + tz.transition 1949, 4, :o2, 14598185, 6 + tz.transition 1949, 9, :o1, 58396435, 24 + tz.transition 1950, 4, :o2, 14600411, 6 + tz.transition 1950, 9, :o1, 58405171, 24 + tz.transition 1951, 4, :o2, 14602595, 6 + tz.transition 1951, 9, :o1, 58414075, 24 + tz.transition 1952, 4, :o2, 14604779, 6 + tz.transition 1952, 9, :o1, 58422811, 24 + tz.transition 1953, 4, :o2, 14606963, 6 + tz.transition 1953, 9, :o1, 58431547, 24 + tz.transition 1954, 4, :o2, 14609147, 6 + tz.transition 1954, 9, :o1, 58440283, 24 + tz.transition 1955, 4, :o2, 14611331, 6 + tz.transition 1955, 10, :o1, 58449859, 24 + tz.transition 1956, 4, :o2, 14613557, 6 + tz.transition 1956, 10, :o1, 58458595, 24 + tz.transition 1957, 4, :o2, 14615741, 6 + tz.transition 1957, 10, :o1, 58467331, 24 + tz.transition 1958, 4, :o2, 14617925, 6 + tz.transition 1958, 10, :o1, 58476067, 24 + tz.transition 1959, 4, :o2, 14620109, 6 + tz.transition 1959, 10, :o1, 58484803, 24 + tz.transition 1960, 4, :o2, 14622293, 6 + tz.transition 1960, 10, :o1, 58493707, 24 + tz.transition 1961, 4, :o2, 14624519, 6 + tz.transition 1961, 10, :o1, 58502443, 24 + tz.transition 1962, 4, :o2, 14626703, 6 + tz.transition 1962, 10, :o1, 58511179, 24 + tz.transition 1963, 4, :o2, 14628887, 6 + tz.transition 1963, 10, :o1, 58519915, 24 + tz.transition 1964, 4, :o2, 14631071, 6 + tz.transition 1964, 10, :o1, 58528651, 24 + tz.transition 1965, 4, :o2, 14633255, 6 + tz.transition 1965, 10, :o1, 58537555, 24 + tz.transition 1966, 4, :o2, 14635439, 6 + tz.transition 1966, 10, :o1, 58546291, 24 + tz.transition 1967, 4, :o2, 14637665, 6 + tz.transition 1967, 10, :o1, 58555027, 24 + tz.transition 1968, 4, :o2, 14639849, 6 + tz.transition 1968, 10, :o1, 58563763, 24 + tz.transition 1969, 4, :o2, 14642033, 6 + tz.transition 1969, 10, :o1, 58572499, 24 + tz.transition 1970, 4, :o2, 9964800 + tz.transition 1970, 10, :o1, 25686000 + tz.transition 1971, 4, :o2, 41414400 + tz.transition 1971, 10, :o1, 57740400 + tz.transition 1972, 4, :o2, 73468800 + tz.transition 1972, 10, :o1, 89190000 + tz.transition 1973, 4, :o2, 104918400 + tz.transition 1973, 10, :o1, 120639600 + tz.transition 1974, 1, :o2, 126691200 + tz.transition 1974, 10, :o1, 152089200 + tz.transition 1975, 2, :o2, 162374400 + tz.transition 1975, 10, :o1, 183538800 + tz.transition 1976, 4, :o2, 199267200 + tz.transition 1976, 10, :o1, 215593200 + tz.transition 1977, 4, :o2, 230716800 + tz.transition 1977, 10, :o1, 247042800 + tz.transition 1978, 4, :o2, 262771200 + tz.transition 1978, 10, :o1, 278492400 + tz.transition 1979, 4, :o2, 294220800 + tz.transition 1979, 10, :o1, 309942000 + tz.transition 1980, 4, :o2, 325670400 + tz.transition 1980, 10, :o1, 341391600 + tz.transition 1981, 4, :o2, 357120000 + tz.transition 1981, 10, :o1, 372841200 + tz.transition 1982, 4, :o2, 388569600 + tz.transition 1982, 10, :o1, 404895600 + tz.transition 1983, 4, :o2, 420019200 + tz.transition 1983, 10, :o1, 436345200 + tz.transition 1984, 4, :o2, 452073600 + tz.transition 1984, 10, :o1, 467794800 + tz.transition 1985, 4, :o2, 483523200 + tz.transition 1985, 10, :o1, 499244400 + tz.transition 1986, 4, :o2, 514972800 + tz.transition 1986, 10, :o1, 530694000 + tz.transition 1987, 4, :o2, 544608000 + tz.transition 1987, 10, :o1, 562143600 + tz.transition 1988, 4, :o2, 576057600 + tz.transition 1988, 10, :o1, 594198000 + tz.transition 1989, 4, :o2, 607507200 + tz.transition 1989, 10, :o1, 625647600 + tz.transition 1990, 4, :o2, 638956800 + tz.transition 1990, 10, :o1, 657097200 + tz.transition 1991, 4, :o2, 671011200 + tz.transition 1991, 10, :o1, 688546800 + tz.transition 1992, 4, :o2, 702460800 + tz.transition 1992, 10, :o1, 719996400 + tz.transition 1993, 4, :o2, 733910400 + tz.transition 1993, 10, :o1, 752050800 + tz.transition 1994, 4, :o2, 765360000 + tz.transition 1994, 10, :o1, 783500400 + tz.transition 1995, 4, :o2, 796809600 + tz.transition 1995, 10, :o1, 814950000 + tz.transition 1996, 4, :o2, 828864000 + tz.transition 1996, 10, :o1, 846399600 + tz.transition 1997, 4, :o2, 860313600 + tz.transition 1997, 10, :o1, 877849200 + tz.transition 1998, 4, :o2, 891763200 + tz.transition 1998, 10, :o1, 909298800 + tz.transition 1999, 4, :o2, 923212800 + tz.transition 1999, 10, :o1, 941353200 + tz.transition 2000, 4, :o2, 954662400 + tz.transition 2000, 10, :o1, 972802800 + tz.transition 2001, 4, :o2, 986112000 + tz.transition 2001, 10, :o1, 1004252400 + tz.transition 2002, 4, :o2, 1018166400 + tz.transition 2002, 10, :o1, 1035702000 + tz.transition 2003, 4, :o2, 1049616000 + tz.transition 2003, 10, :o1, 1067151600 + tz.transition 2004, 4, :o2, 1081065600 + tz.transition 2004, 10, :o1, 1099206000 + tz.transition 2005, 4, :o2, 1112515200 + tz.transition 2005, 10, :o1, 1130655600 + tz.transition 2006, 4, :o2, 1143964800 + tz.transition 2006, 10, :o1, 1162105200 + tz.transition 2007, 3, :o2, 1173600000 + tz.transition 2007, 11, :o1, 1194159600 + tz.transition 2008, 3, :o2, 1205049600 + tz.transition 2008, 11, :o1, 1225609200 + tz.transition 2009, 3, :o2, 1236499200 + tz.transition 2009, 11, :o1, 1257058800 + tz.transition 2010, 3, :o2, 1268553600 + tz.transition 2010, 11, :o1, 1289113200 + tz.transition 2011, 3, :o2, 1300003200 + tz.transition 2011, 11, :o1, 1320562800 + tz.transition 2012, 3, :o2, 1331452800 + tz.transition 2012, 11, :o1, 1352012400 + tz.transition 2013, 3, :o2, 1362902400 + tz.transition 2013, 11, :o1, 1383462000 + tz.transition 2014, 3, :o2, 1394352000 + tz.transition 2014, 11, :o1, 1414911600 + tz.transition 2015, 3, :o2, 1425801600 + tz.transition 2015, 11, :o1, 1446361200 + tz.transition 2016, 3, :o2, 1457856000 + tz.transition 2016, 11, :o1, 1478415600 + tz.transition 2017, 3, :o2, 1489305600 + tz.transition 2017, 11, :o1, 1509865200 + tz.transition 2018, 3, :o2, 1520755200 + tz.transition 2018, 11, :o1, 1541314800 + tz.transition 2019, 3, :o2, 1552204800 + tz.transition 2019, 11, :o1, 1572764400 + tz.transition 2020, 3, :o2, 1583654400 + tz.transition 2020, 11, :o1, 1604214000 + tz.transition 2021, 3, :o2, 1615708800 + tz.transition 2021, 11, :o1, 1636268400 + tz.transition 2022, 3, :o2, 1647158400 + tz.transition 2022, 11, :o1, 1667718000 + tz.transition 2023, 3, :o2, 1678608000 + tz.transition 2023, 11, :o1, 1699167600 + tz.transition 2024, 3, :o2, 1710057600 + tz.transition 2024, 11, :o1, 1730617200 + tz.transition 2025, 3, :o2, 1741507200 + tz.transition 2025, 11, :o1, 1762066800 + tz.transition 2026, 3, :o2, 1772956800 + tz.transition 2026, 11, :o1, 1793516400 + tz.transition 2027, 3, :o2, 1805011200 + tz.transition 2027, 11, :o1, 1825570800 + tz.transition 2028, 3, :o2, 1836460800 + tz.transition 2028, 11, :o1, 1857020400 + tz.transition 2029, 3, :o2, 1867910400 + tz.transition 2029, 11, :o1, 1888470000 + tz.transition 2030, 3, :o2, 1899360000 + tz.transition 2030, 11, :o1, 1919919600 + tz.transition 2031, 3, :o2, 1930809600 + tz.transition 2031, 11, :o1, 1951369200 + tz.transition 2032, 3, :o2, 1962864000 + tz.transition 2032, 11, :o1, 1983423600 + tz.transition 2033, 3, :o2, 1994313600 + tz.transition 2033, 11, :o1, 2014873200 + tz.transition 2034, 3, :o2, 2025763200 + tz.transition 2034, 11, :o1, 2046322800 + tz.transition 2035, 3, :o2, 2057212800 + tz.transition 2035, 11, :o1, 2077772400 + tz.transition 2036, 3, :o2, 2088662400 + tz.transition 2036, 11, :o1, 2109222000 + tz.transition 2037, 3, :o2, 2120112000 + tz.transition 2037, 11, :o1, 2140671600 + tz.transition 2038, 3, :o2, 14792981, 6 + tz.transition 2038, 11, :o1, 59177635, 24 + tz.transition 2039, 3, :o2, 14795165, 6 + tz.transition 2039, 11, :o1, 59186371, 24 + tz.transition 2040, 3, :o2, 14797349, 6 + tz.transition 2040, 11, :o1, 59195107, 24 + tz.transition 2041, 3, :o2, 14799533, 6 + tz.transition 2041, 11, :o1, 59203843, 24 + tz.transition 2042, 3, :o2, 14801717, 6 + tz.transition 2042, 11, :o1, 59212579, 24 + tz.transition 2043, 3, :o2, 14803901, 6 + tz.transition 2043, 11, :o1, 59221315, 24 + tz.transition 2044, 3, :o2, 14806127, 6 + tz.transition 2044, 11, :o1, 59230219, 24 + tz.transition 2045, 3, :o2, 14808311, 6 + tz.transition 2045, 11, :o1, 59238955, 24 + tz.transition 2046, 3, :o2, 14810495, 6 + tz.transition 2046, 11, :o1, 59247691, 24 + tz.transition 2047, 3, :o2, 14812679, 6 + tz.transition 2047, 11, :o1, 59256427, 24 + tz.transition 2048, 3, :o2, 14814863, 6 + tz.transition 2048, 11, :o1, 59265163, 24 + tz.transition 2049, 3, :o2, 14817089, 6 + tz.transition 2049, 11, :o1, 59274067, 24 + tz.transition 2050, 3, :o2, 14819273, 6 + tz.transition 2050, 11, :o1, 59282803, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chihuahua.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chihuahua.rb new file mode 100644 index 0000000000..1710b57c79 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chihuahua.rb @@ -0,0 +1,136 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Chihuahua + include TimezoneDefinition + + timezone 'America/Chihuahua' do |tz| + tz.offset :o0, -25460, 0, :LMT + tz.offset :o1, -25200, 0, :MST + tz.offset :o2, -21600, 0, :CST + tz.offset :o3, -21600, 3600, :CDT + tz.offset :o4, -25200, 3600, :MDT + + tz.transition 1922, 1, :o1, 58153339, 24 + tz.transition 1927, 6, :o2, 9700171, 4 + tz.transition 1930, 11, :o1, 9705183, 4 + tz.transition 1931, 5, :o2, 9705855, 4 + tz.transition 1931, 10, :o1, 9706463, 4 + tz.transition 1932, 4, :o2, 58243171, 24 + tz.transition 1996, 4, :o3, 828864000 + tz.transition 1996, 10, :o2, 846399600 + tz.transition 1997, 4, :o3, 860313600 + tz.transition 1997, 10, :o2, 877849200 + tz.transition 1998, 4, :o4, 891766800 + tz.transition 1998, 10, :o1, 909302400 + tz.transition 1999, 4, :o4, 923216400 + tz.transition 1999, 10, :o1, 941356800 + tz.transition 2000, 4, :o4, 954666000 + tz.transition 2000, 10, :o1, 972806400 + tz.transition 2001, 5, :o4, 989139600 + tz.transition 2001, 9, :o1, 1001836800 + tz.transition 2002, 4, :o4, 1018170000 + tz.transition 2002, 10, :o1, 1035705600 + tz.transition 2003, 4, :o4, 1049619600 + tz.transition 2003, 10, :o1, 1067155200 + tz.transition 2004, 4, :o4, 1081069200 + tz.transition 2004, 10, :o1, 1099209600 + tz.transition 2005, 4, :o4, 1112518800 + tz.transition 2005, 10, :o1, 1130659200 + tz.transition 2006, 4, :o4, 1143968400 + tz.transition 2006, 10, :o1, 1162108800 + tz.transition 2007, 4, :o4, 1175418000 + tz.transition 2007, 10, :o1, 1193558400 + tz.transition 2008, 4, :o4, 1207472400 + tz.transition 2008, 10, :o1, 1225008000 + tz.transition 2009, 4, :o4, 1238922000 + tz.transition 2009, 10, :o1, 1256457600 + tz.transition 2010, 4, :o4, 1270371600 + tz.transition 2010, 10, :o1, 1288512000 + tz.transition 2011, 4, :o4, 1301821200 + tz.transition 2011, 10, :o1, 1319961600 + tz.transition 2012, 4, :o4, 1333270800 + tz.transition 2012, 10, :o1, 1351411200 + tz.transition 2013, 4, :o4, 1365325200 + tz.transition 2013, 10, :o1, 1382860800 + tz.transition 2014, 4, :o4, 1396774800 + tz.transition 2014, 10, :o1, 1414310400 + tz.transition 2015, 4, :o4, 1428224400 + tz.transition 2015, 10, :o1, 1445760000 + tz.transition 2016, 4, :o4, 1459674000 + tz.transition 2016, 10, :o1, 1477814400 + tz.transition 2017, 4, :o4, 1491123600 + tz.transition 2017, 10, :o1, 1509264000 + tz.transition 2018, 4, :o4, 1522573200 + tz.transition 2018, 10, :o1, 1540713600 + tz.transition 2019, 4, :o4, 1554627600 + tz.transition 2019, 10, :o1, 1572163200 + tz.transition 2020, 4, :o4, 1586077200 + tz.transition 2020, 10, :o1, 1603612800 + tz.transition 2021, 4, :o4, 1617526800 + tz.transition 2021, 10, :o1, 1635667200 + tz.transition 2022, 4, :o4, 1648976400 + tz.transition 2022, 10, :o1, 1667116800 + tz.transition 2023, 4, :o4, 1680426000 + tz.transition 2023, 10, :o1, 1698566400 + tz.transition 2024, 4, :o4, 1712480400 + tz.transition 2024, 10, :o1, 1730016000 + tz.transition 2025, 4, :o4, 1743930000 + tz.transition 2025, 10, :o1, 1761465600 + tz.transition 2026, 4, :o4, 1775379600 + tz.transition 2026, 10, :o1, 1792915200 + tz.transition 2027, 4, :o4, 1806829200 + tz.transition 2027, 10, :o1, 1824969600 + tz.transition 2028, 4, :o4, 1838278800 + tz.transition 2028, 10, :o1, 1856419200 + tz.transition 2029, 4, :o4, 1869728400 + tz.transition 2029, 10, :o1, 1887868800 + tz.transition 2030, 4, :o4, 1901782800 + tz.transition 2030, 10, :o1, 1919318400 + tz.transition 2031, 4, :o4, 1933232400 + tz.transition 2031, 10, :o1, 1950768000 + tz.transition 2032, 4, :o4, 1964682000 + tz.transition 2032, 10, :o1, 1982822400 + tz.transition 2033, 4, :o4, 1996131600 + tz.transition 2033, 10, :o1, 2014272000 + tz.transition 2034, 4, :o4, 2027581200 + tz.transition 2034, 10, :o1, 2045721600 + tz.transition 2035, 4, :o4, 2059030800 + tz.transition 2035, 10, :o1, 2077171200 + tz.transition 2036, 4, :o4, 2091085200 + tz.transition 2036, 10, :o1, 2108620800 + tz.transition 2037, 4, :o4, 2122534800 + tz.transition 2037, 10, :o1, 2140070400 + tz.transition 2038, 4, :o4, 19724143, 8 + tz.transition 2038, 10, :o1, 14794367, 6 + tz.transition 2039, 4, :o4, 19727055, 8 + tz.transition 2039, 10, :o1, 14796551, 6 + tz.transition 2040, 4, :o4, 19729967, 8 + tz.transition 2040, 10, :o1, 14798735, 6 + tz.transition 2041, 4, :o4, 19732935, 8 + tz.transition 2041, 10, :o1, 14800919, 6 + tz.transition 2042, 4, :o4, 19735847, 8 + tz.transition 2042, 10, :o1, 14803103, 6 + tz.transition 2043, 4, :o4, 19738759, 8 + tz.transition 2043, 10, :o1, 14805287, 6 + tz.transition 2044, 4, :o4, 19741671, 8 + tz.transition 2044, 10, :o1, 14807513, 6 + tz.transition 2045, 4, :o4, 19744583, 8 + tz.transition 2045, 10, :o1, 14809697, 6 + tz.transition 2046, 4, :o4, 19747495, 8 + tz.transition 2046, 10, :o1, 14811881, 6 + tz.transition 2047, 4, :o4, 19750463, 8 + tz.transition 2047, 10, :o1, 14814065, 6 + tz.transition 2048, 4, :o4, 19753375, 8 + tz.transition 2048, 10, :o1, 14816249, 6 + tz.transition 2049, 4, :o4, 19756287, 8 + tz.transition 2049, 10, :o1, 14818475, 6 + tz.transition 2050, 4, :o4, 19759199, 8 + tz.transition 2050, 10, :o1, 14820659, 6 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Denver.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Denver.rb new file mode 100644 index 0000000000..1c1efb5ff3 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Denver.rb @@ -0,0 +1,204 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Denver + include TimezoneDefinition + + timezone 'America/Denver' do |tz| + tz.offset :o0, -25196, 0, :LMT + tz.offset :o1, -25200, 0, :MST + tz.offset :o2, -25200, 3600, :MDT + tz.offset :o3, -25200, 3600, :MWT + tz.offset :o4, -25200, 3600, :MPT + + tz.transition 1883, 11, :o1, 57819199, 24 + tz.transition 1918, 3, :o2, 19373471, 8 + tz.transition 1918, 10, :o1, 14531363, 6 + tz.transition 1919, 3, :o2, 19376383, 8 + tz.transition 1919, 10, :o1, 14533547, 6 + tz.transition 1920, 3, :o2, 19379295, 8 + tz.transition 1920, 10, :o1, 14535773, 6 + tz.transition 1921, 3, :o2, 19382207, 8 + tz.transition 1921, 5, :o1, 14536991, 6 + tz.transition 1942, 2, :o3, 19443199, 8 + tz.transition 1945, 8, :o4, 58360379, 24 + tz.transition 1945, 9, :o1, 14590373, 6 + tz.transition 1965, 4, :o2, 19511007, 8 + tz.transition 1965, 10, :o1, 14634389, 6 + tz.transition 1966, 4, :o2, 19513919, 8 + tz.transition 1966, 10, :o1, 14636573, 6 + tz.transition 1967, 4, :o2, 19516887, 8 + tz.transition 1967, 10, :o1, 14638757, 6 + tz.transition 1968, 4, :o2, 19519799, 8 + tz.transition 1968, 10, :o1, 14640941, 6 + tz.transition 1969, 4, :o2, 19522711, 8 + tz.transition 1969, 10, :o1, 14643125, 6 + tz.transition 1970, 4, :o2, 9968400 + tz.transition 1970, 10, :o1, 25689600 + tz.transition 1971, 4, :o2, 41418000 + tz.transition 1971, 10, :o1, 57744000 + tz.transition 1972, 4, :o2, 73472400 + tz.transition 1972, 10, :o1, 89193600 + tz.transition 1973, 4, :o2, 104922000 + tz.transition 1973, 10, :o1, 120643200 + tz.transition 1974, 1, :o2, 126694800 + tz.transition 1974, 10, :o1, 152092800 + tz.transition 1975, 2, :o2, 162378000 + tz.transition 1975, 10, :o1, 183542400 + tz.transition 1976, 4, :o2, 199270800 + tz.transition 1976, 10, :o1, 215596800 + tz.transition 1977, 4, :o2, 230720400 + tz.transition 1977, 10, :o1, 247046400 + tz.transition 1978, 4, :o2, 262774800 + tz.transition 1978, 10, :o1, 278496000 + tz.transition 1979, 4, :o2, 294224400 + tz.transition 1979, 10, :o1, 309945600 + tz.transition 1980, 4, :o2, 325674000 + tz.transition 1980, 10, :o1, 341395200 + tz.transition 1981, 4, :o2, 357123600 + tz.transition 1981, 10, :o1, 372844800 + tz.transition 1982, 4, :o2, 388573200 + tz.transition 1982, 10, :o1, 404899200 + tz.transition 1983, 4, :o2, 420022800 + tz.transition 1983, 10, :o1, 436348800 + tz.transition 1984, 4, :o2, 452077200 + tz.transition 1984, 10, :o1, 467798400 + tz.transition 1985, 4, :o2, 483526800 + tz.transition 1985, 10, :o1, 499248000 + tz.transition 1986, 4, :o2, 514976400 + tz.transition 1986, 10, :o1, 530697600 + tz.transition 1987, 4, :o2, 544611600 + tz.transition 1987, 10, :o1, 562147200 + tz.transition 1988, 4, :o2, 576061200 + tz.transition 1988, 10, :o1, 594201600 + tz.transition 1989, 4, :o2, 607510800 + tz.transition 1989, 10, :o1, 625651200 + tz.transition 1990, 4, :o2, 638960400 + tz.transition 1990, 10, :o1, 657100800 + tz.transition 1991, 4, :o2, 671014800 + tz.transition 1991, 10, :o1, 688550400 + tz.transition 1992, 4, :o2, 702464400 + tz.transition 1992, 10, :o1, 720000000 + tz.transition 1993, 4, :o2, 733914000 + tz.transition 1993, 10, :o1, 752054400 + tz.transition 1994, 4, :o2, 765363600 + tz.transition 1994, 10, :o1, 783504000 + tz.transition 1995, 4, :o2, 796813200 + tz.transition 1995, 10, :o1, 814953600 + tz.transition 1996, 4, :o2, 828867600 + tz.transition 1996, 10, :o1, 846403200 + tz.transition 1997, 4, :o2, 860317200 + tz.transition 1997, 10, :o1, 877852800 + tz.transition 1998, 4, :o2, 891766800 + tz.transition 1998, 10, :o1, 909302400 + tz.transition 1999, 4, :o2, 923216400 + tz.transition 1999, 10, :o1, 941356800 + tz.transition 2000, 4, :o2, 954666000 + tz.transition 2000, 10, :o1, 972806400 + tz.transition 2001, 4, :o2, 986115600 + tz.transition 2001, 10, :o1, 1004256000 + tz.transition 2002, 4, :o2, 1018170000 + tz.transition 2002, 10, :o1, 1035705600 + tz.transition 2003, 4, :o2, 1049619600 + tz.transition 2003, 10, :o1, 1067155200 + tz.transition 2004, 4, :o2, 1081069200 + tz.transition 2004, 10, :o1, 1099209600 + tz.transition 2005, 4, :o2, 1112518800 + tz.transition 2005, 10, :o1, 1130659200 + tz.transition 2006, 4, :o2, 1143968400 + tz.transition 2006, 10, :o1, 1162108800 + tz.transition 2007, 3, :o2, 1173603600 + tz.transition 2007, 11, :o1, 1194163200 + tz.transition 2008, 3, :o2, 1205053200 + tz.transition 2008, 11, :o1, 1225612800 + tz.transition 2009, 3, :o2, 1236502800 + tz.transition 2009, 11, :o1, 1257062400 + tz.transition 2010, 3, :o2, 1268557200 + tz.transition 2010, 11, :o1, 1289116800 + tz.transition 2011, 3, :o2, 1300006800 + tz.transition 2011, 11, :o1, 1320566400 + tz.transition 2012, 3, :o2, 1331456400 + tz.transition 2012, 11, :o1, 1352016000 + tz.transition 2013, 3, :o2, 1362906000 + tz.transition 2013, 11, :o1, 1383465600 + tz.transition 2014, 3, :o2, 1394355600 + tz.transition 2014, 11, :o1, 1414915200 + tz.transition 2015, 3, :o2, 1425805200 + tz.transition 2015, 11, :o1, 1446364800 + tz.transition 2016, 3, :o2, 1457859600 + tz.transition 2016, 11, :o1, 1478419200 + tz.transition 2017, 3, :o2, 1489309200 + tz.transition 2017, 11, :o1, 1509868800 + tz.transition 2018, 3, :o2, 1520758800 + tz.transition 2018, 11, :o1, 1541318400 + tz.transition 2019, 3, :o2, 1552208400 + tz.transition 2019, 11, :o1, 1572768000 + tz.transition 2020, 3, :o2, 1583658000 + tz.transition 2020, 11, :o1, 1604217600 + tz.transition 2021, 3, :o2, 1615712400 + tz.transition 2021, 11, :o1, 1636272000 + tz.transition 2022, 3, :o2, 1647162000 + tz.transition 2022, 11, :o1, 1667721600 + tz.transition 2023, 3, :o2, 1678611600 + tz.transition 2023, 11, :o1, 1699171200 + tz.transition 2024, 3, :o2, 1710061200 + tz.transition 2024, 11, :o1, 1730620800 + tz.transition 2025, 3, :o2, 1741510800 + tz.transition 2025, 11, :o1, 1762070400 + tz.transition 2026, 3, :o2, 1772960400 + tz.transition 2026, 11, :o1, 1793520000 + tz.transition 2027, 3, :o2, 1805014800 + tz.transition 2027, 11, :o1, 1825574400 + tz.transition 2028, 3, :o2, 1836464400 + tz.transition 2028, 11, :o1, 1857024000 + tz.transition 2029, 3, :o2, 1867914000 + tz.transition 2029, 11, :o1, 1888473600 + tz.transition 2030, 3, :o2, 1899363600 + tz.transition 2030, 11, :o1, 1919923200 + tz.transition 2031, 3, :o2, 1930813200 + tz.transition 2031, 11, :o1, 1951372800 + tz.transition 2032, 3, :o2, 1962867600 + tz.transition 2032, 11, :o1, 1983427200 + tz.transition 2033, 3, :o2, 1994317200 + tz.transition 2033, 11, :o1, 2014876800 + tz.transition 2034, 3, :o2, 2025766800 + tz.transition 2034, 11, :o1, 2046326400 + tz.transition 2035, 3, :o2, 2057216400 + tz.transition 2035, 11, :o1, 2077776000 + tz.transition 2036, 3, :o2, 2088666000 + tz.transition 2036, 11, :o1, 2109225600 + tz.transition 2037, 3, :o2, 2120115600 + tz.transition 2037, 11, :o1, 2140675200 + tz.transition 2038, 3, :o2, 19723975, 8 + tz.transition 2038, 11, :o1, 14794409, 6 + tz.transition 2039, 3, :o2, 19726887, 8 + tz.transition 2039, 11, :o1, 14796593, 6 + tz.transition 2040, 3, :o2, 19729799, 8 + tz.transition 2040, 11, :o1, 14798777, 6 + tz.transition 2041, 3, :o2, 19732711, 8 + tz.transition 2041, 11, :o1, 14800961, 6 + tz.transition 2042, 3, :o2, 19735623, 8 + tz.transition 2042, 11, :o1, 14803145, 6 + tz.transition 2043, 3, :o2, 19738535, 8 + tz.transition 2043, 11, :o1, 14805329, 6 + tz.transition 2044, 3, :o2, 19741503, 8 + tz.transition 2044, 11, :o1, 14807555, 6 + tz.transition 2045, 3, :o2, 19744415, 8 + tz.transition 2045, 11, :o1, 14809739, 6 + tz.transition 2046, 3, :o2, 19747327, 8 + tz.transition 2046, 11, :o1, 14811923, 6 + tz.transition 2047, 3, :o2, 19750239, 8 + tz.transition 2047, 11, :o1, 14814107, 6 + tz.transition 2048, 3, :o2, 19753151, 8 + tz.transition 2048, 11, :o1, 14816291, 6 + tz.transition 2049, 3, :o2, 19756119, 8 + tz.transition 2049, 11, :o1, 14818517, 6 + tz.transition 2050, 3, :o2, 19759031, 8 + tz.transition 2050, 11, :o1, 14820701, 6 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Godthab.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Godthab.rb new file mode 100644 index 0000000000..1e05518b0d --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Godthab.rb @@ -0,0 +1,161 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Godthab + include TimezoneDefinition + + timezone 'America/Godthab' do |tz| + tz.offset :o0, -12416, 0, :LMT + tz.offset :o1, -10800, 0, :WGT + tz.offset :o2, -10800, 3600, :WGST + + tz.transition 1916, 7, :o1, 3268448069, 1350 + tz.transition 1980, 4, :o2, 323845200 + tz.transition 1980, 9, :o1, 338950800 + tz.transition 1981, 3, :o2, 354675600 + tz.transition 1981, 9, :o1, 370400400 + tz.transition 1982, 3, :o2, 386125200 + tz.transition 1982, 9, :o1, 401850000 + tz.transition 1983, 3, :o2, 417574800 + tz.transition 1983, 9, :o1, 433299600 + tz.transition 1984, 3, :o2, 449024400 + tz.transition 1984, 9, :o1, 465354000 + tz.transition 1985, 3, :o2, 481078800 + tz.transition 1985, 9, :o1, 496803600 + tz.transition 1986, 3, :o2, 512528400 + tz.transition 1986, 9, :o1, 528253200 + tz.transition 1987, 3, :o2, 543978000 + tz.transition 1987, 9, :o1, 559702800 + tz.transition 1988, 3, :o2, 575427600 + tz.transition 1988, 9, :o1, 591152400 + tz.transition 1989, 3, :o2, 606877200 + tz.transition 1989, 9, :o1, 622602000 + tz.transition 1990, 3, :o2, 638326800 + tz.transition 1990, 9, :o1, 654656400 + tz.transition 1991, 3, :o2, 670381200 + tz.transition 1991, 9, :o1, 686106000 + tz.transition 1992, 3, :o2, 701830800 + tz.transition 1992, 9, :o1, 717555600 + tz.transition 1993, 3, :o2, 733280400 + tz.transition 1993, 9, :o1, 749005200 + tz.transition 1994, 3, :o2, 764730000 + tz.transition 1994, 9, :o1, 780454800 + tz.transition 1995, 3, :o2, 796179600 + tz.transition 1995, 9, :o1, 811904400 + tz.transition 1996, 3, :o2, 828234000 + tz.transition 1996, 10, :o1, 846378000 + tz.transition 1997, 3, :o2, 859683600 + tz.transition 1997, 10, :o1, 877827600 + tz.transition 1998, 3, :o2, 891133200 + tz.transition 1998, 10, :o1, 909277200 + tz.transition 1999, 3, :o2, 922582800 + tz.transition 1999, 10, :o1, 941331600 + tz.transition 2000, 3, :o2, 954032400 + tz.transition 2000, 10, :o1, 972781200 + tz.transition 2001, 3, :o2, 985482000 + tz.transition 2001, 10, :o1, 1004230800 + tz.transition 2002, 3, :o2, 1017536400 + tz.transition 2002, 10, :o1, 1035680400 + tz.transition 2003, 3, :o2, 1048986000 + tz.transition 2003, 10, :o1, 1067130000 + tz.transition 2004, 3, :o2, 1080435600 + tz.transition 2004, 10, :o1, 1099184400 + tz.transition 2005, 3, :o2, 1111885200 + tz.transition 2005, 10, :o1, 1130634000 + tz.transition 2006, 3, :o2, 1143334800 + tz.transition 2006, 10, :o1, 1162083600 + tz.transition 2007, 3, :o2, 1174784400 + tz.transition 2007, 10, :o1, 1193533200 + tz.transition 2008, 3, :o2, 1206838800 + tz.transition 2008, 10, :o1, 1224982800 + tz.transition 2009, 3, :o2, 1238288400 + tz.transition 2009, 10, :o1, 1256432400 + tz.transition 2010, 3, :o2, 1269738000 + tz.transition 2010, 10, :o1, 1288486800 + tz.transition 2011, 3, :o2, 1301187600 + tz.transition 2011, 10, :o1, 1319936400 + tz.transition 2012, 3, :o2, 1332637200 + tz.transition 2012, 10, :o1, 1351386000 + tz.transition 2013, 3, :o2, 1364691600 + tz.transition 2013, 10, :o1, 1382835600 + tz.transition 2014, 3, :o2, 1396141200 + tz.transition 2014, 10, :o1, 1414285200 + tz.transition 2015, 3, :o2, 1427590800 + tz.transition 2015, 10, :o1, 1445734800 + tz.transition 2016, 3, :o2, 1459040400 + tz.transition 2016, 10, :o1, 1477789200 + tz.transition 2017, 3, :o2, 1490490000 + tz.transition 2017, 10, :o1, 1509238800 + tz.transition 2018, 3, :o2, 1521939600 + tz.transition 2018, 10, :o1, 1540688400 + tz.transition 2019, 3, :o2, 1553994000 + tz.transition 2019, 10, :o1, 1572138000 + tz.transition 2020, 3, :o2, 1585443600 + tz.transition 2020, 10, :o1, 1603587600 + tz.transition 2021, 3, :o2, 1616893200 + tz.transition 2021, 10, :o1, 1635642000 + tz.transition 2022, 3, :o2, 1648342800 + tz.transition 2022, 10, :o1, 1667091600 + tz.transition 2023, 3, :o2, 1679792400 + tz.transition 2023, 10, :o1, 1698541200 + tz.transition 2024, 3, :o2, 1711846800 + tz.transition 2024, 10, :o1, 1729990800 + tz.transition 2025, 3, :o2, 1743296400 + tz.transition 2025, 10, :o1, 1761440400 + tz.transition 2026, 3, :o2, 1774746000 + tz.transition 2026, 10, :o1, 1792890000 + tz.transition 2027, 3, :o2, 1806195600 + tz.transition 2027, 10, :o1, 1824944400 + tz.transition 2028, 3, :o2, 1837645200 + tz.transition 2028, 10, :o1, 1856394000 + tz.transition 2029, 3, :o2, 1869094800 + tz.transition 2029, 10, :o1, 1887843600 + tz.transition 2030, 3, :o2, 1901149200 + tz.transition 2030, 10, :o1, 1919293200 + tz.transition 2031, 3, :o2, 1932598800 + tz.transition 2031, 10, :o1, 1950742800 + tz.transition 2032, 3, :o2, 1964048400 + tz.transition 2032, 10, :o1, 1982797200 + tz.transition 2033, 3, :o2, 1995498000 + tz.transition 2033, 10, :o1, 2014246800 + tz.transition 2034, 3, :o2, 2026947600 + tz.transition 2034, 10, :o1, 2045696400 + tz.transition 2035, 3, :o2, 2058397200 + tz.transition 2035, 10, :o1, 2077146000 + tz.transition 2036, 3, :o2, 2090451600 + tz.transition 2036, 10, :o1, 2108595600 + tz.transition 2037, 3, :o2, 2121901200 + tz.transition 2037, 10, :o1, 2140045200 + tz.transition 2038, 3, :o2, 59172253, 24 + tz.transition 2038, 10, :o1, 59177461, 24 + tz.transition 2039, 3, :o2, 59180989, 24 + tz.transition 2039, 10, :o1, 59186197, 24 + tz.transition 2040, 3, :o2, 59189725, 24 + tz.transition 2040, 10, :o1, 59194933, 24 + tz.transition 2041, 3, :o2, 59198629, 24 + tz.transition 2041, 10, :o1, 59203669, 24 + tz.transition 2042, 3, :o2, 59207365, 24 + tz.transition 2042, 10, :o1, 59212405, 24 + tz.transition 2043, 3, :o2, 59216101, 24 + tz.transition 2043, 10, :o1, 59221141, 24 + tz.transition 2044, 3, :o2, 59224837, 24 + tz.transition 2044, 10, :o1, 59230045, 24 + tz.transition 2045, 3, :o2, 59233573, 24 + tz.transition 2045, 10, :o1, 59238781, 24 + tz.transition 2046, 3, :o2, 59242309, 24 + tz.transition 2046, 10, :o1, 59247517, 24 + tz.transition 2047, 3, :o2, 59251213, 24 + tz.transition 2047, 10, :o1, 59256253, 24 + tz.transition 2048, 3, :o2, 59259949, 24 + tz.transition 2048, 10, :o1, 59264989, 24 + tz.transition 2049, 3, :o2, 59268685, 24 + tz.transition 2049, 10, :o1, 59273893, 24 + tz.transition 2050, 3, :o2, 59277421, 24 + tz.transition 2050, 10, :o1, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guatemala.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guatemala.rb new file mode 100644 index 0000000000..a2bf73401c --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guatemala.rb @@ -0,0 +1,27 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Guatemala + include TimezoneDefinition + + timezone 'America/Guatemala' do |tz| + tz.offset :o0, -21724, 0, :LMT + tz.offset :o1, -21600, 0, :CST + tz.offset :o2, -21600, 3600, :CDT + + tz.transition 1918, 10, :o1, 52312429831, 21600 + tz.transition 1973, 11, :o2, 123055200 + tz.transition 1974, 2, :o1, 130914000 + tz.transition 1983, 5, :o2, 422344800 + tz.transition 1983, 9, :o1, 433054800 + tz.transition 1991, 3, :o2, 669708000 + tz.transition 1991, 9, :o1, 684219600 + tz.transition 2006, 4, :o2, 1146376800 + tz.transition 2006, 10, :o1, 1159678800 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guyana.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guyana.rb new file mode 100644 index 0000000000..fccca4ceb4 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guyana.rb @@ -0,0 +1,24 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Guyana + include TimezoneDefinition + + timezone 'America/Guyana' do |tz| + tz.offset :o0, -13960, 0, :LMT + tz.offset :o1, -13500, 0, :GBGT + tz.offset :o2, -13500, 0, :GYT + tz.offset :o3, -10800, 0, :GYT + tz.offset :o4, -14400, 0, :GYT + + tz.transition 1915, 3, :o1, 5228404549, 2160 + tz.transition 1966, 5, :o2, 78056693, 32 + tz.transition 1975, 7, :o3, 176010300 + tz.transition 1991, 1, :o4, 662698800 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Halifax.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Halifax.rb new file mode 100644 index 0000000000..d25ae775b3 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Halifax.rb @@ -0,0 +1,274 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Halifax + include TimezoneDefinition + + timezone 'America/Halifax' do |tz| + tz.offset :o0, -15264, 0, :LMT + tz.offset :o1, -14400, 0, :AST + tz.offset :o2, -14400, 3600, :ADT + tz.offset :o3, -14400, 3600, :AWT + tz.offset :o4, -14400, 3600, :APT + + tz.transition 1902, 6, :o1, 724774703, 300 + tz.transition 1916, 4, :o2, 7262864, 3 + tz.transition 1916, 10, :o1, 19369101, 8 + tz.transition 1918, 4, :o2, 9686791, 4 + tz.transition 1918, 10, :o1, 58125545, 24 + tz.transition 1920, 5, :o2, 7267361, 3 + tz.transition 1920, 8, :o1, 19380525, 8 + tz.transition 1921, 5, :o2, 7268447, 3 + tz.transition 1921, 9, :o1, 19383501, 8 + tz.transition 1922, 4, :o2, 7269524, 3 + tz.transition 1922, 9, :o1, 19386421, 8 + tz.transition 1923, 5, :o2, 7270637, 3 + tz.transition 1923, 9, :o1, 19389333, 8 + tz.transition 1924, 5, :o2, 7271729, 3 + tz.transition 1924, 9, :o1, 19392349, 8 + tz.transition 1925, 5, :o2, 7272821, 3 + tz.transition 1925, 9, :o1, 19395373, 8 + tz.transition 1926, 5, :o2, 7273955, 3 + tz.transition 1926, 9, :o1, 19398173, 8 + tz.transition 1927, 5, :o2, 7275005, 3 + tz.transition 1927, 9, :o1, 19401197, 8 + tz.transition 1928, 5, :o2, 7276139, 3 + tz.transition 1928, 9, :o1, 19403989, 8 + tz.transition 1929, 5, :o2, 7277231, 3 + tz.transition 1929, 9, :o1, 19406861, 8 + tz.transition 1930, 5, :o2, 7278323, 3 + tz.transition 1930, 9, :o1, 19409877, 8 + tz.transition 1931, 5, :o2, 7279415, 3 + tz.transition 1931, 9, :o1, 19412901, 8 + tz.transition 1932, 5, :o2, 7280486, 3 + tz.transition 1932, 9, :o1, 19415813, 8 + tz.transition 1933, 4, :o2, 7281578, 3 + tz.transition 1933, 10, :o1, 19418781, 8 + tz.transition 1934, 5, :o2, 7282733, 3 + tz.transition 1934, 9, :o1, 19421573, 8 + tz.transition 1935, 6, :o2, 7283867, 3 + tz.transition 1935, 9, :o1, 19424605, 8 + tz.transition 1936, 6, :o2, 7284962, 3 + tz.transition 1936, 9, :o1, 19427405, 8 + tz.transition 1937, 5, :o2, 7285967, 3 + tz.transition 1937, 9, :o1, 19430429, 8 + tz.transition 1938, 5, :o2, 7287059, 3 + tz.transition 1938, 9, :o1, 19433341, 8 + tz.transition 1939, 5, :o2, 7288235, 3 + tz.transition 1939, 9, :o1, 19436253, 8 + tz.transition 1940, 5, :o2, 7289264, 3 + tz.transition 1940, 9, :o1, 19439221, 8 + tz.transition 1941, 5, :o2, 7290356, 3 + tz.transition 1941, 9, :o1, 19442133, 8 + tz.transition 1942, 2, :o3, 9721599, 4 + tz.transition 1945, 8, :o4, 58360379, 24 + tz.transition 1945, 9, :o1, 58361489, 24 + tz.transition 1946, 4, :o2, 9727755, 4 + tz.transition 1946, 9, :o1, 58370225, 24 + tz.transition 1947, 4, :o2, 9729211, 4 + tz.transition 1947, 9, :o1, 58378961, 24 + tz.transition 1948, 4, :o2, 9730667, 4 + tz.transition 1948, 9, :o1, 58387697, 24 + tz.transition 1949, 4, :o2, 9732123, 4 + tz.transition 1949, 9, :o1, 58396433, 24 + tz.transition 1951, 4, :o2, 9735063, 4 + tz.transition 1951, 9, :o1, 58414073, 24 + tz.transition 1952, 4, :o2, 9736519, 4 + tz.transition 1952, 9, :o1, 58422809, 24 + tz.transition 1953, 4, :o2, 9737975, 4 + tz.transition 1953, 9, :o1, 58431545, 24 + tz.transition 1954, 4, :o2, 9739431, 4 + tz.transition 1954, 9, :o1, 58440281, 24 + tz.transition 1956, 4, :o2, 9742371, 4 + tz.transition 1956, 9, :o1, 58457921, 24 + tz.transition 1957, 4, :o2, 9743827, 4 + tz.transition 1957, 9, :o1, 58466657, 24 + tz.transition 1958, 4, :o2, 9745283, 4 + tz.transition 1958, 9, :o1, 58475393, 24 + tz.transition 1959, 4, :o2, 9746739, 4 + tz.transition 1959, 9, :o1, 58484129, 24 + tz.transition 1962, 4, :o2, 9751135, 4 + tz.transition 1962, 10, :o1, 58511177, 24 + tz.transition 1963, 4, :o2, 9752591, 4 + tz.transition 1963, 10, :o1, 58519913, 24 + tz.transition 1964, 4, :o2, 9754047, 4 + tz.transition 1964, 10, :o1, 58528649, 24 + tz.transition 1965, 4, :o2, 9755503, 4 + tz.transition 1965, 10, :o1, 58537553, 24 + tz.transition 1966, 4, :o2, 9756959, 4 + tz.transition 1966, 10, :o1, 58546289, 24 + tz.transition 1967, 4, :o2, 9758443, 4 + tz.transition 1967, 10, :o1, 58555025, 24 + tz.transition 1968, 4, :o2, 9759899, 4 + tz.transition 1968, 10, :o1, 58563761, 24 + tz.transition 1969, 4, :o2, 9761355, 4 + tz.transition 1969, 10, :o1, 58572497, 24 + tz.transition 1970, 4, :o2, 9957600 + tz.transition 1970, 10, :o1, 25678800 + tz.transition 1971, 4, :o2, 41407200 + tz.transition 1971, 10, :o1, 57733200 + tz.transition 1972, 4, :o2, 73461600 + tz.transition 1972, 10, :o1, 89182800 + tz.transition 1973, 4, :o2, 104911200 + tz.transition 1973, 10, :o1, 120632400 + tz.transition 1974, 4, :o2, 136360800 + tz.transition 1974, 10, :o1, 152082000 + tz.transition 1975, 4, :o2, 167810400 + tz.transition 1975, 10, :o1, 183531600 + tz.transition 1976, 4, :o2, 199260000 + tz.transition 1976, 10, :o1, 215586000 + tz.transition 1977, 4, :o2, 230709600 + tz.transition 1977, 10, :o1, 247035600 + tz.transition 1978, 4, :o2, 262764000 + tz.transition 1978, 10, :o1, 278485200 + tz.transition 1979, 4, :o2, 294213600 + tz.transition 1979, 10, :o1, 309934800 + tz.transition 1980, 4, :o2, 325663200 + tz.transition 1980, 10, :o1, 341384400 + tz.transition 1981, 4, :o2, 357112800 + tz.transition 1981, 10, :o1, 372834000 + tz.transition 1982, 4, :o2, 388562400 + tz.transition 1982, 10, :o1, 404888400 + tz.transition 1983, 4, :o2, 420012000 + tz.transition 1983, 10, :o1, 436338000 + tz.transition 1984, 4, :o2, 452066400 + tz.transition 1984, 10, :o1, 467787600 + tz.transition 1985, 4, :o2, 483516000 + tz.transition 1985, 10, :o1, 499237200 + tz.transition 1986, 4, :o2, 514965600 + tz.transition 1986, 10, :o1, 530686800 + tz.transition 1987, 4, :o2, 544600800 + tz.transition 1987, 10, :o1, 562136400 + tz.transition 1988, 4, :o2, 576050400 + tz.transition 1988, 10, :o1, 594190800 + tz.transition 1989, 4, :o2, 607500000 + tz.transition 1989, 10, :o1, 625640400 + tz.transition 1990, 4, :o2, 638949600 + tz.transition 1990, 10, :o1, 657090000 + tz.transition 1991, 4, :o2, 671004000 + tz.transition 1991, 10, :o1, 688539600 + tz.transition 1992, 4, :o2, 702453600 + tz.transition 1992, 10, :o1, 719989200 + tz.transition 1993, 4, :o2, 733903200 + tz.transition 1993, 10, :o1, 752043600 + tz.transition 1994, 4, :o2, 765352800 + tz.transition 1994, 10, :o1, 783493200 + tz.transition 1995, 4, :o2, 796802400 + tz.transition 1995, 10, :o1, 814942800 + tz.transition 1996, 4, :o2, 828856800 + tz.transition 1996, 10, :o1, 846392400 + tz.transition 1997, 4, :o2, 860306400 + tz.transition 1997, 10, :o1, 877842000 + tz.transition 1998, 4, :o2, 891756000 + tz.transition 1998, 10, :o1, 909291600 + tz.transition 1999, 4, :o2, 923205600 + tz.transition 1999, 10, :o1, 941346000 + tz.transition 2000, 4, :o2, 954655200 + tz.transition 2000, 10, :o1, 972795600 + tz.transition 2001, 4, :o2, 986104800 + tz.transition 2001, 10, :o1, 1004245200 + tz.transition 2002, 4, :o2, 1018159200 + tz.transition 2002, 10, :o1, 1035694800 + tz.transition 2003, 4, :o2, 1049608800 + tz.transition 2003, 10, :o1, 1067144400 + tz.transition 2004, 4, :o2, 1081058400 + tz.transition 2004, 10, :o1, 1099198800 + tz.transition 2005, 4, :o2, 1112508000 + tz.transition 2005, 10, :o1, 1130648400 + tz.transition 2006, 4, :o2, 1143957600 + tz.transition 2006, 10, :o1, 1162098000 + tz.transition 2007, 3, :o2, 1173592800 + tz.transition 2007, 11, :o1, 1194152400 + tz.transition 2008, 3, :o2, 1205042400 + tz.transition 2008, 11, :o1, 1225602000 + tz.transition 2009, 3, :o2, 1236492000 + tz.transition 2009, 11, :o1, 1257051600 + tz.transition 2010, 3, :o2, 1268546400 + tz.transition 2010, 11, :o1, 1289106000 + tz.transition 2011, 3, :o2, 1299996000 + tz.transition 2011, 11, :o1, 1320555600 + tz.transition 2012, 3, :o2, 1331445600 + tz.transition 2012, 11, :o1, 1352005200 + tz.transition 2013, 3, :o2, 1362895200 + tz.transition 2013, 11, :o1, 1383454800 + tz.transition 2014, 3, :o2, 1394344800 + tz.transition 2014, 11, :o1, 1414904400 + tz.transition 2015, 3, :o2, 1425794400 + tz.transition 2015, 11, :o1, 1446354000 + tz.transition 2016, 3, :o2, 1457848800 + tz.transition 2016, 11, :o1, 1478408400 + tz.transition 2017, 3, :o2, 1489298400 + tz.transition 2017, 11, :o1, 1509858000 + tz.transition 2018, 3, :o2, 1520748000 + tz.transition 2018, 11, :o1, 1541307600 + tz.transition 2019, 3, :o2, 1552197600 + tz.transition 2019, 11, :o1, 1572757200 + tz.transition 2020, 3, :o2, 1583647200 + tz.transition 2020, 11, :o1, 1604206800 + tz.transition 2021, 3, :o2, 1615701600 + tz.transition 2021, 11, :o1, 1636261200 + tz.transition 2022, 3, :o2, 1647151200 + tz.transition 2022, 11, :o1, 1667710800 + tz.transition 2023, 3, :o2, 1678600800 + tz.transition 2023, 11, :o1, 1699160400 + tz.transition 2024, 3, :o2, 1710050400 + tz.transition 2024, 11, :o1, 1730610000 + tz.transition 2025, 3, :o2, 1741500000 + tz.transition 2025, 11, :o1, 1762059600 + tz.transition 2026, 3, :o2, 1772949600 + tz.transition 2026, 11, :o1, 1793509200 + tz.transition 2027, 3, :o2, 1805004000 + tz.transition 2027, 11, :o1, 1825563600 + tz.transition 2028, 3, :o2, 1836453600 + tz.transition 2028, 11, :o1, 1857013200 + tz.transition 2029, 3, :o2, 1867903200 + tz.transition 2029, 11, :o1, 1888462800 + tz.transition 2030, 3, :o2, 1899352800 + tz.transition 2030, 11, :o1, 1919912400 + tz.transition 2031, 3, :o2, 1930802400 + tz.transition 2031, 11, :o1, 1951362000 + tz.transition 2032, 3, :o2, 1962856800 + tz.transition 2032, 11, :o1, 1983416400 + tz.transition 2033, 3, :o2, 1994306400 + tz.transition 2033, 11, :o1, 2014866000 + tz.transition 2034, 3, :o2, 2025756000 + tz.transition 2034, 11, :o1, 2046315600 + tz.transition 2035, 3, :o2, 2057205600 + tz.transition 2035, 11, :o1, 2077765200 + tz.transition 2036, 3, :o2, 2088655200 + tz.transition 2036, 11, :o1, 2109214800 + tz.transition 2037, 3, :o2, 2120104800 + tz.transition 2037, 11, :o1, 2140664400 + tz.transition 2038, 3, :o2, 9861987, 4 + tz.transition 2038, 11, :o1, 59177633, 24 + tz.transition 2039, 3, :o2, 9863443, 4 + tz.transition 2039, 11, :o1, 59186369, 24 + tz.transition 2040, 3, :o2, 9864899, 4 + tz.transition 2040, 11, :o1, 59195105, 24 + tz.transition 2041, 3, :o2, 9866355, 4 + tz.transition 2041, 11, :o1, 59203841, 24 + tz.transition 2042, 3, :o2, 9867811, 4 + tz.transition 2042, 11, :o1, 59212577, 24 + tz.transition 2043, 3, :o2, 9869267, 4 + tz.transition 2043, 11, :o1, 59221313, 24 + tz.transition 2044, 3, :o2, 9870751, 4 + tz.transition 2044, 11, :o1, 59230217, 24 + tz.transition 2045, 3, :o2, 9872207, 4 + tz.transition 2045, 11, :o1, 59238953, 24 + tz.transition 2046, 3, :o2, 9873663, 4 + tz.transition 2046, 11, :o1, 59247689, 24 + tz.transition 2047, 3, :o2, 9875119, 4 + tz.transition 2047, 11, :o1, 59256425, 24 + tz.transition 2048, 3, :o2, 9876575, 4 + tz.transition 2048, 11, :o1, 59265161, 24 + tz.transition 2049, 3, :o2, 9878059, 4 + tz.transition 2049, 11, :o1, 59274065, 24 + tz.transition 2050, 3, :o2, 9879515, 4 + tz.transition 2050, 11, :o1, 59282801, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Indiana/Indianapolis.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Indiana/Indianapolis.rb new file mode 100644 index 0000000000..f1430f6c24 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Indiana/Indianapolis.rb @@ -0,0 +1,149 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Indiana + module Indianapolis + include TimezoneDefinition + + timezone 'America/Indiana/Indianapolis' do |tz| + tz.offset :o0, -20678, 0, :LMT + tz.offset :o1, -21600, 0, :CST + tz.offset :o2, -21600, 3600, :CDT + tz.offset :o3, -21600, 3600, :CWT + tz.offset :o4, -21600, 3600, :CPT + tz.offset :o5, -18000, 0, :EST + tz.offset :o6, -18000, 3600, :EDT + + tz.transition 1883, 11, :o1, 9636533, 4 + tz.transition 1918, 3, :o2, 14530103, 6 + tz.transition 1918, 10, :o1, 58125451, 24 + tz.transition 1919, 3, :o2, 14532287, 6 + tz.transition 1919, 10, :o1, 58134187, 24 + tz.transition 1941, 6, :o2, 14581007, 6 + tz.transition 1941, 9, :o1, 58326379, 24 + tz.transition 1942, 2, :o3, 14582399, 6 + tz.transition 1945, 8, :o4, 58360379, 24 + tz.transition 1945, 9, :o1, 58361491, 24 + tz.transition 1946, 4, :o2, 14591633, 6 + tz.transition 1946, 9, :o1, 58370227, 24 + tz.transition 1947, 4, :o2, 14593817, 6 + tz.transition 1947, 9, :o1, 58378963, 24 + tz.transition 1948, 4, :o2, 14596001, 6 + tz.transition 1948, 9, :o1, 58387699, 24 + tz.transition 1949, 4, :o2, 14598185, 6 + tz.transition 1949, 9, :o1, 58396435, 24 + tz.transition 1950, 4, :o2, 14600411, 6 + tz.transition 1950, 9, :o1, 58405171, 24 + tz.transition 1951, 4, :o2, 14602595, 6 + tz.transition 1951, 9, :o1, 58414075, 24 + tz.transition 1952, 4, :o2, 14604779, 6 + tz.transition 1952, 9, :o1, 58422811, 24 + tz.transition 1953, 4, :o2, 14606963, 6 + tz.transition 1953, 9, :o1, 58431547, 24 + tz.transition 1954, 4, :o2, 14609147, 6 + tz.transition 1954, 9, :o1, 58440283, 24 + tz.transition 1955, 4, :o5, 14611331, 6 + tz.transition 1957, 9, :o1, 58466659, 24 + tz.transition 1958, 4, :o5, 14617925, 6 + tz.transition 1969, 4, :o6, 58568131, 24 + tz.transition 1969, 10, :o5, 9762083, 4 + tz.transition 1970, 4, :o6, 9961200 + tz.transition 1970, 10, :o5, 25682400 + tz.transition 2006, 4, :o6, 1143961200 + tz.transition 2006, 10, :o5, 1162101600 + tz.transition 2007, 3, :o6, 1173596400 + tz.transition 2007, 11, :o5, 1194156000 + tz.transition 2008, 3, :o6, 1205046000 + tz.transition 2008, 11, :o5, 1225605600 + tz.transition 2009, 3, :o6, 1236495600 + tz.transition 2009, 11, :o5, 1257055200 + tz.transition 2010, 3, :o6, 1268550000 + tz.transition 2010, 11, :o5, 1289109600 + tz.transition 2011, 3, :o6, 1299999600 + tz.transition 2011, 11, :o5, 1320559200 + tz.transition 2012, 3, :o6, 1331449200 + tz.transition 2012, 11, :o5, 1352008800 + tz.transition 2013, 3, :o6, 1362898800 + tz.transition 2013, 11, :o5, 1383458400 + tz.transition 2014, 3, :o6, 1394348400 + tz.transition 2014, 11, :o5, 1414908000 + tz.transition 2015, 3, :o6, 1425798000 + tz.transition 2015, 11, :o5, 1446357600 + tz.transition 2016, 3, :o6, 1457852400 + tz.transition 2016, 11, :o5, 1478412000 + tz.transition 2017, 3, :o6, 1489302000 + tz.transition 2017, 11, :o5, 1509861600 + tz.transition 2018, 3, :o6, 1520751600 + tz.transition 2018, 11, :o5, 1541311200 + tz.transition 2019, 3, :o6, 1552201200 + tz.transition 2019, 11, :o5, 1572760800 + tz.transition 2020, 3, :o6, 1583650800 + tz.transition 2020, 11, :o5, 1604210400 + tz.transition 2021, 3, :o6, 1615705200 + tz.transition 2021, 11, :o5, 1636264800 + tz.transition 2022, 3, :o6, 1647154800 + tz.transition 2022, 11, :o5, 1667714400 + tz.transition 2023, 3, :o6, 1678604400 + tz.transition 2023, 11, :o5, 1699164000 + tz.transition 2024, 3, :o6, 1710054000 + tz.transition 2024, 11, :o5, 1730613600 + tz.transition 2025, 3, :o6, 1741503600 + tz.transition 2025, 11, :o5, 1762063200 + tz.transition 2026, 3, :o6, 1772953200 + tz.transition 2026, 11, :o5, 1793512800 + tz.transition 2027, 3, :o6, 1805007600 + tz.transition 2027, 11, :o5, 1825567200 + tz.transition 2028, 3, :o6, 1836457200 + tz.transition 2028, 11, :o5, 1857016800 + tz.transition 2029, 3, :o6, 1867906800 + tz.transition 2029, 11, :o5, 1888466400 + tz.transition 2030, 3, :o6, 1899356400 + tz.transition 2030, 11, :o5, 1919916000 + tz.transition 2031, 3, :o6, 1930806000 + tz.transition 2031, 11, :o5, 1951365600 + tz.transition 2032, 3, :o6, 1962860400 + tz.transition 2032, 11, :o5, 1983420000 + tz.transition 2033, 3, :o6, 1994310000 + tz.transition 2033, 11, :o5, 2014869600 + tz.transition 2034, 3, :o6, 2025759600 + tz.transition 2034, 11, :o5, 2046319200 + tz.transition 2035, 3, :o6, 2057209200 + tz.transition 2035, 11, :o5, 2077768800 + tz.transition 2036, 3, :o6, 2088658800 + tz.transition 2036, 11, :o5, 2109218400 + tz.transition 2037, 3, :o6, 2120108400 + tz.transition 2037, 11, :o5, 2140668000 + tz.transition 2038, 3, :o6, 59171923, 24 + tz.transition 2038, 11, :o5, 9862939, 4 + tz.transition 2039, 3, :o6, 59180659, 24 + tz.transition 2039, 11, :o5, 9864395, 4 + tz.transition 2040, 3, :o6, 59189395, 24 + tz.transition 2040, 11, :o5, 9865851, 4 + tz.transition 2041, 3, :o6, 59198131, 24 + tz.transition 2041, 11, :o5, 9867307, 4 + tz.transition 2042, 3, :o6, 59206867, 24 + tz.transition 2042, 11, :o5, 9868763, 4 + tz.transition 2043, 3, :o6, 59215603, 24 + tz.transition 2043, 11, :o5, 9870219, 4 + tz.transition 2044, 3, :o6, 59224507, 24 + tz.transition 2044, 11, :o5, 9871703, 4 + tz.transition 2045, 3, :o6, 59233243, 24 + tz.transition 2045, 11, :o5, 9873159, 4 + tz.transition 2046, 3, :o6, 59241979, 24 + tz.transition 2046, 11, :o5, 9874615, 4 + tz.transition 2047, 3, :o6, 59250715, 24 + tz.transition 2047, 11, :o5, 9876071, 4 + tz.transition 2048, 3, :o6, 59259451, 24 + tz.transition 2048, 11, :o5, 9877527, 4 + tz.transition 2049, 3, :o6, 59268355, 24 + tz.transition 2049, 11, :o5, 9879011, 4 + tz.transition 2050, 3, :o6, 59277091, 24 + tz.transition 2050, 11, :o5, 9880467, 4 + end + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Juneau.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Juneau.rb new file mode 100644 index 0000000000..f646f3f54a --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Juneau.rb @@ -0,0 +1,194 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Juneau + include TimezoneDefinition + + timezone 'America/Juneau' do |tz| + tz.offset :o0, 54139, 0, :LMT + tz.offset :o1, -32261, 0, :LMT + tz.offset :o2, -28800, 0, :PST + tz.offset :o3, -28800, 3600, :PWT + tz.offset :o4, -28800, 3600, :PPT + tz.offset :o5, -28800, 3600, :PDT + tz.offset :o6, -32400, 0, :YST + tz.offset :o7, -32400, 0, :AKST + tz.offset :o8, -32400, 3600, :AKDT + + tz.transition 1867, 10, :o1, 207641393861, 86400 + tz.transition 1900, 8, :o2, 208677805061, 86400 + tz.transition 1942, 2, :o3, 29164799, 12 + tz.transition 1945, 8, :o4, 58360379, 24 + tz.transition 1945, 9, :o2, 19453831, 8 + tz.transition 1969, 4, :o5, 29284067, 12 + tz.transition 1969, 10, :o2, 19524167, 8 + tz.transition 1970, 4, :o5, 9972000 + tz.transition 1970, 10, :o2, 25693200 + tz.transition 1971, 4, :o5, 41421600 + tz.transition 1971, 10, :o2, 57747600 + tz.transition 1972, 4, :o5, 73476000 + tz.transition 1972, 10, :o2, 89197200 + tz.transition 1973, 4, :o5, 104925600 + tz.transition 1973, 10, :o2, 120646800 + tz.transition 1974, 1, :o5, 126698400 + tz.transition 1974, 10, :o2, 152096400 + tz.transition 1975, 2, :o5, 162381600 + tz.transition 1975, 10, :o2, 183546000 + tz.transition 1976, 4, :o5, 199274400 + tz.transition 1976, 10, :o2, 215600400 + tz.transition 1977, 4, :o5, 230724000 + tz.transition 1977, 10, :o2, 247050000 + tz.transition 1978, 4, :o5, 262778400 + tz.transition 1978, 10, :o2, 278499600 + tz.transition 1979, 4, :o5, 294228000 + tz.transition 1979, 10, :o2, 309949200 + tz.transition 1980, 4, :o5, 325677600 + tz.transition 1980, 10, :o2, 341398800 + tz.transition 1981, 4, :o5, 357127200 + tz.transition 1981, 10, :o2, 372848400 + tz.transition 1982, 4, :o5, 388576800 + tz.transition 1982, 10, :o2, 404902800 + tz.transition 1983, 4, :o5, 420026400 + tz.transition 1983, 10, :o6, 436352400 + tz.transition 1983, 11, :o7, 439030800 + tz.transition 1984, 4, :o8, 452084400 + tz.transition 1984, 10, :o7, 467805600 + tz.transition 1985, 4, :o8, 483534000 + tz.transition 1985, 10, :o7, 499255200 + tz.transition 1986, 4, :o8, 514983600 + tz.transition 1986, 10, :o7, 530704800 + tz.transition 1987, 4, :o8, 544618800 + tz.transition 1987, 10, :o7, 562154400 + tz.transition 1988, 4, :o8, 576068400 + tz.transition 1988, 10, :o7, 594208800 + tz.transition 1989, 4, :o8, 607518000 + tz.transition 1989, 10, :o7, 625658400 + tz.transition 1990, 4, :o8, 638967600 + tz.transition 1990, 10, :o7, 657108000 + tz.transition 1991, 4, :o8, 671022000 + tz.transition 1991, 10, :o7, 688557600 + tz.transition 1992, 4, :o8, 702471600 + tz.transition 1992, 10, :o7, 720007200 + tz.transition 1993, 4, :o8, 733921200 + tz.transition 1993, 10, :o7, 752061600 + tz.transition 1994, 4, :o8, 765370800 + tz.transition 1994, 10, :o7, 783511200 + tz.transition 1995, 4, :o8, 796820400 + tz.transition 1995, 10, :o7, 814960800 + tz.transition 1996, 4, :o8, 828874800 + tz.transition 1996, 10, :o7, 846410400 + tz.transition 1997, 4, :o8, 860324400 + tz.transition 1997, 10, :o7, 877860000 + tz.transition 1998, 4, :o8, 891774000 + tz.transition 1998, 10, :o7, 909309600 + tz.transition 1999, 4, :o8, 923223600 + tz.transition 1999, 10, :o7, 941364000 + tz.transition 2000, 4, :o8, 954673200 + tz.transition 2000, 10, :o7, 972813600 + tz.transition 2001, 4, :o8, 986122800 + tz.transition 2001, 10, :o7, 1004263200 + tz.transition 2002, 4, :o8, 1018177200 + tz.transition 2002, 10, :o7, 1035712800 + tz.transition 2003, 4, :o8, 1049626800 + tz.transition 2003, 10, :o7, 1067162400 + tz.transition 2004, 4, :o8, 1081076400 + tz.transition 2004, 10, :o7, 1099216800 + tz.transition 2005, 4, :o8, 1112526000 + tz.transition 2005, 10, :o7, 1130666400 + tz.transition 2006, 4, :o8, 1143975600 + tz.transition 2006, 10, :o7, 1162116000 + tz.transition 2007, 3, :o8, 1173610800 + tz.transition 2007, 11, :o7, 1194170400 + tz.transition 2008, 3, :o8, 1205060400 + tz.transition 2008, 11, :o7, 1225620000 + tz.transition 2009, 3, :o8, 1236510000 + tz.transition 2009, 11, :o7, 1257069600 + tz.transition 2010, 3, :o8, 1268564400 + tz.transition 2010, 11, :o7, 1289124000 + tz.transition 2011, 3, :o8, 1300014000 + tz.transition 2011, 11, :o7, 1320573600 + tz.transition 2012, 3, :o8, 1331463600 + tz.transition 2012, 11, :o7, 1352023200 + tz.transition 2013, 3, :o8, 1362913200 + tz.transition 2013, 11, :o7, 1383472800 + tz.transition 2014, 3, :o8, 1394362800 + tz.transition 2014, 11, :o7, 1414922400 + tz.transition 2015, 3, :o8, 1425812400 + tz.transition 2015, 11, :o7, 1446372000 + tz.transition 2016, 3, :o8, 1457866800 + tz.transition 2016, 11, :o7, 1478426400 + tz.transition 2017, 3, :o8, 1489316400 + tz.transition 2017, 11, :o7, 1509876000 + tz.transition 2018, 3, :o8, 1520766000 + tz.transition 2018, 11, :o7, 1541325600 + tz.transition 2019, 3, :o8, 1552215600 + tz.transition 2019, 11, :o7, 1572775200 + tz.transition 2020, 3, :o8, 1583665200 + tz.transition 2020, 11, :o7, 1604224800 + tz.transition 2021, 3, :o8, 1615719600 + tz.transition 2021, 11, :o7, 1636279200 + tz.transition 2022, 3, :o8, 1647169200 + tz.transition 2022, 11, :o7, 1667728800 + tz.transition 2023, 3, :o8, 1678618800 + tz.transition 2023, 11, :o7, 1699178400 + tz.transition 2024, 3, :o8, 1710068400 + tz.transition 2024, 11, :o7, 1730628000 + tz.transition 2025, 3, :o8, 1741518000 + tz.transition 2025, 11, :o7, 1762077600 + tz.transition 2026, 3, :o8, 1772967600 + tz.transition 2026, 11, :o7, 1793527200 + tz.transition 2027, 3, :o8, 1805022000 + tz.transition 2027, 11, :o7, 1825581600 + tz.transition 2028, 3, :o8, 1836471600 + tz.transition 2028, 11, :o7, 1857031200 + tz.transition 2029, 3, :o8, 1867921200 + tz.transition 2029, 11, :o7, 1888480800 + tz.transition 2030, 3, :o8, 1899370800 + tz.transition 2030, 11, :o7, 1919930400 + tz.transition 2031, 3, :o8, 1930820400 + tz.transition 2031, 11, :o7, 1951380000 + tz.transition 2032, 3, :o8, 1962874800 + tz.transition 2032, 11, :o7, 1983434400 + tz.transition 2033, 3, :o8, 1994324400 + tz.transition 2033, 11, :o7, 2014884000 + tz.transition 2034, 3, :o8, 2025774000 + tz.transition 2034, 11, :o7, 2046333600 + tz.transition 2035, 3, :o8, 2057223600 + tz.transition 2035, 11, :o7, 2077783200 + tz.transition 2036, 3, :o8, 2088673200 + tz.transition 2036, 11, :o7, 2109232800 + tz.transition 2037, 3, :o8, 2120122800 + tz.transition 2037, 11, :o7, 2140682400 + tz.transition 2038, 3, :o8, 59171927, 24 + tz.transition 2038, 11, :o7, 29588819, 12 + tz.transition 2039, 3, :o8, 59180663, 24 + tz.transition 2039, 11, :o7, 29593187, 12 + tz.transition 2040, 3, :o8, 59189399, 24 + tz.transition 2040, 11, :o7, 29597555, 12 + tz.transition 2041, 3, :o8, 59198135, 24 + tz.transition 2041, 11, :o7, 29601923, 12 + tz.transition 2042, 3, :o8, 59206871, 24 + tz.transition 2042, 11, :o7, 29606291, 12 + tz.transition 2043, 3, :o8, 59215607, 24 + tz.transition 2043, 11, :o7, 29610659, 12 + tz.transition 2044, 3, :o8, 59224511, 24 + tz.transition 2044, 11, :o7, 29615111, 12 + tz.transition 2045, 3, :o8, 59233247, 24 + tz.transition 2045, 11, :o7, 29619479, 12 + tz.transition 2046, 3, :o8, 59241983, 24 + tz.transition 2046, 11, :o7, 29623847, 12 + tz.transition 2047, 3, :o8, 59250719, 24 + tz.transition 2047, 11, :o7, 29628215, 12 + tz.transition 2048, 3, :o8, 59259455, 24 + tz.transition 2048, 11, :o7, 29632583, 12 + tz.transition 2049, 3, :o8, 59268359, 24 + tz.transition 2049, 11, :o7, 29637035, 12 + tz.transition 2050, 3, :o8, 59277095, 24 + tz.transition 2050, 11, :o7, 29641403, 12 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/La_Paz.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/La_Paz.rb new file mode 100644 index 0000000000..45c907899f --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/La_Paz.rb @@ -0,0 +1,22 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module La_Paz + include TimezoneDefinition + + timezone 'America/La_Paz' do |tz| + tz.offset :o0, -16356, 0, :LMT + tz.offset :o1, -16356, 0, :CMT + tz.offset :o2, -16356, 3600, :BOST + tz.offset :o3, -14400, 0, :BOT + + tz.transition 1890, 1, :o1, 17361854563, 7200 + tz.transition 1931, 10, :o2, 17471733763, 7200 + tz.transition 1932, 3, :o3, 17472871063, 7200 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Lima.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Lima.rb new file mode 100644 index 0000000000..af68ac29f7 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Lima.rb @@ -0,0 +1,35 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Lima + include TimezoneDefinition + + timezone 'America/Lima' do |tz| + tz.offset :o0, -18492, 0, :LMT + tz.offset :o1, -18516, 0, :LMT + tz.offset :o2, -18000, 0, :PET + tz.offset :o3, -18000, 3600, :PEST + + tz.transition 1890, 1, :o1, 17361854741, 7200 + tz.transition 1908, 7, :o2, 17410685143, 7200 + tz.transition 1938, 1, :o3, 58293593, 24 + tz.transition 1938, 4, :o2, 7286969, 3 + tz.transition 1938, 9, :o3, 58300001, 24 + tz.transition 1939, 3, :o2, 7288046, 3 + tz.transition 1939, 9, :o3, 58308737, 24 + tz.transition 1940, 3, :o2, 7289138, 3 + tz.transition 1986, 1, :o3, 504939600 + tz.transition 1986, 4, :o2, 512712000 + tz.transition 1987, 1, :o3, 536475600 + tz.transition 1987, 4, :o2, 544248000 + tz.transition 1990, 1, :o3, 631170000 + tz.transition 1990, 4, :o2, 638942400 + tz.transition 1994, 1, :o3, 757400400 + tz.transition 1994, 4, :o2, 765172800 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Los_Angeles.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Los_Angeles.rb new file mode 100644 index 0000000000..16007fd675 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Los_Angeles.rb @@ -0,0 +1,232 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Los_Angeles + include TimezoneDefinition + + timezone 'America/Los_Angeles' do |tz| + tz.offset :o0, -28378, 0, :LMT + tz.offset :o1, -28800, 0, :PST + tz.offset :o2, -28800, 3600, :PDT + tz.offset :o3, -28800, 3600, :PWT + tz.offset :o4, -28800, 3600, :PPT + + tz.transition 1883, 11, :o1, 7227400, 3 + tz.transition 1918, 3, :o2, 29060207, 12 + tz.transition 1918, 10, :o1, 19375151, 8 + tz.transition 1919, 3, :o2, 29064575, 12 + tz.transition 1919, 10, :o1, 19378063, 8 + tz.transition 1942, 2, :o3, 29164799, 12 + tz.transition 1945, 8, :o4, 58360379, 24 + tz.transition 1945, 9, :o1, 19453831, 8 + tz.transition 1948, 3, :o2, 29191499, 12 + tz.transition 1949, 1, :o1, 19463343, 8 + tz.transition 1950, 4, :o2, 29200823, 12 + tz.transition 1950, 9, :o1, 19468391, 8 + tz.transition 1951, 4, :o2, 29205191, 12 + tz.transition 1951, 9, :o1, 19471359, 8 + tz.transition 1952, 4, :o2, 29209559, 12 + tz.transition 1952, 9, :o1, 19474271, 8 + tz.transition 1953, 4, :o2, 29213927, 12 + tz.transition 1953, 9, :o1, 19477183, 8 + tz.transition 1954, 4, :o2, 29218295, 12 + tz.transition 1954, 9, :o1, 19480095, 8 + tz.transition 1955, 4, :o2, 29222663, 12 + tz.transition 1955, 9, :o1, 19483007, 8 + tz.transition 1956, 4, :o2, 29227115, 12 + tz.transition 1956, 9, :o1, 19485975, 8 + tz.transition 1957, 4, :o2, 29231483, 12 + tz.transition 1957, 9, :o1, 19488887, 8 + tz.transition 1958, 4, :o2, 29235851, 12 + tz.transition 1958, 9, :o1, 19491799, 8 + tz.transition 1959, 4, :o2, 29240219, 12 + tz.transition 1959, 9, :o1, 19494711, 8 + tz.transition 1960, 4, :o2, 29244587, 12 + tz.transition 1960, 9, :o1, 19497623, 8 + tz.transition 1961, 4, :o2, 29249039, 12 + tz.transition 1961, 9, :o1, 19500535, 8 + tz.transition 1962, 4, :o2, 29253407, 12 + tz.transition 1962, 10, :o1, 19503727, 8 + tz.transition 1963, 4, :o2, 29257775, 12 + tz.transition 1963, 10, :o1, 19506639, 8 + tz.transition 1964, 4, :o2, 29262143, 12 + tz.transition 1964, 10, :o1, 19509551, 8 + tz.transition 1965, 4, :o2, 29266511, 12 + tz.transition 1965, 10, :o1, 19512519, 8 + tz.transition 1966, 4, :o2, 29270879, 12 + tz.transition 1966, 10, :o1, 19515431, 8 + tz.transition 1967, 4, :o2, 29275331, 12 + tz.transition 1967, 10, :o1, 19518343, 8 + tz.transition 1968, 4, :o2, 29279699, 12 + tz.transition 1968, 10, :o1, 19521255, 8 + tz.transition 1969, 4, :o2, 29284067, 12 + tz.transition 1969, 10, :o1, 19524167, 8 + tz.transition 1970, 4, :o2, 9972000 + tz.transition 1970, 10, :o1, 25693200 + tz.transition 1971, 4, :o2, 41421600 + tz.transition 1971, 10, :o1, 57747600 + tz.transition 1972, 4, :o2, 73476000 + tz.transition 1972, 10, :o1, 89197200 + tz.transition 1973, 4, :o2, 104925600 + tz.transition 1973, 10, :o1, 120646800 + tz.transition 1974, 1, :o2, 126698400 + tz.transition 1974, 10, :o1, 152096400 + tz.transition 1975, 2, :o2, 162381600 + tz.transition 1975, 10, :o1, 183546000 + tz.transition 1976, 4, :o2, 199274400 + tz.transition 1976, 10, :o1, 215600400 + tz.transition 1977, 4, :o2, 230724000 + tz.transition 1977, 10, :o1, 247050000 + tz.transition 1978, 4, :o2, 262778400 + tz.transition 1978, 10, :o1, 278499600 + tz.transition 1979, 4, :o2, 294228000 + tz.transition 1979, 10, :o1, 309949200 + tz.transition 1980, 4, :o2, 325677600 + tz.transition 1980, 10, :o1, 341398800 + tz.transition 1981, 4, :o2, 357127200 + tz.transition 1981, 10, :o1, 372848400 + tz.transition 1982, 4, :o2, 388576800 + tz.transition 1982, 10, :o1, 404902800 + tz.transition 1983, 4, :o2, 420026400 + tz.transition 1983, 10, :o1, 436352400 + tz.transition 1984, 4, :o2, 452080800 + tz.transition 1984, 10, :o1, 467802000 + tz.transition 1985, 4, :o2, 483530400 + tz.transition 1985, 10, :o1, 499251600 + tz.transition 1986, 4, :o2, 514980000 + tz.transition 1986, 10, :o1, 530701200 + tz.transition 1987, 4, :o2, 544615200 + tz.transition 1987, 10, :o1, 562150800 + tz.transition 1988, 4, :o2, 576064800 + tz.transition 1988, 10, :o1, 594205200 + tz.transition 1989, 4, :o2, 607514400 + tz.transition 1989, 10, :o1, 625654800 + tz.transition 1990, 4, :o2, 638964000 + tz.transition 1990, 10, :o1, 657104400 + tz.transition 1991, 4, :o2, 671018400 + tz.transition 1991, 10, :o1, 688554000 + tz.transition 1992, 4, :o2, 702468000 + tz.transition 1992, 10, :o1, 720003600 + tz.transition 1993, 4, :o2, 733917600 + tz.transition 1993, 10, :o1, 752058000 + tz.transition 1994, 4, :o2, 765367200 + tz.transition 1994, 10, :o1, 783507600 + tz.transition 1995, 4, :o2, 796816800 + tz.transition 1995, 10, :o1, 814957200 + tz.transition 1996, 4, :o2, 828871200 + tz.transition 1996, 10, :o1, 846406800 + tz.transition 1997, 4, :o2, 860320800 + tz.transition 1997, 10, :o1, 877856400 + tz.transition 1998, 4, :o2, 891770400 + tz.transition 1998, 10, :o1, 909306000 + tz.transition 1999, 4, :o2, 923220000 + tz.transition 1999, 10, :o1, 941360400 + tz.transition 2000, 4, :o2, 954669600 + tz.transition 2000, 10, :o1, 972810000 + tz.transition 2001, 4, :o2, 986119200 + tz.transition 2001, 10, :o1, 1004259600 + tz.transition 2002, 4, :o2, 1018173600 + tz.transition 2002, 10, :o1, 1035709200 + tz.transition 2003, 4, :o2, 1049623200 + tz.transition 2003, 10, :o1, 1067158800 + tz.transition 2004, 4, :o2, 1081072800 + tz.transition 2004, 10, :o1, 1099213200 + tz.transition 2005, 4, :o2, 1112522400 + tz.transition 2005, 10, :o1, 1130662800 + tz.transition 2006, 4, :o2, 1143972000 + tz.transition 2006, 10, :o1, 1162112400 + tz.transition 2007, 3, :o2, 1173607200 + tz.transition 2007, 11, :o1, 1194166800 + tz.transition 2008, 3, :o2, 1205056800 + tz.transition 2008, 11, :o1, 1225616400 + tz.transition 2009, 3, :o2, 1236506400 + tz.transition 2009, 11, :o1, 1257066000 + tz.transition 2010, 3, :o2, 1268560800 + tz.transition 2010, 11, :o1, 1289120400 + tz.transition 2011, 3, :o2, 1300010400 + tz.transition 2011, 11, :o1, 1320570000 + tz.transition 2012, 3, :o2, 1331460000 + tz.transition 2012, 11, :o1, 1352019600 + tz.transition 2013, 3, :o2, 1362909600 + tz.transition 2013, 11, :o1, 1383469200 + tz.transition 2014, 3, :o2, 1394359200 + tz.transition 2014, 11, :o1, 1414918800 + tz.transition 2015, 3, :o2, 1425808800 + tz.transition 2015, 11, :o1, 1446368400 + tz.transition 2016, 3, :o2, 1457863200 + tz.transition 2016, 11, :o1, 1478422800 + tz.transition 2017, 3, :o2, 1489312800 + tz.transition 2017, 11, :o1, 1509872400 + tz.transition 2018, 3, :o2, 1520762400 + tz.transition 2018, 11, :o1, 1541322000 + tz.transition 2019, 3, :o2, 1552212000 + tz.transition 2019, 11, :o1, 1572771600 + tz.transition 2020, 3, :o2, 1583661600 + tz.transition 2020, 11, :o1, 1604221200 + tz.transition 2021, 3, :o2, 1615716000 + tz.transition 2021, 11, :o1, 1636275600 + tz.transition 2022, 3, :o2, 1647165600 + tz.transition 2022, 11, :o1, 1667725200 + tz.transition 2023, 3, :o2, 1678615200 + tz.transition 2023, 11, :o1, 1699174800 + tz.transition 2024, 3, :o2, 1710064800 + tz.transition 2024, 11, :o1, 1730624400 + tz.transition 2025, 3, :o2, 1741514400 + tz.transition 2025, 11, :o1, 1762074000 + tz.transition 2026, 3, :o2, 1772964000 + tz.transition 2026, 11, :o1, 1793523600 + tz.transition 2027, 3, :o2, 1805018400 + tz.transition 2027, 11, :o1, 1825578000 + tz.transition 2028, 3, :o2, 1836468000 + tz.transition 2028, 11, :o1, 1857027600 + tz.transition 2029, 3, :o2, 1867917600 + tz.transition 2029, 11, :o1, 1888477200 + tz.transition 2030, 3, :o2, 1899367200 + tz.transition 2030, 11, :o1, 1919926800 + tz.transition 2031, 3, :o2, 1930816800 + tz.transition 2031, 11, :o1, 1951376400 + tz.transition 2032, 3, :o2, 1962871200 + tz.transition 2032, 11, :o1, 1983430800 + tz.transition 2033, 3, :o2, 1994320800 + tz.transition 2033, 11, :o1, 2014880400 + tz.transition 2034, 3, :o2, 2025770400 + tz.transition 2034, 11, :o1, 2046330000 + tz.transition 2035, 3, :o2, 2057220000 + tz.transition 2035, 11, :o1, 2077779600 + tz.transition 2036, 3, :o2, 2088669600 + tz.transition 2036, 11, :o1, 2109229200 + tz.transition 2037, 3, :o2, 2120119200 + tz.transition 2037, 11, :o1, 2140678800 + tz.transition 2038, 3, :o2, 29585963, 12 + tz.transition 2038, 11, :o1, 19725879, 8 + tz.transition 2039, 3, :o2, 29590331, 12 + tz.transition 2039, 11, :o1, 19728791, 8 + tz.transition 2040, 3, :o2, 29594699, 12 + tz.transition 2040, 11, :o1, 19731703, 8 + tz.transition 2041, 3, :o2, 29599067, 12 + tz.transition 2041, 11, :o1, 19734615, 8 + tz.transition 2042, 3, :o2, 29603435, 12 + tz.transition 2042, 11, :o1, 19737527, 8 + tz.transition 2043, 3, :o2, 29607803, 12 + tz.transition 2043, 11, :o1, 19740439, 8 + tz.transition 2044, 3, :o2, 29612255, 12 + tz.transition 2044, 11, :o1, 19743407, 8 + tz.transition 2045, 3, :o2, 29616623, 12 + tz.transition 2045, 11, :o1, 19746319, 8 + tz.transition 2046, 3, :o2, 29620991, 12 + tz.transition 2046, 11, :o1, 19749231, 8 + tz.transition 2047, 3, :o2, 29625359, 12 + tz.transition 2047, 11, :o1, 19752143, 8 + tz.transition 2048, 3, :o2, 29629727, 12 + tz.transition 2048, 11, :o1, 19755055, 8 + tz.transition 2049, 3, :o2, 29634179, 12 + tz.transition 2049, 11, :o1, 19758023, 8 + tz.transition 2050, 3, :o2, 29638547, 12 + tz.transition 2050, 11, :o1, 19760935, 8 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mazatlan.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mazatlan.rb new file mode 100644 index 0000000000..ba9e6efcf1 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mazatlan.rb @@ -0,0 +1,139 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Mazatlan + include TimezoneDefinition + + timezone 'America/Mazatlan' do |tz| + tz.offset :o0, -25540, 0, :LMT + tz.offset :o1, -25200, 0, :MST + tz.offset :o2, -21600, 0, :CST + tz.offset :o3, -28800, 0, :PST + tz.offset :o4, -25200, 3600, :MDT + + tz.transition 1922, 1, :o1, 58153339, 24 + tz.transition 1927, 6, :o2, 9700171, 4 + tz.transition 1930, 11, :o1, 9705183, 4 + tz.transition 1931, 5, :o2, 9705855, 4 + tz.transition 1931, 10, :o1, 9706463, 4 + tz.transition 1932, 4, :o2, 58243171, 24 + tz.transition 1942, 4, :o1, 9721895, 4 + tz.transition 1949, 1, :o3, 58390339, 24 + tz.transition 1970, 1, :o1, 28800 + tz.transition 1996, 4, :o4, 828867600 + tz.transition 1996, 10, :o1, 846403200 + tz.transition 1997, 4, :o4, 860317200 + tz.transition 1997, 10, :o1, 877852800 + tz.transition 1998, 4, :o4, 891766800 + tz.transition 1998, 10, :o1, 909302400 + tz.transition 1999, 4, :o4, 923216400 + tz.transition 1999, 10, :o1, 941356800 + tz.transition 2000, 4, :o4, 954666000 + tz.transition 2000, 10, :o1, 972806400 + tz.transition 2001, 5, :o4, 989139600 + tz.transition 2001, 9, :o1, 1001836800 + tz.transition 2002, 4, :o4, 1018170000 + tz.transition 2002, 10, :o1, 1035705600 + tz.transition 2003, 4, :o4, 1049619600 + tz.transition 2003, 10, :o1, 1067155200 + tz.transition 2004, 4, :o4, 1081069200 + tz.transition 2004, 10, :o1, 1099209600 + tz.transition 2005, 4, :o4, 1112518800 + tz.transition 2005, 10, :o1, 1130659200 + tz.transition 2006, 4, :o4, 1143968400 + tz.transition 2006, 10, :o1, 1162108800 + tz.transition 2007, 4, :o4, 1175418000 + tz.transition 2007, 10, :o1, 1193558400 + tz.transition 2008, 4, :o4, 1207472400 + tz.transition 2008, 10, :o1, 1225008000 + tz.transition 2009, 4, :o4, 1238922000 + tz.transition 2009, 10, :o1, 1256457600 + tz.transition 2010, 4, :o4, 1270371600 + tz.transition 2010, 10, :o1, 1288512000 + tz.transition 2011, 4, :o4, 1301821200 + tz.transition 2011, 10, :o1, 1319961600 + tz.transition 2012, 4, :o4, 1333270800 + tz.transition 2012, 10, :o1, 1351411200 + tz.transition 2013, 4, :o4, 1365325200 + tz.transition 2013, 10, :o1, 1382860800 + tz.transition 2014, 4, :o4, 1396774800 + tz.transition 2014, 10, :o1, 1414310400 + tz.transition 2015, 4, :o4, 1428224400 + tz.transition 2015, 10, :o1, 1445760000 + tz.transition 2016, 4, :o4, 1459674000 + tz.transition 2016, 10, :o1, 1477814400 + tz.transition 2017, 4, :o4, 1491123600 + tz.transition 2017, 10, :o1, 1509264000 + tz.transition 2018, 4, :o4, 1522573200 + tz.transition 2018, 10, :o1, 1540713600 + tz.transition 2019, 4, :o4, 1554627600 + tz.transition 2019, 10, :o1, 1572163200 + tz.transition 2020, 4, :o4, 1586077200 + tz.transition 2020, 10, :o1, 1603612800 + tz.transition 2021, 4, :o4, 1617526800 + tz.transition 2021, 10, :o1, 1635667200 + tz.transition 2022, 4, :o4, 1648976400 + tz.transition 2022, 10, :o1, 1667116800 + tz.transition 2023, 4, :o4, 1680426000 + tz.transition 2023, 10, :o1, 1698566400 + tz.transition 2024, 4, :o4, 1712480400 + tz.transition 2024, 10, :o1, 1730016000 + tz.transition 2025, 4, :o4, 1743930000 + tz.transition 2025, 10, :o1, 1761465600 + tz.transition 2026, 4, :o4, 1775379600 + tz.transition 2026, 10, :o1, 1792915200 + tz.transition 2027, 4, :o4, 1806829200 + tz.transition 2027, 10, :o1, 1824969600 + tz.transition 2028, 4, :o4, 1838278800 + tz.transition 2028, 10, :o1, 1856419200 + tz.transition 2029, 4, :o4, 1869728400 + tz.transition 2029, 10, :o1, 1887868800 + tz.transition 2030, 4, :o4, 1901782800 + tz.transition 2030, 10, :o1, 1919318400 + tz.transition 2031, 4, :o4, 1933232400 + tz.transition 2031, 10, :o1, 1950768000 + tz.transition 2032, 4, :o4, 1964682000 + tz.transition 2032, 10, :o1, 1982822400 + tz.transition 2033, 4, :o4, 1996131600 + tz.transition 2033, 10, :o1, 2014272000 + tz.transition 2034, 4, :o4, 2027581200 + tz.transition 2034, 10, :o1, 2045721600 + tz.transition 2035, 4, :o4, 2059030800 + tz.transition 2035, 10, :o1, 2077171200 + tz.transition 2036, 4, :o4, 2091085200 + tz.transition 2036, 10, :o1, 2108620800 + tz.transition 2037, 4, :o4, 2122534800 + tz.transition 2037, 10, :o1, 2140070400 + tz.transition 2038, 4, :o4, 19724143, 8 + tz.transition 2038, 10, :o1, 14794367, 6 + tz.transition 2039, 4, :o4, 19727055, 8 + tz.transition 2039, 10, :o1, 14796551, 6 + tz.transition 2040, 4, :o4, 19729967, 8 + tz.transition 2040, 10, :o1, 14798735, 6 + tz.transition 2041, 4, :o4, 19732935, 8 + tz.transition 2041, 10, :o1, 14800919, 6 + tz.transition 2042, 4, :o4, 19735847, 8 + tz.transition 2042, 10, :o1, 14803103, 6 + tz.transition 2043, 4, :o4, 19738759, 8 + tz.transition 2043, 10, :o1, 14805287, 6 + tz.transition 2044, 4, :o4, 19741671, 8 + tz.transition 2044, 10, :o1, 14807513, 6 + tz.transition 2045, 4, :o4, 19744583, 8 + tz.transition 2045, 10, :o1, 14809697, 6 + tz.transition 2046, 4, :o4, 19747495, 8 + tz.transition 2046, 10, :o1, 14811881, 6 + tz.transition 2047, 4, :o4, 19750463, 8 + tz.transition 2047, 10, :o1, 14814065, 6 + tz.transition 2048, 4, :o4, 19753375, 8 + tz.transition 2048, 10, :o1, 14816249, 6 + tz.transition 2049, 4, :o4, 19756287, 8 + tz.transition 2049, 10, :o1, 14818475, 6 + tz.transition 2050, 4, :o4, 19759199, 8 + tz.transition 2050, 10, :o1, 14820659, 6 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mexico_City.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mexico_City.rb new file mode 100644 index 0000000000..2347fce647 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mexico_City.rb @@ -0,0 +1,144 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Mexico_City + include TimezoneDefinition + + timezone 'America/Mexico_City' do |tz| + tz.offset :o0, -23796, 0, :LMT + tz.offset :o1, -25200, 0, :MST + tz.offset :o2, -21600, 0, :CST + tz.offset :o3, -21600, 3600, :CDT + tz.offset :o4, -21600, 3600, :CWT + + tz.transition 1922, 1, :o1, 58153339, 24 + tz.transition 1927, 6, :o2, 9700171, 4 + tz.transition 1930, 11, :o1, 9705183, 4 + tz.transition 1931, 5, :o2, 9705855, 4 + tz.transition 1931, 10, :o1, 9706463, 4 + tz.transition 1932, 4, :o2, 58243171, 24 + tz.transition 1939, 2, :o3, 9717199, 4 + tz.transition 1939, 6, :o2, 58306553, 24 + tz.transition 1940, 12, :o3, 9719891, 4 + tz.transition 1941, 4, :o2, 58322057, 24 + tz.transition 1943, 12, :o4, 9724299, 4 + tz.transition 1944, 5, :o2, 58349081, 24 + tz.transition 1950, 2, :o3, 9733299, 4 + tz.transition 1950, 7, :o2, 58403825, 24 + tz.transition 1996, 4, :o3, 828864000 + tz.transition 1996, 10, :o2, 846399600 + tz.transition 1997, 4, :o3, 860313600 + tz.transition 1997, 10, :o2, 877849200 + tz.transition 1998, 4, :o3, 891763200 + tz.transition 1998, 10, :o2, 909298800 + tz.transition 1999, 4, :o3, 923212800 + tz.transition 1999, 10, :o2, 941353200 + tz.transition 2000, 4, :o3, 954662400 + tz.transition 2000, 10, :o2, 972802800 + tz.transition 2001, 5, :o3, 989136000 + tz.transition 2001, 9, :o2, 1001833200 + tz.transition 2002, 4, :o3, 1018166400 + tz.transition 2002, 10, :o2, 1035702000 + tz.transition 2003, 4, :o3, 1049616000 + tz.transition 2003, 10, :o2, 1067151600 + tz.transition 2004, 4, :o3, 1081065600 + tz.transition 2004, 10, :o2, 1099206000 + tz.transition 2005, 4, :o3, 1112515200 + tz.transition 2005, 10, :o2, 1130655600 + tz.transition 2006, 4, :o3, 1143964800 + tz.transition 2006, 10, :o2, 1162105200 + tz.transition 2007, 4, :o3, 1175414400 + tz.transition 2007, 10, :o2, 1193554800 + tz.transition 2008, 4, :o3, 1207468800 + tz.transition 2008, 10, :o2, 1225004400 + tz.transition 2009, 4, :o3, 1238918400 + tz.transition 2009, 10, :o2, 1256454000 + tz.transition 2010, 4, :o3, 1270368000 + tz.transition 2010, 10, :o2, 1288508400 + tz.transition 2011, 4, :o3, 1301817600 + tz.transition 2011, 10, :o2, 1319958000 + tz.transition 2012, 4, :o3, 1333267200 + tz.transition 2012, 10, :o2, 1351407600 + tz.transition 2013, 4, :o3, 1365321600 + tz.transition 2013, 10, :o2, 1382857200 + tz.transition 2014, 4, :o3, 1396771200 + tz.transition 2014, 10, :o2, 1414306800 + tz.transition 2015, 4, :o3, 1428220800 + tz.transition 2015, 10, :o2, 1445756400 + tz.transition 2016, 4, :o3, 1459670400 + tz.transition 2016, 10, :o2, 1477810800 + tz.transition 2017, 4, :o3, 1491120000 + tz.transition 2017, 10, :o2, 1509260400 + tz.transition 2018, 4, :o3, 1522569600 + tz.transition 2018, 10, :o2, 1540710000 + tz.transition 2019, 4, :o3, 1554624000 + tz.transition 2019, 10, :o2, 1572159600 + tz.transition 2020, 4, :o3, 1586073600 + tz.transition 2020, 10, :o2, 1603609200 + tz.transition 2021, 4, :o3, 1617523200 + tz.transition 2021, 10, :o2, 1635663600 + tz.transition 2022, 4, :o3, 1648972800 + tz.transition 2022, 10, :o2, 1667113200 + tz.transition 2023, 4, :o3, 1680422400 + tz.transition 2023, 10, :o2, 1698562800 + tz.transition 2024, 4, :o3, 1712476800 + tz.transition 2024, 10, :o2, 1730012400 + tz.transition 2025, 4, :o3, 1743926400 + tz.transition 2025, 10, :o2, 1761462000 + tz.transition 2026, 4, :o3, 1775376000 + tz.transition 2026, 10, :o2, 1792911600 + tz.transition 2027, 4, :o3, 1806825600 + tz.transition 2027, 10, :o2, 1824966000 + tz.transition 2028, 4, :o3, 1838275200 + tz.transition 2028, 10, :o2, 1856415600 + tz.transition 2029, 4, :o3, 1869724800 + tz.transition 2029, 10, :o2, 1887865200 + tz.transition 2030, 4, :o3, 1901779200 + tz.transition 2030, 10, :o2, 1919314800 + tz.transition 2031, 4, :o3, 1933228800 + tz.transition 2031, 10, :o2, 1950764400 + tz.transition 2032, 4, :o3, 1964678400 + tz.transition 2032, 10, :o2, 1982818800 + tz.transition 2033, 4, :o3, 1996128000 + tz.transition 2033, 10, :o2, 2014268400 + tz.transition 2034, 4, :o3, 2027577600 + tz.transition 2034, 10, :o2, 2045718000 + tz.transition 2035, 4, :o3, 2059027200 + tz.transition 2035, 10, :o2, 2077167600 + tz.transition 2036, 4, :o3, 2091081600 + tz.transition 2036, 10, :o2, 2108617200 + tz.transition 2037, 4, :o3, 2122531200 + tz.transition 2037, 10, :o2, 2140066800 + tz.transition 2038, 4, :o3, 14793107, 6 + tz.transition 2038, 10, :o2, 59177467, 24 + tz.transition 2039, 4, :o3, 14795291, 6 + tz.transition 2039, 10, :o2, 59186203, 24 + tz.transition 2040, 4, :o3, 14797475, 6 + tz.transition 2040, 10, :o2, 59194939, 24 + tz.transition 2041, 4, :o3, 14799701, 6 + tz.transition 2041, 10, :o2, 59203675, 24 + tz.transition 2042, 4, :o3, 14801885, 6 + tz.transition 2042, 10, :o2, 59212411, 24 + tz.transition 2043, 4, :o3, 14804069, 6 + tz.transition 2043, 10, :o2, 59221147, 24 + tz.transition 2044, 4, :o3, 14806253, 6 + tz.transition 2044, 10, :o2, 59230051, 24 + tz.transition 2045, 4, :o3, 14808437, 6 + tz.transition 2045, 10, :o2, 59238787, 24 + tz.transition 2046, 4, :o3, 14810621, 6 + tz.transition 2046, 10, :o2, 59247523, 24 + tz.transition 2047, 4, :o3, 14812847, 6 + tz.transition 2047, 10, :o2, 59256259, 24 + tz.transition 2048, 4, :o3, 14815031, 6 + tz.transition 2048, 10, :o2, 59264995, 24 + tz.transition 2049, 4, :o3, 14817215, 6 + tz.transition 2049, 10, :o2, 59273899, 24 + tz.transition 2050, 4, :o3, 14819399, 6 + tz.transition 2050, 10, :o2, 59282635, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Monterrey.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Monterrey.rb new file mode 100644 index 0000000000..5816a9eab1 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Monterrey.rb @@ -0,0 +1,131 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Monterrey + include TimezoneDefinition + + timezone 'America/Monterrey' do |tz| + tz.offset :o0, -24076, 0, :LMT + tz.offset :o1, -21600, 0, :CST + tz.offset :o2, -21600, 3600, :CDT + + tz.transition 1922, 1, :o1, 9692223, 4 + tz.transition 1988, 4, :o2, 576057600 + tz.transition 1988, 10, :o1, 594198000 + tz.transition 1996, 4, :o2, 828864000 + tz.transition 1996, 10, :o1, 846399600 + tz.transition 1997, 4, :o2, 860313600 + tz.transition 1997, 10, :o1, 877849200 + tz.transition 1998, 4, :o2, 891763200 + tz.transition 1998, 10, :o1, 909298800 + tz.transition 1999, 4, :o2, 923212800 + tz.transition 1999, 10, :o1, 941353200 + tz.transition 2000, 4, :o2, 954662400 + tz.transition 2000, 10, :o1, 972802800 + tz.transition 2001, 5, :o2, 989136000 + tz.transition 2001, 9, :o1, 1001833200 + tz.transition 2002, 4, :o2, 1018166400 + tz.transition 2002, 10, :o1, 1035702000 + tz.transition 2003, 4, :o2, 1049616000 + tz.transition 2003, 10, :o1, 1067151600 + tz.transition 2004, 4, :o2, 1081065600 + tz.transition 2004, 10, :o1, 1099206000 + tz.transition 2005, 4, :o2, 1112515200 + tz.transition 2005, 10, :o1, 1130655600 + tz.transition 2006, 4, :o2, 1143964800 + tz.transition 2006, 10, :o1, 1162105200 + tz.transition 2007, 4, :o2, 1175414400 + tz.transition 2007, 10, :o1, 1193554800 + tz.transition 2008, 4, :o2, 1207468800 + tz.transition 2008, 10, :o1, 1225004400 + tz.transition 2009, 4, :o2, 1238918400 + tz.transition 2009, 10, :o1, 1256454000 + tz.transition 2010, 4, :o2, 1270368000 + tz.transition 2010, 10, :o1, 1288508400 + tz.transition 2011, 4, :o2, 1301817600 + tz.transition 2011, 10, :o1, 1319958000 + tz.transition 2012, 4, :o2, 1333267200 + tz.transition 2012, 10, :o1, 1351407600 + tz.transition 2013, 4, :o2, 1365321600 + tz.transition 2013, 10, :o1, 1382857200 + tz.transition 2014, 4, :o2, 1396771200 + tz.transition 2014, 10, :o1, 1414306800 + tz.transition 2015, 4, :o2, 1428220800 + tz.transition 2015, 10, :o1, 1445756400 + tz.transition 2016, 4, :o2, 1459670400 + tz.transition 2016, 10, :o1, 1477810800 + tz.transition 2017, 4, :o2, 1491120000 + tz.transition 2017, 10, :o1, 1509260400 + tz.transition 2018, 4, :o2, 1522569600 + tz.transition 2018, 10, :o1, 1540710000 + tz.transition 2019, 4, :o2, 1554624000 + tz.transition 2019, 10, :o1, 1572159600 + tz.transition 2020, 4, :o2, 1586073600 + tz.transition 2020, 10, :o1, 1603609200 + tz.transition 2021, 4, :o2, 1617523200 + tz.transition 2021, 10, :o1, 1635663600 + tz.transition 2022, 4, :o2, 1648972800 + tz.transition 2022, 10, :o1, 1667113200 + tz.transition 2023, 4, :o2, 1680422400 + tz.transition 2023, 10, :o1, 1698562800 + tz.transition 2024, 4, :o2, 1712476800 + tz.transition 2024, 10, :o1, 1730012400 + tz.transition 2025, 4, :o2, 1743926400 + tz.transition 2025, 10, :o1, 1761462000 + tz.transition 2026, 4, :o2, 1775376000 + tz.transition 2026, 10, :o1, 1792911600 + tz.transition 2027, 4, :o2, 1806825600 + tz.transition 2027, 10, :o1, 1824966000 + tz.transition 2028, 4, :o2, 1838275200 + tz.transition 2028, 10, :o1, 1856415600 + tz.transition 2029, 4, :o2, 1869724800 + tz.transition 2029, 10, :o1, 1887865200 + tz.transition 2030, 4, :o2, 1901779200 + tz.transition 2030, 10, :o1, 1919314800 + tz.transition 2031, 4, :o2, 1933228800 + tz.transition 2031, 10, :o1, 1950764400 + tz.transition 2032, 4, :o2, 1964678400 + tz.transition 2032, 10, :o1, 1982818800 + tz.transition 2033, 4, :o2, 1996128000 + tz.transition 2033, 10, :o1, 2014268400 + tz.transition 2034, 4, :o2, 2027577600 + tz.transition 2034, 10, :o1, 2045718000 + tz.transition 2035, 4, :o2, 2059027200 + tz.transition 2035, 10, :o1, 2077167600 + tz.transition 2036, 4, :o2, 2091081600 + tz.transition 2036, 10, :o1, 2108617200 + tz.transition 2037, 4, :o2, 2122531200 + tz.transition 2037, 10, :o1, 2140066800 + tz.transition 2038, 4, :o2, 14793107, 6 + tz.transition 2038, 10, :o1, 59177467, 24 + tz.transition 2039, 4, :o2, 14795291, 6 + tz.transition 2039, 10, :o1, 59186203, 24 + tz.transition 2040, 4, :o2, 14797475, 6 + tz.transition 2040, 10, :o1, 59194939, 24 + tz.transition 2041, 4, :o2, 14799701, 6 + tz.transition 2041, 10, :o1, 59203675, 24 + tz.transition 2042, 4, :o2, 14801885, 6 + tz.transition 2042, 10, :o1, 59212411, 24 + tz.transition 2043, 4, :o2, 14804069, 6 + tz.transition 2043, 10, :o1, 59221147, 24 + tz.transition 2044, 4, :o2, 14806253, 6 + tz.transition 2044, 10, :o1, 59230051, 24 + tz.transition 2045, 4, :o2, 14808437, 6 + tz.transition 2045, 10, :o1, 59238787, 24 + tz.transition 2046, 4, :o2, 14810621, 6 + tz.transition 2046, 10, :o1, 59247523, 24 + tz.transition 2047, 4, :o2, 14812847, 6 + tz.transition 2047, 10, :o1, 59256259, 24 + tz.transition 2048, 4, :o2, 14815031, 6 + tz.transition 2048, 10, :o1, 59264995, 24 + tz.transition 2049, 4, :o2, 14817215, 6 + tz.transition 2049, 10, :o1, 59273899, 24 + tz.transition 2050, 4, :o2, 14819399, 6 + tz.transition 2050, 10, :o1, 59282635, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/New_York.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/New_York.rb new file mode 100644 index 0000000000..7d802bd2de --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/New_York.rb @@ -0,0 +1,282 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module New_York + include TimezoneDefinition + + timezone 'America/New_York' do |tz| + tz.offset :o0, -17762, 0, :LMT + tz.offset :o1, -18000, 0, :EST + tz.offset :o2, -18000, 3600, :EDT + tz.offset :o3, -18000, 3600, :EWT + tz.offset :o4, -18000, 3600, :EPT + + tz.transition 1883, 11, :o1, 57819197, 24 + tz.transition 1918, 3, :o2, 58120411, 24 + tz.transition 1918, 10, :o1, 9687575, 4 + tz.transition 1919, 3, :o2, 58129147, 24 + tz.transition 1919, 10, :o1, 9689031, 4 + tz.transition 1920, 3, :o2, 58137883, 24 + tz.transition 1920, 10, :o1, 9690515, 4 + tz.transition 1921, 4, :o2, 58147291, 24 + tz.transition 1921, 9, :o1, 9691831, 4 + tz.transition 1922, 4, :o2, 58156195, 24 + tz.transition 1922, 9, :o1, 9693287, 4 + tz.transition 1923, 4, :o2, 58164931, 24 + tz.transition 1923, 9, :o1, 9694771, 4 + tz.transition 1924, 4, :o2, 58173667, 24 + tz.transition 1924, 9, :o1, 9696227, 4 + tz.transition 1925, 4, :o2, 58182403, 24 + tz.transition 1925, 9, :o1, 9697683, 4 + tz.transition 1926, 4, :o2, 58191139, 24 + tz.transition 1926, 9, :o1, 9699139, 4 + tz.transition 1927, 4, :o2, 58199875, 24 + tz.transition 1927, 9, :o1, 9700595, 4 + tz.transition 1928, 4, :o2, 58208779, 24 + tz.transition 1928, 9, :o1, 9702079, 4 + tz.transition 1929, 4, :o2, 58217515, 24 + tz.transition 1929, 9, :o1, 9703535, 4 + tz.transition 1930, 4, :o2, 58226251, 24 + tz.transition 1930, 9, :o1, 9704991, 4 + tz.transition 1931, 4, :o2, 58234987, 24 + tz.transition 1931, 9, :o1, 9706447, 4 + tz.transition 1932, 4, :o2, 58243723, 24 + tz.transition 1932, 9, :o1, 9707903, 4 + tz.transition 1933, 4, :o2, 58252627, 24 + tz.transition 1933, 9, :o1, 9709359, 4 + tz.transition 1934, 4, :o2, 58261363, 24 + tz.transition 1934, 9, :o1, 9710843, 4 + tz.transition 1935, 4, :o2, 58270099, 24 + tz.transition 1935, 9, :o1, 9712299, 4 + tz.transition 1936, 4, :o2, 58278835, 24 + tz.transition 1936, 9, :o1, 9713755, 4 + tz.transition 1937, 4, :o2, 58287571, 24 + tz.transition 1937, 9, :o1, 9715211, 4 + tz.transition 1938, 4, :o2, 58296307, 24 + tz.transition 1938, 9, :o1, 9716667, 4 + tz.transition 1939, 4, :o2, 58305211, 24 + tz.transition 1939, 9, :o1, 9718123, 4 + tz.transition 1940, 4, :o2, 58313947, 24 + tz.transition 1940, 9, :o1, 9719607, 4 + tz.transition 1941, 4, :o2, 58322683, 24 + tz.transition 1941, 9, :o1, 9721063, 4 + tz.transition 1942, 2, :o3, 58329595, 24 + tz.transition 1945, 8, :o4, 58360379, 24 + tz.transition 1945, 9, :o1, 9726915, 4 + tz.transition 1946, 4, :o2, 58366531, 24 + tz.transition 1946, 9, :o1, 9728371, 4 + tz.transition 1947, 4, :o2, 58375267, 24 + tz.transition 1947, 9, :o1, 9729827, 4 + tz.transition 1948, 4, :o2, 58384003, 24 + tz.transition 1948, 9, :o1, 9731283, 4 + tz.transition 1949, 4, :o2, 58392739, 24 + tz.transition 1949, 9, :o1, 9732739, 4 + tz.transition 1950, 4, :o2, 58401643, 24 + tz.transition 1950, 9, :o1, 9734195, 4 + tz.transition 1951, 4, :o2, 58410379, 24 + tz.transition 1951, 9, :o1, 9735679, 4 + tz.transition 1952, 4, :o2, 58419115, 24 + tz.transition 1952, 9, :o1, 9737135, 4 + tz.transition 1953, 4, :o2, 58427851, 24 + tz.transition 1953, 9, :o1, 9738591, 4 + tz.transition 1954, 4, :o2, 58436587, 24 + tz.transition 1954, 9, :o1, 9740047, 4 + tz.transition 1955, 4, :o2, 58445323, 24 + tz.transition 1955, 10, :o1, 9741643, 4 + tz.transition 1956, 4, :o2, 58454227, 24 + tz.transition 1956, 10, :o1, 9743099, 4 + tz.transition 1957, 4, :o2, 58462963, 24 + tz.transition 1957, 10, :o1, 9744555, 4 + tz.transition 1958, 4, :o2, 58471699, 24 + tz.transition 1958, 10, :o1, 9746011, 4 + tz.transition 1959, 4, :o2, 58480435, 24 + tz.transition 1959, 10, :o1, 9747467, 4 + tz.transition 1960, 4, :o2, 58489171, 24 + tz.transition 1960, 10, :o1, 9748951, 4 + tz.transition 1961, 4, :o2, 58498075, 24 + tz.transition 1961, 10, :o1, 9750407, 4 + tz.transition 1962, 4, :o2, 58506811, 24 + tz.transition 1962, 10, :o1, 9751863, 4 + tz.transition 1963, 4, :o2, 58515547, 24 + tz.transition 1963, 10, :o1, 9753319, 4 + tz.transition 1964, 4, :o2, 58524283, 24 + tz.transition 1964, 10, :o1, 9754775, 4 + tz.transition 1965, 4, :o2, 58533019, 24 + tz.transition 1965, 10, :o1, 9756259, 4 + tz.transition 1966, 4, :o2, 58541755, 24 + tz.transition 1966, 10, :o1, 9757715, 4 + tz.transition 1967, 4, :o2, 58550659, 24 + tz.transition 1967, 10, :o1, 9759171, 4 + tz.transition 1968, 4, :o2, 58559395, 24 + tz.transition 1968, 10, :o1, 9760627, 4 + tz.transition 1969, 4, :o2, 58568131, 24 + tz.transition 1969, 10, :o1, 9762083, 4 + tz.transition 1970, 4, :o2, 9961200 + tz.transition 1970, 10, :o1, 25682400 + tz.transition 1971, 4, :o2, 41410800 + tz.transition 1971, 10, :o1, 57736800 + tz.transition 1972, 4, :o2, 73465200 + tz.transition 1972, 10, :o1, 89186400 + tz.transition 1973, 4, :o2, 104914800 + tz.transition 1973, 10, :o1, 120636000 + tz.transition 1974, 1, :o2, 126687600 + tz.transition 1974, 10, :o1, 152085600 + tz.transition 1975, 2, :o2, 162370800 + tz.transition 1975, 10, :o1, 183535200 + tz.transition 1976, 4, :o2, 199263600 + tz.transition 1976, 10, :o1, 215589600 + tz.transition 1977, 4, :o2, 230713200 + tz.transition 1977, 10, :o1, 247039200 + tz.transition 1978, 4, :o2, 262767600 + tz.transition 1978, 10, :o1, 278488800 + tz.transition 1979, 4, :o2, 294217200 + tz.transition 1979, 10, :o1, 309938400 + tz.transition 1980, 4, :o2, 325666800 + tz.transition 1980, 10, :o1, 341388000 + tz.transition 1981, 4, :o2, 357116400 + tz.transition 1981, 10, :o1, 372837600 + tz.transition 1982, 4, :o2, 388566000 + tz.transition 1982, 10, :o1, 404892000 + tz.transition 1983, 4, :o2, 420015600 + tz.transition 1983, 10, :o1, 436341600 + tz.transition 1984, 4, :o2, 452070000 + tz.transition 1984, 10, :o1, 467791200 + tz.transition 1985, 4, :o2, 483519600 + tz.transition 1985, 10, :o1, 499240800 + tz.transition 1986, 4, :o2, 514969200 + tz.transition 1986, 10, :o1, 530690400 + tz.transition 1987, 4, :o2, 544604400 + tz.transition 1987, 10, :o1, 562140000 + tz.transition 1988, 4, :o2, 576054000 + tz.transition 1988, 10, :o1, 594194400 + tz.transition 1989, 4, :o2, 607503600 + tz.transition 1989, 10, :o1, 625644000 + tz.transition 1990, 4, :o2, 638953200 + tz.transition 1990, 10, :o1, 657093600 + tz.transition 1991, 4, :o2, 671007600 + tz.transition 1991, 10, :o1, 688543200 + tz.transition 1992, 4, :o2, 702457200 + tz.transition 1992, 10, :o1, 719992800 + tz.transition 1993, 4, :o2, 733906800 + tz.transition 1993, 10, :o1, 752047200 + tz.transition 1994, 4, :o2, 765356400 + tz.transition 1994, 10, :o1, 783496800 + tz.transition 1995, 4, :o2, 796806000 + tz.transition 1995, 10, :o1, 814946400 + tz.transition 1996, 4, :o2, 828860400 + tz.transition 1996, 10, :o1, 846396000 + tz.transition 1997, 4, :o2, 860310000 + tz.transition 1997, 10, :o1, 877845600 + tz.transition 1998, 4, :o2, 891759600 + tz.transition 1998, 10, :o1, 909295200 + tz.transition 1999, 4, :o2, 923209200 + tz.transition 1999, 10, :o1, 941349600 + tz.transition 2000, 4, :o2, 954658800 + tz.transition 2000, 10, :o1, 972799200 + tz.transition 2001, 4, :o2, 986108400 + tz.transition 2001, 10, :o1, 1004248800 + tz.transition 2002, 4, :o2, 1018162800 + tz.transition 2002, 10, :o1, 1035698400 + tz.transition 2003, 4, :o2, 1049612400 + tz.transition 2003, 10, :o1, 1067148000 + tz.transition 2004, 4, :o2, 1081062000 + tz.transition 2004, 10, :o1, 1099202400 + tz.transition 2005, 4, :o2, 1112511600 + tz.transition 2005, 10, :o1, 1130652000 + tz.transition 2006, 4, :o2, 1143961200 + tz.transition 2006, 10, :o1, 1162101600 + tz.transition 2007, 3, :o2, 1173596400 + tz.transition 2007, 11, :o1, 1194156000 + tz.transition 2008, 3, :o2, 1205046000 + tz.transition 2008, 11, :o1, 1225605600 + tz.transition 2009, 3, :o2, 1236495600 + tz.transition 2009, 11, :o1, 1257055200 + tz.transition 2010, 3, :o2, 1268550000 + tz.transition 2010, 11, :o1, 1289109600 + tz.transition 2011, 3, :o2, 1299999600 + tz.transition 2011, 11, :o1, 1320559200 + tz.transition 2012, 3, :o2, 1331449200 + tz.transition 2012, 11, :o1, 1352008800 + tz.transition 2013, 3, :o2, 1362898800 + tz.transition 2013, 11, :o1, 1383458400 + tz.transition 2014, 3, :o2, 1394348400 + tz.transition 2014, 11, :o1, 1414908000 + tz.transition 2015, 3, :o2, 1425798000 + tz.transition 2015, 11, :o1, 1446357600 + tz.transition 2016, 3, :o2, 1457852400 + tz.transition 2016, 11, :o1, 1478412000 + tz.transition 2017, 3, :o2, 1489302000 + tz.transition 2017, 11, :o1, 1509861600 + tz.transition 2018, 3, :o2, 1520751600 + tz.transition 2018, 11, :o1, 1541311200 + tz.transition 2019, 3, :o2, 1552201200 + tz.transition 2019, 11, :o1, 1572760800 + tz.transition 2020, 3, :o2, 1583650800 + tz.transition 2020, 11, :o1, 1604210400 + tz.transition 2021, 3, :o2, 1615705200 + tz.transition 2021, 11, :o1, 1636264800 + tz.transition 2022, 3, :o2, 1647154800 + tz.transition 2022, 11, :o1, 1667714400 + tz.transition 2023, 3, :o2, 1678604400 + tz.transition 2023, 11, :o1, 1699164000 + tz.transition 2024, 3, :o2, 1710054000 + tz.transition 2024, 11, :o1, 1730613600 + tz.transition 2025, 3, :o2, 1741503600 + tz.transition 2025, 11, :o1, 1762063200 + tz.transition 2026, 3, :o2, 1772953200 + tz.transition 2026, 11, :o1, 1793512800 + tz.transition 2027, 3, :o2, 1805007600 + tz.transition 2027, 11, :o1, 1825567200 + tz.transition 2028, 3, :o2, 1836457200 + tz.transition 2028, 11, :o1, 1857016800 + tz.transition 2029, 3, :o2, 1867906800 + tz.transition 2029, 11, :o1, 1888466400 + tz.transition 2030, 3, :o2, 1899356400 + tz.transition 2030, 11, :o1, 1919916000 + tz.transition 2031, 3, :o2, 1930806000 + tz.transition 2031, 11, :o1, 1951365600 + tz.transition 2032, 3, :o2, 1962860400 + tz.transition 2032, 11, :o1, 1983420000 + tz.transition 2033, 3, :o2, 1994310000 + tz.transition 2033, 11, :o1, 2014869600 + tz.transition 2034, 3, :o2, 2025759600 + tz.transition 2034, 11, :o1, 2046319200 + tz.transition 2035, 3, :o2, 2057209200 + tz.transition 2035, 11, :o1, 2077768800 + tz.transition 2036, 3, :o2, 2088658800 + tz.transition 2036, 11, :o1, 2109218400 + tz.transition 2037, 3, :o2, 2120108400 + tz.transition 2037, 11, :o1, 2140668000 + tz.transition 2038, 3, :o2, 59171923, 24 + tz.transition 2038, 11, :o1, 9862939, 4 + tz.transition 2039, 3, :o2, 59180659, 24 + tz.transition 2039, 11, :o1, 9864395, 4 + tz.transition 2040, 3, :o2, 59189395, 24 + tz.transition 2040, 11, :o1, 9865851, 4 + tz.transition 2041, 3, :o2, 59198131, 24 + tz.transition 2041, 11, :o1, 9867307, 4 + tz.transition 2042, 3, :o2, 59206867, 24 + tz.transition 2042, 11, :o1, 9868763, 4 + tz.transition 2043, 3, :o2, 59215603, 24 + tz.transition 2043, 11, :o1, 9870219, 4 + tz.transition 2044, 3, :o2, 59224507, 24 + tz.transition 2044, 11, :o1, 9871703, 4 + tz.transition 2045, 3, :o2, 59233243, 24 + tz.transition 2045, 11, :o1, 9873159, 4 + tz.transition 2046, 3, :o2, 59241979, 24 + tz.transition 2046, 11, :o1, 9874615, 4 + tz.transition 2047, 3, :o2, 59250715, 24 + tz.transition 2047, 11, :o1, 9876071, 4 + tz.transition 2048, 3, :o2, 59259451, 24 + tz.transition 2048, 11, :o1, 9877527, 4 + tz.transition 2049, 3, :o2, 59268355, 24 + tz.transition 2049, 11, :o1, 9879011, 4 + tz.transition 2050, 3, :o2, 59277091, 24 + tz.transition 2050, 11, :o1, 9880467, 4 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Phoenix.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Phoenix.rb new file mode 100644 index 0000000000..b514e0c0f9 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Phoenix.rb @@ -0,0 +1,30 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Phoenix + include TimezoneDefinition + + timezone 'America/Phoenix' do |tz| + tz.offset :o0, -26898, 0, :LMT + tz.offset :o1, -25200, 0, :MST + tz.offset :o2, -25200, 3600, :MDT + tz.offset :o3, -25200, 3600, :MWT + + tz.transition 1883, 11, :o1, 57819199, 24 + tz.transition 1918, 3, :o2, 19373471, 8 + tz.transition 1918, 10, :o1, 14531363, 6 + tz.transition 1919, 3, :o2, 19376383, 8 + tz.transition 1919, 10, :o1, 14533547, 6 + tz.transition 1942, 2, :o3, 19443199, 8 + tz.transition 1944, 1, :o1, 3500770681, 1440 + tz.transition 1944, 4, :o3, 3500901781, 1440 + tz.transition 1944, 10, :o1, 3501165241, 1440 + tz.transition 1967, 4, :o2, 19516887, 8 + tz.transition 1967, 10, :o1, 14638757, 6 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Regina.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Regina.rb new file mode 100644 index 0000000000..ebdb68814a --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Regina.rb @@ -0,0 +1,74 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Regina + include TimezoneDefinition + + timezone 'America/Regina' do |tz| + tz.offset :o0, -25116, 0, :LMT + tz.offset :o1, -25200, 0, :MST + tz.offset :o2, -25200, 3600, :MDT + tz.offset :o3, -25200, 3600, :MWT + tz.offset :o4, -25200, 3600, :MPT + tz.offset :o5, -21600, 0, :CST + + tz.transition 1905, 9, :o1, 17403046493, 7200 + tz.transition 1918, 4, :o2, 19373583, 8 + tz.transition 1918, 10, :o1, 14531387, 6 + tz.transition 1930, 5, :o2, 58226419, 24 + tz.transition 1930, 10, :o1, 9705019, 4 + tz.transition 1931, 5, :o2, 58235155, 24 + tz.transition 1931, 10, :o1, 9706475, 4 + tz.transition 1932, 5, :o2, 58243891, 24 + tz.transition 1932, 10, :o1, 9707931, 4 + tz.transition 1933, 5, :o2, 58252795, 24 + tz.transition 1933, 10, :o1, 9709387, 4 + tz.transition 1934, 5, :o2, 58261531, 24 + tz.transition 1934, 10, :o1, 9710871, 4 + tz.transition 1937, 4, :o2, 58287235, 24 + tz.transition 1937, 10, :o1, 9715267, 4 + tz.transition 1938, 4, :o2, 58295971, 24 + tz.transition 1938, 10, :o1, 9716695, 4 + tz.transition 1939, 4, :o2, 58304707, 24 + tz.transition 1939, 10, :o1, 9718179, 4 + tz.transition 1940, 4, :o2, 58313611, 24 + tz.transition 1940, 10, :o1, 9719663, 4 + tz.transition 1941, 4, :o2, 58322347, 24 + tz.transition 1941, 10, :o1, 9721119, 4 + tz.transition 1942, 2, :o3, 19443199, 8 + tz.transition 1945, 8, :o4, 58360379, 24 + tz.transition 1945, 9, :o1, 14590373, 6 + tz.transition 1946, 4, :o2, 19455399, 8 + tz.transition 1946, 10, :o1, 14592641, 6 + tz.transition 1947, 4, :o2, 19458423, 8 + tz.transition 1947, 9, :o1, 14594741, 6 + tz.transition 1948, 4, :o2, 19461335, 8 + tz.transition 1948, 9, :o1, 14596925, 6 + tz.transition 1949, 4, :o2, 19464247, 8 + tz.transition 1949, 9, :o1, 14599109, 6 + tz.transition 1950, 4, :o2, 19467215, 8 + tz.transition 1950, 9, :o1, 14601293, 6 + tz.transition 1951, 4, :o2, 19470127, 8 + tz.transition 1951, 9, :o1, 14603519, 6 + tz.transition 1952, 4, :o2, 19473039, 8 + tz.transition 1952, 9, :o1, 14605703, 6 + tz.transition 1953, 4, :o2, 19475951, 8 + tz.transition 1953, 9, :o1, 14607887, 6 + tz.transition 1954, 4, :o2, 19478863, 8 + tz.transition 1954, 9, :o1, 14610071, 6 + tz.transition 1955, 4, :o2, 19481775, 8 + tz.transition 1955, 9, :o1, 14612255, 6 + tz.transition 1956, 4, :o2, 19484743, 8 + tz.transition 1956, 9, :o1, 14614481, 6 + tz.transition 1957, 4, :o2, 19487655, 8 + tz.transition 1957, 9, :o1, 14616665, 6 + tz.transition 1959, 4, :o2, 19493479, 8 + tz.transition 1959, 10, :o1, 14621201, 6 + tz.transition 1960, 4, :o5, 19496391, 8 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Santiago.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Santiago.rb new file mode 100644 index 0000000000..0287c9ebc4 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Santiago.rb @@ -0,0 +1,205 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Santiago + include TimezoneDefinition + + timezone 'America/Santiago' do |tz| + tz.offset :o0, -16966, 0, :LMT + tz.offset :o1, -16966, 0, :SMT + tz.offset :o2, -18000, 0, :CLT + tz.offset :o3, -14400, 0, :CLT + tz.offset :o4, -18000, 3600, :CLST + tz.offset :o5, -14400, 3600, :CLST + + tz.transition 1890, 1, :o1, 104171127683, 43200 + tz.transition 1910, 1, :o2, 104486660483, 43200 + tz.transition 1916, 7, :o1, 58105097, 24 + tz.transition 1918, 9, :o3, 104623388483, 43200 + tz.transition 1919, 7, :o1, 7266422, 3 + tz.transition 1927, 9, :o4, 104765386883, 43200 + tz.transition 1928, 4, :o2, 7276013, 3 + tz.transition 1928, 9, :o4, 58211777, 24 + tz.transition 1929, 4, :o2, 7277108, 3 + tz.transition 1929, 9, :o4, 58220537, 24 + tz.transition 1930, 4, :o2, 7278203, 3 + tz.transition 1930, 9, :o4, 58229297, 24 + tz.transition 1931, 4, :o2, 7279298, 3 + tz.transition 1931, 9, :o4, 58238057, 24 + tz.transition 1932, 4, :o2, 7280396, 3 + tz.transition 1932, 9, :o4, 58246841, 24 + tz.transition 1942, 6, :o2, 7291535, 3 + tz.transition 1942, 8, :o4, 58333745, 24 + tz.transition 1946, 9, :o2, 19456517, 8 + tz.transition 1947, 5, :o3, 58375865, 24 + tz.transition 1968, 11, :o5, 7320491, 3 + tz.transition 1969, 3, :o3, 19522485, 8 + tz.transition 1969, 11, :o5, 7321646, 3 + tz.transition 1970, 3, :o3, 7527600 + tz.transition 1970, 10, :o5, 24465600 + tz.transition 1971, 3, :o3, 37767600 + tz.transition 1971, 10, :o5, 55915200 + tz.transition 1972, 3, :o3, 69217200 + tz.transition 1972, 10, :o5, 87969600 + tz.transition 1973, 3, :o3, 100666800 + tz.transition 1973, 9, :o5, 118209600 + tz.transition 1974, 3, :o3, 132116400 + tz.transition 1974, 10, :o5, 150868800 + tz.transition 1975, 3, :o3, 163566000 + tz.transition 1975, 10, :o5, 182318400 + tz.transition 1976, 3, :o3, 195620400 + tz.transition 1976, 10, :o5, 213768000 + tz.transition 1977, 3, :o3, 227070000 + tz.transition 1977, 10, :o5, 245217600 + tz.transition 1978, 3, :o3, 258519600 + tz.transition 1978, 10, :o5, 277272000 + tz.transition 1979, 3, :o3, 289969200 + tz.transition 1979, 10, :o5, 308721600 + tz.transition 1980, 3, :o3, 321418800 + tz.transition 1980, 10, :o5, 340171200 + tz.transition 1981, 3, :o3, 353473200 + tz.transition 1981, 10, :o5, 371620800 + tz.transition 1982, 3, :o3, 384922800 + tz.transition 1982, 10, :o5, 403070400 + tz.transition 1983, 3, :o3, 416372400 + tz.transition 1983, 10, :o5, 434520000 + tz.transition 1984, 3, :o3, 447822000 + tz.transition 1984, 10, :o5, 466574400 + tz.transition 1985, 3, :o3, 479271600 + tz.transition 1985, 10, :o5, 498024000 + tz.transition 1986, 3, :o3, 510721200 + tz.transition 1986, 10, :o5, 529473600 + tz.transition 1987, 4, :o3, 545194800 + tz.transition 1987, 10, :o5, 560923200 + tz.transition 1988, 3, :o3, 574225200 + tz.transition 1988, 10, :o5, 591768000 + tz.transition 1989, 3, :o3, 605674800 + tz.transition 1989, 10, :o5, 624427200 + tz.transition 1990, 3, :o3, 637729200 + tz.transition 1990, 9, :o5, 653457600 + tz.transition 1991, 3, :o3, 668574000 + tz.transition 1991, 10, :o5, 687326400 + tz.transition 1992, 3, :o3, 700628400 + tz.transition 1992, 10, :o5, 718776000 + tz.transition 1993, 3, :o3, 732078000 + tz.transition 1993, 10, :o5, 750225600 + tz.transition 1994, 3, :o3, 763527600 + tz.transition 1994, 10, :o5, 781675200 + tz.transition 1995, 3, :o3, 794977200 + tz.transition 1995, 10, :o5, 813729600 + tz.transition 1996, 3, :o3, 826426800 + tz.transition 1996, 10, :o5, 845179200 + tz.transition 1997, 3, :o3, 859690800 + tz.transition 1997, 10, :o5, 876628800 + tz.transition 1998, 3, :o3, 889930800 + tz.transition 1998, 9, :o5, 906868800 + tz.transition 1999, 4, :o3, 923194800 + tz.transition 1999, 10, :o5, 939528000 + tz.transition 2000, 3, :o3, 952830000 + tz.transition 2000, 10, :o5, 971582400 + tz.transition 2001, 3, :o3, 984279600 + tz.transition 2001, 10, :o5, 1003032000 + tz.transition 2002, 3, :o3, 1015729200 + tz.transition 2002, 10, :o5, 1034481600 + tz.transition 2003, 3, :o3, 1047178800 + tz.transition 2003, 10, :o5, 1065931200 + tz.transition 2004, 3, :o3, 1079233200 + tz.transition 2004, 10, :o5, 1097380800 + tz.transition 2005, 3, :o3, 1110682800 + tz.transition 2005, 10, :o5, 1128830400 + tz.transition 2006, 3, :o3, 1142132400 + tz.transition 2006, 10, :o5, 1160884800 + tz.transition 2007, 3, :o3, 1173582000 + tz.transition 2007, 10, :o5, 1192334400 + tz.transition 2008, 3, :o3, 1206846000 + tz.transition 2008, 10, :o5, 1223784000 + tz.transition 2009, 3, :o3, 1237086000 + tz.transition 2009, 10, :o5, 1255233600 + tz.transition 2010, 3, :o3, 1268535600 + tz.transition 2010, 10, :o5, 1286683200 + tz.transition 2011, 3, :o3, 1299985200 + tz.transition 2011, 10, :o5, 1318132800 + tz.transition 2012, 3, :o3, 1331434800 + tz.transition 2012, 10, :o5, 1350187200 + tz.transition 2013, 3, :o3, 1362884400 + tz.transition 2013, 10, :o5, 1381636800 + tz.transition 2014, 3, :o3, 1394334000 + tz.transition 2014, 10, :o5, 1413086400 + tz.transition 2015, 3, :o3, 1426388400 + tz.transition 2015, 10, :o5, 1444536000 + tz.transition 2016, 3, :o3, 1457838000 + tz.transition 2016, 10, :o5, 1475985600 + tz.transition 2017, 3, :o3, 1489287600 + tz.transition 2017, 10, :o5, 1508040000 + tz.transition 2018, 3, :o3, 1520737200 + tz.transition 2018, 10, :o5, 1539489600 + tz.transition 2019, 3, :o3, 1552186800 + tz.transition 2019, 10, :o5, 1570939200 + tz.transition 2020, 3, :o3, 1584241200 + tz.transition 2020, 10, :o5, 1602388800 + tz.transition 2021, 3, :o3, 1615690800 + tz.transition 2021, 10, :o5, 1633838400 + tz.transition 2022, 3, :o3, 1647140400 + tz.transition 2022, 10, :o5, 1665288000 + tz.transition 2023, 3, :o3, 1678590000 + tz.transition 2023, 10, :o5, 1697342400 + tz.transition 2024, 3, :o3, 1710039600 + tz.transition 2024, 10, :o5, 1728792000 + tz.transition 2025, 3, :o3, 1741489200 + tz.transition 2025, 10, :o5, 1760241600 + tz.transition 2026, 3, :o3, 1773543600 + tz.transition 2026, 10, :o5, 1791691200 + tz.transition 2027, 3, :o3, 1804993200 + tz.transition 2027, 10, :o5, 1823140800 + tz.transition 2028, 3, :o3, 1836442800 + tz.transition 2028, 10, :o5, 1855195200 + tz.transition 2029, 3, :o3, 1867892400 + tz.transition 2029, 10, :o5, 1886644800 + tz.transition 2030, 3, :o3, 1899342000 + tz.transition 2030, 10, :o5, 1918094400 + tz.transition 2031, 3, :o3, 1930791600 + tz.transition 2031, 10, :o5, 1949544000 + tz.transition 2032, 3, :o3, 1962846000 + tz.transition 2032, 10, :o5, 1980993600 + tz.transition 2033, 3, :o3, 1994295600 + tz.transition 2033, 10, :o5, 2012443200 + tz.transition 2034, 3, :o3, 2025745200 + tz.transition 2034, 10, :o5, 2044497600 + tz.transition 2035, 3, :o3, 2057194800 + tz.transition 2035, 10, :o5, 2075947200 + tz.transition 2036, 3, :o3, 2088644400 + tz.transition 2036, 10, :o5, 2107396800 + tz.transition 2037, 3, :o3, 2120698800 + tz.transition 2037, 10, :o5, 2138846400 + tz.transition 2038, 3, :o3, 19723973, 8 + tz.transition 2038, 10, :o5, 7397120, 3 + tz.transition 2039, 3, :o3, 19726885, 8 + tz.transition 2039, 10, :o5, 7398212, 3 + tz.transition 2040, 3, :o3, 19729797, 8 + tz.transition 2040, 10, :o5, 7399325, 3 + tz.transition 2041, 3, :o3, 19732709, 8 + tz.transition 2041, 10, :o5, 7400417, 3 + tz.transition 2042, 3, :o3, 19735621, 8 + tz.transition 2042, 10, :o5, 7401509, 3 + tz.transition 2043, 3, :o3, 19738589, 8 + tz.transition 2043, 10, :o5, 7402601, 3 + tz.transition 2044, 3, :o3, 19741501, 8 + tz.transition 2044, 10, :o5, 7403693, 3 + tz.transition 2045, 3, :o3, 19744413, 8 + tz.transition 2045, 10, :o5, 7404806, 3 + tz.transition 2046, 3, :o3, 19747325, 8 + tz.transition 2046, 10, :o5, 7405898, 3 + tz.transition 2047, 3, :o3, 19750237, 8 + tz.transition 2047, 10, :o5, 7406990, 3 + tz.transition 2048, 3, :o3, 19753205, 8 + tz.transition 2048, 10, :o5, 7408082, 3 + tz.transition 2049, 3, :o3, 19756117, 8 + tz.transition 2049, 10, :o5, 7409174, 3 + tz.transition 2050, 3, :o3, 19759029, 8 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Sao_Paulo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Sao_Paulo.rb new file mode 100644 index 0000000000..0524f81c04 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Sao_Paulo.rb @@ -0,0 +1,171 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Sao_Paulo + include TimezoneDefinition + + timezone 'America/Sao_Paulo' do |tz| + tz.offset :o0, -11188, 0, :LMT + tz.offset :o1, -10800, 0, :BRT + tz.offset :o2, -10800, 3600, :BRST + + tz.transition 1914, 1, :o1, 52274886397, 21600 + tz.transition 1931, 10, :o2, 29119417, 12 + tz.transition 1932, 4, :o1, 29121583, 12 + tz.transition 1932, 10, :o2, 19415869, 8 + tz.transition 1933, 4, :o1, 29125963, 12 + tz.transition 1949, 12, :o2, 19466013, 8 + tz.transition 1950, 4, :o1, 19467101, 8 + tz.transition 1950, 12, :o2, 19468933, 8 + tz.transition 1951, 4, :o1, 29204851, 12 + tz.transition 1951, 12, :o2, 19471853, 8 + tz.transition 1952, 4, :o1, 29209243, 12 + tz.transition 1952, 12, :o2, 19474781, 8 + tz.transition 1953, 3, :o1, 29213251, 12 + tz.transition 1963, 10, :o2, 19506605, 8 + tz.transition 1964, 3, :o1, 29261467, 12 + tz.transition 1965, 1, :o2, 19510333, 8 + tz.transition 1965, 3, :o1, 29266207, 12 + tz.transition 1965, 12, :o2, 19512765, 8 + tz.transition 1966, 3, :o1, 29270227, 12 + tz.transition 1966, 11, :o2, 19515445, 8 + tz.transition 1967, 3, :o1, 29274607, 12 + tz.transition 1967, 11, :o2, 19518365, 8 + tz.transition 1968, 3, :o1, 29278999, 12 + tz.transition 1985, 11, :o2, 499748400 + tz.transition 1986, 3, :o1, 511236000 + tz.transition 1986, 10, :o2, 530593200 + tz.transition 1987, 2, :o1, 540266400 + tz.transition 1987, 10, :o2, 562129200 + tz.transition 1988, 2, :o1, 571197600 + tz.transition 1988, 10, :o2, 592974000 + tz.transition 1989, 1, :o1, 602042400 + tz.transition 1989, 10, :o2, 624423600 + tz.transition 1990, 2, :o1, 634701600 + tz.transition 1990, 10, :o2, 656478000 + tz.transition 1991, 2, :o1, 666756000 + tz.transition 1991, 10, :o2, 687927600 + tz.transition 1992, 2, :o1, 697600800 + tz.transition 1992, 10, :o2, 719982000 + tz.transition 1993, 1, :o1, 728445600 + tz.transition 1993, 10, :o2, 750826800 + tz.transition 1994, 2, :o1, 761709600 + tz.transition 1994, 10, :o2, 782276400 + tz.transition 1995, 2, :o1, 793159200 + tz.transition 1995, 10, :o2, 813726000 + tz.transition 1996, 2, :o1, 824004000 + tz.transition 1996, 10, :o2, 844570800 + tz.transition 1997, 2, :o1, 856058400 + tz.transition 1997, 10, :o2, 876106800 + tz.transition 1998, 3, :o1, 888717600 + tz.transition 1998, 10, :o2, 908074800 + tz.transition 1999, 2, :o1, 919562400 + tz.transition 1999, 10, :o2, 938919600 + tz.transition 2000, 2, :o1, 951616800 + tz.transition 2000, 10, :o2, 970974000 + tz.transition 2001, 2, :o1, 982461600 + tz.transition 2001, 10, :o2, 1003028400 + tz.transition 2002, 2, :o1, 1013911200 + tz.transition 2002, 11, :o2, 1036292400 + tz.transition 2003, 2, :o1, 1045360800 + tz.transition 2003, 10, :o2, 1066532400 + tz.transition 2004, 2, :o1, 1076810400 + tz.transition 2004, 11, :o2, 1099364400 + tz.transition 2005, 2, :o1, 1108864800 + tz.transition 2005, 10, :o2, 1129431600 + tz.transition 2006, 2, :o1, 1140314400 + tz.transition 2006, 11, :o2, 1162695600 + tz.transition 2007, 2, :o1, 1172368800 + tz.transition 2007, 10, :o2, 1192330800 + tz.transition 2008, 2, :o1, 1203213600 + tz.transition 2008, 10, :o2, 1224385200 + tz.transition 2009, 2, :o1, 1234663200 + tz.transition 2009, 10, :o2, 1255834800 + tz.transition 2010, 2, :o1, 1266717600 + tz.transition 2010, 10, :o2, 1287284400 + tz.transition 2011, 2, :o1, 1298167200 + tz.transition 2011, 10, :o2, 1318734000 + tz.transition 2012, 2, :o1, 1330221600 + tz.transition 2012, 10, :o2, 1350788400 + tz.transition 2013, 2, :o1, 1361066400 + tz.transition 2013, 10, :o2, 1382238000 + tz.transition 2014, 2, :o1, 1392516000 + tz.transition 2014, 10, :o2, 1413687600 + tz.transition 2015, 2, :o1, 1424570400 + tz.transition 2015, 10, :o2, 1445137200 + tz.transition 2016, 2, :o1, 1456020000 + tz.transition 2016, 10, :o2, 1476586800 + tz.transition 2017, 2, :o1, 1487469600 + tz.transition 2017, 10, :o2, 1508036400 + tz.transition 2018, 2, :o1, 1518919200 + tz.transition 2018, 10, :o2, 1540090800 + tz.transition 2019, 2, :o1, 1550368800 + tz.transition 2019, 10, :o2, 1571540400 + tz.transition 2020, 2, :o1, 1581818400 + tz.transition 2020, 10, :o2, 1602990000 + tz.transition 2021, 2, :o1, 1613872800 + tz.transition 2021, 10, :o2, 1634439600 + tz.transition 2022, 2, :o1, 1645322400 + tz.transition 2022, 10, :o2, 1665889200 + tz.transition 2023, 2, :o1, 1677376800 + tz.transition 2023, 10, :o2, 1697338800 + tz.transition 2024, 2, :o1, 1708221600 + tz.transition 2024, 10, :o2, 1729393200 + tz.transition 2025, 2, :o1, 1739671200 + tz.transition 2025, 10, :o2, 1760842800 + tz.transition 2026, 2, :o1, 1771725600 + tz.transition 2026, 10, :o2, 1792292400 + tz.transition 2027, 2, :o1, 1803175200 + tz.transition 2027, 10, :o2, 1823742000 + tz.transition 2028, 2, :o1, 1834624800 + tz.transition 2028, 10, :o2, 1855191600 + tz.transition 2029, 2, :o1, 1866074400 + tz.transition 2029, 10, :o2, 1887246000 + tz.transition 2030, 2, :o1, 1897524000 + tz.transition 2030, 10, :o2, 1918695600 + tz.transition 2031, 2, :o1, 1928973600 + tz.transition 2031, 10, :o2, 1950145200 + tz.transition 2032, 2, :o1, 1960423200 + tz.transition 2032, 10, :o2, 1981594800 + tz.transition 2033, 2, :o1, 1992477600 + tz.transition 2033, 10, :o2, 2013044400 + tz.transition 2034, 2, :o1, 2024532000 + tz.transition 2034, 10, :o2, 2044494000 + tz.transition 2035, 2, :o1, 2055376800 + tz.transition 2035, 10, :o2, 2076548400 + tz.transition 2036, 2, :o1, 2086826400 + tz.transition 2036, 10, :o2, 2107998000 + tz.transition 2037, 2, :o1, 2118880800 + tz.transition 2037, 10, :o2, 2139447600 + tz.transition 2038, 2, :o1, 29585707, 12 + tz.transition 2038, 10, :o2, 19725709, 8 + tz.transition 2039, 2, :o1, 29590075, 12 + tz.transition 2039, 10, :o2, 19728621, 8 + tz.transition 2040, 2, :o1, 29594443, 12 + tz.transition 2040, 10, :o2, 19731589, 8 + tz.transition 2041, 2, :o1, 29598811, 12 + tz.transition 2041, 10, :o2, 19734501, 8 + tz.transition 2042, 2, :o1, 29603179, 12 + tz.transition 2042, 10, :o2, 19737413, 8 + tz.transition 2043, 2, :o1, 29607547, 12 + tz.transition 2043, 10, :o2, 19740325, 8 + tz.transition 2044, 2, :o1, 29611999, 12 + tz.transition 2044, 10, :o2, 19743237, 8 + tz.transition 2045, 2, :o1, 29616367, 12 + tz.transition 2045, 10, :o2, 19746149, 8 + tz.transition 2046, 2, :o1, 29620735, 12 + tz.transition 2046, 10, :o2, 19749117, 8 + tz.transition 2047, 2, :o1, 29625103, 12 + tz.transition 2047, 10, :o2, 19752029, 8 + tz.transition 2048, 2, :o1, 29629471, 12 + tz.transition 2048, 10, :o2, 19754941, 8 + tz.transition 2049, 2, :o1, 29633923, 12 + tz.transition 2049, 10, :o2, 19757853, 8 + tz.transition 2050, 2, :o1, 29638291, 12 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/St_Johns.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/St_Johns.rb new file mode 100644 index 0000000000..e4a3599d35 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/St_Johns.rb @@ -0,0 +1,288 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module St_Johns + include TimezoneDefinition + + timezone 'America/St_Johns' do |tz| + tz.offset :o0, -12652, 0, :LMT + tz.offset :o1, -12652, 0, :NST + tz.offset :o2, -12652, 3600, :NDT + tz.offset :o3, -12600, 0, :NST + tz.offset :o4, -12600, 3600, :NDT + tz.offset :o5, -12600, 3600, :NWT + tz.offset :o6, -12600, 3600, :NPT + tz.offset :o7, -12600, 7200, :NDDT + + tz.transition 1884, 1, :o1, 52038215563, 21600 + tz.transition 1917, 4, :o2, 52300657363, 21600 + tz.transition 1917, 9, :o1, 52304155663, 21600 + tz.transition 1918, 4, :o2, 52308670963, 21600 + tz.transition 1918, 10, :o1, 52312990063, 21600 + tz.transition 1919, 5, :o2, 52317027463, 21600 + tz.transition 1919, 8, :o1, 52319164963, 21600 + tz.transition 1920, 5, :o2, 52324868263, 21600 + tz.transition 1920, 11, :o1, 52328798563, 21600 + tz.transition 1921, 5, :o2, 52332730663, 21600 + tz.transition 1921, 10, :o1, 52336660963, 21600 + tz.transition 1922, 5, :o2, 52340744263, 21600 + tz.transition 1922, 10, :o1, 52344523363, 21600 + tz.transition 1923, 5, :o2, 52348606663, 21600 + tz.transition 1923, 10, :o1, 52352385763, 21600 + tz.transition 1924, 5, :o2, 52356469063, 21600 + tz.transition 1924, 10, :o1, 52360248163, 21600 + tz.transition 1925, 5, :o2, 52364331463, 21600 + tz.transition 1925, 10, :o1, 52368110563, 21600 + tz.transition 1926, 5, :o2, 52372193863, 21600 + tz.transition 1926, 11, :o1, 52376124163, 21600 + tz.transition 1927, 5, :o2, 52380056263, 21600 + tz.transition 1927, 10, :o1, 52383986563, 21600 + tz.transition 1928, 5, :o2, 52388069863, 21600 + tz.transition 1928, 10, :o1, 52391848963, 21600 + tz.transition 1929, 5, :o2, 52395932263, 21600 + tz.transition 1929, 10, :o1, 52399711363, 21600 + tz.transition 1930, 5, :o2, 52403794663, 21600 + tz.transition 1930, 10, :o1, 52407573763, 21600 + tz.transition 1931, 5, :o2, 52411657063, 21600 + tz.transition 1931, 10, :o1, 52415436163, 21600 + tz.transition 1932, 5, :o2, 52419519463, 21600 + tz.transition 1932, 10, :o1, 52423449763, 21600 + tz.transition 1933, 5, :o2, 52427533063, 21600 + tz.transition 1933, 10, :o1, 52431312163, 21600 + tz.transition 1934, 5, :o2, 52435395463, 21600 + tz.transition 1934, 10, :o1, 52439174563, 21600 + tz.transition 1935, 3, :o3, 52442459563, 21600 + tz.transition 1935, 5, :o4, 116540573, 48 + tz.transition 1935, 10, :o3, 38849657, 16 + tz.transition 1936, 5, :o4, 116558383, 48 + tz.transition 1936, 10, :o3, 116565437, 48 + tz.transition 1937, 5, :o4, 116575855, 48 + tz.transition 1937, 10, :o3, 116582909, 48 + tz.transition 1938, 5, :o4, 116593327, 48 + tz.transition 1938, 10, :o3, 116600381, 48 + tz.transition 1939, 5, :o4, 116611135, 48 + tz.transition 1939, 10, :o3, 116617853, 48 + tz.transition 1940, 5, :o4, 116628607, 48 + tz.transition 1940, 10, :o3, 116635661, 48 + tz.transition 1941, 5, :o4, 116646079, 48 + tz.transition 1941, 10, :o3, 116653133, 48 + tz.transition 1942, 5, :o5, 116663551, 48 + tz.transition 1945, 8, :o6, 58360379, 24 + tz.transition 1945, 9, :o3, 38907659, 16 + tz.transition 1946, 5, :o4, 116733731, 48 + tz.transition 1946, 10, :o3, 38913595, 16 + tz.transition 1947, 5, :o4, 116751203, 48 + tz.transition 1947, 10, :o3, 38919419, 16 + tz.transition 1948, 5, :o4, 116768675, 48 + tz.transition 1948, 10, :o3, 38925243, 16 + tz.transition 1949, 5, :o4, 116786147, 48 + tz.transition 1949, 10, :o3, 38931067, 16 + tz.transition 1950, 5, :o4, 116803955, 48 + tz.transition 1950, 10, :o3, 38937003, 16 + tz.transition 1951, 4, :o4, 116820755, 48 + tz.transition 1951, 9, :o3, 38942715, 16 + tz.transition 1952, 4, :o4, 116838227, 48 + tz.transition 1952, 9, :o3, 38948539, 16 + tz.transition 1953, 4, :o4, 116855699, 48 + tz.transition 1953, 9, :o3, 38954363, 16 + tz.transition 1954, 4, :o4, 116873171, 48 + tz.transition 1954, 9, :o3, 38960187, 16 + tz.transition 1955, 4, :o4, 116890643, 48 + tz.transition 1955, 9, :o3, 38966011, 16 + tz.transition 1956, 4, :o4, 116908451, 48 + tz.transition 1956, 9, :o3, 38971947, 16 + tz.transition 1957, 4, :o4, 116925923, 48 + tz.transition 1957, 9, :o3, 38977771, 16 + tz.transition 1958, 4, :o4, 116943395, 48 + tz.transition 1958, 9, :o3, 38983595, 16 + tz.transition 1959, 4, :o4, 116960867, 48 + tz.transition 1959, 9, :o3, 38989419, 16 + tz.transition 1960, 4, :o4, 116978339, 48 + tz.transition 1960, 10, :o3, 38995803, 16 + tz.transition 1961, 4, :o4, 116996147, 48 + tz.transition 1961, 10, :o3, 39001627, 16 + tz.transition 1962, 4, :o4, 117013619, 48 + tz.transition 1962, 10, :o3, 39007451, 16 + tz.transition 1963, 4, :o4, 117031091, 48 + tz.transition 1963, 10, :o3, 39013275, 16 + tz.transition 1964, 4, :o4, 117048563, 48 + tz.transition 1964, 10, :o3, 39019099, 16 + tz.transition 1965, 4, :o4, 117066035, 48 + tz.transition 1965, 10, :o3, 39025035, 16 + tz.transition 1966, 4, :o4, 117083507, 48 + tz.transition 1966, 10, :o3, 39030859, 16 + tz.transition 1967, 4, :o4, 117101315, 48 + tz.transition 1967, 10, :o3, 39036683, 16 + tz.transition 1968, 4, :o4, 117118787, 48 + tz.transition 1968, 10, :o3, 39042507, 16 + tz.transition 1969, 4, :o4, 117136259, 48 + tz.transition 1969, 10, :o3, 39048331, 16 + tz.transition 1970, 4, :o4, 9955800 + tz.transition 1970, 10, :o3, 25677000 + tz.transition 1971, 4, :o4, 41405400 + tz.transition 1971, 10, :o3, 57731400 + tz.transition 1972, 4, :o4, 73459800 + tz.transition 1972, 10, :o3, 89181000 + tz.transition 1973, 4, :o4, 104909400 + tz.transition 1973, 10, :o3, 120630600 + tz.transition 1974, 4, :o4, 136359000 + tz.transition 1974, 10, :o3, 152080200 + tz.transition 1975, 4, :o4, 167808600 + tz.transition 1975, 10, :o3, 183529800 + tz.transition 1976, 4, :o4, 199258200 + tz.transition 1976, 10, :o3, 215584200 + tz.transition 1977, 4, :o4, 230707800 + tz.transition 1977, 10, :o3, 247033800 + tz.transition 1978, 4, :o4, 262762200 + tz.transition 1978, 10, :o3, 278483400 + tz.transition 1979, 4, :o4, 294211800 + tz.transition 1979, 10, :o3, 309933000 + tz.transition 1980, 4, :o4, 325661400 + tz.transition 1980, 10, :o3, 341382600 + tz.transition 1981, 4, :o4, 357111000 + tz.transition 1981, 10, :o3, 372832200 + tz.transition 1982, 4, :o4, 388560600 + tz.transition 1982, 10, :o3, 404886600 + tz.transition 1983, 4, :o4, 420010200 + tz.transition 1983, 10, :o3, 436336200 + tz.transition 1984, 4, :o4, 452064600 + tz.transition 1984, 10, :o3, 467785800 + tz.transition 1985, 4, :o4, 483514200 + tz.transition 1985, 10, :o3, 499235400 + tz.transition 1986, 4, :o4, 514963800 + tz.transition 1986, 10, :o3, 530685000 + tz.transition 1987, 4, :o4, 544591860 + tz.transition 1987, 10, :o3, 562127460 + tz.transition 1988, 4, :o7, 576041460 + tz.transition 1988, 10, :o3, 594178260 + tz.transition 1989, 4, :o4, 607491060 + tz.transition 1989, 10, :o3, 625631460 + tz.transition 1990, 4, :o4, 638940660 + tz.transition 1990, 10, :o3, 657081060 + tz.transition 1991, 4, :o4, 670995060 + tz.transition 1991, 10, :o3, 688530660 + tz.transition 1992, 4, :o4, 702444660 + tz.transition 1992, 10, :o3, 719980260 + tz.transition 1993, 4, :o4, 733894260 + tz.transition 1993, 10, :o3, 752034660 + tz.transition 1994, 4, :o4, 765343860 + tz.transition 1994, 10, :o3, 783484260 + tz.transition 1995, 4, :o4, 796793460 + tz.transition 1995, 10, :o3, 814933860 + tz.transition 1996, 4, :o4, 828847860 + tz.transition 1996, 10, :o3, 846383460 + tz.transition 1997, 4, :o4, 860297460 + tz.transition 1997, 10, :o3, 877833060 + tz.transition 1998, 4, :o4, 891747060 + tz.transition 1998, 10, :o3, 909282660 + tz.transition 1999, 4, :o4, 923196660 + tz.transition 1999, 10, :o3, 941337060 + tz.transition 2000, 4, :o4, 954646260 + tz.transition 2000, 10, :o3, 972786660 + tz.transition 2001, 4, :o4, 986095860 + tz.transition 2001, 10, :o3, 1004236260 + tz.transition 2002, 4, :o4, 1018150260 + tz.transition 2002, 10, :o3, 1035685860 + tz.transition 2003, 4, :o4, 1049599860 + tz.transition 2003, 10, :o3, 1067135460 + tz.transition 2004, 4, :o4, 1081049460 + tz.transition 2004, 10, :o3, 1099189860 + tz.transition 2005, 4, :o4, 1112499060 + tz.transition 2005, 10, :o3, 1130639460 + tz.transition 2006, 4, :o4, 1143948660 + tz.transition 2006, 10, :o3, 1162089060 + tz.transition 2007, 3, :o4, 1173583860 + tz.transition 2007, 11, :o3, 1194143460 + tz.transition 2008, 3, :o4, 1205033460 + tz.transition 2008, 11, :o3, 1225593060 + tz.transition 2009, 3, :o4, 1236483060 + tz.transition 2009, 11, :o3, 1257042660 + tz.transition 2010, 3, :o4, 1268537460 + tz.transition 2010, 11, :o3, 1289097060 + tz.transition 2011, 3, :o4, 1299987060 + tz.transition 2011, 11, :o3, 1320546660 + tz.transition 2012, 3, :o4, 1331436660 + tz.transition 2012, 11, :o3, 1351996260 + tz.transition 2013, 3, :o4, 1362886260 + tz.transition 2013, 11, :o3, 1383445860 + tz.transition 2014, 3, :o4, 1394335860 + tz.transition 2014, 11, :o3, 1414895460 + tz.transition 2015, 3, :o4, 1425785460 + tz.transition 2015, 11, :o3, 1446345060 + tz.transition 2016, 3, :o4, 1457839860 + tz.transition 2016, 11, :o3, 1478399460 + tz.transition 2017, 3, :o4, 1489289460 + tz.transition 2017, 11, :o3, 1509849060 + tz.transition 2018, 3, :o4, 1520739060 + tz.transition 2018, 11, :o3, 1541298660 + tz.transition 2019, 3, :o4, 1552188660 + tz.transition 2019, 11, :o3, 1572748260 + tz.transition 2020, 3, :o4, 1583638260 + tz.transition 2020, 11, :o3, 1604197860 + tz.transition 2021, 3, :o4, 1615692660 + tz.transition 2021, 11, :o3, 1636252260 + tz.transition 2022, 3, :o4, 1647142260 + tz.transition 2022, 11, :o3, 1667701860 + tz.transition 2023, 3, :o4, 1678591860 + tz.transition 2023, 11, :o3, 1699151460 + tz.transition 2024, 3, :o4, 1710041460 + tz.transition 2024, 11, :o3, 1730601060 + tz.transition 2025, 3, :o4, 1741491060 + tz.transition 2025, 11, :o3, 1762050660 + tz.transition 2026, 3, :o4, 1772940660 + tz.transition 2026, 11, :o3, 1793500260 + tz.transition 2027, 3, :o4, 1804995060 + tz.transition 2027, 11, :o3, 1825554660 + tz.transition 2028, 3, :o4, 1836444660 + tz.transition 2028, 11, :o3, 1857004260 + tz.transition 2029, 3, :o4, 1867894260 + tz.transition 2029, 11, :o3, 1888453860 + tz.transition 2030, 3, :o4, 1899343860 + tz.transition 2030, 11, :o3, 1919903460 + tz.transition 2031, 3, :o4, 1930793460 + tz.transition 2031, 11, :o3, 1951353060 + tz.transition 2032, 3, :o4, 1962847860 + tz.transition 2032, 11, :o3, 1983407460 + tz.transition 2033, 3, :o4, 1994297460 + tz.transition 2033, 11, :o3, 2014857060 + tz.transition 2034, 3, :o4, 2025747060 + tz.transition 2034, 11, :o3, 2046306660 + tz.transition 2035, 3, :o4, 2057196660 + tz.transition 2035, 11, :o3, 2077756260 + tz.transition 2036, 3, :o4, 2088646260 + tz.transition 2036, 11, :o3, 2109205860 + tz.transition 2037, 3, :o4, 2120095860 + tz.transition 2037, 11, :o3, 2140655460 + tz.transition 2038, 3, :o4, 3550315171, 1440 + tz.transition 2038, 11, :o3, 3550657831, 1440 + tz.transition 2039, 3, :o4, 3550839331, 1440 + tz.transition 2039, 11, :o3, 3551181991, 1440 + tz.transition 2040, 3, :o4, 3551363491, 1440 + tz.transition 2040, 11, :o3, 3551706151, 1440 + tz.transition 2041, 3, :o4, 3551887651, 1440 + tz.transition 2041, 11, :o3, 3552230311, 1440 + tz.transition 2042, 3, :o4, 3552411811, 1440 + tz.transition 2042, 11, :o3, 3552754471, 1440 + tz.transition 2043, 3, :o4, 3552935971, 1440 + tz.transition 2043, 11, :o3, 3553278631, 1440 + tz.transition 2044, 3, :o4, 3553470211, 1440 + tz.transition 2044, 11, :o3, 3553812871, 1440 + tz.transition 2045, 3, :o4, 3553994371, 1440 + tz.transition 2045, 11, :o3, 3554337031, 1440 + tz.transition 2046, 3, :o4, 3554518531, 1440 + tz.transition 2046, 11, :o3, 3554861191, 1440 + tz.transition 2047, 3, :o4, 3555042691, 1440 + tz.transition 2047, 11, :o3, 3555385351, 1440 + tz.transition 2048, 3, :o4, 3555566851, 1440 + tz.transition 2048, 11, :o3, 3555909511, 1440 + tz.transition 2049, 3, :o4, 3556101091, 1440 + tz.transition 2049, 11, :o3, 3556443751, 1440 + tz.transition 2050, 3, :o4, 3556625251, 1440 + tz.transition 2050, 11, :o3, 3556967911, 1440 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Tijuana.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Tijuana.rb new file mode 100644 index 0000000000..423059da46 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Tijuana.rb @@ -0,0 +1,196 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module America + module Tijuana + include TimezoneDefinition + + timezone 'America/Tijuana' do |tz| + tz.offset :o0, -28084, 0, :LMT + tz.offset :o1, -25200, 0, :MST + tz.offset :o2, -28800, 0, :PST + tz.offset :o3, -28800, 3600, :PDT + tz.offset :o4, -28800, 3600, :PWT + tz.offset :o5, -28800, 3600, :PPT + + tz.transition 1922, 1, :o1, 14538335, 6 + tz.transition 1924, 1, :o2, 58170859, 24 + tz.transition 1927, 6, :o1, 58201027, 24 + tz.transition 1930, 11, :o2, 58231099, 24 + tz.transition 1931, 4, :o3, 14558597, 6 + tz.transition 1931, 9, :o2, 58238755, 24 + tz.transition 1942, 4, :o4, 14582843, 6 + tz.transition 1945, 8, :o5, 58360379, 24 + tz.transition 1945, 11, :o2, 58362523, 24 + tz.transition 1948, 4, :o3, 14595881, 6 + tz.transition 1949, 1, :o2, 58390339, 24 + tz.transition 1954, 4, :o3, 29218295, 12 + tz.transition 1954, 9, :o2, 19480095, 8 + tz.transition 1955, 4, :o3, 29222663, 12 + tz.transition 1955, 9, :o2, 19483007, 8 + tz.transition 1956, 4, :o3, 29227115, 12 + tz.transition 1956, 9, :o2, 19485975, 8 + tz.transition 1957, 4, :o3, 29231483, 12 + tz.transition 1957, 9, :o2, 19488887, 8 + tz.transition 1958, 4, :o3, 29235851, 12 + tz.transition 1958, 9, :o2, 19491799, 8 + tz.transition 1959, 4, :o3, 29240219, 12 + tz.transition 1959, 9, :o2, 19494711, 8 + tz.transition 1960, 4, :o3, 29244587, 12 + tz.transition 1960, 9, :o2, 19497623, 8 + tz.transition 1976, 4, :o3, 199274400 + tz.transition 1976, 10, :o2, 215600400 + tz.transition 1977, 4, :o3, 230724000 + tz.transition 1977, 10, :o2, 247050000 + tz.transition 1978, 4, :o3, 262778400 + tz.transition 1978, 10, :o2, 278499600 + tz.transition 1979, 4, :o3, 294228000 + tz.transition 1979, 10, :o2, 309949200 + tz.transition 1980, 4, :o3, 325677600 + tz.transition 1980, 10, :o2, 341398800 + tz.transition 1981, 4, :o3, 357127200 + tz.transition 1981, 10, :o2, 372848400 + tz.transition 1982, 4, :o3, 388576800 + tz.transition 1982, 10, :o2, 404902800 + tz.transition 1983, 4, :o3, 420026400 + tz.transition 1983, 10, :o2, 436352400 + tz.transition 1984, 4, :o3, 452080800 + tz.transition 1984, 10, :o2, 467802000 + tz.transition 1985, 4, :o3, 483530400 + tz.transition 1985, 10, :o2, 499251600 + tz.transition 1986, 4, :o3, 514980000 + tz.transition 1986, 10, :o2, 530701200 + tz.transition 1987, 4, :o3, 544615200 + tz.transition 1987, 10, :o2, 562150800 + tz.transition 1988, 4, :o3, 576064800 + tz.transition 1988, 10, :o2, 594205200 + tz.transition 1989, 4, :o3, 607514400 + tz.transition 1989, 10, :o2, 625654800 + tz.transition 1990, 4, :o3, 638964000 + tz.transition 1990, 10, :o2, 657104400 + tz.transition 1991, 4, :o3, 671018400 + tz.transition 1991, 10, :o2, 688554000 + tz.transition 1992, 4, :o3, 702468000 + tz.transition 1992, 10, :o2, 720003600 + tz.transition 1993, 4, :o3, 733917600 + tz.transition 1993, 10, :o2, 752058000 + tz.transition 1994, 4, :o3, 765367200 + tz.transition 1994, 10, :o2, 783507600 + tz.transition 1995, 4, :o3, 796816800 + tz.transition 1995, 10, :o2, 814957200 + tz.transition 1996, 4, :o3, 828871200 + tz.transition 1996, 10, :o2, 846406800 + tz.transition 1997, 4, :o3, 860320800 + tz.transition 1997, 10, :o2, 877856400 + tz.transition 1998, 4, :o3, 891770400 + tz.transition 1998, 10, :o2, 909306000 + tz.transition 1999, 4, :o3, 923220000 + tz.transition 1999, 10, :o2, 941360400 + tz.transition 2000, 4, :o3, 954669600 + tz.transition 2000, 10, :o2, 972810000 + tz.transition 2001, 4, :o3, 986119200 + tz.transition 2001, 10, :o2, 1004259600 + tz.transition 2002, 4, :o3, 1018173600 + tz.transition 2002, 10, :o2, 1035709200 + tz.transition 2003, 4, :o3, 1049623200 + tz.transition 2003, 10, :o2, 1067158800 + tz.transition 2004, 4, :o3, 1081072800 + tz.transition 2004, 10, :o2, 1099213200 + tz.transition 2005, 4, :o3, 1112522400 + tz.transition 2005, 10, :o2, 1130662800 + tz.transition 2006, 4, :o3, 1143972000 + tz.transition 2006, 10, :o2, 1162112400 + tz.transition 2007, 4, :o3, 1175421600 + tz.transition 2007, 10, :o2, 1193562000 + tz.transition 2008, 4, :o3, 1207476000 + tz.transition 2008, 10, :o2, 1225011600 + tz.transition 2009, 4, :o3, 1238925600 + tz.transition 2009, 10, :o2, 1256461200 + tz.transition 2010, 4, :o3, 1270375200 + tz.transition 2010, 10, :o2, 1288515600 + tz.transition 2011, 4, :o3, 1301824800 + tz.transition 2011, 10, :o2, 1319965200 + tz.transition 2012, 4, :o3, 1333274400 + tz.transition 2012, 10, :o2, 1351414800 + tz.transition 2013, 4, :o3, 1365328800 + tz.transition 2013, 10, :o2, 1382864400 + tz.transition 2014, 4, :o3, 1396778400 + tz.transition 2014, 10, :o2, 1414314000 + tz.transition 2015, 4, :o3, 1428228000 + tz.transition 2015, 10, :o2, 1445763600 + tz.transition 2016, 4, :o3, 1459677600 + tz.transition 2016, 10, :o2, 1477818000 + tz.transition 2017, 4, :o3, 1491127200 + tz.transition 2017, 10, :o2, 1509267600 + tz.transition 2018, 4, :o3, 1522576800 + tz.transition 2018, 10, :o2, 1540717200 + tz.transition 2019, 4, :o3, 1554631200 + tz.transition 2019, 10, :o2, 1572166800 + tz.transition 2020, 4, :o3, 1586080800 + tz.transition 2020, 10, :o2, 1603616400 + tz.transition 2021, 4, :o3, 1617530400 + tz.transition 2021, 10, :o2, 1635670800 + tz.transition 2022, 4, :o3, 1648980000 + tz.transition 2022, 10, :o2, 1667120400 + tz.transition 2023, 4, :o3, 1680429600 + tz.transition 2023, 10, :o2, 1698570000 + tz.transition 2024, 4, :o3, 1712484000 + tz.transition 2024, 10, :o2, 1730019600 + tz.transition 2025, 4, :o3, 1743933600 + tz.transition 2025, 10, :o2, 1761469200 + tz.transition 2026, 4, :o3, 1775383200 + tz.transition 2026, 10, :o2, 1792918800 + tz.transition 2027, 4, :o3, 1806832800 + tz.transition 2027, 10, :o2, 1824973200 + tz.transition 2028, 4, :o3, 1838282400 + tz.transition 2028, 10, :o2, 1856422800 + tz.transition 2029, 4, :o3, 1869732000 + tz.transition 2029, 10, :o2, 1887872400 + tz.transition 2030, 4, :o3, 1901786400 + tz.transition 2030, 10, :o2, 1919322000 + tz.transition 2031, 4, :o3, 1933236000 + tz.transition 2031, 10, :o2, 1950771600 + tz.transition 2032, 4, :o3, 1964685600 + tz.transition 2032, 10, :o2, 1982826000 + tz.transition 2033, 4, :o3, 1996135200 + tz.transition 2033, 10, :o2, 2014275600 + tz.transition 2034, 4, :o3, 2027584800 + tz.transition 2034, 10, :o2, 2045725200 + tz.transition 2035, 4, :o3, 2059034400 + tz.transition 2035, 10, :o2, 2077174800 + tz.transition 2036, 4, :o3, 2091088800 + tz.transition 2036, 10, :o2, 2108624400 + tz.transition 2037, 4, :o3, 2122538400 + tz.transition 2037, 10, :o2, 2140074000 + tz.transition 2038, 4, :o3, 29586215, 12 + tz.transition 2038, 10, :o2, 19725823, 8 + tz.transition 2039, 4, :o3, 29590583, 12 + tz.transition 2039, 10, :o2, 19728735, 8 + tz.transition 2040, 4, :o3, 29594951, 12 + tz.transition 2040, 10, :o2, 19731647, 8 + tz.transition 2041, 4, :o3, 29599403, 12 + tz.transition 2041, 10, :o2, 19734559, 8 + tz.transition 2042, 4, :o3, 29603771, 12 + tz.transition 2042, 10, :o2, 19737471, 8 + tz.transition 2043, 4, :o3, 29608139, 12 + tz.transition 2043, 10, :o2, 19740383, 8 + tz.transition 2044, 4, :o3, 29612507, 12 + tz.transition 2044, 10, :o2, 19743351, 8 + tz.transition 2045, 4, :o3, 29616875, 12 + tz.transition 2045, 10, :o2, 19746263, 8 + tz.transition 2046, 4, :o3, 29621243, 12 + tz.transition 2046, 10, :o2, 19749175, 8 + tz.transition 2047, 4, :o3, 29625695, 12 + tz.transition 2047, 10, :o2, 19752087, 8 + tz.transition 2048, 4, :o3, 29630063, 12 + tz.transition 2048, 10, :o2, 19754999, 8 + tz.transition 2049, 4, :o3, 29634431, 12 + tz.transition 2049, 10, :o2, 19757967, 8 + tz.transition 2050, 4, :o3, 29638799, 12 + tz.transition 2050, 10, :o2, 19760879, 8 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Almaty.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Almaty.rb new file mode 100644 index 0000000000..9ee18970f1 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Almaty.rb @@ -0,0 +1,67 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Almaty + include TimezoneDefinition + + timezone 'Asia/Almaty' do |tz| + tz.offset :o0, 18468, 0, :LMT + tz.offset :o1, 18000, 0, :ALMT + tz.offset :o2, 21600, 0, :ALMT + tz.offset :o3, 21600, 3600, :ALMST + + tz.transition 1924, 5, :o1, 1939125829, 800 + tz.transition 1930, 6, :o2, 58227559, 24 + tz.transition 1981, 3, :o3, 354909600 + tz.transition 1981, 9, :o2, 370717200 + tz.transition 1982, 3, :o3, 386445600 + tz.transition 1982, 9, :o2, 402253200 + tz.transition 1983, 3, :o3, 417981600 + tz.transition 1983, 9, :o2, 433789200 + tz.transition 1984, 3, :o3, 449604000 + tz.transition 1984, 9, :o2, 465336000 + tz.transition 1985, 3, :o3, 481060800 + tz.transition 1985, 9, :o2, 496785600 + tz.transition 1986, 3, :o3, 512510400 + tz.transition 1986, 9, :o2, 528235200 + tz.transition 1987, 3, :o3, 543960000 + tz.transition 1987, 9, :o2, 559684800 + tz.transition 1988, 3, :o3, 575409600 + tz.transition 1988, 9, :o2, 591134400 + tz.transition 1989, 3, :o3, 606859200 + tz.transition 1989, 9, :o2, 622584000 + tz.transition 1990, 3, :o3, 638308800 + tz.transition 1990, 9, :o2, 654638400 + tz.transition 1992, 3, :o3, 701802000 + tz.transition 1992, 9, :o2, 717523200 + tz.transition 1993, 3, :o3, 733262400 + tz.transition 1993, 9, :o2, 748987200 + tz.transition 1994, 3, :o3, 764712000 + tz.transition 1994, 9, :o2, 780436800 + tz.transition 1995, 3, :o3, 796161600 + tz.transition 1995, 9, :o2, 811886400 + tz.transition 1996, 3, :o3, 828216000 + tz.transition 1996, 10, :o2, 846360000 + tz.transition 1997, 3, :o3, 859665600 + tz.transition 1997, 10, :o2, 877809600 + tz.transition 1998, 3, :o3, 891115200 + tz.transition 1998, 10, :o2, 909259200 + tz.transition 1999, 3, :o3, 922564800 + tz.transition 1999, 10, :o2, 941313600 + tz.transition 2000, 3, :o3, 954014400 + tz.transition 2000, 10, :o2, 972763200 + tz.transition 2001, 3, :o3, 985464000 + tz.transition 2001, 10, :o2, 1004212800 + tz.transition 2002, 3, :o3, 1017518400 + tz.transition 2002, 10, :o2, 1035662400 + tz.transition 2003, 3, :o3, 1048968000 + tz.transition 2003, 10, :o2, 1067112000 + tz.transition 2004, 3, :o3, 1080417600 + tz.transition 2004, 10, :o2, 1099166400 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baghdad.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baghdad.rb new file mode 100644 index 0000000000..774dca1587 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baghdad.rb @@ -0,0 +1,73 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Baghdad + include TimezoneDefinition + + timezone 'Asia/Baghdad' do |tz| + tz.offset :o0, 10660, 0, :LMT + tz.offset :o1, 10656, 0, :BMT + tz.offset :o2, 10800, 0, :AST + tz.offset :o3, 10800, 3600, :ADT + + tz.transition 1889, 12, :o1, 10417111387, 4320 + tz.transition 1917, 12, :o2, 726478313, 300 + tz.transition 1982, 4, :o3, 389048400 + tz.transition 1982, 9, :o2, 402264000 + tz.transition 1983, 3, :o3, 417906000 + tz.transition 1983, 9, :o2, 433800000 + tz.transition 1984, 3, :o3, 449614800 + tz.transition 1984, 9, :o2, 465422400 + tz.transition 1985, 3, :o3, 481150800 + tz.transition 1985, 9, :o2, 496792800 + tz.transition 1986, 3, :o3, 512517600 + tz.transition 1986, 9, :o2, 528242400 + tz.transition 1987, 3, :o3, 543967200 + tz.transition 1987, 9, :o2, 559692000 + tz.transition 1988, 3, :o3, 575416800 + tz.transition 1988, 9, :o2, 591141600 + tz.transition 1989, 3, :o3, 606866400 + tz.transition 1989, 9, :o2, 622591200 + tz.transition 1990, 3, :o3, 638316000 + tz.transition 1990, 9, :o2, 654645600 + tz.transition 1991, 4, :o3, 670464000 + tz.transition 1991, 10, :o2, 686275200 + tz.transition 1992, 4, :o3, 702086400 + tz.transition 1992, 10, :o2, 717897600 + tz.transition 1993, 4, :o3, 733622400 + tz.transition 1993, 10, :o2, 749433600 + tz.transition 1994, 4, :o3, 765158400 + tz.transition 1994, 10, :o2, 780969600 + tz.transition 1995, 4, :o3, 796694400 + tz.transition 1995, 10, :o2, 812505600 + tz.transition 1996, 4, :o3, 828316800 + tz.transition 1996, 10, :o2, 844128000 + tz.transition 1997, 4, :o3, 859852800 + tz.transition 1997, 10, :o2, 875664000 + tz.transition 1998, 4, :o3, 891388800 + tz.transition 1998, 10, :o2, 907200000 + tz.transition 1999, 4, :o3, 922924800 + tz.transition 1999, 10, :o2, 938736000 + tz.transition 2000, 4, :o3, 954547200 + tz.transition 2000, 10, :o2, 970358400 + tz.transition 2001, 4, :o3, 986083200 + tz.transition 2001, 10, :o2, 1001894400 + tz.transition 2002, 4, :o3, 1017619200 + tz.transition 2002, 10, :o2, 1033430400 + tz.transition 2003, 4, :o3, 1049155200 + tz.transition 2003, 10, :o2, 1064966400 + tz.transition 2004, 4, :o3, 1080777600 + tz.transition 2004, 10, :o2, 1096588800 + tz.transition 2005, 4, :o3, 1112313600 + tz.transition 2005, 10, :o2, 1128124800 + tz.transition 2006, 4, :o3, 1143849600 + tz.transition 2006, 10, :o2, 1159660800 + tz.transition 2007, 4, :o3, 1175385600 + tz.transition 2007, 10, :o2, 1191196800 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baku.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baku.rb new file mode 100644 index 0000000000..e86340ebfa --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baku.rb @@ -0,0 +1,161 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Baku + include TimezoneDefinition + + timezone 'Asia/Baku' do |tz| + tz.offset :o0, 11964, 0, :LMT + tz.offset :o1, 10800, 0, :BAKT + tz.offset :o2, 14400, 0, :BAKT + tz.offset :o3, 14400, 3600, :BAKST + tz.offset :o4, 10800, 3600, :BAKST + tz.offset :o5, 10800, 3600, :AZST + tz.offset :o6, 10800, 0, :AZT + tz.offset :o7, 14400, 0, :AZT + tz.offset :o8, 14400, 3600, :AZST + + tz.transition 1924, 5, :o1, 17452133003, 7200 + tz.transition 1957, 2, :o2, 19487187, 8 + tz.transition 1981, 3, :o3, 354916800 + tz.transition 1981, 9, :o2, 370724400 + tz.transition 1982, 3, :o3, 386452800 + tz.transition 1982, 9, :o2, 402260400 + tz.transition 1983, 3, :o3, 417988800 + tz.transition 1983, 9, :o2, 433796400 + tz.transition 1984, 3, :o3, 449611200 + tz.transition 1984, 9, :o2, 465343200 + tz.transition 1985, 3, :o3, 481068000 + tz.transition 1985, 9, :o2, 496792800 + tz.transition 1986, 3, :o3, 512517600 + tz.transition 1986, 9, :o2, 528242400 + tz.transition 1987, 3, :o3, 543967200 + tz.transition 1987, 9, :o2, 559692000 + tz.transition 1988, 3, :o3, 575416800 + tz.transition 1988, 9, :o2, 591141600 + tz.transition 1989, 3, :o3, 606866400 + tz.transition 1989, 9, :o2, 622591200 + tz.transition 1990, 3, :o3, 638316000 + tz.transition 1990, 9, :o2, 654645600 + tz.transition 1991, 3, :o4, 670370400 + tz.transition 1991, 8, :o5, 683496000 + tz.transition 1991, 9, :o6, 686098800 + tz.transition 1992, 3, :o5, 701812800 + tz.transition 1992, 9, :o7, 717534000 + tz.transition 1996, 3, :o8, 828234000 + tz.transition 1996, 10, :o7, 846378000 + tz.transition 1997, 3, :o8, 859680000 + tz.transition 1997, 10, :o7, 877824000 + tz.transition 1998, 3, :o8, 891129600 + tz.transition 1998, 10, :o7, 909273600 + tz.transition 1999, 3, :o8, 922579200 + tz.transition 1999, 10, :o7, 941328000 + tz.transition 2000, 3, :o8, 954028800 + tz.transition 2000, 10, :o7, 972777600 + tz.transition 2001, 3, :o8, 985478400 + tz.transition 2001, 10, :o7, 1004227200 + tz.transition 2002, 3, :o8, 1017532800 + tz.transition 2002, 10, :o7, 1035676800 + tz.transition 2003, 3, :o8, 1048982400 + tz.transition 2003, 10, :o7, 1067126400 + tz.transition 2004, 3, :o8, 1080432000 + tz.transition 2004, 10, :o7, 1099180800 + tz.transition 2005, 3, :o8, 1111881600 + tz.transition 2005, 10, :o7, 1130630400 + tz.transition 2006, 3, :o8, 1143331200 + tz.transition 2006, 10, :o7, 1162080000 + tz.transition 2007, 3, :o8, 1174780800 + tz.transition 2007, 10, :o7, 1193529600 + tz.transition 2008, 3, :o8, 1206835200 + tz.transition 2008, 10, :o7, 1224979200 + tz.transition 2009, 3, :o8, 1238284800 + tz.transition 2009, 10, :o7, 1256428800 + tz.transition 2010, 3, :o8, 1269734400 + tz.transition 2010, 10, :o7, 1288483200 + tz.transition 2011, 3, :o8, 1301184000 + tz.transition 2011, 10, :o7, 1319932800 + tz.transition 2012, 3, :o8, 1332633600 + tz.transition 2012, 10, :o7, 1351382400 + tz.transition 2013, 3, :o8, 1364688000 + tz.transition 2013, 10, :o7, 1382832000 + tz.transition 2014, 3, :o8, 1396137600 + tz.transition 2014, 10, :o7, 1414281600 + tz.transition 2015, 3, :o8, 1427587200 + tz.transition 2015, 10, :o7, 1445731200 + tz.transition 2016, 3, :o8, 1459036800 + tz.transition 2016, 10, :o7, 1477785600 + tz.transition 2017, 3, :o8, 1490486400 + tz.transition 2017, 10, :o7, 1509235200 + tz.transition 2018, 3, :o8, 1521936000 + tz.transition 2018, 10, :o7, 1540684800 + tz.transition 2019, 3, :o8, 1553990400 + tz.transition 2019, 10, :o7, 1572134400 + tz.transition 2020, 3, :o8, 1585440000 + tz.transition 2020, 10, :o7, 1603584000 + tz.transition 2021, 3, :o8, 1616889600 + tz.transition 2021, 10, :o7, 1635638400 + tz.transition 2022, 3, :o8, 1648339200 + tz.transition 2022, 10, :o7, 1667088000 + tz.transition 2023, 3, :o8, 1679788800 + tz.transition 2023, 10, :o7, 1698537600 + tz.transition 2024, 3, :o8, 1711843200 + tz.transition 2024, 10, :o7, 1729987200 + tz.transition 2025, 3, :o8, 1743292800 + tz.transition 2025, 10, :o7, 1761436800 + tz.transition 2026, 3, :o8, 1774742400 + tz.transition 2026, 10, :o7, 1792886400 + tz.transition 2027, 3, :o8, 1806192000 + tz.transition 2027, 10, :o7, 1824940800 + tz.transition 2028, 3, :o8, 1837641600 + tz.transition 2028, 10, :o7, 1856390400 + tz.transition 2029, 3, :o8, 1869091200 + tz.transition 2029, 10, :o7, 1887840000 + tz.transition 2030, 3, :o8, 1901145600 + tz.transition 2030, 10, :o7, 1919289600 + tz.transition 2031, 3, :o8, 1932595200 + tz.transition 2031, 10, :o7, 1950739200 + tz.transition 2032, 3, :o8, 1964044800 + tz.transition 2032, 10, :o7, 1982793600 + tz.transition 2033, 3, :o8, 1995494400 + tz.transition 2033, 10, :o7, 2014243200 + tz.transition 2034, 3, :o8, 2026944000 + tz.transition 2034, 10, :o7, 2045692800 + tz.transition 2035, 3, :o8, 2058393600 + tz.transition 2035, 10, :o7, 2077142400 + tz.transition 2036, 3, :o8, 2090448000 + tz.transition 2036, 10, :o7, 2108592000 + tz.transition 2037, 3, :o8, 2121897600 + tz.transition 2037, 10, :o7, 2140041600 + tz.transition 2038, 3, :o8, 4931021, 2 + tz.transition 2038, 10, :o7, 4931455, 2 + tz.transition 2039, 3, :o8, 4931749, 2 + tz.transition 2039, 10, :o7, 4932183, 2 + tz.transition 2040, 3, :o8, 4932477, 2 + tz.transition 2040, 10, :o7, 4932911, 2 + tz.transition 2041, 3, :o8, 4933219, 2 + tz.transition 2041, 10, :o7, 4933639, 2 + tz.transition 2042, 3, :o8, 4933947, 2 + tz.transition 2042, 10, :o7, 4934367, 2 + tz.transition 2043, 3, :o8, 4934675, 2 + tz.transition 2043, 10, :o7, 4935095, 2 + tz.transition 2044, 3, :o8, 4935403, 2 + tz.transition 2044, 10, :o7, 4935837, 2 + tz.transition 2045, 3, :o8, 4936131, 2 + tz.transition 2045, 10, :o7, 4936565, 2 + tz.transition 2046, 3, :o8, 4936859, 2 + tz.transition 2046, 10, :o7, 4937293, 2 + tz.transition 2047, 3, :o8, 4937601, 2 + tz.transition 2047, 10, :o7, 4938021, 2 + tz.transition 2048, 3, :o8, 4938329, 2 + tz.transition 2048, 10, :o7, 4938749, 2 + tz.transition 2049, 3, :o8, 4939057, 2 + tz.transition 2049, 10, :o7, 4939491, 2 + tz.transition 2050, 3, :o8, 4939785, 2 + tz.transition 2050, 10, :o7, 4940219, 2 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Bangkok.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Bangkok.rb new file mode 100644 index 0000000000..139194e5e5 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Bangkok.rb @@ -0,0 +1,20 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Bangkok + include TimezoneDefinition + + timezone 'Asia/Bangkok' do |tz| + tz.offset :o0, 24124, 0, :LMT + tz.offset :o1, 24124, 0, :BMT + tz.offset :o2, 25200, 0, :ICT + + tz.transition 1879, 12, :o1, 52006648769, 21600 + tz.transition 1920, 3, :o2, 52324168769, 21600 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Chongqing.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Chongqing.rb new file mode 100644 index 0000000000..8c94b4ba86 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Chongqing.rb @@ -0,0 +1,33 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Chongqing + include TimezoneDefinition + + timezone 'Asia/Chongqing' do |tz| + tz.offset :o0, 25580, 0, :LMT + tz.offset :o1, 25200, 0, :LONT + tz.offset :o2, 28800, 0, :CST + tz.offset :o3, 28800, 3600, :CDT + + tz.transition 1927, 12, :o1, 10477063601, 4320 + tz.transition 1980, 4, :o2, 325962000 + tz.transition 1986, 5, :o3, 515520000 + tz.transition 1986, 9, :o2, 527007600 + tz.transition 1987, 4, :o3, 545155200 + tz.transition 1987, 9, :o2, 558457200 + tz.transition 1988, 4, :o3, 576604800 + tz.transition 1988, 9, :o2, 589906800 + tz.transition 1989, 4, :o3, 608659200 + tz.transition 1989, 9, :o2, 621961200 + tz.transition 1990, 4, :o3, 640108800 + tz.transition 1990, 9, :o2, 653410800 + tz.transition 1991, 4, :o3, 671558400 + tz.transition 1991, 9, :o2, 684860400 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Colombo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Colombo.rb new file mode 100644 index 0000000000..f6531fa819 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Colombo.rb @@ -0,0 +1,30 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Colombo + include TimezoneDefinition + + timezone 'Asia/Colombo' do |tz| + tz.offset :o0, 19164, 0, :LMT + tz.offset :o1, 19172, 0, :MMT + tz.offset :o2, 19800, 0, :IST + tz.offset :o3, 19800, 1800, :IHST + tz.offset :o4, 19800, 3600, :IST + tz.offset :o5, 23400, 0, :LKT + tz.offset :o6, 21600, 0, :LKT + + tz.transition 1879, 12, :o1, 17335550003, 7200 + tz.transition 1905, 12, :o2, 52211763607, 21600 + tz.transition 1942, 1, :o3, 116657485, 48 + tz.transition 1942, 8, :o4, 9722413, 4 + tz.transition 1945, 10, :o2, 38907909, 16 + tz.transition 1996, 5, :o5, 832962600 + tz.transition 1996, 10, :o6, 846266400 + tz.transition 2006, 4, :o2, 1145039400 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Dhaka.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Dhaka.rb new file mode 100644 index 0000000000..ec3f753dec --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Dhaka.rb @@ -0,0 +1,112 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Dhaka + include TimezoneDefinition + + timezone 'Asia/Dhaka' do |tz| + tz.offset :o0, 21700, 0, :LMT + tz.offset :o1, 21200, 0, :HMT + tz.offset :o2, 23400, 0, :BURT + tz.offset :o3, 19800, 0, :IST + tz.offset :o4, 21600, 0, :DACT + tz.offset :o5, 21600, 0, :BDT + tz.offset :o6, 21600, 3600, :BDST + + tz.transition 1889, 12, :o1, 2083422167, 864 + tz.transition 1941, 9, :o2, 524937943, 216 + tz.transition 1942, 5, :o3, 116663723, 48 + tz.transition 1942, 8, :o2, 116668957, 48 + tz.transition 1951, 9, :o4, 116828123, 48 + tz.transition 1971, 3, :o5, 38772000 + tz.transition 2009, 6, :o6, 1246294800 + tz.transition 2009, 12, :o5, 1262278800 + tz.transition 2010, 3, :o6, 1270054800 + tz.transition 2010, 10, :o5, 1288544400 + tz.transition 2011, 3, :o6, 1301590800 + tz.transition 2011, 10, :o5, 1320080400 + tz.transition 2012, 3, :o6, 1333213200 + tz.transition 2012, 10, :o5, 1351702800 + tz.transition 2013, 3, :o6, 1364749200 + tz.transition 2013, 10, :o5, 1383238800 + tz.transition 2014, 3, :o6, 1396285200 + tz.transition 2014, 10, :o5, 1414774800 + tz.transition 2015, 3, :o6, 1427821200 + tz.transition 2015, 10, :o5, 1446310800 + tz.transition 2016, 3, :o6, 1459443600 + tz.transition 2016, 10, :o5, 1477933200 + tz.transition 2017, 3, :o6, 1490979600 + tz.transition 2017, 10, :o5, 1509469200 + tz.transition 2018, 3, :o6, 1522515600 + tz.transition 2018, 10, :o5, 1541005200 + tz.transition 2019, 3, :o6, 1554051600 + tz.transition 2019, 10, :o5, 1572541200 + tz.transition 2020, 3, :o6, 1585674000 + tz.transition 2020, 10, :o5, 1604163600 + tz.transition 2021, 3, :o6, 1617210000 + tz.transition 2021, 10, :o5, 1635699600 + tz.transition 2022, 3, :o6, 1648746000 + tz.transition 2022, 10, :o5, 1667235600 + tz.transition 2023, 3, :o6, 1680282000 + tz.transition 2023, 10, :o5, 1698771600 + tz.transition 2024, 3, :o6, 1711904400 + tz.transition 2024, 10, :o5, 1730394000 + tz.transition 2025, 3, :o6, 1743440400 + tz.transition 2025, 10, :o5, 1761930000 + tz.transition 2026, 3, :o6, 1774976400 + tz.transition 2026, 10, :o5, 1793466000 + tz.transition 2027, 3, :o6, 1806512400 + tz.transition 2027, 10, :o5, 1825002000 + tz.transition 2028, 3, :o6, 1838134800 + tz.transition 2028, 10, :o5, 1856624400 + tz.transition 2029, 3, :o6, 1869670800 + tz.transition 2029, 10, :o5, 1888160400 + tz.transition 2030, 3, :o6, 1901206800 + tz.transition 2030, 10, :o5, 1919696400 + tz.transition 2031, 3, :o6, 1932742800 + tz.transition 2031, 10, :o5, 1951232400 + tz.transition 2032, 3, :o6, 1964365200 + tz.transition 2032, 10, :o5, 1982854800 + tz.transition 2033, 3, :o6, 1995901200 + tz.transition 2033, 10, :o5, 2014390800 + tz.transition 2034, 3, :o6, 2027437200 + tz.transition 2034, 10, :o5, 2045926800 + tz.transition 2035, 3, :o6, 2058973200 + tz.transition 2035, 10, :o5, 2077462800 + tz.transition 2036, 3, :o6, 2090595600 + tz.transition 2036, 10, :o5, 2109085200 + tz.transition 2037, 3, :o6, 2122131600 + tz.transition 2037, 10, :o5, 2140621200 + tz.transition 2038, 3, :o6, 59172341, 24 + tz.transition 2038, 10, :o5, 59177477, 24 + tz.transition 2039, 3, :o6, 59181101, 24 + tz.transition 2039, 10, :o5, 59186237, 24 + tz.transition 2040, 3, :o6, 59189885, 24 + tz.transition 2040, 10, :o5, 59195021, 24 + tz.transition 2041, 3, :o6, 59198645, 24 + tz.transition 2041, 10, :o5, 59203781, 24 + tz.transition 2042, 3, :o6, 59207405, 24 + tz.transition 2042, 10, :o5, 59212541, 24 + tz.transition 2043, 3, :o6, 59216165, 24 + tz.transition 2043, 10, :o5, 59221301, 24 + tz.transition 2044, 3, :o6, 59224949, 24 + tz.transition 2044, 10, :o5, 59230085, 24 + tz.transition 2045, 3, :o6, 59233709, 24 + tz.transition 2045, 10, :o5, 59238845, 24 + tz.transition 2046, 3, :o6, 59242469, 24 + tz.transition 2046, 10, :o5, 59247605, 24 + tz.transition 2047, 3, :o6, 59251229, 24 + tz.transition 2047, 10, :o5, 59256365, 24 + tz.transition 2048, 3, :o6, 59260013, 24 + tz.transition 2048, 10, :o5, 59265149, 24 + tz.transition 2049, 3, :o6, 59268773, 24 + tz.transition 2049, 10, :o5, 59273909, 24 + tz.transition 2050, 3, :o6, 59277533, 24 + tz.transition 2050, 10, :o5, 59282669, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Hong_Kong.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Hong_Kong.rb new file mode 100644 index 0000000000..94bd6e0821 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Hong_Kong.rb @@ -0,0 +1,90 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Hong_Kong + include TimezoneDefinition + + timezone 'Asia/Hong_Kong' do |tz| + tz.offset :o0, 27396, 0, :LMT + tz.offset :o1, 28800, 0, :HKT + tz.offset :o2, 28800, 3600, :HKST + tz.offset :o3, 32400, 0, :JST + + tz.transition 1904, 10, :o1, 5800279639, 2400 + tz.transition 1941, 3, :o2, 38881365, 16 + tz.transition 1941, 9, :o1, 116652829, 48 + tz.transition 1941, 12, :o3, 14582119, 6 + tz.transition 1945, 9, :o1, 19453705, 8 + tz.transition 1946, 4, :o2, 38910885, 16 + tz.transition 1946, 11, :o1, 116743453, 48 + tz.transition 1947, 4, :o2, 38916613, 16 + tz.transition 1947, 12, :o1, 116762365, 48 + tz.transition 1948, 5, :o2, 38922773, 16 + tz.transition 1948, 10, :o1, 116777053, 48 + tz.transition 1949, 4, :o2, 38928149, 16 + tz.transition 1949, 10, :o1, 116794525, 48 + tz.transition 1950, 4, :o2, 38933973, 16 + tz.transition 1950, 10, :o1, 116811997, 48 + tz.transition 1951, 3, :o2, 38939797, 16 + tz.transition 1951, 10, :o1, 116829469, 48 + tz.transition 1952, 4, :o2, 38945733, 16 + tz.transition 1952, 10, :o1, 116846893, 48 + tz.transition 1953, 4, :o2, 38951557, 16 + tz.transition 1953, 10, :o1, 116864749, 48 + tz.transition 1954, 3, :o2, 38957157, 16 + tz.transition 1954, 10, :o1, 116882221, 48 + tz.transition 1955, 3, :o2, 38962981, 16 + tz.transition 1955, 11, :o1, 116900029, 48 + tz.transition 1956, 3, :o2, 38968805, 16 + tz.transition 1956, 11, :o1, 116917501, 48 + tz.transition 1957, 3, :o2, 38974741, 16 + tz.transition 1957, 11, :o1, 116934973, 48 + tz.transition 1958, 3, :o2, 38980565, 16 + tz.transition 1958, 11, :o1, 116952445, 48 + tz.transition 1959, 3, :o2, 38986389, 16 + tz.transition 1959, 10, :o1, 116969917, 48 + tz.transition 1960, 3, :o2, 38992213, 16 + tz.transition 1960, 11, :o1, 116987725, 48 + tz.transition 1961, 3, :o2, 38998037, 16 + tz.transition 1961, 11, :o1, 117005197, 48 + tz.transition 1962, 3, :o2, 39003861, 16 + tz.transition 1962, 11, :o1, 117022669, 48 + tz.transition 1963, 3, :o2, 39009797, 16 + tz.transition 1963, 11, :o1, 117040141, 48 + tz.transition 1964, 3, :o2, 39015621, 16 + tz.transition 1964, 10, :o1, 117057613, 48 + tz.transition 1965, 4, :o2, 39021893, 16 + tz.transition 1965, 10, :o1, 117074413, 48 + tz.transition 1966, 4, :o2, 39027717, 16 + tz.transition 1966, 10, :o1, 117091885, 48 + tz.transition 1967, 4, :o2, 39033541, 16 + tz.transition 1967, 10, :o1, 117109693, 48 + tz.transition 1968, 4, :o2, 39039477, 16 + tz.transition 1968, 10, :o1, 117127165, 48 + tz.transition 1969, 4, :o2, 39045301, 16 + tz.transition 1969, 10, :o1, 117144637, 48 + tz.transition 1970, 4, :o2, 9315000 + tz.transition 1970, 10, :o1, 25036200 + tz.transition 1971, 4, :o2, 40764600 + tz.transition 1971, 10, :o1, 56485800 + tz.transition 1972, 4, :o2, 72214200 + tz.transition 1972, 10, :o1, 88540200 + tz.transition 1973, 4, :o2, 104268600 + tz.transition 1973, 10, :o1, 119989800 + tz.transition 1973, 12, :o2, 126041400 + tz.transition 1974, 10, :o1, 151439400 + tz.transition 1975, 4, :o2, 167167800 + tz.transition 1975, 10, :o1, 182889000 + tz.transition 1976, 4, :o2, 198617400 + tz.transition 1976, 10, :o1, 214338600 + tz.transition 1977, 4, :o2, 230067000 + tz.transition 1977, 10, :o1, 245788200 + tz.transition 1979, 5, :o2, 295385400 + tz.transition 1979, 10, :o1, 309292200 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Irkutsk.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Irkutsk.rb new file mode 100644 index 0000000000..2d47d9580b --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Irkutsk.rb @@ -0,0 +1,165 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Irkutsk + include TimezoneDefinition + + timezone 'Asia/Irkutsk' do |tz| + tz.offset :o0, 25040, 0, :LMT + tz.offset :o1, 25040, 0, :IMT + tz.offset :o2, 25200, 0, :IRKT + tz.offset :o3, 28800, 0, :IRKT + tz.offset :o4, 28800, 3600, :IRKST + tz.offset :o5, 25200, 3600, :IRKST + + tz.transition 1879, 12, :o1, 2600332427, 1080 + tz.transition 1920, 1, :o2, 2616136067, 1080 + tz.transition 1930, 6, :o3, 58227557, 24 + tz.transition 1981, 3, :o4, 354902400 + tz.transition 1981, 9, :o3, 370710000 + tz.transition 1982, 3, :o4, 386438400 + tz.transition 1982, 9, :o3, 402246000 + tz.transition 1983, 3, :o4, 417974400 + tz.transition 1983, 9, :o3, 433782000 + tz.transition 1984, 3, :o4, 449596800 + tz.transition 1984, 9, :o3, 465328800 + tz.transition 1985, 3, :o4, 481053600 + tz.transition 1985, 9, :o3, 496778400 + tz.transition 1986, 3, :o4, 512503200 + tz.transition 1986, 9, :o3, 528228000 + tz.transition 1987, 3, :o4, 543952800 + tz.transition 1987, 9, :o3, 559677600 + tz.transition 1988, 3, :o4, 575402400 + tz.transition 1988, 9, :o3, 591127200 + tz.transition 1989, 3, :o4, 606852000 + tz.transition 1989, 9, :o3, 622576800 + tz.transition 1990, 3, :o4, 638301600 + tz.transition 1990, 9, :o3, 654631200 + tz.transition 1991, 3, :o5, 670356000 + tz.transition 1991, 9, :o2, 686084400 + tz.transition 1992, 1, :o3, 695761200 + tz.transition 1992, 3, :o4, 701794800 + tz.transition 1992, 9, :o3, 717516000 + tz.transition 1993, 3, :o4, 733255200 + tz.transition 1993, 9, :o3, 748980000 + tz.transition 1994, 3, :o4, 764704800 + tz.transition 1994, 9, :o3, 780429600 + tz.transition 1995, 3, :o4, 796154400 + tz.transition 1995, 9, :o3, 811879200 + tz.transition 1996, 3, :o4, 828208800 + tz.transition 1996, 10, :o3, 846352800 + tz.transition 1997, 3, :o4, 859658400 + tz.transition 1997, 10, :o3, 877802400 + tz.transition 1998, 3, :o4, 891108000 + tz.transition 1998, 10, :o3, 909252000 + tz.transition 1999, 3, :o4, 922557600 + tz.transition 1999, 10, :o3, 941306400 + tz.transition 2000, 3, :o4, 954007200 + tz.transition 2000, 10, :o3, 972756000 + tz.transition 2001, 3, :o4, 985456800 + tz.transition 2001, 10, :o3, 1004205600 + tz.transition 2002, 3, :o4, 1017511200 + tz.transition 2002, 10, :o3, 1035655200 + tz.transition 2003, 3, :o4, 1048960800 + tz.transition 2003, 10, :o3, 1067104800 + tz.transition 2004, 3, :o4, 1080410400 + tz.transition 2004, 10, :o3, 1099159200 + tz.transition 2005, 3, :o4, 1111860000 + tz.transition 2005, 10, :o3, 1130608800 + tz.transition 2006, 3, :o4, 1143309600 + tz.transition 2006, 10, :o3, 1162058400 + tz.transition 2007, 3, :o4, 1174759200 + tz.transition 2007, 10, :o3, 1193508000 + tz.transition 2008, 3, :o4, 1206813600 + tz.transition 2008, 10, :o3, 1224957600 + tz.transition 2009, 3, :o4, 1238263200 + tz.transition 2009, 10, :o3, 1256407200 + tz.transition 2010, 3, :o4, 1269712800 + tz.transition 2010, 10, :o3, 1288461600 + tz.transition 2011, 3, :o4, 1301162400 + tz.transition 2011, 10, :o3, 1319911200 + tz.transition 2012, 3, :o4, 1332612000 + tz.transition 2012, 10, :o3, 1351360800 + tz.transition 2013, 3, :o4, 1364666400 + tz.transition 2013, 10, :o3, 1382810400 + tz.transition 2014, 3, :o4, 1396116000 + tz.transition 2014, 10, :o3, 1414260000 + tz.transition 2015, 3, :o4, 1427565600 + tz.transition 2015, 10, :o3, 1445709600 + tz.transition 2016, 3, :o4, 1459015200 + tz.transition 2016, 10, :o3, 1477764000 + tz.transition 2017, 3, :o4, 1490464800 + tz.transition 2017, 10, :o3, 1509213600 + tz.transition 2018, 3, :o4, 1521914400 + tz.transition 2018, 10, :o3, 1540663200 + tz.transition 2019, 3, :o4, 1553968800 + tz.transition 2019, 10, :o3, 1572112800 + tz.transition 2020, 3, :o4, 1585418400 + tz.transition 2020, 10, :o3, 1603562400 + tz.transition 2021, 3, :o4, 1616868000 + tz.transition 2021, 10, :o3, 1635616800 + tz.transition 2022, 3, :o4, 1648317600 + tz.transition 2022, 10, :o3, 1667066400 + tz.transition 2023, 3, :o4, 1679767200 + tz.transition 2023, 10, :o3, 1698516000 + tz.transition 2024, 3, :o4, 1711821600 + tz.transition 2024, 10, :o3, 1729965600 + tz.transition 2025, 3, :o4, 1743271200 + tz.transition 2025, 10, :o3, 1761415200 + tz.transition 2026, 3, :o4, 1774720800 + tz.transition 2026, 10, :o3, 1792864800 + tz.transition 2027, 3, :o4, 1806170400 + tz.transition 2027, 10, :o3, 1824919200 + tz.transition 2028, 3, :o4, 1837620000 + tz.transition 2028, 10, :o3, 1856368800 + tz.transition 2029, 3, :o4, 1869069600 + tz.transition 2029, 10, :o3, 1887818400 + tz.transition 2030, 3, :o4, 1901124000 + tz.transition 2030, 10, :o3, 1919268000 + tz.transition 2031, 3, :o4, 1932573600 + tz.transition 2031, 10, :o3, 1950717600 + tz.transition 2032, 3, :o4, 1964023200 + tz.transition 2032, 10, :o3, 1982772000 + tz.transition 2033, 3, :o4, 1995472800 + tz.transition 2033, 10, :o3, 2014221600 + tz.transition 2034, 3, :o4, 2026922400 + tz.transition 2034, 10, :o3, 2045671200 + tz.transition 2035, 3, :o4, 2058372000 + tz.transition 2035, 10, :o3, 2077120800 + tz.transition 2036, 3, :o4, 2090426400 + tz.transition 2036, 10, :o3, 2108570400 + tz.transition 2037, 3, :o4, 2121876000 + tz.transition 2037, 10, :o3, 2140020000 + tz.transition 2038, 3, :o4, 9862041, 4 + tz.transition 2038, 10, :o3, 9862909, 4 + tz.transition 2039, 3, :o4, 9863497, 4 + tz.transition 2039, 10, :o3, 9864365, 4 + tz.transition 2040, 3, :o4, 9864953, 4 + tz.transition 2040, 10, :o3, 9865821, 4 + tz.transition 2041, 3, :o4, 9866437, 4 + tz.transition 2041, 10, :o3, 9867277, 4 + tz.transition 2042, 3, :o4, 9867893, 4 + tz.transition 2042, 10, :o3, 9868733, 4 + tz.transition 2043, 3, :o4, 9869349, 4 + tz.transition 2043, 10, :o3, 9870189, 4 + tz.transition 2044, 3, :o4, 9870805, 4 + tz.transition 2044, 10, :o3, 9871673, 4 + tz.transition 2045, 3, :o4, 9872261, 4 + tz.transition 2045, 10, :o3, 9873129, 4 + tz.transition 2046, 3, :o4, 9873717, 4 + tz.transition 2046, 10, :o3, 9874585, 4 + tz.transition 2047, 3, :o4, 9875201, 4 + tz.transition 2047, 10, :o3, 9876041, 4 + tz.transition 2048, 3, :o4, 9876657, 4 + tz.transition 2048, 10, :o3, 9877497, 4 + tz.transition 2049, 3, :o4, 9878113, 4 + tz.transition 2049, 10, :o3, 9878981, 4 + tz.transition 2050, 3, :o4, 9879569, 4 + tz.transition 2050, 10, :o3, 9880437, 4 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jakarta.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jakarta.rb new file mode 100644 index 0000000000..cc58fa173b --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jakarta.rb @@ -0,0 +1,30 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Jakarta + include TimezoneDefinition + + timezone 'Asia/Jakarta' do |tz| + tz.offset :o0, 25632, 0, :LMT + tz.offset :o1, 25632, 0, :JMT + tz.offset :o2, 26400, 0, :JAVT + tz.offset :o3, 27000, 0, :WIT + tz.offset :o4, 32400, 0, :JST + tz.offset :o5, 28800, 0, :WIT + tz.offset :o6, 25200, 0, :WIT + + tz.transition 1867, 8, :o1, 720956461, 300 + tz.transition 1923, 12, :o2, 87256267, 36 + tz.transition 1932, 10, :o3, 87372439, 36 + tz.transition 1942, 3, :o4, 38887059, 16 + tz.transition 1945, 9, :o3, 19453769, 8 + tz.transition 1948, 4, :o5, 38922755, 16 + tz.transition 1950, 4, :o3, 14600413, 6 + tz.transition 1963, 12, :o6, 39014323, 16 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jerusalem.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jerusalem.rb new file mode 100644 index 0000000000..9b737b899e --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jerusalem.rb @@ -0,0 +1,163 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Jerusalem + include TimezoneDefinition + + timezone 'Asia/Jerusalem' do |tz| + tz.offset :o0, 8456, 0, :LMT + tz.offset :o1, 8440, 0, :JMT + tz.offset :o2, 7200, 0, :IST + tz.offset :o3, 7200, 3600, :IDT + tz.offset :o4, 7200, 7200, :IDDT + + tz.transition 1879, 12, :o1, 26003326343, 10800 + tz.transition 1917, 12, :o2, 5230643909, 2160 + tz.transition 1940, 5, :o3, 29157377, 12 + tz.transition 1942, 10, :o2, 19445315, 8 + tz.transition 1943, 4, :o3, 4861631, 2 + tz.transition 1943, 10, :o2, 19448235, 8 + tz.transition 1944, 3, :o3, 29174177, 12 + tz.transition 1944, 10, :o2, 19451163, 8 + tz.transition 1945, 4, :o3, 29178737, 12 + tz.transition 1945, 10, :o2, 58362251, 24 + tz.transition 1946, 4, :o3, 4863853, 2 + tz.transition 1946, 10, :o2, 19457003, 8 + tz.transition 1948, 5, :o4, 29192333, 12 + tz.transition 1948, 8, :o3, 7298386, 3 + tz.transition 1948, 10, :o2, 58388555, 24 + tz.transition 1949, 4, :o3, 29196449, 12 + tz.transition 1949, 10, :o2, 58397315, 24 + tz.transition 1950, 4, :o3, 29200649, 12 + tz.transition 1950, 9, :o2, 4867079, 2 + tz.transition 1951, 3, :o3, 29204849, 12 + tz.transition 1951, 11, :o2, 4867923, 2 + tz.transition 1952, 4, :o3, 4868245, 2 + tz.transition 1952, 10, :o2, 4868609, 2 + tz.transition 1953, 4, :o3, 4868959, 2 + tz.transition 1953, 9, :o2, 4869267, 2 + tz.transition 1954, 6, :o3, 29218877, 12 + tz.transition 1954, 9, :o2, 19479979, 8 + tz.transition 1955, 6, :o3, 4870539, 2 + tz.transition 1955, 9, :o2, 19482891, 8 + tz.transition 1956, 6, :o3, 29227529, 12 + tz.transition 1956, 9, :o2, 4871493, 2 + tz.transition 1957, 4, :o3, 4871915, 2 + tz.transition 1957, 9, :o2, 19488827, 8 + tz.transition 1974, 7, :o3, 142380000 + tz.transition 1974, 10, :o2, 150843600 + tz.transition 1975, 4, :o3, 167176800 + tz.transition 1975, 8, :o2, 178664400 + tz.transition 1985, 4, :o3, 482277600 + tz.transition 1985, 9, :o2, 495579600 + tz.transition 1986, 5, :o3, 516751200 + tz.transition 1986, 9, :o2, 526424400 + tz.transition 1987, 4, :o3, 545436000 + tz.transition 1987, 9, :o2, 558478800 + tz.transition 1988, 4, :o3, 576540000 + tz.transition 1988, 9, :o2, 589237200 + tz.transition 1989, 4, :o3, 609890400 + tz.transition 1989, 9, :o2, 620773200 + tz.transition 1990, 3, :o3, 638316000 + tz.transition 1990, 8, :o2, 651618000 + tz.transition 1991, 3, :o3, 669765600 + tz.transition 1991, 8, :o2, 683672400 + tz.transition 1992, 3, :o3, 701820000 + tz.transition 1992, 9, :o2, 715726800 + tz.transition 1993, 4, :o3, 733701600 + tz.transition 1993, 9, :o2, 747176400 + tz.transition 1994, 3, :o3, 765151200 + tz.transition 1994, 8, :o2, 778021200 + tz.transition 1995, 3, :o3, 796600800 + tz.transition 1995, 9, :o2, 810075600 + tz.transition 1996, 3, :o3, 826840800 + tz.transition 1996, 9, :o2, 842821200 + tz.transition 1997, 3, :o3, 858895200 + tz.transition 1997, 9, :o2, 874184400 + tz.transition 1998, 3, :o3, 890344800 + tz.transition 1998, 9, :o2, 905029200 + tz.transition 1999, 4, :o3, 923011200 + tz.transition 1999, 9, :o2, 936313200 + tz.transition 2000, 4, :o3, 955670400 + tz.transition 2000, 10, :o2, 970783200 + tz.transition 2001, 4, :o3, 986770800 + tz.transition 2001, 9, :o2, 1001282400 + tz.transition 2002, 3, :o3, 1017356400 + tz.transition 2002, 10, :o2, 1033941600 + tz.transition 2003, 3, :o3, 1048806000 + tz.transition 2003, 10, :o2, 1065132000 + tz.transition 2004, 4, :o3, 1081292400 + tz.transition 2004, 9, :o2, 1095804000 + tz.transition 2005, 4, :o3, 1112313600 + tz.transition 2005, 10, :o2, 1128812400 + tz.transition 2006, 3, :o3, 1143763200 + tz.transition 2006, 9, :o2, 1159657200 + tz.transition 2007, 3, :o3, 1175212800 + tz.transition 2007, 9, :o2, 1189897200 + tz.transition 2008, 3, :o3, 1206662400 + tz.transition 2008, 10, :o2, 1223161200 + tz.transition 2009, 3, :o3, 1238112000 + tz.transition 2009, 9, :o2, 1254006000 + tz.transition 2010, 3, :o3, 1269561600 + tz.transition 2010, 9, :o2, 1284246000 + tz.transition 2011, 4, :o3, 1301616000 + tz.transition 2011, 10, :o2, 1317510000 + tz.transition 2012, 3, :o3, 1333065600 + tz.transition 2012, 9, :o2, 1348354800 + tz.transition 2013, 3, :o3, 1364515200 + tz.transition 2013, 9, :o2, 1378594800 + tz.transition 2014, 3, :o3, 1395964800 + tz.transition 2014, 9, :o2, 1411858800 + tz.transition 2015, 3, :o3, 1427414400 + tz.transition 2015, 9, :o2, 1442703600 + tz.transition 2016, 4, :o3, 1459468800 + tz.transition 2016, 10, :o2, 1475967600 + tz.transition 2017, 3, :o3, 1490918400 + tz.transition 2017, 9, :o2, 1506207600 + tz.transition 2018, 3, :o3, 1522368000 + tz.transition 2018, 9, :o2, 1537052400 + tz.transition 2019, 3, :o3, 1553817600 + tz.transition 2019, 10, :o2, 1570316400 + tz.transition 2020, 3, :o3, 1585267200 + tz.transition 2020, 9, :o2, 1601161200 + tz.transition 2021, 3, :o3, 1616716800 + tz.transition 2021, 9, :o2, 1631401200 + tz.transition 2022, 4, :o3, 1648771200 + tz.transition 2022, 10, :o2, 1664665200 + tz.transition 2023, 3, :o3, 1680220800 + tz.transition 2023, 9, :o2, 1695510000 + tz.transition 2024, 3, :o3, 1711670400 + tz.transition 2024, 10, :o2, 1728169200 + tz.transition 2025, 3, :o3, 1743120000 + tz.transition 2025, 9, :o2, 1759014000 + tz.transition 2026, 3, :o3, 1774569600 + tz.transition 2026, 9, :o2, 1789858800 + tz.transition 2027, 3, :o3, 1806019200 + tz.transition 2027, 10, :o2, 1823122800 + tz.transition 2028, 3, :o3, 1838073600 + tz.transition 2028, 9, :o2, 1853362800 + tz.transition 2029, 3, :o3, 1869523200 + tz.transition 2029, 9, :o2, 1884207600 + tz.transition 2030, 3, :o3, 1900972800 + tz.transition 2030, 10, :o2, 1917471600 + tz.transition 2031, 3, :o3, 1932422400 + tz.transition 2031, 9, :o2, 1947711600 + tz.transition 2032, 3, :o3, 1963872000 + tz.transition 2032, 9, :o2, 1978556400 + tz.transition 2033, 4, :o3, 1995926400 + tz.transition 2033, 10, :o2, 2011820400 + tz.transition 2034, 3, :o3, 2027376000 + tz.transition 2034, 9, :o2, 2042060400 + tz.transition 2035, 3, :o3, 2058825600 + tz.transition 2035, 10, :o2, 2075324400 + tz.transition 2036, 3, :o3, 2090275200 + tz.transition 2036, 9, :o2, 2106169200 + tz.transition 2037, 3, :o3, 2121724800 + tz.transition 2037, 9, :o2, 2136409200 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kabul.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kabul.rb new file mode 100644 index 0000000000..669c09790a --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kabul.rb @@ -0,0 +1,20 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Kabul + include TimezoneDefinition + + timezone 'Asia/Kabul' do |tz| + tz.offset :o0, 16608, 0, :LMT + tz.offset :o1, 14400, 0, :AFT + tz.offset :o2, 16200, 0, :AFT + + tz.transition 1889, 12, :o1, 2170231477, 900 + tz.transition 1944, 12, :o2, 7294369, 3 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kamchatka.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kamchatka.rb new file mode 100644 index 0000000000..2f1690b3a9 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kamchatka.rb @@ -0,0 +1,163 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Kamchatka + include TimezoneDefinition + + timezone 'Asia/Kamchatka' do |tz| + tz.offset :o0, 38076, 0, :LMT + tz.offset :o1, 39600, 0, :PETT + tz.offset :o2, 43200, 0, :PETT + tz.offset :o3, 43200, 3600, :PETST + tz.offset :o4, 39600, 3600, :PETST + + tz.transition 1922, 11, :o1, 17448250027, 7200 + tz.transition 1930, 6, :o2, 58227553, 24 + tz.transition 1981, 3, :o3, 354888000 + tz.transition 1981, 9, :o2, 370695600 + tz.transition 1982, 3, :o3, 386424000 + tz.transition 1982, 9, :o2, 402231600 + tz.transition 1983, 3, :o3, 417960000 + tz.transition 1983, 9, :o2, 433767600 + tz.transition 1984, 3, :o3, 449582400 + tz.transition 1984, 9, :o2, 465314400 + tz.transition 1985, 3, :o3, 481039200 + tz.transition 1985, 9, :o2, 496764000 + tz.transition 1986, 3, :o3, 512488800 + tz.transition 1986, 9, :o2, 528213600 + tz.transition 1987, 3, :o3, 543938400 + tz.transition 1987, 9, :o2, 559663200 + tz.transition 1988, 3, :o3, 575388000 + tz.transition 1988, 9, :o2, 591112800 + tz.transition 1989, 3, :o3, 606837600 + tz.transition 1989, 9, :o2, 622562400 + tz.transition 1990, 3, :o3, 638287200 + tz.transition 1990, 9, :o2, 654616800 + tz.transition 1991, 3, :o4, 670341600 + tz.transition 1991, 9, :o1, 686070000 + tz.transition 1992, 1, :o2, 695746800 + tz.transition 1992, 3, :o3, 701780400 + tz.transition 1992, 9, :o2, 717501600 + tz.transition 1993, 3, :o3, 733240800 + tz.transition 1993, 9, :o2, 748965600 + tz.transition 1994, 3, :o3, 764690400 + tz.transition 1994, 9, :o2, 780415200 + tz.transition 1995, 3, :o3, 796140000 + tz.transition 1995, 9, :o2, 811864800 + tz.transition 1996, 3, :o3, 828194400 + tz.transition 1996, 10, :o2, 846338400 + tz.transition 1997, 3, :o3, 859644000 + tz.transition 1997, 10, :o2, 877788000 + tz.transition 1998, 3, :o3, 891093600 + tz.transition 1998, 10, :o2, 909237600 + tz.transition 1999, 3, :o3, 922543200 + tz.transition 1999, 10, :o2, 941292000 + tz.transition 2000, 3, :o3, 953992800 + tz.transition 2000, 10, :o2, 972741600 + tz.transition 2001, 3, :o3, 985442400 + tz.transition 2001, 10, :o2, 1004191200 + tz.transition 2002, 3, :o3, 1017496800 + tz.transition 2002, 10, :o2, 1035640800 + tz.transition 2003, 3, :o3, 1048946400 + tz.transition 2003, 10, :o2, 1067090400 + tz.transition 2004, 3, :o3, 1080396000 + tz.transition 2004, 10, :o2, 1099144800 + tz.transition 2005, 3, :o3, 1111845600 + tz.transition 2005, 10, :o2, 1130594400 + tz.transition 2006, 3, :o3, 1143295200 + tz.transition 2006, 10, :o2, 1162044000 + tz.transition 2007, 3, :o3, 1174744800 + tz.transition 2007, 10, :o2, 1193493600 + tz.transition 2008, 3, :o3, 1206799200 + tz.transition 2008, 10, :o2, 1224943200 + tz.transition 2009, 3, :o3, 1238248800 + tz.transition 2009, 10, :o2, 1256392800 + tz.transition 2010, 3, :o3, 1269698400 + tz.transition 2010, 10, :o2, 1288447200 + tz.transition 2011, 3, :o3, 1301148000 + tz.transition 2011, 10, :o2, 1319896800 + tz.transition 2012, 3, :o3, 1332597600 + tz.transition 2012, 10, :o2, 1351346400 + tz.transition 2013, 3, :o3, 1364652000 + tz.transition 2013, 10, :o2, 1382796000 + tz.transition 2014, 3, :o3, 1396101600 + tz.transition 2014, 10, :o2, 1414245600 + tz.transition 2015, 3, :o3, 1427551200 + tz.transition 2015, 10, :o2, 1445695200 + tz.transition 2016, 3, :o3, 1459000800 + tz.transition 2016, 10, :o2, 1477749600 + tz.transition 2017, 3, :o3, 1490450400 + tz.transition 2017, 10, :o2, 1509199200 + tz.transition 2018, 3, :o3, 1521900000 + tz.transition 2018, 10, :o2, 1540648800 + tz.transition 2019, 3, :o3, 1553954400 + tz.transition 2019, 10, :o2, 1572098400 + tz.transition 2020, 3, :o3, 1585404000 + tz.transition 2020, 10, :o2, 1603548000 + tz.transition 2021, 3, :o3, 1616853600 + tz.transition 2021, 10, :o2, 1635602400 + tz.transition 2022, 3, :o3, 1648303200 + tz.transition 2022, 10, :o2, 1667052000 + tz.transition 2023, 3, :o3, 1679752800 + tz.transition 2023, 10, :o2, 1698501600 + tz.transition 2024, 3, :o3, 1711807200 + tz.transition 2024, 10, :o2, 1729951200 + tz.transition 2025, 3, :o3, 1743256800 + tz.transition 2025, 10, :o2, 1761400800 + tz.transition 2026, 3, :o3, 1774706400 + tz.transition 2026, 10, :o2, 1792850400 + tz.transition 2027, 3, :o3, 1806156000 + tz.transition 2027, 10, :o2, 1824904800 + tz.transition 2028, 3, :o3, 1837605600 + tz.transition 2028, 10, :o2, 1856354400 + tz.transition 2029, 3, :o3, 1869055200 + tz.transition 2029, 10, :o2, 1887804000 + tz.transition 2030, 3, :o3, 1901109600 + tz.transition 2030, 10, :o2, 1919253600 + tz.transition 2031, 3, :o3, 1932559200 + tz.transition 2031, 10, :o2, 1950703200 + tz.transition 2032, 3, :o3, 1964008800 + tz.transition 2032, 10, :o2, 1982757600 + tz.transition 2033, 3, :o3, 1995458400 + tz.transition 2033, 10, :o2, 2014207200 + tz.transition 2034, 3, :o3, 2026908000 + tz.transition 2034, 10, :o2, 2045656800 + tz.transition 2035, 3, :o3, 2058357600 + tz.transition 2035, 10, :o2, 2077106400 + tz.transition 2036, 3, :o3, 2090412000 + tz.transition 2036, 10, :o2, 2108556000 + tz.transition 2037, 3, :o3, 2121861600 + tz.transition 2037, 10, :o2, 2140005600 + tz.transition 2038, 3, :o3, 29586121, 12 + tz.transition 2038, 10, :o2, 29588725, 12 + tz.transition 2039, 3, :o3, 29590489, 12 + tz.transition 2039, 10, :o2, 29593093, 12 + tz.transition 2040, 3, :o3, 29594857, 12 + tz.transition 2040, 10, :o2, 29597461, 12 + tz.transition 2041, 3, :o3, 29599309, 12 + tz.transition 2041, 10, :o2, 29601829, 12 + tz.transition 2042, 3, :o3, 29603677, 12 + tz.transition 2042, 10, :o2, 29606197, 12 + tz.transition 2043, 3, :o3, 29608045, 12 + tz.transition 2043, 10, :o2, 29610565, 12 + tz.transition 2044, 3, :o3, 29612413, 12 + tz.transition 2044, 10, :o2, 29615017, 12 + tz.transition 2045, 3, :o3, 29616781, 12 + tz.transition 2045, 10, :o2, 29619385, 12 + tz.transition 2046, 3, :o3, 29621149, 12 + tz.transition 2046, 10, :o2, 29623753, 12 + tz.transition 2047, 3, :o3, 29625601, 12 + tz.transition 2047, 10, :o2, 29628121, 12 + tz.transition 2048, 3, :o3, 29629969, 12 + tz.transition 2048, 10, :o2, 29632489, 12 + tz.transition 2049, 3, :o3, 29634337, 12 + tz.transition 2049, 10, :o2, 29636941, 12 + tz.transition 2050, 3, :o3, 29638705, 12 + tz.transition 2050, 10, :o2, 29641309, 12 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Karachi.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Karachi.rb new file mode 100644 index 0000000000..dfe02c5cf6 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Karachi.rb @@ -0,0 +1,114 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Karachi + include TimezoneDefinition + + timezone 'Asia/Karachi' do |tz| + tz.offset :o0, 16092, 0, :LMT + tz.offset :o1, 19800, 0, :IST + tz.offset :o2, 19800, 3600, :IST + tz.offset :o3, 18000, 0, :KART + tz.offset :o4, 18000, 0, :PKT + tz.offset :o5, 18000, 3600, :PKST + + tz.transition 1906, 12, :o1, 1934061051, 800 + tz.transition 1942, 8, :o2, 116668957, 48 + tz.transition 1945, 10, :o1, 116723675, 48 + tz.transition 1951, 9, :o3, 116828125, 48 + tz.transition 1971, 3, :o4, 38775600 + tz.transition 2002, 4, :o5, 1018119660 + tz.transition 2002, 10, :o4, 1033840860 + tz.transition 2008, 5, :o5, 1212260400 + tz.transition 2008, 10, :o4, 1225476000 + tz.transition 2009, 4, :o5, 1239735600 + tz.transition 2009, 10, :o4, 1257012000 + tz.transition 2010, 4, :o5, 1271271600 + tz.transition 2010, 10, :o4, 1288548000 + tz.transition 2011, 4, :o5, 1302807600 + tz.transition 2011, 10, :o4, 1320084000 + tz.transition 2012, 4, :o5, 1334430000 + tz.transition 2012, 10, :o4, 1351706400 + tz.transition 2013, 4, :o5, 1365966000 + tz.transition 2013, 10, :o4, 1383242400 + tz.transition 2014, 4, :o5, 1397502000 + tz.transition 2014, 10, :o4, 1414778400 + tz.transition 2015, 4, :o5, 1429038000 + tz.transition 2015, 10, :o4, 1446314400 + tz.transition 2016, 4, :o5, 1460660400 + tz.transition 2016, 10, :o4, 1477936800 + tz.transition 2017, 4, :o5, 1492196400 + tz.transition 2017, 10, :o4, 1509472800 + tz.transition 2018, 4, :o5, 1523732400 + tz.transition 2018, 10, :o4, 1541008800 + tz.transition 2019, 4, :o5, 1555268400 + tz.transition 2019, 10, :o4, 1572544800 + tz.transition 2020, 4, :o5, 1586890800 + tz.transition 2020, 10, :o4, 1604167200 + tz.transition 2021, 4, :o5, 1618426800 + tz.transition 2021, 10, :o4, 1635703200 + tz.transition 2022, 4, :o5, 1649962800 + tz.transition 2022, 10, :o4, 1667239200 + tz.transition 2023, 4, :o5, 1681498800 + tz.transition 2023, 10, :o4, 1698775200 + tz.transition 2024, 4, :o5, 1713121200 + tz.transition 2024, 10, :o4, 1730397600 + tz.transition 2025, 4, :o5, 1744657200 + tz.transition 2025, 10, :o4, 1761933600 + tz.transition 2026, 4, :o5, 1776193200 + tz.transition 2026, 10, :o4, 1793469600 + tz.transition 2027, 4, :o5, 1807729200 + tz.transition 2027, 10, :o4, 1825005600 + tz.transition 2028, 4, :o5, 1839351600 + tz.transition 2028, 10, :o4, 1856628000 + tz.transition 2029, 4, :o5, 1870887600 + tz.transition 2029, 10, :o4, 1888164000 + tz.transition 2030, 4, :o5, 1902423600 + tz.transition 2030, 10, :o4, 1919700000 + tz.transition 2031, 4, :o5, 1933959600 + tz.transition 2031, 10, :o4, 1951236000 + tz.transition 2032, 4, :o5, 1965582000 + tz.transition 2032, 10, :o4, 1982858400 + tz.transition 2033, 4, :o5, 1997118000 + tz.transition 2033, 10, :o4, 2014394400 + tz.transition 2034, 4, :o5, 2028654000 + tz.transition 2034, 10, :o4, 2045930400 + tz.transition 2035, 4, :o5, 2060190000 + tz.transition 2035, 10, :o4, 2077466400 + tz.transition 2036, 4, :o5, 2091812400 + tz.transition 2036, 10, :o4, 2109088800 + tz.transition 2037, 4, :o5, 2123348400 + tz.transition 2037, 10, :o4, 2140624800 + tz.transition 2038, 4, :o5, 59172679, 24 + tz.transition 2038, 10, :o4, 9862913, 4 + tz.transition 2039, 4, :o5, 59181439, 24 + tz.transition 2039, 10, :o4, 9864373, 4 + tz.transition 2040, 4, :o5, 59190223, 24 + tz.transition 2040, 10, :o4, 9865837, 4 + tz.transition 2041, 4, :o5, 59198983, 24 + tz.transition 2041, 10, :o4, 9867297, 4 + tz.transition 2042, 4, :o5, 59207743, 24 + tz.transition 2042, 10, :o4, 9868757, 4 + tz.transition 2043, 4, :o5, 59216503, 24 + tz.transition 2043, 10, :o4, 9870217, 4 + tz.transition 2044, 4, :o5, 59225287, 24 + tz.transition 2044, 10, :o4, 9871681, 4 + tz.transition 2045, 4, :o5, 59234047, 24 + tz.transition 2045, 10, :o4, 9873141, 4 + tz.transition 2046, 4, :o5, 59242807, 24 + tz.transition 2046, 10, :o4, 9874601, 4 + tz.transition 2047, 4, :o5, 59251567, 24 + tz.transition 2047, 10, :o4, 9876061, 4 + tz.transition 2048, 4, :o5, 59260351, 24 + tz.transition 2048, 10, :o4, 9877525, 4 + tz.transition 2049, 4, :o5, 59269111, 24 + tz.transition 2049, 10, :o4, 9878985, 4 + tz.transition 2050, 4, :o5, 59277871, 24 + tz.transition 2050, 10, :o4, 9880445, 4 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kathmandu.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kathmandu.rb new file mode 100644 index 0000000000..37b241612e --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kathmandu.rb @@ -0,0 +1,20 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Kathmandu + include TimezoneDefinition + + timezone 'Asia/Kathmandu' do |tz| + tz.offset :o0, 20476, 0, :LMT + tz.offset :o1, 19800, 0, :IST + tz.offset :o2, 20700, 0, :NPT + + tz.transition 1919, 12, :o1, 52322204081, 21600 + tz.transition 1985, 12, :o2, 504901800 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kolkata.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kolkata.rb new file mode 100644 index 0000000000..1b6ffbd59d --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kolkata.rb @@ -0,0 +1,25 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Kolkata + include TimezoneDefinition + + timezone 'Asia/Kolkata' do |tz| + tz.offset :o0, 21208, 0, :LMT + tz.offset :o1, 21200, 0, :HMT + tz.offset :o2, 23400, 0, :BURT + tz.offset :o3, 19800, 0, :IST + tz.offset :o4, 19800, 3600, :IST + + tz.transition 1879, 12, :o1, 26003324749, 10800 + tz.transition 1941, 9, :o2, 524937943, 216 + tz.transition 1942, 5, :o3, 116663723, 48 + tz.transition 1942, 8, :o4, 116668957, 48 + tz.transition 1945, 10, :o3, 116723675, 48 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Krasnoyarsk.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Krasnoyarsk.rb new file mode 100644 index 0000000000..d6c503c155 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Krasnoyarsk.rb @@ -0,0 +1,163 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Krasnoyarsk + include TimezoneDefinition + + timezone 'Asia/Krasnoyarsk' do |tz| + tz.offset :o0, 22280, 0, :LMT + tz.offset :o1, 21600, 0, :KRAT + tz.offset :o2, 25200, 0, :KRAT + tz.offset :o3, 25200, 3600, :KRAST + tz.offset :o4, 21600, 3600, :KRAST + + tz.transition 1920, 1, :o1, 5232231163, 2160 + tz.transition 1930, 6, :o2, 9704593, 4 + tz.transition 1981, 3, :o3, 354906000 + tz.transition 1981, 9, :o2, 370713600 + tz.transition 1982, 3, :o3, 386442000 + tz.transition 1982, 9, :o2, 402249600 + tz.transition 1983, 3, :o3, 417978000 + tz.transition 1983, 9, :o2, 433785600 + tz.transition 1984, 3, :o3, 449600400 + tz.transition 1984, 9, :o2, 465332400 + tz.transition 1985, 3, :o3, 481057200 + tz.transition 1985, 9, :o2, 496782000 + tz.transition 1986, 3, :o3, 512506800 + tz.transition 1986, 9, :o2, 528231600 + tz.transition 1987, 3, :o3, 543956400 + tz.transition 1987, 9, :o2, 559681200 + tz.transition 1988, 3, :o3, 575406000 + tz.transition 1988, 9, :o2, 591130800 + tz.transition 1989, 3, :o3, 606855600 + tz.transition 1989, 9, :o2, 622580400 + tz.transition 1990, 3, :o3, 638305200 + tz.transition 1990, 9, :o2, 654634800 + tz.transition 1991, 3, :o4, 670359600 + tz.transition 1991, 9, :o1, 686088000 + tz.transition 1992, 1, :o2, 695764800 + tz.transition 1992, 3, :o3, 701798400 + tz.transition 1992, 9, :o2, 717519600 + tz.transition 1993, 3, :o3, 733258800 + tz.transition 1993, 9, :o2, 748983600 + tz.transition 1994, 3, :o3, 764708400 + tz.transition 1994, 9, :o2, 780433200 + tz.transition 1995, 3, :o3, 796158000 + tz.transition 1995, 9, :o2, 811882800 + tz.transition 1996, 3, :o3, 828212400 + tz.transition 1996, 10, :o2, 846356400 + tz.transition 1997, 3, :o3, 859662000 + tz.transition 1997, 10, :o2, 877806000 + tz.transition 1998, 3, :o3, 891111600 + tz.transition 1998, 10, :o2, 909255600 + tz.transition 1999, 3, :o3, 922561200 + tz.transition 1999, 10, :o2, 941310000 + tz.transition 2000, 3, :o3, 954010800 + tz.transition 2000, 10, :o2, 972759600 + tz.transition 2001, 3, :o3, 985460400 + tz.transition 2001, 10, :o2, 1004209200 + tz.transition 2002, 3, :o3, 1017514800 + tz.transition 2002, 10, :o2, 1035658800 + tz.transition 2003, 3, :o3, 1048964400 + tz.transition 2003, 10, :o2, 1067108400 + tz.transition 2004, 3, :o3, 1080414000 + tz.transition 2004, 10, :o2, 1099162800 + tz.transition 2005, 3, :o3, 1111863600 + tz.transition 2005, 10, :o2, 1130612400 + tz.transition 2006, 3, :o3, 1143313200 + tz.transition 2006, 10, :o2, 1162062000 + tz.transition 2007, 3, :o3, 1174762800 + tz.transition 2007, 10, :o2, 1193511600 + tz.transition 2008, 3, :o3, 1206817200 + tz.transition 2008, 10, :o2, 1224961200 + tz.transition 2009, 3, :o3, 1238266800 + tz.transition 2009, 10, :o2, 1256410800 + tz.transition 2010, 3, :o3, 1269716400 + tz.transition 2010, 10, :o2, 1288465200 + tz.transition 2011, 3, :o3, 1301166000 + tz.transition 2011, 10, :o2, 1319914800 + tz.transition 2012, 3, :o3, 1332615600 + tz.transition 2012, 10, :o2, 1351364400 + tz.transition 2013, 3, :o3, 1364670000 + tz.transition 2013, 10, :o2, 1382814000 + tz.transition 2014, 3, :o3, 1396119600 + tz.transition 2014, 10, :o2, 1414263600 + tz.transition 2015, 3, :o3, 1427569200 + tz.transition 2015, 10, :o2, 1445713200 + tz.transition 2016, 3, :o3, 1459018800 + tz.transition 2016, 10, :o2, 1477767600 + tz.transition 2017, 3, :o3, 1490468400 + tz.transition 2017, 10, :o2, 1509217200 + tz.transition 2018, 3, :o3, 1521918000 + tz.transition 2018, 10, :o2, 1540666800 + tz.transition 2019, 3, :o3, 1553972400 + tz.transition 2019, 10, :o2, 1572116400 + tz.transition 2020, 3, :o3, 1585422000 + tz.transition 2020, 10, :o2, 1603566000 + tz.transition 2021, 3, :o3, 1616871600 + tz.transition 2021, 10, :o2, 1635620400 + tz.transition 2022, 3, :o3, 1648321200 + tz.transition 2022, 10, :o2, 1667070000 + tz.transition 2023, 3, :o3, 1679770800 + tz.transition 2023, 10, :o2, 1698519600 + tz.transition 2024, 3, :o3, 1711825200 + tz.transition 2024, 10, :o2, 1729969200 + tz.transition 2025, 3, :o3, 1743274800 + tz.transition 2025, 10, :o2, 1761418800 + tz.transition 2026, 3, :o3, 1774724400 + tz.transition 2026, 10, :o2, 1792868400 + tz.transition 2027, 3, :o3, 1806174000 + tz.transition 2027, 10, :o2, 1824922800 + tz.transition 2028, 3, :o3, 1837623600 + tz.transition 2028, 10, :o2, 1856372400 + tz.transition 2029, 3, :o3, 1869073200 + tz.transition 2029, 10, :o2, 1887822000 + tz.transition 2030, 3, :o3, 1901127600 + tz.transition 2030, 10, :o2, 1919271600 + tz.transition 2031, 3, :o3, 1932577200 + tz.transition 2031, 10, :o2, 1950721200 + tz.transition 2032, 3, :o3, 1964026800 + tz.transition 2032, 10, :o2, 1982775600 + tz.transition 2033, 3, :o3, 1995476400 + tz.transition 2033, 10, :o2, 2014225200 + tz.transition 2034, 3, :o3, 2026926000 + tz.transition 2034, 10, :o2, 2045674800 + tz.transition 2035, 3, :o3, 2058375600 + tz.transition 2035, 10, :o2, 2077124400 + tz.transition 2036, 3, :o3, 2090430000 + tz.transition 2036, 10, :o2, 2108574000 + tz.transition 2037, 3, :o3, 2121879600 + tz.transition 2037, 10, :o2, 2140023600 + tz.transition 2038, 3, :o3, 59172247, 24 + tz.transition 2038, 10, :o2, 59177455, 24 + tz.transition 2039, 3, :o3, 59180983, 24 + tz.transition 2039, 10, :o2, 59186191, 24 + tz.transition 2040, 3, :o3, 59189719, 24 + tz.transition 2040, 10, :o2, 59194927, 24 + tz.transition 2041, 3, :o3, 59198623, 24 + tz.transition 2041, 10, :o2, 59203663, 24 + tz.transition 2042, 3, :o3, 59207359, 24 + tz.transition 2042, 10, :o2, 59212399, 24 + tz.transition 2043, 3, :o3, 59216095, 24 + tz.transition 2043, 10, :o2, 59221135, 24 + tz.transition 2044, 3, :o3, 59224831, 24 + tz.transition 2044, 10, :o2, 59230039, 24 + tz.transition 2045, 3, :o3, 59233567, 24 + tz.transition 2045, 10, :o2, 59238775, 24 + tz.transition 2046, 3, :o3, 59242303, 24 + tz.transition 2046, 10, :o2, 59247511, 24 + tz.transition 2047, 3, :o3, 59251207, 24 + tz.transition 2047, 10, :o2, 59256247, 24 + tz.transition 2048, 3, :o3, 59259943, 24 + tz.transition 2048, 10, :o2, 59264983, 24 + tz.transition 2049, 3, :o3, 59268679, 24 + tz.transition 2049, 10, :o2, 59273887, 24 + tz.transition 2050, 3, :o3, 59277415, 24 + tz.transition 2050, 10, :o2, 59282623, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb new file mode 100644 index 0000000000..77a0c206fa --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb @@ -0,0 +1,31 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Kuala_Lumpur + include TimezoneDefinition + + timezone 'Asia/Kuala_Lumpur' do |tz| + tz.offset :o0, 24406, 0, :LMT + tz.offset :o1, 24925, 0, :SMT + tz.offset :o2, 25200, 0, :MALT + tz.offset :o3, 25200, 1200, :MALST + tz.offset :o4, 26400, 0, :MALT + tz.offset :o5, 27000, 0, :MALT + tz.offset :o6, 32400, 0, :JST + tz.offset :o7, 28800, 0, :MYT + + tz.transition 1900, 12, :o1, 104344641397, 43200 + tz.transition 1905, 5, :o2, 8353142363, 3456 + tz.transition 1932, 12, :o3, 58249757, 24 + tz.transition 1935, 12, :o4, 87414055, 36 + tz.transition 1941, 8, :o5, 87488575, 36 + tz.transition 1942, 2, :o6, 38886499, 16 + tz.transition 1945, 9, :o5, 19453681, 8 + tz.transition 1981, 12, :o7, 378664200 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuwait.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuwait.rb new file mode 100644 index 0000000000..5bd5283197 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuwait.rb @@ -0,0 +1,18 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Kuwait + include TimezoneDefinition + + timezone 'Asia/Kuwait' do |tz| + tz.offset :o0, 11516, 0, :LMT + tz.offset :o1, 10800, 0, :AST + + tz.transition 1949, 12, :o1, 52558899121, 21600 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Magadan.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Magadan.rb new file mode 100644 index 0000000000..302093693e --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Magadan.rb @@ -0,0 +1,163 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Magadan + include TimezoneDefinition + + timezone 'Asia/Magadan' do |tz| + tz.offset :o0, 36192, 0, :LMT + tz.offset :o1, 36000, 0, :MAGT + tz.offset :o2, 39600, 0, :MAGT + tz.offset :o3, 39600, 3600, :MAGST + tz.offset :o4, 36000, 3600, :MAGST + + tz.transition 1924, 5, :o1, 2181516373, 900 + tz.transition 1930, 6, :o2, 29113777, 12 + tz.transition 1981, 3, :o3, 354891600 + tz.transition 1981, 9, :o2, 370699200 + tz.transition 1982, 3, :o3, 386427600 + tz.transition 1982, 9, :o2, 402235200 + tz.transition 1983, 3, :o3, 417963600 + tz.transition 1983, 9, :o2, 433771200 + tz.transition 1984, 3, :o3, 449586000 + tz.transition 1984, 9, :o2, 465318000 + tz.transition 1985, 3, :o3, 481042800 + tz.transition 1985, 9, :o2, 496767600 + tz.transition 1986, 3, :o3, 512492400 + tz.transition 1986, 9, :o2, 528217200 + tz.transition 1987, 3, :o3, 543942000 + tz.transition 1987, 9, :o2, 559666800 + tz.transition 1988, 3, :o3, 575391600 + tz.transition 1988, 9, :o2, 591116400 + tz.transition 1989, 3, :o3, 606841200 + tz.transition 1989, 9, :o2, 622566000 + tz.transition 1990, 3, :o3, 638290800 + tz.transition 1990, 9, :o2, 654620400 + tz.transition 1991, 3, :o4, 670345200 + tz.transition 1991, 9, :o1, 686073600 + tz.transition 1992, 1, :o2, 695750400 + tz.transition 1992, 3, :o3, 701784000 + tz.transition 1992, 9, :o2, 717505200 + tz.transition 1993, 3, :o3, 733244400 + tz.transition 1993, 9, :o2, 748969200 + tz.transition 1994, 3, :o3, 764694000 + tz.transition 1994, 9, :o2, 780418800 + tz.transition 1995, 3, :o3, 796143600 + tz.transition 1995, 9, :o2, 811868400 + tz.transition 1996, 3, :o3, 828198000 + tz.transition 1996, 10, :o2, 846342000 + tz.transition 1997, 3, :o3, 859647600 + tz.transition 1997, 10, :o2, 877791600 + tz.transition 1998, 3, :o3, 891097200 + tz.transition 1998, 10, :o2, 909241200 + tz.transition 1999, 3, :o3, 922546800 + tz.transition 1999, 10, :o2, 941295600 + tz.transition 2000, 3, :o3, 953996400 + tz.transition 2000, 10, :o2, 972745200 + tz.transition 2001, 3, :o3, 985446000 + tz.transition 2001, 10, :o2, 1004194800 + tz.transition 2002, 3, :o3, 1017500400 + tz.transition 2002, 10, :o2, 1035644400 + tz.transition 2003, 3, :o3, 1048950000 + tz.transition 2003, 10, :o2, 1067094000 + tz.transition 2004, 3, :o3, 1080399600 + tz.transition 2004, 10, :o2, 1099148400 + tz.transition 2005, 3, :o3, 1111849200 + tz.transition 2005, 10, :o2, 1130598000 + tz.transition 2006, 3, :o3, 1143298800 + tz.transition 2006, 10, :o2, 1162047600 + tz.transition 2007, 3, :o3, 1174748400 + tz.transition 2007, 10, :o2, 1193497200 + tz.transition 2008, 3, :o3, 1206802800 + tz.transition 2008, 10, :o2, 1224946800 + tz.transition 2009, 3, :o3, 1238252400 + tz.transition 2009, 10, :o2, 1256396400 + tz.transition 2010, 3, :o3, 1269702000 + tz.transition 2010, 10, :o2, 1288450800 + tz.transition 2011, 3, :o3, 1301151600 + tz.transition 2011, 10, :o2, 1319900400 + tz.transition 2012, 3, :o3, 1332601200 + tz.transition 2012, 10, :o2, 1351350000 + tz.transition 2013, 3, :o3, 1364655600 + tz.transition 2013, 10, :o2, 1382799600 + tz.transition 2014, 3, :o3, 1396105200 + tz.transition 2014, 10, :o2, 1414249200 + tz.transition 2015, 3, :o3, 1427554800 + tz.transition 2015, 10, :o2, 1445698800 + tz.transition 2016, 3, :o3, 1459004400 + tz.transition 2016, 10, :o2, 1477753200 + tz.transition 2017, 3, :o3, 1490454000 + tz.transition 2017, 10, :o2, 1509202800 + tz.transition 2018, 3, :o3, 1521903600 + tz.transition 2018, 10, :o2, 1540652400 + tz.transition 2019, 3, :o3, 1553958000 + tz.transition 2019, 10, :o2, 1572102000 + tz.transition 2020, 3, :o3, 1585407600 + tz.transition 2020, 10, :o2, 1603551600 + tz.transition 2021, 3, :o3, 1616857200 + tz.transition 2021, 10, :o2, 1635606000 + tz.transition 2022, 3, :o3, 1648306800 + tz.transition 2022, 10, :o2, 1667055600 + tz.transition 2023, 3, :o3, 1679756400 + tz.transition 2023, 10, :o2, 1698505200 + tz.transition 2024, 3, :o3, 1711810800 + tz.transition 2024, 10, :o2, 1729954800 + tz.transition 2025, 3, :o3, 1743260400 + tz.transition 2025, 10, :o2, 1761404400 + tz.transition 2026, 3, :o3, 1774710000 + tz.transition 2026, 10, :o2, 1792854000 + tz.transition 2027, 3, :o3, 1806159600 + tz.transition 2027, 10, :o2, 1824908400 + tz.transition 2028, 3, :o3, 1837609200 + tz.transition 2028, 10, :o2, 1856358000 + tz.transition 2029, 3, :o3, 1869058800 + tz.transition 2029, 10, :o2, 1887807600 + tz.transition 2030, 3, :o3, 1901113200 + tz.transition 2030, 10, :o2, 1919257200 + tz.transition 2031, 3, :o3, 1932562800 + tz.transition 2031, 10, :o2, 1950706800 + tz.transition 2032, 3, :o3, 1964012400 + tz.transition 2032, 10, :o2, 1982761200 + tz.transition 2033, 3, :o3, 1995462000 + tz.transition 2033, 10, :o2, 2014210800 + tz.transition 2034, 3, :o3, 2026911600 + tz.transition 2034, 10, :o2, 2045660400 + tz.transition 2035, 3, :o3, 2058361200 + tz.transition 2035, 10, :o2, 2077110000 + tz.transition 2036, 3, :o3, 2090415600 + tz.transition 2036, 10, :o2, 2108559600 + tz.transition 2037, 3, :o3, 2121865200 + tz.transition 2037, 10, :o2, 2140009200 + tz.transition 2038, 3, :o3, 19724081, 8 + tz.transition 2038, 10, :o2, 19725817, 8 + tz.transition 2039, 3, :o3, 19726993, 8 + tz.transition 2039, 10, :o2, 19728729, 8 + tz.transition 2040, 3, :o3, 19729905, 8 + tz.transition 2040, 10, :o2, 19731641, 8 + tz.transition 2041, 3, :o3, 19732873, 8 + tz.transition 2041, 10, :o2, 19734553, 8 + tz.transition 2042, 3, :o3, 19735785, 8 + tz.transition 2042, 10, :o2, 19737465, 8 + tz.transition 2043, 3, :o3, 19738697, 8 + tz.transition 2043, 10, :o2, 19740377, 8 + tz.transition 2044, 3, :o3, 19741609, 8 + tz.transition 2044, 10, :o2, 19743345, 8 + tz.transition 2045, 3, :o3, 19744521, 8 + tz.transition 2045, 10, :o2, 19746257, 8 + tz.transition 2046, 3, :o3, 19747433, 8 + tz.transition 2046, 10, :o2, 19749169, 8 + tz.transition 2047, 3, :o3, 19750401, 8 + tz.transition 2047, 10, :o2, 19752081, 8 + tz.transition 2048, 3, :o3, 19753313, 8 + tz.transition 2048, 10, :o2, 19754993, 8 + tz.transition 2049, 3, :o3, 19756225, 8 + tz.transition 2049, 10, :o2, 19757961, 8 + tz.transition 2050, 3, :o3, 19759137, 8 + tz.transition 2050, 10, :o2, 19760873, 8 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Muscat.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Muscat.rb new file mode 100644 index 0000000000..604f651dfa --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Muscat.rb @@ -0,0 +1,18 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Muscat + include TimezoneDefinition + + timezone 'Asia/Muscat' do |tz| + tz.offset :o0, 14060, 0, :LMT + tz.offset :o1, 14400, 0, :GST + + tz.transition 1919, 12, :o1, 10464441137, 4320 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Novosibirsk.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Novosibirsk.rb new file mode 100644 index 0000000000..a4e7796e75 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Novosibirsk.rb @@ -0,0 +1,164 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Novosibirsk + include TimezoneDefinition + + timezone 'Asia/Novosibirsk' do |tz| + tz.offset :o0, 19900, 0, :LMT + tz.offset :o1, 21600, 0, :NOVT + tz.offset :o2, 25200, 0, :NOVT + tz.offset :o3, 25200, 3600, :NOVST + tz.offset :o4, 21600, 3600, :NOVST + + tz.transition 1919, 12, :o1, 2092872833, 864 + tz.transition 1930, 6, :o2, 9704593, 4 + tz.transition 1981, 3, :o3, 354906000 + tz.transition 1981, 9, :o2, 370713600 + tz.transition 1982, 3, :o3, 386442000 + tz.transition 1982, 9, :o2, 402249600 + tz.transition 1983, 3, :o3, 417978000 + tz.transition 1983, 9, :o2, 433785600 + tz.transition 1984, 3, :o3, 449600400 + tz.transition 1984, 9, :o2, 465332400 + tz.transition 1985, 3, :o3, 481057200 + tz.transition 1985, 9, :o2, 496782000 + tz.transition 1986, 3, :o3, 512506800 + tz.transition 1986, 9, :o2, 528231600 + tz.transition 1987, 3, :o3, 543956400 + tz.transition 1987, 9, :o2, 559681200 + tz.transition 1988, 3, :o3, 575406000 + tz.transition 1988, 9, :o2, 591130800 + tz.transition 1989, 3, :o3, 606855600 + tz.transition 1989, 9, :o2, 622580400 + tz.transition 1990, 3, :o3, 638305200 + tz.transition 1990, 9, :o2, 654634800 + tz.transition 1991, 3, :o4, 670359600 + tz.transition 1991, 9, :o1, 686088000 + tz.transition 1992, 1, :o2, 695764800 + tz.transition 1992, 3, :o3, 701798400 + tz.transition 1992, 9, :o2, 717519600 + tz.transition 1993, 3, :o3, 733258800 + tz.transition 1993, 5, :o4, 738086400 + tz.transition 1993, 9, :o1, 748987200 + tz.transition 1994, 3, :o4, 764712000 + tz.transition 1994, 9, :o1, 780436800 + tz.transition 1995, 3, :o4, 796161600 + tz.transition 1995, 9, :o1, 811886400 + tz.transition 1996, 3, :o4, 828216000 + tz.transition 1996, 10, :o1, 846360000 + tz.transition 1997, 3, :o4, 859665600 + tz.transition 1997, 10, :o1, 877809600 + tz.transition 1998, 3, :o4, 891115200 + tz.transition 1998, 10, :o1, 909259200 + tz.transition 1999, 3, :o4, 922564800 + tz.transition 1999, 10, :o1, 941313600 + tz.transition 2000, 3, :o4, 954014400 + tz.transition 2000, 10, :o1, 972763200 + tz.transition 2001, 3, :o4, 985464000 + tz.transition 2001, 10, :o1, 1004212800 + tz.transition 2002, 3, :o4, 1017518400 + tz.transition 2002, 10, :o1, 1035662400 + tz.transition 2003, 3, :o4, 1048968000 + tz.transition 2003, 10, :o1, 1067112000 + tz.transition 2004, 3, :o4, 1080417600 + tz.transition 2004, 10, :o1, 1099166400 + tz.transition 2005, 3, :o4, 1111867200 + tz.transition 2005, 10, :o1, 1130616000 + tz.transition 2006, 3, :o4, 1143316800 + tz.transition 2006, 10, :o1, 1162065600 + tz.transition 2007, 3, :o4, 1174766400 + tz.transition 2007, 10, :o1, 1193515200 + tz.transition 2008, 3, :o4, 1206820800 + tz.transition 2008, 10, :o1, 1224964800 + tz.transition 2009, 3, :o4, 1238270400 + tz.transition 2009, 10, :o1, 1256414400 + tz.transition 2010, 3, :o4, 1269720000 + tz.transition 2010, 10, :o1, 1288468800 + tz.transition 2011, 3, :o4, 1301169600 + tz.transition 2011, 10, :o1, 1319918400 + tz.transition 2012, 3, :o4, 1332619200 + tz.transition 2012, 10, :o1, 1351368000 + tz.transition 2013, 3, :o4, 1364673600 + tz.transition 2013, 10, :o1, 1382817600 + tz.transition 2014, 3, :o4, 1396123200 + tz.transition 2014, 10, :o1, 1414267200 + tz.transition 2015, 3, :o4, 1427572800 + tz.transition 2015, 10, :o1, 1445716800 + tz.transition 2016, 3, :o4, 1459022400 + tz.transition 2016, 10, :o1, 1477771200 + tz.transition 2017, 3, :o4, 1490472000 + tz.transition 2017, 10, :o1, 1509220800 + tz.transition 2018, 3, :o4, 1521921600 + tz.transition 2018, 10, :o1, 1540670400 + tz.transition 2019, 3, :o4, 1553976000 + tz.transition 2019, 10, :o1, 1572120000 + tz.transition 2020, 3, :o4, 1585425600 + tz.transition 2020, 10, :o1, 1603569600 + tz.transition 2021, 3, :o4, 1616875200 + tz.transition 2021, 10, :o1, 1635624000 + tz.transition 2022, 3, :o4, 1648324800 + tz.transition 2022, 10, :o1, 1667073600 + tz.transition 2023, 3, :o4, 1679774400 + tz.transition 2023, 10, :o1, 1698523200 + tz.transition 2024, 3, :o4, 1711828800 + tz.transition 2024, 10, :o1, 1729972800 + tz.transition 2025, 3, :o4, 1743278400 + tz.transition 2025, 10, :o1, 1761422400 + tz.transition 2026, 3, :o4, 1774728000 + tz.transition 2026, 10, :o1, 1792872000 + tz.transition 2027, 3, :o4, 1806177600 + tz.transition 2027, 10, :o1, 1824926400 + tz.transition 2028, 3, :o4, 1837627200 + tz.transition 2028, 10, :o1, 1856376000 + tz.transition 2029, 3, :o4, 1869076800 + tz.transition 2029, 10, :o1, 1887825600 + tz.transition 2030, 3, :o4, 1901131200 + tz.transition 2030, 10, :o1, 1919275200 + tz.transition 2031, 3, :o4, 1932580800 + tz.transition 2031, 10, :o1, 1950724800 + tz.transition 2032, 3, :o4, 1964030400 + tz.transition 2032, 10, :o1, 1982779200 + tz.transition 2033, 3, :o4, 1995480000 + tz.transition 2033, 10, :o1, 2014228800 + tz.transition 2034, 3, :o4, 2026929600 + tz.transition 2034, 10, :o1, 2045678400 + tz.transition 2035, 3, :o4, 2058379200 + tz.transition 2035, 10, :o1, 2077128000 + tz.transition 2036, 3, :o4, 2090433600 + tz.transition 2036, 10, :o1, 2108577600 + tz.transition 2037, 3, :o4, 2121883200 + tz.transition 2037, 10, :o1, 2140027200 + tz.transition 2038, 3, :o4, 7396531, 3 + tz.transition 2038, 10, :o1, 7397182, 3 + tz.transition 2039, 3, :o4, 7397623, 3 + tz.transition 2039, 10, :o1, 7398274, 3 + tz.transition 2040, 3, :o4, 7398715, 3 + tz.transition 2040, 10, :o1, 7399366, 3 + tz.transition 2041, 3, :o4, 7399828, 3 + tz.transition 2041, 10, :o1, 7400458, 3 + tz.transition 2042, 3, :o4, 7400920, 3 + tz.transition 2042, 10, :o1, 7401550, 3 + tz.transition 2043, 3, :o4, 7402012, 3 + tz.transition 2043, 10, :o1, 7402642, 3 + tz.transition 2044, 3, :o4, 7403104, 3 + tz.transition 2044, 10, :o1, 7403755, 3 + tz.transition 2045, 3, :o4, 7404196, 3 + tz.transition 2045, 10, :o1, 7404847, 3 + tz.transition 2046, 3, :o4, 7405288, 3 + tz.transition 2046, 10, :o1, 7405939, 3 + tz.transition 2047, 3, :o4, 7406401, 3 + tz.transition 2047, 10, :o1, 7407031, 3 + tz.transition 2048, 3, :o4, 7407493, 3 + tz.transition 2048, 10, :o1, 7408123, 3 + tz.transition 2049, 3, :o4, 7408585, 3 + tz.transition 2049, 10, :o1, 7409236, 3 + tz.transition 2050, 3, :o4, 7409677, 3 + tz.transition 2050, 10, :o1, 7410328, 3 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Rangoon.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Rangoon.rb new file mode 100644 index 0000000000..759b82d77a --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Rangoon.rb @@ -0,0 +1,24 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Rangoon + include TimezoneDefinition + + timezone 'Asia/Rangoon' do |tz| + tz.offset :o0, 23080, 0, :LMT + tz.offset :o1, 23076, 0, :RMT + tz.offset :o2, 23400, 0, :BURT + tz.offset :o3, 32400, 0, :JST + tz.offset :o4, 23400, 0, :MMT + + tz.transition 1879, 12, :o1, 5200664903, 2160 + tz.transition 1919, 12, :o2, 5813578159, 2400 + tz.transition 1942, 4, :o3, 116663051, 48 + tz.transition 1945, 5, :o4, 19452625, 8 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Riyadh.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Riyadh.rb new file mode 100644 index 0000000000..7add410620 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Riyadh.rb @@ -0,0 +1,18 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Riyadh + include TimezoneDefinition + + timezone 'Asia/Riyadh' do |tz| + tz.offset :o0, 11212, 0, :LMT + tz.offset :o1, 10800, 0, :AST + + tz.transition 1949, 12, :o1, 52558899197, 21600 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Seoul.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Seoul.rb new file mode 100644 index 0000000000..795d2a75df --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Seoul.rb @@ -0,0 +1,34 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Seoul + include TimezoneDefinition + + timezone 'Asia/Seoul' do |tz| + tz.offset :o0, 30472, 0, :LMT + tz.offset :o1, 30600, 0, :KST + tz.offset :o2, 32400, 0, :KST + tz.offset :o3, 28800, 0, :KST + tz.offset :o4, 28800, 3600, :KDT + tz.offset :o5, 32400, 3600, :KDT + + tz.transition 1889, 12, :o1, 26042775991, 10800 + tz.transition 1904, 11, :o2, 116007127, 48 + tz.transition 1927, 12, :o1, 19401969, 8 + tz.transition 1931, 12, :o2, 116481943, 48 + tz.transition 1954, 3, :o3, 19478577, 8 + tz.transition 1960, 5, :o4, 14622415, 6 + tz.transition 1960, 9, :o3, 19497521, 8 + tz.transition 1961, 8, :o1, 14625127, 6 + tz.transition 1968, 9, :o2, 117126247, 48 + tz.transition 1987, 5, :o5, 547570800 + tz.transition 1987, 10, :o2, 560872800 + tz.transition 1988, 5, :o5, 579020400 + tz.transition 1988, 10, :o2, 592322400 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Shanghai.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Shanghai.rb new file mode 100644 index 0000000000..34b13d59ae --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Shanghai.rb @@ -0,0 +1,35 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Shanghai + include TimezoneDefinition + + timezone 'Asia/Shanghai' do |tz| + tz.offset :o0, 29152, 0, :LMT + tz.offset :o1, 28800, 0, :CST + tz.offset :o2, 28800, 3600, :CDT + + tz.transition 1927, 12, :o1, 6548164639, 2700 + tz.transition 1940, 6, :o2, 14578699, 6 + tz.transition 1940, 9, :o1, 19439225, 8 + tz.transition 1941, 3, :o2, 14580415, 6 + tz.transition 1941, 9, :o1, 19442145, 8 + tz.transition 1986, 5, :o2, 515520000 + tz.transition 1986, 9, :o1, 527007600 + tz.transition 1987, 4, :o2, 545155200 + tz.transition 1987, 9, :o1, 558457200 + tz.transition 1988, 4, :o2, 576604800 + tz.transition 1988, 9, :o1, 589906800 + tz.transition 1989, 4, :o2, 608659200 + tz.transition 1989, 9, :o1, 621961200 + tz.transition 1990, 4, :o2, 640108800 + tz.transition 1990, 9, :o1, 653410800 + tz.transition 1991, 4, :o2, 671558400 + tz.transition 1991, 9, :o1, 684860400 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Singapore.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Singapore.rb new file mode 100644 index 0000000000..b323a78f74 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Singapore.rb @@ -0,0 +1,33 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Singapore + include TimezoneDefinition + + timezone 'Asia/Singapore' do |tz| + tz.offset :o0, 24925, 0, :LMT + tz.offset :o1, 24925, 0, :SMT + tz.offset :o2, 25200, 0, :MALT + tz.offset :o3, 25200, 1200, :MALST + tz.offset :o4, 26400, 0, :MALT + tz.offset :o5, 27000, 0, :MALT + tz.offset :o6, 32400, 0, :JST + tz.offset :o7, 27000, 0, :SGT + tz.offset :o8, 28800, 0, :SGT + + tz.transition 1900, 12, :o1, 8347571291, 3456 + tz.transition 1905, 5, :o2, 8353142363, 3456 + tz.transition 1932, 12, :o3, 58249757, 24 + tz.transition 1935, 12, :o4, 87414055, 36 + tz.transition 1941, 8, :o5, 87488575, 36 + tz.transition 1942, 2, :o6, 38886499, 16 + tz.transition 1945, 9, :o5, 19453681, 8 + tz.transition 1965, 8, :o7, 39023699, 16 + tz.transition 1981, 12, :o8, 378664200 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Taipei.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Taipei.rb new file mode 100644 index 0000000000..3ba12108fb --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Taipei.rb @@ -0,0 +1,59 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Taipei + include TimezoneDefinition + + timezone 'Asia/Taipei' do |tz| + tz.offset :o0, 29160, 0, :LMT + tz.offset :o1, 28800, 0, :CST + tz.offset :o2, 28800, 3600, :CDT + + tz.transition 1895, 12, :o1, 193084733, 80 + tz.transition 1945, 4, :o2, 14589457, 6 + tz.transition 1945, 9, :o1, 19453833, 8 + tz.transition 1946, 4, :o2, 14591647, 6 + tz.transition 1946, 9, :o1, 19456753, 8 + tz.transition 1947, 4, :o2, 14593837, 6 + tz.transition 1947, 9, :o1, 19459673, 8 + tz.transition 1948, 4, :o2, 14596033, 6 + tz.transition 1948, 9, :o1, 19462601, 8 + tz.transition 1949, 4, :o2, 14598223, 6 + tz.transition 1949, 9, :o1, 19465521, 8 + tz.transition 1950, 4, :o2, 14600413, 6 + tz.transition 1950, 9, :o1, 19468441, 8 + tz.transition 1951, 4, :o2, 14602603, 6 + tz.transition 1951, 9, :o1, 19471361, 8 + tz.transition 1952, 2, :o2, 14604433, 6 + tz.transition 1952, 10, :o1, 19474537, 8 + tz.transition 1953, 3, :o2, 14606809, 6 + tz.transition 1953, 10, :o1, 19477457, 8 + tz.transition 1954, 3, :o2, 14608999, 6 + tz.transition 1954, 10, :o1, 19480377, 8 + tz.transition 1955, 3, :o2, 14611189, 6 + tz.transition 1955, 9, :o1, 19483049, 8 + tz.transition 1956, 3, :o2, 14613385, 6 + tz.transition 1956, 9, :o1, 19485977, 8 + tz.transition 1957, 3, :o2, 14615575, 6 + tz.transition 1957, 9, :o1, 19488897, 8 + tz.transition 1958, 3, :o2, 14617765, 6 + tz.transition 1958, 9, :o1, 19491817, 8 + tz.transition 1959, 3, :o2, 14619955, 6 + tz.transition 1959, 9, :o1, 19494737, 8 + tz.transition 1960, 5, :o2, 14622517, 6 + tz.transition 1960, 9, :o1, 19497665, 8 + tz.transition 1961, 5, :o2, 14624707, 6 + tz.transition 1961, 9, :o1, 19500585, 8 + tz.transition 1974, 3, :o2, 133977600 + tz.transition 1974, 9, :o1, 149785200 + tz.transition 1975, 3, :o2, 165513600 + tz.transition 1975, 9, :o1, 181321200 + tz.transition 1980, 6, :o2, 331142400 + tz.transition 1980, 9, :o1, 339087600 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tashkent.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tashkent.rb new file mode 100644 index 0000000000..c205c7934d --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tashkent.rb @@ -0,0 +1,47 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Tashkent + include TimezoneDefinition + + timezone 'Asia/Tashkent' do |tz| + tz.offset :o0, 16632, 0, :LMT + tz.offset :o1, 18000, 0, :TAST + tz.offset :o2, 21600, 0, :TAST + tz.offset :o3, 21600, 3600, :TASST + tz.offset :o4, 18000, 3600, :TASST + tz.offset :o5, 18000, 3600, :UZST + tz.offset :o6, 18000, 0, :UZT + + tz.transition 1924, 5, :o1, 969562923, 400 + tz.transition 1930, 6, :o2, 58227559, 24 + tz.transition 1981, 3, :o3, 354909600 + tz.transition 1981, 9, :o2, 370717200 + tz.transition 1982, 3, :o3, 386445600 + tz.transition 1982, 9, :o2, 402253200 + tz.transition 1983, 3, :o3, 417981600 + tz.transition 1983, 9, :o2, 433789200 + tz.transition 1984, 3, :o3, 449604000 + tz.transition 1984, 9, :o2, 465336000 + tz.transition 1985, 3, :o3, 481060800 + tz.transition 1985, 9, :o2, 496785600 + tz.transition 1986, 3, :o3, 512510400 + tz.transition 1986, 9, :o2, 528235200 + tz.transition 1987, 3, :o3, 543960000 + tz.transition 1987, 9, :o2, 559684800 + tz.transition 1988, 3, :o3, 575409600 + tz.transition 1988, 9, :o2, 591134400 + tz.transition 1989, 3, :o3, 606859200 + tz.transition 1989, 9, :o2, 622584000 + tz.transition 1990, 3, :o3, 638308800 + tz.transition 1990, 9, :o2, 654638400 + tz.transition 1991, 3, :o4, 670363200 + tz.transition 1991, 8, :o5, 683661600 + tz.transition 1991, 9, :o6, 686091600 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tbilisi.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tbilisi.rb new file mode 100644 index 0000000000..15792a5651 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tbilisi.rb @@ -0,0 +1,78 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Tbilisi + include TimezoneDefinition + + timezone 'Asia/Tbilisi' do |tz| + tz.offset :o0, 10756, 0, :LMT + tz.offset :o1, 10756, 0, :TBMT + tz.offset :o2, 10800, 0, :TBIT + tz.offset :o3, 14400, 0, :TBIT + tz.offset :o4, 14400, 3600, :TBIST + tz.offset :o5, 10800, 3600, :TBIST + tz.offset :o6, 10800, 3600, :GEST + tz.offset :o7, 10800, 0, :GET + tz.offset :o8, 14400, 0, :GET + tz.offset :o9, 14400, 3600, :GEST + + tz.transition 1879, 12, :o1, 52006652111, 21600 + tz.transition 1924, 5, :o2, 52356399311, 21600 + tz.transition 1957, 2, :o3, 19487187, 8 + tz.transition 1981, 3, :o4, 354916800 + tz.transition 1981, 9, :o3, 370724400 + tz.transition 1982, 3, :o4, 386452800 + tz.transition 1982, 9, :o3, 402260400 + tz.transition 1983, 3, :o4, 417988800 + tz.transition 1983, 9, :o3, 433796400 + tz.transition 1984, 3, :o4, 449611200 + tz.transition 1984, 9, :o3, 465343200 + tz.transition 1985, 3, :o4, 481068000 + tz.transition 1985, 9, :o3, 496792800 + tz.transition 1986, 3, :o4, 512517600 + tz.transition 1986, 9, :o3, 528242400 + tz.transition 1987, 3, :o4, 543967200 + tz.transition 1987, 9, :o3, 559692000 + tz.transition 1988, 3, :o4, 575416800 + tz.transition 1988, 9, :o3, 591141600 + tz.transition 1989, 3, :o4, 606866400 + tz.transition 1989, 9, :o3, 622591200 + tz.transition 1990, 3, :o4, 638316000 + tz.transition 1990, 9, :o3, 654645600 + tz.transition 1991, 3, :o5, 670370400 + tz.transition 1991, 4, :o6, 671140800 + tz.transition 1991, 9, :o7, 686098800 + tz.transition 1992, 3, :o6, 701816400 + tz.transition 1992, 9, :o7, 717537600 + tz.transition 1993, 3, :o6, 733266000 + tz.transition 1993, 9, :o7, 748987200 + tz.transition 1994, 3, :o6, 764715600 + tz.transition 1994, 9, :o8, 780436800 + tz.transition 1995, 3, :o9, 796161600 + tz.transition 1995, 9, :o8, 811882800 + tz.transition 1996, 3, :o9, 828216000 + tz.transition 1997, 3, :o9, 859662000 + tz.transition 1997, 10, :o8, 877806000 + tz.transition 1998, 3, :o9, 891115200 + tz.transition 1998, 10, :o8, 909255600 + tz.transition 1999, 3, :o9, 922564800 + tz.transition 1999, 10, :o8, 941310000 + tz.transition 2000, 3, :o9, 954014400 + tz.transition 2000, 10, :o8, 972759600 + tz.transition 2001, 3, :o9, 985464000 + tz.transition 2001, 10, :o8, 1004209200 + tz.transition 2002, 3, :o9, 1017518400 + tz.transition 2002, 10, :o8, 1035658800 + tz.transition 2003, 3, :o9, 1048968000 + tz.transition 2003, 10, :o8, 1067108400 + tz.transition 2004, 3, :o9, 1080417600 + tz.transition 2004, 6, :o6, 1088276400 + tz.transition 2004, 10, :o7, 1099177200 + tz.transition 2005, 3, :o8, 1111878000 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tehran.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tehran.rb new file mode 100644 index 0000000000..d8df964a46 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tehran.rb @@ -0,0 +1,121 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Tehran + include TimezoneDefinition + + timezone 'Asia/Tehran' do |tz| + tz.offset :o0, 12344, 0, :LMT + tz.offset :o1, 12344, 0, :TMT + tz.offset :o2, 12600, 0, :IRST + tz.offset :o3, 14400, 0, :IRST + tz.offset :o4, 14400, 3600, :IRDT + tz.offset :o5, 12600, 3600, :IRDT + + tz.transition 1915, 12, :o1, 26145324257, 10800 + tz.transition 1945, 12, :o2, 26263670657, 10800 + tz.transition 1977, 10, :o3, 247177800 + tz.transition 1978, 3, :o4, 259272000 + tz.transition 1978, 10, :o3, 277758000 + tz.transition 1978, 12, :o2, 283982400 + tz.transition 1979, 3, :o5, 290809800 + tz.transition 1979, 9, :o2, 306531000 + tz.transition 1980, 3, :o5, 322432200 + tz.transition 1980, 9, :o2, 338499000 + tz.transition 1991, 5, :o5, 673216200 + tz.transition 1991, 9, :o2, 685481400 + tz.transition 1992, 3, :o5, 701209800 + tz.transition 1992, 9, :o2, 717103800 + tz.transition 1993, 3, :o5, 732745800 + tz.transition 1993, 9, :o2, 748639800 + tz.transition 1994, 3, :o5, 764281800 + tz.transition 1994, 9, :o2, 780175800 + tz.transition 1995, 3, :o5, 795817800 + tz.transition 1995, 9, :o2, 811711800 + tz.transition 1996, 3, :o5, 827353800 + tz.transition 1996, 9, :o2, 843247800 + tz.transition 1997, 3, :o5, 858976200 + tz.transition 1997, 9, :o2, 874870200 + tz.transition 1998, 3, :o5, 890512200 + tz.transition 1998, 9, :o2, 906406200 + tz.transition 1999, 3, :o5, 922048200 + tz.transition 1999, 9, :o2, 937942200 + tz.transition 2000, 3, :o5, 953584200 + tz.transition 2000, 9, :o2, 969478200 + tz.transition 2001, 3, :o5, 985206600 + tz.transition 2001, 9, :o2, 1001100600 + tz.transition 2002, 3, :o5, 1016742600 + tz.transition 2002, 9, :o2, 1032636600 + tz.transition 2003, 3, :o5, 1048278600 + tz.transition 2003, 9, :o2, 1064172600 + tz.transition 2004, 3, :o5, 1079814600 + tz.transition 2004, 9, :o2, 1095708600 + tz.transition 2005, 3, :o5, 1111437000 + tz.transition 2005, 9, :o2, 1127331000 + tz.transition 2008, 3, :o5, 1206045000 + tz.transition 2008, 9, :o2, 1221939000 + tz.transition 2009, 3, :o5, 1237667400 + tz.transition 2009, 9, :o2, 1253561400 + tz.transition 2010, 3, :o5, 1269203400 + tz.transition 2010, 9, :o2, 1285097400 + tz.transition 2011, 3, :o5, 1300739400 + tz.transition 2011, 9, :o2, 1316633400 + tz.transition 2012, 3, :o5, 1332275400 + tz.transition 2012, 9, :o2, 1348169400 + tz.transition 2013, 3, :o5, 1363897800 + tz.transition 2013, 9, :o2, 1379791800 + tz.transition 2014, 3, :o5, 1395433800 + tz.transition 2014, 9, :o2, 1411327800 + tz.transition 2015, 3, :o5, 1426969800 + tz.transition 2015, 9, :o2, 1442863800 + tz.transition 2016, 3, :o5, 1458505800 + tz.transition 2016, 9, :o2, 1474399800 + tz.transition 2017, 3, :o5, 1490128200 + tz.transition 2017, 9, :o2, 1506022200 + tz.transition 2018, 3, :o5, 1521664200 + tz.transition 2018, 9, :o2, 1537558200 + tz.transition 2019, 3, :o5, 1553200200 + tz.transition 2019, 9, :o2, 1569094200 + tz.transition 2020, 3, :o5, 1584736200 + tz.transition 2020, 9, :o2, 1600630200 + tz.transition 2021, 3, :o5, 1616358600 + tz.transition 2021, 9, :o2, 1632252600 + tz.transition 2022, 3, :o5, 1647894600 + tz.transition 2022, 9, :o2, 1663788600 + tz.transition 2023, 3, :o5, 1679430600 + tz.transition 2023, 9, :o2, 1695324600 + tz.transition 2024, 3, :o5, 1710966600 + tz.transition 2024, 9, :o2, 1726860600 + tz.transition 2025, 3, :o5, 1742589000 + tz.transition 2025, 9, :o2, 1758483000 + tz.transition 2026, 3, :o5, 1774125000 + tz.transition 2026, 9, :o2, 1790019000 + tz.transition 2027, 3, :o5, 1805661000 + tz.transition 2027, 9, :o2, 1821555000 + tz.transition 2028, 3, :o5, 1837197000 + tz.transition 2028, 9, :o2, 1853091000 + tz.transition 2029, 3, :o5, 1868733000 + tz.transition 2029, 9, :o2, 1884627000 + tz.transition 2030, 3, :o5, 1900355400 + tz.transition 2030, 9, :o2, 1916249400 + tz.transition 2031, 3, :o5, 1931891400 + tz.transition 2031, 9, :o2, 1947785400 + tz.transition 2032, 3, :o5, 1963427400 + tz.transition 2032, 9, :o2, 1979321400 + tz.transition 2033, 3, :o5, 1994963400 + tz.transition 2033, 9, :o2, 2010857400 + tz.transition 2034, 3, :o5, 2026585800 + tz.transition 2034, 9, :o2, 2042479800 + tz.transition 2035, 3, :o5, 2058121800 + tz.transition 2035, 9, :o2, 2074015800 + tz.transition 2036, 3, :o5, 2089657800 + tz.transition 2036, 9, :o2, 2105551800 + tz.transition 2037, 3, :o5, 2121193800 + tz.transition 2037, 9, :o2, 2137087800 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tokyo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tokyo.rb new file mode 100644 index 0000000000..51c9e16421 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tokyo.rb @@ -0,0 +1,30 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Tokyo + include TimezoneDefinition + + timezone 'Asia/Tokyo' do |tz| + tz.offset :o0, 33539, 0, :LMT + tz.offset :o1, 32400, 0, :JST + tz.offset :o2, 32400, 0, :CJT + tz.offset :o3, 32400, 3600, :JDT + + tz.transition 1887, 12, :o1, 19285097, 8 + tz.transition 1895, 12, :o2, 19308473, 8 + tz.transition 1937, 12, :o1, 19431193, 8 + tz.transition 1948, 5, :o3, 58384157, 24 + tz.transition 1948, 9, :o1, 14596831, 6 + tz.transition 1949, 4, :o3, 58392221, 24 + tz.transition 1949, 9, :o1, 14599015, 6 + tz.transition 1950, 5, :o3, 58401797, 24 + tz.transition 1950, 9, :o1, 14601199, 6 + tz.transition 1951, 5, :o3, 58410533, 24 + tz.transition 1951, 9, :o1, 14603383, 6 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Ulaanbaatar.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Ulaanbaatar.rb new file mode 100644 index 0000000000..2854f5c5fd --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Ulaanbaatar.rb @@ -0,0 +1,65 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Ulaanbaatar + include TimezoneDefinition + + timezone 'Asia/Ulaanbaatar' do |tz| + tz.offset :o0, 25652, 0, :LMT + tz.offset :o1, 25200, 0, :ULAT + tz.offset :o2, 28800, 0, :ULAT + tz.offset :o3, 28800, 3600, :ULAST + + tz.transition 1905, 7, :o1, 52208457187, 21600 + tz.transition 1977, 12, :o2, 252435600 + tz.transition 1983, 3, :o3, 417974400 + tz.transition 1983, 9, :o2, 433782000 + tz.transition 1984, 3, :o3, 449596800 + tz.transition 1984, 9, :o2, 465318000 + tz.transition 1985, 3, :o3, 481046400 + tz.transition 1985, 9, :o2, 496767600 + tz.transition 1986, 3, :o3, 512496000 + tz.transition 1986, 9, :o2, 528217200 + tz.transition 1987, 3, :o3, 543945600 + tz.transition 1987, 9, :o2, 559666800 + tz.transition 1988, 3, :o3, 575395200 + tz.transition 1988, 9, :o2, 591116400 + tz.transition 1989, 3, :o3, 606844800 + tz.transition 1989, 9, :o2, 622566000 + tz.transition 1990, 3, :o3, 638294400 + tz.transition 1990, 9, :o2, 654620400 + tz.transition 1991, 3, :o3, 670348800 + tz.transition 1991, 9, :o2, 686070000 + tz.transition 1992, 3, :o3, 701798400 + tz.transition 1992, 9, :o2, 717519600 + tz.transition 1993, 3, :o3, 733248000 + tz.transition 1993, 9, :o2, 748969200 + tz.transition 1994, 3, :o3, 764697600 + tz.transition 1994, 9, :o2, 780418800 + tz.transition 1995, 3, :o3, 796147200 + tz.transition 1995, 9, :o2, 811868400 + tz.transition 1996, 3, :o3, 828201600 + tz.transition 1996, 9, :o2, 843922800 + tz.transition 1997, 3, :o3, 859651200 + tz.transition 1997, 9, :o2, 875372400 + tz.transition 1998, 3, :o3, 891100800 + tz.transition 1998, 9, :o2, 906822000 + tz.transition 2001, 4, :o3, 988394400 + tz.transition 2001, 9, :o2, 1001696400 + tz.transition 2002, 3, :o3, 1017424800 + tz.transition 2002, 9, :o2, 1033146000 + tz.transition 2003, 3, :o3, 1048874400 + tz.transition 2003, 9, :o2, 1064595600 + tz.transition 2004, 3, :o3, 1080324000 + tz.transition 2004, 9, :o2, 1096045200 + tz.transition 2005, 3, :o3, 1111773600 + tz.transition 2005, 9, :o2, 1127494800 + tz.transition 2006, 3, :o3, 1143223200 + tz.transition 2006, 9, :o2, 1159549200 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Urumqi.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Urumqi.rb new file mode 100644 index 0000000000..d793ff1341 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Urumqi.rb @@ -0,0 +1,33 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Urumqi + include TimezoneDefinition + + timezone 'Asia/Urumqi' do |tz| + tz.offset :o0, 21020, 0, :LMT + tz.offset :o1, 21600, 0, :URUT + tz.offset :o2, 28800, 0, :CST + tz.offset :o3, 28800, 3600, :CDT + + tz.transition 1927, 12, :o1, 10477063829, 4320 + tz.transition 1980, 4, :o2, 325965600 + tz.transition 1986, 5, :o3, 515520000 + tz.transition 1986, 9, :o2, 527007600 + tz.transition 1987, 4, :o3, 545155200 + tz.transition 1987, 9, :o2, 558457200 + tz.transition 1988, 4, :o3, 576604800 + tz.transition 1988, 9, :o2, 589906800 + tz.transition 1989, 4, :o3, 608659200 + tz.transition 1989, 9, :o2, 621961200 + tz.transition 1990, 4, :o3, 640108800 + tz.transition 1990, 9, :o2, 653410800 + tz.transition 1991, 4, :o3, 671558400 + tz.transition 1991, 9, :o2, 684860400 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Vladivostok.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Vladivostok.rb new file mode 100644 index 0000000000..bd9e3d60ec --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Vladivostok.rb @@ -0,0 +1,164 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Vladivostok + include TimezoneDefinition + + timezone 'Asia/Vladivostok' do |tz| + tz.offset :o0, 31664, 0, :LMT + tz.offset :o1, 32400, 0, :VLAT + tz.offset :o2, 36000, 0, :VLAT + tz.offset :o3, 36000, 3600, :VLAST + tz.offset :o4, 32400, 3600, :VLASST + tz.offset :o5, 32400, 0, :VLAST + + tz.transition 1922, 11, :o1, 13086214921, 5400 + tz.transition 1930, 6, :o2, 19409185, 8 + tz.transition 1981, 3, :o3, 354895200 + tz.transition 1981, 9, :o2, 370702800 + tz.transition 1982, 3, :o3, 386431200 + tz.transition 1982, 9, :o2, 402238800 + tz.transition 1983, 3, :o3, 417967200 + tz.transition 1983, 9, :o2, 433774800 + tz.transition 1984, 3, :o3, 449589600 + tz.transition 1984, 9, :o2, 465321600 + tz.transition 1985, 3, :o3, 481046400 + tz.transition 1985, 9, :o2, 496771200 + tz.transition 1986, 3, :o3, 512496000 + tz.transition 1986, 9, :o2, 528220800 + tz.transition 1987, 3, :o3, 543945600 + tz.transition 1987, 9, :o2, 559670400 + tz.transition 1988, 3, :o3, 575395200 + tz.transition 1988, 9, :o2, 591120000 + tz.transition 1989, 3, :o3, 606844800 + tz.transition 1989, 9, :o2, 622569600 + tz.transition 1990, 3, :o3, 638294400 + tz.transition 1990, 9, :o2, 654624000 + tz.transition 1991, 3, :o4, 670348800 + tz.transition 1991, 9, :o5, 686077200 + tz.transition 1992, 1, :o2, 695754000 + tz.transition 1992, 3, :o3, 701787600 + tz.transition 1992, 9, :o2, 717508800 + tz.transition 1993, 3, :o3, 733248000 + tz.transition 1993, 9, :o2, 748972800 + tz.transition 1994, 3, :o3, 764697600 + tz.transition 1994, 9, :o2, 780422400 + tz.transition 1995, 3, :o3, 796147200 + tz.transition 1995, 9, :o2, 811872000 + tz.transition 1996, 3, :o3, 828201600 + tz.transition 1996, 10, :o2, 846345600 + tz.transition 1997, 3, :o3, 859651200 + tz.transition 1997, 10, :o2, 877795200 + tz.transition 1998, 3, :o3, 891100800 + tz.transition 1998, 10, :o2, 909244800 + tz.transition 1999, 3, :o3, 922550400 + tz.transition 1999, 10, :o2, 941299200 + tz.transition 2000, 3, :o3, 954000000 + tz.transition 2000, 10, :o2, 972748800 + tz.transition 2001, 3, :o3, 985449600 + tz.transition 2001, 10, :o2, 1004198400 + tz.transition 2002, 3, :o3, 1017504000 + tz.transition 2002, 10, :o2, 1035648000 + tz.transition 2003, 3, :o3, 1048953600 + tz.transition 2003, 10, :o2, 1067097600 + tz.transition 2004, 3, :o3, 1080403200 + tz.transition 2004, 10, :o2, 1099152000 + tz.transition 2005, 3, :o3, 1111852800 + tz.transition 2005, 10, :o2, 1130601600 + tz.transition 2006, 3, :o3, 1143302400 + tz.transition 2006, 10, :o2, 1162051200 + tz.transition 2007, 3, :o3, 1174752000 + tz.transition 2007, 10, :o2, 1193500800 + tz.transition 2008, 3, :o3, 1206806400 + tz.transition 2008, 10, :o2, 1224950400 + tz.transition 2009, 3, :o3, 1238256000 + tz.transition 2009, 10, :o2, 1256400000 + tz.transition 2010, 3, :o3, 1269705600 + tz.transition 2010, 10, :o2, 1288454400 + tz.transition 2011, 3, :o3, 1301155200 + tz.transition 2011, 10, :o2, 1319904000 + tz.transition 2012, 3, :o3, 1332604800 + tz.transition 2012, 10, :o2, 1351353600 + tz.transition 2013, 3, :o3, 1364659200 + tz.transition 2013, 10, :o2, 1382803200 + tz.transition 2014, 3, :o3, 1396108800 + tz.transition 2014, 10, :o2, 1414252800 + tz.transition 2015, 3, :o3, 1427558400 + tz.transition 2015, 10, :o2, 1445702400 + tz.transition 2016, 3, :o3, 1459008000 + tz.transition 2016, 10, :o2, 1477756800 + tz.transition 2017, 3, :o3, 1490457600 + tz.transition 2017, 10, :o2, 1509206400 + tz.transition 2018, 3, :o3, 1521907200 + tz.transition 2018, 10, :o2, 1540656000 + tz.transition 2019, 3, :o3, 1553961600 + tz.transition 2019, 10, :o2, 1572105600 + tz.transition 2020, 3, :o3, 1585411200 + tz.transition 2020, 10, :o2, 1603555200 + tz.transition 2021, 3, :o3, 1616860800 + tz.transition 2021, 10, :o2, 1635609600 + tz.transition 2022, 3, :o3, 1648310400 + tz.transition 2022, 10, :o2, 1667059200 + tz.transition 2023, 3, :o3, 1679760000 + tz.transition 2023, 10, :o2, 1698508800 + tz.transition 2024, 3, :o3, 1711814400 + tz.transition 2024, 10, :o2, 1729958400 + tz.transition 2025, 3, :o3, 1743264000 + tz.transition 2025, 10, :o2, 1761408000 + tz.transition 2026, 3, :o3, 1774713600 + tz.transition 2026, 10, :o2, 1792857600 + tz.transition 2027, 3, :o3, 1806163200 + tz.transition 2027, 10, :o2, 1824912000 + tz.transition 2028, 3, :o3, 1837612800 + tz.transition 2028, 10, :o2, 1856361600 + tz.transition 2029, 3, :o3, 1869062400 + tz.transition 2029, 10, :o2, 1887811200 + tz.transition 2030, 3, :o3, 1901116800 + tz.transition 2030, 10, :o2, 1919260800 + tz.transition 2031, 3, :o3, 1932566400 + tz.transition 2031, 10, :o2, 1950710400 + tz.transition 2032, 3, :o3, 1964016000 + tz.transition 2032, 10, :o2, 1982764800 + tz.transition 2033, 3, :o3, 1995465600 + tz.transition 2033, 10, :o2, 2014214400 + tz.transition 2034, 3, :o3, 2026915200 + tz.transition 2034, 10, :o2, 2045664000 + tz.transition 2035, 3, :o3, 2058364800 + tz.transition 2035, 10, :o2, 2077113600 + tz.transition 2036, 3, :o3, 2090419200 + tz.transition 2036, 10, :o2, 2108563200 + tz.transition 2037, 3, :o3, 2121868800 + tz.transition 2037, 10, :o2, 2140012800 + tz.transition 2038, 3, :o3, 14793061, 6 + tz.transition 2038, 10, :o2, 14794363, 6 + tz.transition 2039, 3, :o3, 14795245, 6 + tz.transition 2039, 10, :o2, 14796547, 6 + tz.transition 2040, 3, :o3, 14797429, 6 + tz.transition 2040, 10, :o2, 14798731, 6 + tz.transition 2041, 3, :o3, 14799655, 6 + tz.transition 2041, 10, :o2, 14800915, 6 + tz.transition 2042, 3, :o3, 14801839, 6 + tz.transition 2042, 10, :o2, 14803099, 6 + tz.transition 2043, 3, :o3, 14804023, 6 + tz.transition 2043, 10, :o2, 14805283, 6 + tz.transition 2044, 3, :o3, 14806207, 6 + tz.transition 2044, 10, :o2, 14807509, 6 + tz.transition 2045, 3, :o3, 14808391, 6 + tz.transition 2045, 10, :o2, 14809693, 6 + tz.transition 2046, 3, :o3, 14810575, 6 + tz.transition 2046, 10, :o2, 14811877, 6 + tz.transition 2047, 3, :o3, 14812801, 6 + tz.transition 2047, 10, :o2, 14814061, 6 + tz.transition 2048, 3, :o3, 14814985, 6 + tz.transition 2048, 10, :o2, 14816245, 6 + tz.transition 2049, 3, :o3, 14817169, 6 + tz.transition 2049, 10, :o2, 14818471, 6 + tz.transition 2050, 3, :o3, 14819353, 6 + tz.transition 2050, 10, :o2, 14820655, 6 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yakutsk.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yakutsk.rb new file mode 100644 index 0000000000..56435a788f --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yakutsk.rb @@ -0,0 +1,163 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Yakutsk + include TimezoneDefinition + + timezone 'Asia/Yakutsk' do |tz| + tz.offset :o0, 31120, 0, :LMT + tz.offset :o1, 28800, 0, :YAKT + tz.offset :o2, 32400, 0, :YAKT + tz.offset :o3, 32400, 3600, :YAKST + tz.offset :o4, 28800, 3600, :YAKST + + tz.transition 1919, 12, :o1, 2616091711, 1080 + tz.transition 1930, 6, :o2, 14556889, 6 + tz.transition 1981, 3, :o3, 354898800 + tz.transition 1981, 9, :o2, 370706400 + tz.transition 1982, 3, :o3, 386434800 + tz.transition 1982, 9, :o2, 402242400 + tz.transition 1983, 3, :o3, 417970800 + tz.transition 1983, 9, :o2, 433778400 + tz.transition 1984, 3, :o3, 449593200 + tz.transition 1984, 9, :o2, 465325200 + tz.transition 1985, 3, :o3, 481050000 + tz.transition 1985, 9, :o2, 496774800 + tz.transition 1986, 3, :o3, 512499600 + tz.transition 1986, 9, :o2, 528224400 + tz.transition 1987, 3, :o3, 543949200 + tz.transition 1987, 9, :o2, 559674000 + tz.transition 1988, 3, :o3, 575398800 + tz.transition 1988, 9, :o2, 591123600 + tz.transition 1989, 3, :o3, 606848400 + tz.transition 1989, 9, :o2, 622573200 + tz.transition 1990, 3, :o3, 638298000 + tz.transition 1990, 9, :o2, 654627600 + tz.transition 1991, 3, :o4, 670352400 + tz.transition 1991, 9, :o1, 686080800 + tz.transition 1992, 1, :o2, 695757600 + tz.transition 1992, 3, :o3, 701791200 + tz.transition 1992, 9, :o2, 717512400 + tz.transition 1993, 3, :o3, 733251600 + tz.transition 1993, 9, :o2, 748976400 + tz.transition 1994, 3, :o3, 764701200 + tz.transition 1994, 9, :o2, 780426000 + tz.transition 1995, 3, :o3, 796150800 + tz.transition 1995, 9, :o2, 811875600 + tz.transition 1996, 3, :o3, 828205200 + tz.transition 1996, 10, :o2, 846349200 + tz.transition 1997, 3, :o3, 859654800 + tz.transition 1997, 10, :o2, 877798800 + tz.transition 1998, 3, :o3, 891104400 + tz.transition 1998, 10, :o2, 909248400 + tz.transition 1999, 3, :o3, 922554000 + tz.transition 1999, 10, :o2, 941302800 + tz.transition 2000, 3, :o3, 954003600 + tz.transition 2000, 10, :o2, 972752400 + tz.transition 2001, 3, :o3, 985453200 + tz.transition 2001, 10, :o2, 1004202000 + tz.transition 2002, 3, :o3, 1017507600 + tz.transition 2002, 10, :o2, 1035651600 + tz.transition 2003, 3, :o3, 1048957200 + tz.transition 2003, 10, :o2, 1067101200 + tz.transition 2004, 3, :o3, 1080406800 + tz.transition 2004, 10, :o2, 1099155600 + tz.transition 2005, 3, :o3, 1111856400 + tz.transition 2005, 10, :o2, 1130605200 + tz.transition 2006, 3, :o3, 1143306000 + tz.transition 2006, 10, :o2, 1162054800 + tz.transition 2007, 3, :o3, 1174755600 + tz.transition 2007, 10, :o2, 1193504400 + tz.transition 2008, 3, :o3, 1206810000 + tz.transition 2008, 10, :o2, 1224954000 + tz.transition 2009, 3, :o3, 1238259600 + tz.transition 2009, 10, :o2, 1256403600 + tz.transition 2010, 3, :o3, 1269709200 + tz.transition 2010, 10, :o2, 1288458000 + tz.transition 2011, 3, :o3, 1301158800 + tz.transition 2011, 10, :o2, 1319907600 + tz.transition 2012, 3, :o3, 1332608400 + tz.transition 2012, 10, :o2, 1351357200 + tz.transition 2013, 3, :o3, 1364662800 + tz.transition 2013, 10, :o2, 1382806800 + tz.transition 2014, 3, :o3, 1396112400 + tz.transition 2014, 10, :o2, 1414256400 + tz.transition 2015, 3, :o3, 1427562000 + tz.transition 2015, 10, :o2, 1445706000 + tz.transition 2016, 3, :o3, 1459011600 + tz.transition 2016, 10, :o2, 1477760400 + tz.transition 2017, 3, :o3, 1490461200 + tz.transition 2017, 10, :o2, 1509210000 + tz.transition 2018, 3, :o3, 1521910800 + tz.transition 2018, 10, :o2, 1540659600 + tz.transition 2019, 3, :o3, 1553965200 + tz.transition 2019, 10, :o2, 1572109200 + tz.transition 2020, 3, :o3, 1585414800 + tz.transition 2020, 10, :o2, 1603558800 + tz.transition 2021, 3, :o3, 1616864400 + tz.transition 2021, 10, :o2, 1635613200 + tz.transition 2022, 3, :o3, 1648314000 + tz.transition 2022, 10, :o2, 1667062800 + tz.transition 2023, 3, :o3, 1679763600 + tz.transition 2023, 10, :o2, 1698512400 + tz.transition 2024, 3, :o3, 1711818000 + tz.transition 2024, 10, :o2, 1729962000 + tz.transition 2025, 3, :o3, 1743267600 + tz.transition 2025, 10, :o2, 1761411600 + tz.transition 2026, 3, :o3, 1774717200 + tz.transition 2026, 10, :o2, 1792861200 + tz.transition 2027, 3, :o3, 1806166800 + tz.transition 2027, 10, :o2, 1824915600 + tz.transition 2028, 3, :o3, 1837616400 + tz.transition 2028, 10, :o2, 1856365200 + tz.transition 2029, 3, :o3, 1869066000 + tz.transition 2029, 10, :o2, 1887814800 + tz.transition 2030, 3, :o3, 1901120400 + tz.transition 2030, 10, :o2, 1919264400 + tz.transition 2031, 3, :o3, 1932570000 + tz.transition 2031, 10, :o2, 1950714000 + tz.transition 2032, 3, :o3, 1964019600 + tz.transition 2032, 10, :o2, 1982768400 + tz.transition 2033, 3, :o3, 1995469200 + tz.transition 2033, 10, :o2, 2014218000 + tz.transition 2034, 3, :o3, 2026918800 + tz.transition 2034, 10, :o2, 2045667600 + tz.transition 2035, 3, :o3, 2058368400 + tz.transition 2035, 10, :o2, 2077117200 + tz.transition 2036, 3, :o3, 2090422800 + tz.transition 2036, 10, :o2, 2108566800 + tz.transition 2037, 3, :o3, 2121872400 + tz.transition 2037, 10, :o2, 2140016400 + tz.transition 2038, 3, :o3, 59172245, 24 + tz.transition 2038, 10, :o2, 59177453, 24 + tz.transition 2039, 3, :o3, 59180981, 24 + tz.transition 2039, 10, :o2, 59186189, 24 + tz.transition 2040, 3, :o3, 59189717, 24 + tz.transition 2040, 10, :o2, 59194925, 24 + tz.transition 2041, 3, :o3, 59198621, 24 + tz.transition 2041, 10, :o2, 59203661, 24 + tz.transition 2042, 3, :o3, 59207357, 24 + tz.transition 2042, 10, :o2, 59212397, 24 + tz.transition 2043, 3, :o3, 59216093, 24 + tz.transition 2043, 10, :o2, 59221133, 24 + tz.transition 2044, 3, :o3, 59224829, 24 + tz.transition 2044, 10, :o2, 59230037, 24 + tz.transition 2045, 3, :o3, 59233565, 24 + tz.transition 2045, 10, :o2, 59238773, 24 + tz.transition 2046, 3, :o3, 59242301, 24 + tz.transition 2046, 10, :o2, 59247509, 24 + tz.transition 2047, 3, :o3, 59251205, 24 + tz.transition 2047, 10, :o2, 59256245, 24 + tz.transition 2048, 3, :o3, 59259941, 24 + tz.transition 2048, 10, :o2, 59264981, 24 + tz.transition 2049, 3, :o3, 59268677, 24 + tz.transition 2049, 10, :o2, 59273885, 24 + tz.transition 2050, 3, :o3, 59277413, 24 + tz.transition 2050, 10, :o2, 59282621, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yekaterinburg.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yekaterinburg.rb new file mode 100644 index 0000000000..8ef8df4a41 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yekaterinburg.rb @@ -0,0 +1,165 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Yekaterinburg + include TimezoneDefinition + + timezone 'Asia/Yekaterinburg' do |tz| + tz.offset :o0, 14544, 0, :LMT + tz.offset :o1, 14400, 0, :SVET + tz.offset :o2, 18000, 0, :SVET + tz.offset :o3, 18000, 3600, :SVEST + tz.offset :o4, 14400, 3600, :SVEST + tz.offset :o5, 18000, 0, :YEKT + tz.offset :o6, 18000, 3600, :YEKST + + tz.transition 1919, 7, :o1, 1453292699, 600 + tz.transition 1930, 6, :o2, 7278445, 3 + tz.transition 1981, 3, :o3, 354913200 + tz.transition 1981, 9, :o2, 370720800 + tz.transition 1982, 3, :o3, 386449200 + tz.transition 1982, 9, :o2, 402256800 + tz.transition 1983, 3, :o3, 417985200 + tz.transition 1983, 9, :o2, 433792800 + tz.transition 1984, 3, :o3, 449607600 + tz.transition 1984, 9, :o2, 465339600 + tz.transition 1985, 3, :o3, 481064400 + tz.transition 1985, 9, :o2, 496789200 + tz.transition 1986, 3, :o3, 512514000 + tz.transition 1986, 9, :o2, 528238800 + tz.transition 1987, 3, :o3, 543963600 + tz.transition 1987, 9, :o2, 559688400 + tz.transition 1988, 3, :o3, 575413200 + tz.transition 1988, 9, :o2, 591138000 + tz.transition 1989, 3, :o3, 606862800 + tz.transition 1989, 9, :o2, 622587600 + tz.transition 1990, 3, :o3, 638312400 + tz.transition 1990, 9, :o2, 654642000 + tz.transition 1991, 3, :o4, 670366800 + tz.transition 1991, 9, :o1, 686095200 + tz.transition 1992, 1, :o5, 695772000 + tz.transition 1992, 3, :o6, 701805600 + tz.transition 1992, 9, :o5, 717526800 + tz.transition 1993, 3, :o6, 733266000 + tz.transition 1993, 9, :o5, 748990800 + tz.transition 1994, 3, :o6, 764715600 + tz.transition 1994, 9, :o5, 780440400 + tz.transition 1995, 3, :o6, 796165200 + tz.transition 1995, 9, :o5, 811890000 + tz.transition 1996, 3, :o6, 828219600 + tz.transition 1996, 10, :o5, 846363600 + tz.transition 1997, 3, :o6, 859669200 + tz.transition 1997, 10, :o5, 877813200 + tz.transition 1998, 3, :o6, 891118800 + tz.transition 1998, 10, :o5, 909262800 + tz.transition 1999, 3, :o6, 922568400 + tz.transition 1999, 10, :o5, 941317200 + tz.transition 2000, 3, :o6, 954018000 + tz.transition 2000, 10, :o5, 972766800 + tz.transition 2001, 3, :o6, 985467600 + tz.transition 2001, 10, :o5, 1004216400 + tz.transition 2002, 3, :o6, 1017522000 + tz.transition 2002, 10, :o5, 1035666000 + tz.transition 2003, 3, :o6, 1048971600 + tz.transition 2003, 10, :o5, 1067115600 + tz.transition 2004, 3, :o6, 1080421200 + tz.transition 2004, 10, :o5, 1099170000 + tz.transition 2005, 3, :o6, 1111870800 + tz.transition 2005, 10, :o5, 1130619600 + tz.transition 2006, 3, :o6, 1143320400 + tz.transition 2006, 10, :o5, 1162069200 + tz.transition 2007, 3, :o6, 1174770000 + tz.transition 2007, 10, :o5, 1193518800 + tz.transition 2008, 3, :o6, 1206824400 + tz.transition 2008, 10, :o5, 1224968400 + tz.transition 2009, 3, :o6, 1238274000 + tz.transition 2009, 10, :o5, 1256418000 + tz.transition 2010, 3, :o6, 1269723600 + tz.transition 2010, 10, :o5, 1288472400 + tz.transition 2011, 3, :o6, 1301173200 + tz.transition 2011, 10, :o5, 1319922000 + tz.transition 2012, 3, :o6, 1332622800 + tz.transition 2012, 10, :o5, 1351371600 + tz.transition 2013, 3, :o6, 1364677200 + tz.transition 2013, 10, :o5, 1382821200 + tz.transition 2014, 3, :o6, 1396126800 + tz.transition 2014, 10, :o5, 1414270800 + tz.transition 2015, 3, :o6, 1427576400 + tz.transition 2015, 10, :o5, 1445720400 + tz.transition 2016, 3, :o6, 1459026000 + tz.transition 2016, 10, :o5, 1477774800 + tz.transition 2017, 3, :o6, 1490475600 + tz.transition 2017, 10, :o5, 1509224400 + tz.transition 2018, 3, :o6, 1521925200 + tz.transition 2018, 10, :o5, 1540674000 + tz.transition 2019, 3, :o6, 1553979600 + tz.transition 2019, 10, :o5, 1572123600 + tz.transition 2020, 3, :o6, 1585429200 + tz.transition 2020, 10, :o5, 1603573200 + tz.transition 2021, 3, :o6, 1616878800 + tz.transition 2021, 10, :o5, 1635627600 + tz.transition 2022, 3, :o6, 1648328400 + tz.transition 2022, 10, :o5, 1667077200 + tz.transition 2023, 3, :o6, 1679778000 + tz.transition 2023, 10, :o5, 1698526800 + tz.transition 2024, 3, :o6, 1711832400 + tz.transition 2024, 10, :o5, 1729976400 + tz.transition 2025, 3, :o6, 1743282000 + tz.transition 2025, 10, :o5, 1761426000 + tz.transition 2026, 3, :o6, 1774731600 + tz.transition 2026, 10, :o5, 1792875600 + tz.transition 2027, 3, :o6, 1806181200 + tz.transition 2027, 10, :o5, 1824930000 + tz.transition 2028, 3, :o6, 1837630800 + tz.transition 2028, 10, :o5, 1856379600 + tz.transition 2029, 3, :o6, 1869080400 + tz.transition 2029, 10, :o5, 1887829200 + tz.transition 2030, 3, :o6, 1901134800 + tz.transition 2030, 10, :o5, 1919278800 + tz.transition 2031, 3, :o6, 1932584400 + tz.transition 2031, 10, :o5, 1950728400 + tz.transition 2032, 3, :o6, 1964034000 + tz.transition 2032, 10, :o5, 1982782800 + tz.transition 2033, 3, :o6, 1995483600 + tz.transition 2033, 10, :o5, 2014232400 + tz.transition 2034, 3, :o6, 2026933200 + tz.transition 2034, 10, :o5, 2045682000 + tz.transition 2035, 3, :o6, 2058382800 + tz.transition 2035, 10, :o5, 2077131600 + tz.transition 2036, 3, :o6, 2090437200 + tz.transition 2036, 10, :o5, 2108581200 + tz.transition 2037, 3, :o6, 2121886800 + tz.transition 2037, 10, :o5, 2140030800 + tz.transition 2038, 3, :o6, 19724083, 8 + tz.transition 2038, 10, :o5, 19725819, 8 + tz.transition 2039, 3, :o6, 19726995, 8 + tz.transition 2039, 10, :o5, 19728731, 8 + tz.transition 2040, 3, :o6, 19729907, 8 + tz.transition 2040, 10, :o5, 19731643, 8 + tz.transition 2041, 3, :o6, 19732875, 8 + tz.transition 2041, 10, :o5, 19734555, 8 + tz.transition 2042, 3, :o6, 19735787, 8 + tz.transition 2042, 10, :o5, 19737467, 8 + tz.transition 2043, 3, :o6, 19738699, 8 + tz.transition 2043, 10, :o5, 19740379, 8 + tz.transition 2044, 3, :o6, 19741611, 8 + tz.transition 2044, 10, :o5, 19743347, 8 + tz.transition 2045, 3, :o6, 19744523, 8 + tz.transition 2045, 10, :o5, 19746259, 8 + tz.transition 2046, 3, :o6, 19747435, 8 + tz.transition 2046, 10, :o5, 19749171, 8 + tz.transition 2047, 3, :o6, 19750403, 8 + tz.transition 2047, 10, :o5, 19752083, 8 + tz.transition 2048, 3, :o6, 19753315, 8 + tz.transition 2048, 10, :o5, 19754995, 8 + tz.transition 2049, 3, :o6, 19756227, 8 + tz.transition 2049, 10, :o5, 19757963, 8 + tz.transition 2050, 3, :o6, 19759139, 8 + tz.transition 2050, 10, :o5, 19760875, 8 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yerevan.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yerevan.rb new file mode 100644 index 0000000000..e7f160861f --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yerevan.rb @@ -0,0 +1,165 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Asia + module Yerevan + include TimezoneDefinition + + timezone 'Asia/Yerevan' do |tz| + tz.offset :o0, 10680, 0, :LMT + tz.offset :o1, 10800, 0, :YERT + tz.offset :o2, 14400, 0, :YERT + tz.offset :o3, 14400, 3600, :YERST + tz.offset :o4, 10800, 3600, :YERST + tz.offset :o5, 10800, 3600, :AMST + tz.offset :o6, 10800, 0, :AMT + tz.offset :o7, 14400, 0, :AMT + tz.offset :o8, 14400, 3600, :AMST + + tz.transition 1924, 5, :o1, 1745213311, 720 + tz.transition 1957, 2, :o2, 19487187, 8 + tz.transition 1981, 3, :o3, 354916800 + tz.transition 1981, 9, :o2, 370724400 + tz.transition 1982, 3, :o3, 386452800 + tz.transition 1982, 9, :o2, 402260400 + tz.transition 1983, 3, :o3, 417988800 + tz.transition 1983, 9, :o2, 433796400 + tz.transition 1984, 3, :o3, 449611200 + tz.transition 1984, 9, :o2, 465343200 + tz.transition 1985, 3, :o3, 481068000 + tz.transition 1985, 9, :o2, 496792800 + tz.transition 1986, 3, :o3, 512517600 + tz.transition 1986, 9, :o2, 528242400 + tz.transition 1987, 3, :o3, 543967200 + tz.transition 1987, 9, :o2, 559692000 + tz.transition 1988, 3, :o3, 575416800 + tz.transition 1988, 9, :o2, 591141600 + tz.transition 1989, 3, :o3, 606866400 + tz.transition 1989, 9, :o2, 622591200 + tz.transition 1990, 3, :o3, 638316000 + tz.transition 1990, 9, :o2, 654645600 + tz.transition 1991, 3, :o4, 670370400 + tz.transition 1991, 9, :o5, 685569600 + tz.transition 1991, 9, :o6, 686098800 + tz.transition 1992, 3, :o5, 701812800 + tz.transition 1992, 9, :o6, 717534000 + tz.transition 1993, 3, :o5, 733273200 + tz.transition 1993, 9, :o6, 748998000 + tz.transition 1994, 3, :o5, 764722800 + tz.transition 1994, 9, :o6, 780447600 + tz.transition 1995, 3, :o5, 796172400 + tz.transition 1995, 9, :o7, 811897200 + tz.transition 1997, 3, :o8, 859672800 + tz.transition 1997, 10, :o7, 877816800 + tz.transition 1998, 3, :o8, 891122400 + tz.transition 1998, 10, :o7, 909266400 + tz.transition 1999, 3, :o8, 922572000 + tz.transition 1999, 10, :o7, 941320800 + tz.transition 2000, 3, :o8, 954021600 + tz.transition 2000, 10, :o7, 972770400 + tz.transition 2001, 3, :o8, 985471200 + tz.transition 2001, 10, :o7, 1004220000 + tz.transition 2002, 3, :o8, 1017525600 + tz.transition 2002, 10, :o7, 1035669600 + tz.transition 2003, 3, :o8, 1048975200 + tz.transition 2003, 10, :o7, 1067119200 + tz.transition 2004, 3, :o8, 1080424800 + tz.transition 2004, 10, :o7, 1099173600 + tz.transition 2005, 3, :o8, 1111874400 + tz.transition 2005, 10, :o7, 1130623200 + tz.transition 2006, 3, :o8, 1143324000 + tz.transition 2006, 10, :o7, 1162072800 + tz.transition 2007, 3, :o8, 1174773600 + tz.transition 2007, 10, :o7, 1193522400 + tz.transition 2008, 3, :o8, 1206828000 + tz.transition 2008, 10, :o7, 1224972000 + tz.transition 2009, 3, :o8, 1238277600 + tz.transition 2009, 10, :o7, 1256421600 + tz.transition 2010, 3, :o8, 1269727200 + tz.transition 2010, 10, :o7, 1288476000 + tz.transition 2011, 3, :o8, 1301176800 + tz.transition 2011, 10, :o7, 1319925600 + tz.transition 2012, 3, :o8, 1332626400 + tz.transition 2012, 10, :o7, 1351375200 + tz.transition 2013, 3, :o8, 1364680800 + tz.transition 2013, 10, :o7, 1382824800 + tz.transition 2014, 3, :o8, 1396130400 + tz.transition 2014, 10, :o7, 1414274400 + tz.transition 2015, 3, :o8, 1427580000 + tz.transition 2015, 10, :o7, 1445724000 + tz.transition 2016, 3, :o8, 1459029600 + tz.transition 2016, 10, :o7, 1477778400 + tz.transition 2017, 3, :o8, 1490479200 + tz.transition 2017, 10, :o7, 1509228000 + tz.transition 2018, 3, :o8, 1521928800 + tz.transition 2018, 10, :o7, 1540677600 + tz.transition 2019, 3, :o8, 1553983200 + tz.transition 2019, 10, :o7, 1572127200 + tz.transition 2020, 3, :o8, 1585432800 + tz.transition 2020, 10, :o7, 1603576800 + tz.transition 2021, 3, :o8, 1616882400 + tz.transition 2021, 10, :o7, 1635631200 + tz.transition 2022, 3, :o8, 1648332000 + tz.transition 2022, 10, :o7, 1667080800 + tz.transition 2023, 3, :o8, 1679781600 + tz.transition 2023, 10, :o7, 1698530400 + tz.transition 2024, 3, :o8, 1711836000 + tz.transition 2024, 10, :o7, 1729980000 + tz.transition 2025, 3, :o8, 1743285600 + tz.transition 2025, 10, :o7, 1761429600 + tz.transition 2026, 3, :o8, 1774735200 + tz.transition 2026, 10, :o7, 1792879200 + tz.transition 2027, 3, :o8, 1806184800 + tz.transition 2027, 10, :o7, 1824933600 + tz.transition 2028, 3, :o8, 1837634400 + tz.transition 2028, 10, :o7, 1856383200 + tz.transition 2029, 3, :o8, 1869084000 + tz.transition 2029, 10, :o7, 1887832800 + tz.transition 2030, 3, :o8, 1901138400 + tz.transition 2030, 10, :o7, 1919282400 + tz.transition 2031, 3, :o8, 1932588000 + tz.transition 2031, 10, :o7, 1950732000 + tz.transition 2032, 3, :o8, 1964037600 + tz.transition 2032, 10, :o7, 1982786400 + tz.transition 2033, 3, :o8, 1995487200 + tz.transition 2033, 10, :o7, 2014236000 + tz.transition 2034, 3, :o8, 2026936800 + tz.transition 2034, 10, :o7, 2045685600 + tz.transition 2035, 3, :o8, 2058386400 + tz.transition 2035, 10, :o7, 2077135200 + tz.transition 2036, 3, :o8, 2090440800 + tz.transition 2036, 10, :o7, 2108584800 + tz.transition 2037, 3, :o8, 2121890400 + tz.transition 2037, 10, :o7, 2140034400 + tz.transition 2038, 3, :o8, 29586125, 12 + tz.transition 2038, 10, :o7, 29588729, 12 + tz.transition 2039, 3, :o8, 29590493, 12 + tz.transition 2039, 10, :o7, 29593097, 12 + tz.transition 2040, 3, :o8, 29594861, 12 + tz.transition 2040, 10, :o7, 29597465, 12 + tz.transition 2041, 3, :o8, 29599313, 12 + tz.transition 2041, 10, :o7, 29601833, 12 + tz.transition 2042, 3, :o8, 29603681, 12 + tz.transition 2042, 10, :o7, 29606201, 12 + tz.transition 2043, 3, :o8, 29608049, 12 + tz.transition 2043, 10, :o7, 29610569, 12 + tz.transition 2044, 3, :o8, 29612417, 12 + tz.transition 2044, 10, :o7, 29615021, 12 + tz.transition 2045, 3, :o8, 29616785, 12 + tz.transition 2045, 10, :o7, 29619389, 12 + tz.transition 2046, 3, :o8, 29621153, 12 + tz.transition 2046, 10, :o7, 29623757, 12 + tz.transition 2047, 3, :o8, 29625605, 12 + tz.transition 2047, 10, :o7, 29628125, 12 + tz.transition 2048, 3, :o8, 29629973, 12 + tz.transition 2048, 10, :o7, 29632493, 12 + tz.transition 2049, 3, :o8, 29634341, 12 + tz.transition 2049, 10, :o7, 29636945, 12 + tz.transition 2050, 3, :o8, 29638709, 12 + tz.transition 2050, 10, :o7, 29641313, 12 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Azores.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Azores.rb new file mode 100644 index 0000000000..1bd16a75ac --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Azores.rb @@ -0,0 +1,270 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Atlantic + module Azores + include TimezoneDefinition + + timezone 'Atlantic/Azores' do |tz| + tz.offset :o0, -6160, 0, :LMT + tz.offset :o1, -6872, 0, :HMT + tz.offset :o2, -7200, 0, :AZOT + tz.offset :o3, -7200, 3600, :AZOST + tz.offset :o4, -7200, 7200, :AZOMT + tz.offset :o5, -3600, 0, :AZOT + tz.offset :o6, -3600, 3600, :AZOST + tz.offset :o7, 0, 0, :WET + + tz.transition 1884, 1, :o1, 2601910697, 1080 + tz.transition 1911, 5, :o2, 26127150259, 10800 + tz.transition 1916, 6, :o3, 58104781, 24 + tz.transition 1916, 11, :o2, 29054023, 12 + tz.transition 1917, 3, :o3, 58110925, 24 + tz.transition 1917, 10, :o2, 58116397, 24 + tz.transition 1918, 3, :o3, 58119709, 24 + tz.transition 1918, 10, :o2, 58125157, 24 + tz.transition 1919, 3, :o3, 58128445, 24 + tz.transition 1919, 10, :o2, 58133917, 24 + tz.transition 1920, 3, :o3, 58137229, 24 + tz.transition 1920, 10, :o2, 58142701, 24 + tz.transition 1921, 3, :o3, 58145989, 24 + tz.transition 1921, 10, :o2, 58151461, 24 + tz.transition 1924, 4, :o3, 58173421, 24 + tz.transition 1924, 10, :o2, 58177765, 24 + tz.transition 1926, 4, :o3, 58190965, 24 + tz.transition 1926, 10, :o2, 58194997, 24 + tz.transition 1927, 4, :o3, 58199533, 24 + tz.transition 1927, 10, :o2, 58203733, 24 + tz.transition 1928, 4, :o3, 58208437, 24 + tz.transition 1928, 10, :o2, 58212637, 24 + tz.transition 1929, 4, :o3, 58217341, 24 + tz.transition 1929, 10, :o2, 58221373, 24 + tz.transition 1931, 4, :o3, 58234813, 24 + tz.transition 1931, 10, :o2, 58238845, 24 + tz.transition 1932, 4, :o3, 58243213, 24 + tz.transition 1932, 10, :o2, 58247581, 24 + tz.transition 1934, 4, :o3, 58260853, 24 + tz.transition 1934, 10, :o2, 58265221, 24 + tz.transition 1935, 3, :o3, 58269421, 24 + tz.transition 1935, 10, :o2, 58273957, 24 + tz.transition 1936, 4, :o3, 58278661, 24 + tz.transition 1936, 10, :o2, 58282693, 24 + tz.transition 1937, 4, :o3, 58287061, 24 + tz.transition 1937, 10, :o2, 58291429, 24 + tz.transition 1938, 3, :o3, 58295629, 24 + tz.transition 1938, 10, :o2, 58300165, 24 + tz.transition 1939, 4, :o3, 58304869, 24 + tz.transition 1939, 11, :o2, 58310077, 24 + tz.transition 1940, 2, :o3, 58312429, 24 + tz.transition 1940, 10, :o2, 58317805, 24 + tz.transition 1941, 4, :o3, 58322173, 24 + tz.transition 1941, 10, :o2, 58326565, 24 + tz.transition 1942, 3, :o3, 58330405, 24 + tz.transition 1942, 4, :o4, 4860951, 2 + tz.transition 1942, 8, :o3, 4861175, 2 + tz.transition 1942, 10, :o2, 58335781, 24 + tz.transition 1943, 3, :o3, 58339141, 24 + tz.transition 1943, 4, :o4, 4861665, 2 + tz.transition 1943, 8, :o3, 4861931, 2 + tz.transition 1943, 10, :o2, 58344685, 24 + tz.transition 1944, 3, :o3, 58347877, 24 + tz.transition 1944, 4, :o4, 4862407, 2 + tz.transition 1944, 8, :o3, 4862659, 2 + tz.transition 1944, 10, :o2, 58353421, 24 + tz.transition 1945, 3, :o3, 58356613, 24 + tz.transition 1945, 4, :o4, 4863135, 2 + tz.transition 1945, 8, :o3, 4863387, 2 + tz.transition 1945, 10, :o2, 58362157, 24 + tz.transition 1946, 4, :o3, 58366021, 24 + tz.transition 1946, 10, :o2, 58370389, 24 + tz.transition 1947, 4, :o3, 7296845, 3 + tz.transition 1947, 10, :o2, 7297391, 3 + tz.transition 1948, 4, :o3, 7297937, 3 + tz.transition 1948, 10, :o2, 7298483, 3 + tz.transition 1949, 4, :o3, 7299029, 3 + tz.transition 1949, 10, :o2, 7299575, 3 + tz.transition 1951, 4, :o3, 7301213, 3 + tz.transition 1951, 10, :o2, 7301780, 3 + tz.transition 1952, 4, :o3, 7302326, 3 + tz.transition 1952, 10, :o2, 7302872, 3 + tz.transition 1953, 4, :o3, 7303418, 3 + tz.transition 1953, 10, :o2, 7303964, 3 + tz.transition 1954, 4, :o3, 7304510, 3 + tz.transition 1954, 10, :o2, 7305056, 3 + tz.transition 1955, 4, :o3, 7305602, 3 + tz.transition 1955, 10, :o2, 7306148, 3 + tz.transition 1956, 4, :o3, 7306694, 3 + tz.transition 1956, 10, :o2, 7307261, 3 + tz.transition 1957, 4, :o3, 7307807, 3 + tz.transition 1957, 10, :o2, 7308353, 3 + tz.transition 1958, 4, :o3, 7308899, 3 + tz.transition 1958, 10, :o2, 7309445, 3 + tz.transition 1959, 4, :o3, 7309991, 3 + tz.transition 1959, 10, :o2, 7310537, 3 + tz.transition 1960, 4, :o3, 7311083, 3 + tz.transition 1960, 10, :o2, 7311629, 3 + tz.transition 1961, 4, :o3, 7312175, 3 + tz.transition 1961, 10, :o2, 7312721, 3 + tz.transition 1962, 4, :o3, 7313267, 3 + tz.transition 1962, 10, :o2, 7313834, 3 + tz.transition 1963, 4, :o3, 7314380, 3 + tz.transition 1963, 10, :o2, 7314926, 3 + tz.transition 1964, 4, :o3, 7315472, 3 + tz.transition 1964, 10, :o2, 7316018, 3 + tz.transition 1965, 4, :o3, 7316564, 3 + tz.transition 1965, 10, :o2, 7317110, 3 + tz.transition 1966, 4, :o5, 7317656, 3 + tz.transition 1977, 3, :o6, 228272400 + tz.transition 1977, 9, :o5, 243997200 + tz.transition 1978, 4, :o6, 260326800 + tz.transition 1978, 10, :o5, 276051600 + tz.transition 1979, 4, :o6, 291776400 + tz.transition 1979, 9, :o5, 307504800 + tz.transition 1980, 3, :o6, 323226000 + tz.transition 1980, 9, :o5, 338954400 + tz.transition 1981, 3, :o6, 354679200 + tz.transition 1981, 9, :o5, 370404000 + tz.transition 1982, 3, :o6, 386128800 + tz.transition 1982, 9, :o5, 401853600 + tz.transition 1983, 3, :o6, 417582000 + tz.transition 1983, 9, :o5, 433303200 + tz.transition 1984, 3, :o6, 449028000 + tz.transition 1984, 9, :o5, 465357600 + tz.transition 1985, 3, :o6, 481082400 + tz.transition 1985, 9, :o5, 496807200 + tz.transition 1986, 3, :o6, 512532000 + tz.transition 1986, 9, :o5, 528256800 + tz.transition 1987, 3, :o6, 543981600 + tz.transition 1987, 9, :o5, 559706400 + tz.transition 1988, 3, :o6, 575431200 + tz.transition 1988, 9, :o5, 591156000 + tz.transition 1989, 3, :o6, 606880800 + tz.transition 1989, 9, :o5, 622605600 + tz.transition 1990, 3, :o6, 638330400 + tz.transition 1990, 9, :o5, 654660000 + tz.transition 1991, 3, :o6, 670384800 + tz.transition 1991, 9, :o5, 686109600 + tz.transition 1992, 3, :o6, 701834400 + tz.transition 1992, 9, :o7, 717559200 + tz.transition 1993, 3, :o6, 733280400 + tz.transition 1993, 9, :o5, 749005200 + tz.transition 1994, 3, :o6, 764730000 + tz.transition 1994, 9, :o5, 780454800 + tz.transition 1995, 3, :o6, 796179600 + tz.transition 1995, 9, :o5, 811904400 + tz.transition 1996, 3, :o6, 828234000 + tz.transition 1996, 10, :o5, 846378000 + tz.transition 1997, 3, :o6, 859683600 + tz.transition 1997, 10, :o5, 877827600 + tz.transition 1998, 3, :o6, 891133200 + tz.transition 1998, 10, :o5, 909277200 + tz.transition 1999, 3, :o6, 922582800 + tz.transition 1999, 10, :o5, 941331600 + tz.transition 2000, 3, :o6, 954032400 + tz.transition 2000, 10, :o5, 972781200 + tz.transition 2001, 3, :o6, 985482000 + tz.transition 2001, 10, :o5, 1004230800 + tz.transition 2002, 3, :o6, 1017536400 + tz.transition 2002, 10, :o5, 1035680400 + tz.transition 2003, 3, :o6, 1048986000 + tz.transition 2003, 10, :o5, 1067130000 + tz.transition 2004, 3, :o6, 1080435600 + tz.transition 2004, 10, :o5, 1099184400 + tz.transition 2005, 3, :o6, 1111885200 + tz.transition 2005, 10, :o5, 1130634000 + tz.transition 2006, 3, :o6, 1143334800 + tz.transition 2006, 10, :o5, 1162083600 + tz.transition 2007, 3, :o6, 1174784400 + tz.transition 2007, 10, :o5, 1193533200 + tz.transition 2008, 3, :o6, 1206838800 + tz.transition 2008, 10, :o5, 1224982800 + tz.transition 2009, 3, :o6, 1238288400 + tz.transition 2009, 10, :o5, 1256432400 + tz.transition 2010, 3, :o6, 1269738000 + tz.transition 2010, 10, :o5, 1288486800 + tz.transition 2011, 3, :o6, 1301187600 + tz.transition 2011, 10, :o5, 1319936400 + tz.transition 2012, 3, :o6, 1332637200 + tz.transition 2012, 10, :o5, 1351386000 + tz.transition 2013, 3, :o6, 1364691600 + tz.transition 2013, 10, :o5, 1382835600 + tz.transition 2014, 3, :o6, 1396141200 + tz.transition 2014, 10, :o5, 1414285200 + tz.transition 2015, 3, :o6, 1427590800 + tz.transition 2015, 10, :o5, 1445734800 + tz.transition 2016, 3, :o6, 1459040400 + tz.transition 2016, 10, :o5, 1477789200 + tz.transition 2017, 3, :o6, 1490490000 + tz.transition 2017, 10, :o5, 1509238800 + tz.transition 2018, 3, :o6, 1521939600 + tz.transition 2018, 10, :o5, 1540688400 + tz.transition 2019, 3, :o6, 1553994000 + tz.transition 2019, 10, :o5, 1572138000 + tz.transition 2020, 3, :o6, 1585443600 + tz.transition 2020, 10, :o5, 1603587600 + tz.transition 2021, 3, :o6, 1616893200 + tz.transition 2021, 10, :o5, 1635642000 + tz.transition 2022, 3, :o6, 1648342800 + tz.transition 2022, 10, :o5, 1667091600 + tz.transition 2023, 3, :o6, 1679792400 + tz.transition 2023, 10, :o5, 1698541200 + tz.transition 2024, 3, :o6, 1711846800 + tz.transition 2024, 10, :o5, 1729990800 + tz.transition 2025, 3, :o6, 1743296400 + tz.transition 2025, 10, :o5, 1761440400 + tz.transition 2026, 3, :o6, 1774746000 + tz.transition 2026, 10, :o5, 1792890000 + tz.transition 2027, 3, :o6, 1806195600 + tz.transition 2027, 10, :o5, 1824944400 + tz.transition 2028, 3, :o6, 1837645200 + tz.transition 2028, 10, :o5, 1856394000 + tz.transition 2029, 3, :o6, 1869094800 + tz.transition 2029, 10, :o5, 1887843600 + tz.transition 2030, 3, :o6, 1901149200 + tz.transition 2030, 10, :o5, 1919293200 + tz.transition 2031, 3, :o6, 1932598800 + tz.transition 2031, 10, :o5, 1950742800 + tz.transition 2032, 3, :o6, 1964048400 + tz.transition 2032, 10, :o5, 1982797200 + tz.transition 2033, 3, :o6, 1995498000 + tz.transition 2033, 10, :o5, 2014246800 + tz.transition 2034, 3, :o6, 2026947600 + tz.transition 2034, 10, :o5, 2045696400 + tz.transition 2035, 3, :o6, 2058397200 + tz.transition 2035, 10, :o5, 2077146000 + tz.transition 2036, 3, :o6, 2090451600 + tz.transition 2036, 10, :o5, 2108595600 + tz.transition 2037, 3, :o6, 2121901200 + tz.transition 2037, 10, :o5, 2140045200 + tz.transition 2038, 3, :o6, 59172253, 24 + tz.transition 2038, 10, :o5, 59177461, 24 + tz.transition 2039, 3, :o6, 59180989, 24 + tz.transition 2039, 10, :o5, 59186197, 24 + tz.transition 2040, 3, :o6, 59189725, 24 + tz.transition 2040, 10, :o5, 59194933, 24 + tz.transition 2041, 3, :o6, 59198629, 24 + tz.transition 2041, 10, :o5, 59203669, 24 + tz.transition 2042, 3, :o6, 59207365, 24 + tz.transition 2042, 10, :o5, 59212405, 24 + tz.transition 2043, 3, :o6, 59216101, 24 + tz.transition 2043, 10, :o5, 59221141, 24 + tz.transition 2044, 3, :o6, 59224837, 24 + tz.transition 2044, 10, :o5, 59230045, 24 + tz.transition 2045, 3, :o6, 59233573, 24 + tz.transition 2045, 10, :o5, 59238781, 24 + tz.transition 2046, 3, :o6, 59242309, 24 + tz.transition 2046, 10, :o5, 59247517, 24 + tz.transition 2047, 3, :o6, 59251213, 24 + tz.transition 2047, 10, :o5, 59256253, 24 + tz.transition 2048, 3, :o6, 59259949, 24 + tz.transition 2048, 10, :o5, 59264989, 24 + tz.transition 2049, 3, :o6, 59268685, 24 + tz.transition 2049, 10, :o5, 59273893, 24 + tz.transition 2050, 3, :o6, 59277421, 24 + tz.transition 2050, 10, :o5, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Cape_Verde.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Cape_Verde.rb new file mode 100644 index 0000000000..61c8c15043 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Cape_Verde.rb @@ -0,0 +1,23 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Atlantic + module Cape_Verde + include TimezoneDefinition + + timezone 'Atlantic/Cape_Verde' do |tz| + tz.offset :o0, -5644, 0, :LMT + tz.offset :o1, -7200, 0, :CVT + tz.offset :o2, -7200, 3600, :CVST + tz.offset :o3, -3600, 0, :CVT + + tz.transition 1907, 1, :o1, 52219653811, 21600 + tz.transition 1942, 9, :o2, 29167243, 12 + tz.transition 1945, 10, :o1, 58361845, 24 + tz.transition 1975, 11, :o3, 186120000 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/South_Georgia.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/South_Georgia.rb new file mode 100644 index 0000000000..6a4cbafb9f --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/South_Georgia.rb @@ -0,0 +1,18 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Atlantic + module South_Georgia + include TimezoneDefinition + + timezone 'Atlantic/South_Georgia' do |tz| + tz.offset :o0, -8768, 0, :LMT + tz.offset :o1, -7200, 0, :GST + + tz.transition 1890, 1, :o1, 1627673806, 675 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Adelaide.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Adelaide.rb new file mode 100644 index 0000000000..c5d561cc1e --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Adelaide.rb @@ -0,0 +1,187 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Australia + module Adelaide + include TimezoneDefinition + + timezone 'Australia/Adelaide' do |tz| + tz.offset :o0, 33260, 0, :LMT + tz.offset :o1, 32400, 0, :CST + tz.offset :o2, 34200, 0, :CST + tz.offset :o3, 34200, 3600, :CST + + tz.transition 1895, 1, :o1, 10425132497, 4320 + tz.transition 1899, 4, :o2, 19318201, 8 + tz.transition 1916, 12, :o3, 3486569911, 1440 + tz.transition 1917, 3, :o2, 116222983, 48 + tz.transition 1941, 12, :o3, 38885763, 16 + tz.transition 1942, 3, :o2, 116661463, 48 + tz.transition 1942, 9, :o3, 38890067, 16 + tz.transition 1943, 3, :o2, 116678935, 48 + tz.transition 1943, 10, :o3, 38896003, 16 + tz.transition 1944, 3, :o2, 116696407, 48 + tz.transition 1971, 10, :o3, 57688200 + tz.transition 1972, 2, :o2, 67969800 + tz.transition 1972, 10, :o3, 89137800 + tz.transition 1973, 3, :o2, 100024200 + tz.transition 1973, 10, :o3, 120587400 + tz.transition 1974, 3, :o2, 131473800 + tz.transition 1974, 10, :o3, 152037000 + tz.transition 1975, 3, :o2, 162923400 + tz.transition 1975, 10, :o3, 183486600 + tz.transition 1976, 3, :o2, 194977800 + tz.transition 1976, 10, :o3, 215541000 + tz.transition 1977, 3, :o2, 226427400 + tz.transition 1977, 10, :o3, 246990600 + tz.transition 1978, 3, :o2, 257877000 + tz.transition 1978, 10, :o3, 278440200 + tz.transition 1979, 3, :o2, 289326600 + tz.transition 1979, 10, :o3, 309889800 + tz.transition 1980, 3, :o2, 320776200 + tz.transition 1980, 10, :o3, 341339400 + tz.transition 1981, 2, :o2, 352225800 + tz.transition 1981, 10, :o3, 372789000 + tz.transition 1982, 3, :o2, 384280200 + tz.transition 1982, 10, :o3, 404843400 + tz.transition 1983, 3, :o2, 415729800 + tz.transition 1983, 10, :o3, 436293000 + tz.transition 1984, 3, :o2, 447179400 + tz.transition 1984, 10, :o3, 467742600 + tz.transition 1985, 3, :o2, 478629000 + tz.transition 1985, 10, :o3, 499192200 + tz.transition 1986, 3, :o2, 511288200 + tz.transition 1986, 10, :o3, 530037000 + tz.transition 1987, 3, :o2, 542737800 + tz.transition 1987, 10, :o3, 562091400 + tz.transition 1988, 3, :o2, 574792200 + tz.transition 1988, 10, :o3, 594145800 + tz.transition 1989, 3, :o2, 606241800 + tz.transition 1989, 10, :o3, 625595400 + tz.transition 1990, 3, :o2, 637691400 + tz.transition 1990, 10, :o3, 657045000 + tz.transition 1991, 3, :o2, 667931400 + tz.transition 1991, 10, :o3, 688494600 + tz.transition 1992, 3, :o2, 701195400 + tz.transition 1992, 10, :o3, 719944200 + tz.transition 1993, 3, :o2, 731435400 + tz.transition 1993, 10, :o3, 751998600 + tz.transition 1994, 3, :o2, 764094600 + tz.transition 1994, 10, :o3, 783448200 + tz.transition 1995, 3, :o2, 796149000 + tz.transition 1995, 10, :o3, 814897800 + tz.transition 1996, 3, :o2, 828203400 + tz.transition 1996, 10, :o3, 846347400 + tz.transition 1997, 3, :o2, 859653000 + tz.transition 1997, 10, :o3, 877797000 + tz.transition 1998, 3, :o2, 891102600 + tz.transition 1998, 10, :o3, 909246600 + tz.transition 1999, 3, :o2, 922552200 + tz.transition 1999, 10, :o3, 941301000 + tz.transition 2000, 3, :o2, 954001800 + tz.transition 2000, 10, :o3, 972750600 + tz.transition 2001, 3, :o2, 985451400 + tz.transition 2001, 10, :o3, 1004200200 + tz.transition 2002, 3, :o2, 1017505800 + tz.transition 2002, 10, :o3, 1035649800 + tz.transition 2003, 3, :o2, 1048955400 + tz.transition 2003, 10, :o3, 1067099400 + tz.transition 2004, 3, :o2, 1080405000 + tz.transition 2004, 10, :o3, 1099153800 + tz.transition 2005, 3, :o2, 1111854600 + tz.transition 2005, 10, :o3, 1130603400 + tz.transition 2006, 4, :o2, 1143909000 + tz.transition 2006, 10, :o3, 1162053000 + tz.transition 2007, 3, :o2, 1174753800 + tz.transition 2007, 10, :o3, 1193502600 + tz.transition 2008, 4, :o2, 1207413000 + tz.transition 2008, 10, :o3, 1223137800 + tz.transition 2009, 4, :o2, 1238862600 + tz.transition 2009, 10, :o3, 1254587400 + tz.transition 2010, 4, :o2, 1270312200 + tz.transition 2010, 10, :o3, 1286037000 + tz.transition 2011, 4, :o2, 1301761800 + tz.transition 2011, 10, :o3, 1317486600 + tz.transition 2012, 3, :o2, 1333211400 + tz.transition 2012, 10, :o3, 1349541000 + tz.transition 2013, 4, :o2, 1365265800 + tz.transition 2013, 10, :o3, 1380990600 + tz.transition 2014, 4, :o2, 1396715400 + tz.transition 2014, 10, :o3, 1412440200 + tz.transition 2015, 4, :o2, 1428165000 + tz.transition 2015, 10, :o3, 1443889800 + tz.transition 2016, 4, :o2, 1459614600 + tz.transition 2016, 10, :o3, 1475339400 + tz.transition 2017, 4, :o2, 1491064200 + tz.transition 2017, 9, :o3, 1506789000 + tz.transition 2018, 3, :o2, 1522513800 + tz.transition 2018, 10, :o3, 1538843400 + tz.transition 2019, 4, :o2, 1554568200 + tz.transition 2019, 10, :o3, 1570293000 + tz.transition 2020, 4, :o2, 1586017800 + tz.transition 2020, 10, :o3, 1601742600 + tz.transition 2021, 4, :o2, 1617467400 + tz.transition 2021, 10, :o3, 1633192200 + tz.transition 2022, 4, :o2, 1648917000 + tz.transition 2022, 10, :o3, 1664641800 + tz.transition 2023, 4, :o2, 1680366600 + tz.transition 2023, 9, :o3, 1696091400 + tz.transition 2024, 4, :o2, 1712421000 + tz.transition 2024, 10, :o3, 1728145800 + tz.transition 2025, 4, :o2, 1743870600 + tz.transition 2025, 10, :o3, 1759595400 + tz.transition 2026, 4, :o2, 1775320200 + tz.transition 2026, 10, :o3, 1791045000 + tz.transition 2027, 4, :o2, 1806769800 + tz.transition 2027, 10, :o3, 1822494600 + tz.transition 2028, 4, :o2, 1838219400 + tz.transition 2028, 9, :o3, 1853944200 + tz.transition 2029, 3, :o2, 1869669000 + tz.transition 2029, 10, :o3, 1885998600 + tz.transition 2030, 4, :o2, 1901723400 + tz.transition 2030, 10, :o3, 1917448200 + tz.transition 2031, 4, :o2, 1933173000 + tz.transition 2031, 10, :o3, 1948897800 + tz.transition 2032, 4, :o2, 1964622600 + tz.transition 2032, 10, :o3, 1980347400 + tz.transition 2033, 4, :o2, 1996072200 + tz.transition 2033, 10, :o3, 2011797000 + tz.transition 2034, 4, :o2, 2027521800 + tz.transition 2034, 9, :o3, 2043246600 + tz.transition 2035, 3, :o2, 2058971400 + tz.transition 2035, 10, :o3, 2075301000 + tz.transition 2036, 4, :o2, 2091025800 + tz.transition 2036, 10, :o3, 2106750600 + tz.transition 2037, 4, :o2, 2122475400 + tz.transition 2037, 10, :o3, 2138200200 + tz.transition 2038, 4, :o2, 39448275, 16 + tz.transition 2038, 10, :o3, 39451187, 16 + tz.transition 2039, 4, :o2, 39454099, 16 + tz.transition 2039, 10, :o3, 39457011, 16 + tz.transition 2040, 3, :o2, 39459923, 16 + tz.transition 2040, 10, :o3, 39462947, 16 + tz.transition 2041, 4, :o2, 39465859, 16 + tz.transition 2041, 10, :o3, 39468771, 16 + tz.transition 2042, 4, :o2, 39471683, 16 + tz.transition 2042, 10, :o3, 39474595, 16 + tz.transition 2043, 4, :o2, 39477507, 16 + tz.transition 2043, 10, :o3, 39480419, 16 + tz.transition 2044, 4, :o2, 39483331, 16 + tz.transition 2044, 10, :o3, 39486243, 16 + tz.transition 2045, 4, :o2, 39489155, 16 + tz.transition 2045, 9, :o3, 39492067, 16 + tz.transition 2046, 3, :o2, 39494979, 16 + tz.transition 2046, 10, :o3, 39498003, 16 + tz.transition 2047, 4, :o2, 39500915, 16 + tz.transition 2047, 10, :o3, 39503827, 16 + tz.transition 2048, 4, :o2, 39506739, 16 + tz.transition 2048, 10, :o3, 39509651, 16 + tz.transition 2049, 4, :o2, 39512563, 16 + tz.transition 2049, 10, :o3, 39515475, 16 + tz.transition 2050, 4, :o2, 39518387, 16 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Brisbane.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Brisbane.rb new file mode 100644 index 0000000000..dd85ddae94 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Brisbane.rb @@ -0,0 +1,35 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Australia + module Brisbane + include TimezoneDefinition + + timezone 'Australia/Brisbane' do |tz| + tz.offset :o0, 36728, 0, :LMT + tz.offset :o1, 36000, 0, :EST + tz.offset :o2, 36000, 3600, :EST + + tz.transition 1894, 12, :o1, 26062496009, 10800 + tz.transition 1916, 12, :o2, 3486569881, 1440 + tz.transition 1917, 3, :o1, 19370497, 8 + tz.transition 1941, 12, :o2, 14582161, 6 + tz.transition 1942, 3, :o1, 19443577, 8 + tz.transition 1942, 9, :o2, 14583775, 6 + tz.transition 1943, 3, :o1, 19446489, 8 + tz.transition 1943, 10, :o2, 14586001, 6 + tz.transition 1944, 3, :o1, 19449401, 8 + tz.transition 1971, 10, :o2, 57686400 + tz.transition 1972, 2, :o1, 67968000 + tz.transition 1989, 10, :o2, 625593600 + tz.transition 1990, 3, :o1, 636480000 + tz.transition 1990, 10, :o2, 657043200 + tz.transition 1991, 3, :o1, 667929600 + tz.transition 1991, 10, :o2, 688492800 + tz.transition 1992, 2, :o1, 699379200 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Darwin.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Darwin.rb new file mode 100644 index 0000000000..17de88124d --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Darwin.rb @@ -0,0 +1,29 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Australia + module Darwin + include TimezoneDefinition + + timezone 'Australia/Darwin' do |tz| + tz.offset :o0, 31400, 0, :LMT + tz.offset :o1, 32400, 0, :CST + tz.offset :o2, 34200, 0, :CST + tz.offset :o3, 34200, 3600, :CST + + tz.transition 1895, 1, :o1, 1042513259, 432 + tz.transition 1899, 4, :o2, 19318201, 8 + tz.transition 1916, 12, :o3, 3486569911, 1440 + tz.transition 1917, 3, :o2, 116222983, 48 + tz.transition 1941, 12, :o3, 38885763, 16 + tz.transition 1942, 3, :o2, 116661463, 48 + tz.transition 1942, 9, :o3, 38890067, 16 + tz.transition 1943, 3, :o2, 116678935, 48 + tz.transition 1943, 10, :o3, 38896003, 16 + tz.transition 1944, 3, :o2, 116696407, 48 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Hobart.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Hobart.rb new file mode 100644 index 0000000000..11384b9840 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Hobart.rb @@ -0,0 +1,193 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Australia + module Hobart + include TimezoneDefinition + + timezone 'Australia/Hobart' do |tz| + tz.offset :o0, 35356, 0, :LMT + tz.offset :o1, 36000, 0, :EST + tz.offset :o2, 36000, 3600, :EST + + tz.transition 1895, 8, :o1, 52130241161, 21600 + tz.transition 1916, 9, :o2, 14526823, 6 + tz.transition 1917, 3, :o1, 19370497, 8 + tz.transition 1941, 12, :o2, 14582161, 6 + tz.transition 1942, 3, :o1, 19443577, 8 + tz.transition 1942, 9, :o2, 14583775, 6 + tz.transition 1943, 3, :o1, 19446489, 8 + tz.transition 1943, 10, :o2, 14586001, 6 + tz.transition 1944, 3, :o1, 19449401, 8 + tz.transition 1967, 9, :o2, 14638585, 6 + tz.transition 1968, 3, :o1, 14639677, 6 + tz.transition 1968, 10, :o2, 14640937, 6 + tz.transition 1969, 3, :o1, 14641735, 6 + tz.transition 1969, 10, :o2, 14643121, 6 + tz.transition 1970, 3, :o1, 5673600 + tz.transition 1970, 10, :o2, 25632000 + tz.transition 1971, 3, :o1, 37728000 + tz.transition 1971, 10, :o2, 57686400 + tz.transition 1972, 2, :o1, 67968000 + tz.transition 1972, 10, :o2, 89136000 + tz.transition 1973, 3, :o1, 100022400 + tz.transition 1973, 10, :o2, 120585600 + tz.transition 1974, 3, :o1, 131472000 + tz.transition 1974, 10, :o2, 152035200 + tz.transition 1975, 3, :o1, 162921600 + tz.transition 1975, 10, :o2, 183484800 + tz.transition 1976, 3, :o1, 194976000 + tz.transition 1976, 10, :o2, 215539200 + tz.transition 1977, 3, :o1, 226425600 + tz.transition 1977, 10, :o2, 246988800 + tz.transition 1978, 3, :o1, 257875200 + tz.transition 1978, 10, :o2, 278438400 + tz.transition 1979, 3, :o1, 289324800 + tz.transition 1979, 10, :o2, 309888000 + tz.transition 1980, 3, :o1, 320774400 + tz.transition 1980, 10, :o2, 341337600 + tz.transition 1981, 2, :o1, 352224000 + tz.transition 1981, 10, :o2, 372787200 + tz.transition 1982, 3, :o1, 386092800 + tz.transition 1982, 10, :o2, 404841600 + tz.transition 1983, 3, :o1, 417542400 + tz.transition 1983, 10, :o2, 436291200 + tz.transition 1984, 3, :o1, 447177600 + tz.transition 1984, 10, :o2, 467740800 + tz.transition 1985, 3, :o1, 478627200 + tz.transition 1985, 10, :o2, 499190400 + tz.transition 1986, 3, :o1, 510076800 + tz.transition 1986, 10, :o2, 530035200 + tz.transition 1987, 3, :o1, 542736000 + tz.transition 1987, 10, :o2, 562089600 + tz.transition 1988, 3, :o1, 574790400 + tz.transition 1988, 10, :o2, 594144000 + tz.transition 1989, 3, :o1, 606240000 + tz.transition 1989, 10, :o2, 625593600 + tz.transition 1990, 3, :o1, 637689600 + tz.transition 1990, 10, :o2, 657043200 + tz.transition 1991, 3, :o1, 670348800 + tz.transition 1991, 10, :o2, 686678400 + tz.transition 1992, 3, :o1, 701798400 + tz.transition 1992, 10, :o2, 718128000 + tz.transition 1993, 3, :o1, 733248000 + tz.transition 1993, 10, :o2, 749577600 + tz.transition 1994, 3, :o1, 764697600 + tz.transition 1994, 10, :o2, 781027200 + tz.transition 1995, 3, :o1, 796147200 + tz.transition 1995, 9, :o2, 812476800 + tz.transition 1996, 3, :o1, 828201600 + tz.transition 1996, 10, :o2, 844531200 + tz.transition 1997, 3, :o1, 859651200 + tz.transition 1997, 10, :o2, 875980800 + tz.transition 1998, 3, :o1, 891100800 + tz.transition 1998, 10, :o2, 907430400 + tz.transition 1999, 3, :o1, 922550400 + tz.transition 1999, 10, :o2, 938880000 + tz.transition 2000, 3, :o1, 954000000 + tz.transition 2000, 8, :o2, 967305600 + tz.transition 2001, 3, :o1, 985449600 + tz.transition 2001, 10, :o2, 1002384000 + tz.transition 2002, 3, :o1, 1017504000 + tz.transition 2002, 10, :o2, 1033833600 + tz.transition 2003, 3, :o1, 1048953600 + tz.transition 2003, 10, :o2, 1065283200 + tz.transition 2004, 3, :o1, 1080403200 + tz.transition 2004, 10, :o2, 1096732800 + tz.transition 2005, 3, :o1, 1111852800 + tz.transition 2005, 10, :o2, 1128182400 + tz.transition 2006, 4, :o1, 1143907200 + tz.transition 2006, 9, :o2, 1159632000 + tz.transition 2007, 3, :o1, 1174752000 + tz.transition 2007, 10, :o2, 1191686400 + tz.transition 2008, 4, :o1, 1207411200 + tz.transition 2008, 10, :o2, 1223136000 + tz.transition 2009, 4, :o1, 1238860800 + tz.transition 2009, 10, :o2, 1254585600 + tz.transition 2010, 4, :o1, 1270310400 + tz.transition 2010, 10, :o2, 1286035200 + tz.transition 2011, 4, :o1, 1301760000 + tz.transition 2011, 10, :o2, 1317484800 + tz.transition 2012, 3, :o1, 1333209600 + tz.transition 2012, 10, :o2, 1349539200 + tz.transition 2013, 4, :o1, 1365264000 + tz.transition 2013, 10, :o2, 1380988800 + tz.transition 2014, 4, :o1, 1396713600 + tz.transition 2014, 10, :o2, 1412438400 + tz.transition 2015, 4, :o1, 1428163200 + tz.transition 2015, 10, :o2, 1443888000 + tz.transition 2016, 4, :o1, 1459612800 + tz.transition 2016, 10, :o2, 1475337600 + tz.transition 2017, 4, :o1, 1491062400 + tz.transition 2017, 9, :o2, 1506787200 + tz.transition 2018, 3, :o1, 1522512000 + tz.transition 2018, 10, :o2, 1538841600 + tz.transition 2019, 4, :o1, 1554566400 + tz.transition 2019, 10, :o2, 1570291200 + tz.transition 2020, 4, :o1, 1586016000 + tz.transition 2020, 10, :o2, 1601740800 + tz.transition 2021, 4, :o1, 1617465600 + tz.transition 2021, 10, :o2, 1633190400 + tz.transition 2022, 4, :o1, 1648915200 + tz.transition 2022, 10, :o2, 1664640000 + tz.transition 2023, 4, :o1, 1680364800 + tz.transition 2023, 9, :o2, 1696089600 + tz.transition 2024, 4, :o1, 1712419200 + tz.transition 2024, 10, :o2, 1728144000 + tz.transition 2025, 4, :o1, 1743868800 + tz.transition 2025, 10, :o2, 1759593600 + tz.transition 2026, 4, :o1, 1775318400 + tz.transition 2026, 10, :o2, 1791043200 + tz.transition 2027, 4, :o1, 1806768000 + tz.transition 2027, 10, :o2, 1822492800 + tz.transition 2028, 4, :o1, 1838217600 + tz.transition 2028, 9, :o2, 1853942400 + tz.transition 2029, 3, :o1, 1869667200 + tz.transition 2029, 10, :o2, 1885996800 + tz.transition 2030, 4, :o1, 1901721600 + tz.transition 2030, 10, :o2, 1917446400 + tz.transition 2031, 4, :o1, 1933171200 + tz.transition 2031, 10, :o2, 1948896000 + tz.transition 2032, 4, :o1, 1964620800 + tz.transition 2032, 10, :o2, 1980345600 + tz.transition 2033, 4, :o1, 1996070400 + tz.transition 2033, 10, :o2, 2011795200 + tz.transition 2034, 4, :o1, 2027520000 + tz.transition 2034, 9, :o2, 2043244800 + tz.transition 2035, 3, :o1, 2058969600 + tz.transition 2035, 10, :o2, 2075299200 + tz.transition 2036, 4, :o1, 2091024000 + tz.transition 2036, 10, :o2, 2106748800 + tz.transition 2037, 4, :o1, 2122473600 + tz.transition 2037, 10, :o2, 2138198400 + tz.transition 2038, 4, :o1, 14793103, 6 + tz.transition 2038, 10, :o2, 14794195, 6 + tz.transition 2039, 4, :o1, 14795287, 6 + tz.transition 2039, 10, :o2, 14796379, 6 + tz.transition 2040, 3, :o1, 14797471, 6 + tz.transition 2040, 10, :o2, 14798605, 6 + tz.transition 2041, 4, :o1, 14799697, 6 + tz.transition 2041, 10, :o2, 14800789, 6 + tz.transition 2042, 4, :o1, 14801881, 6 + tz.transition 2042, 10, :o2, 14802973, 6 + tz.transition 2043, 4, :o1, 14804065, 6 + tz.transition 2043, 10, :o2, 14805157, 6 + tz.transition 2044, 4, :o1, 14806249, 6 + tz.transition 2044, 10, :o2, 14807341, 6 + tz.transition 2045, 4, :o1, 14808433, 6 + tz.transition 2045, 9, :o2, 14809525, 6 + tz.transition 2046, 3, :o1, 14810617, 6 + tz.transition 2046, 10, :o2, 14811751, 6 + tz.transition 2047, 4, :o1, 14812843, 6 + tz.transition 2047, 10, :o2, 14813935, 6 + tz.transition 2048, 4, :o1, 14815027, 6 + tz.transition 2048, 10, :o2, 14816119, 6 + tz.transition 2049, 4, :o1, 14817211, 6 + tz.transition 2049, 10, :o2, 14818303, 6 + tz.transition 2050, 4, :o1, 14819395, 6 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Melbourne.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Melbourne.rb new file mode 100644 index 0000000000..c1304488ea --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Melbourne.rb @@ -0,0 +1,185 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Australia + module Melbourne + include TimezoneDefinition + + timezone 'Australia/Melbourne' do |tz| + tz.offset :o0, 34792, 0, :LMT + tz.offset :o1, 36000, 0, :EST + tz.offset :o2, 36000, 3600, :EST + + tz.transition 1895, 1, :o1, 26062831051, 10800 + tz.transition 1916, 12, :o2, 3486569881, 1440 + tz.transition 1917, 3, :o1, 19370497, 8 + tz.transition 1941, 12, :o2, 14582161, 6 + tz.transition 1942, 3, :o1, 19443577, 8 + tz.transition 1942, 9, :o2, 14583775, 6 + tz.transition 1943, 3, :o1, 19446489, 8 + tz.transition 1943, 10, :o2, 14586001, 6 + tz.transition 1944, 3, :o1, 19449401, 8 + tz.transition 1971, 10, :o2, 57686400 + tz.transition 1972, 2, :o1, 67968000 + tz.transition 1972, 10, :o2, 89136000 + tz.transition 1973, 3, :o1, 100022400 + tz.transition 1973, 10, :o2, 120585600 + tz.transition 1974, 3, :o1, 131472000 + tz.transition 1974, 10, :o2, 152035200 + tz.transition 1975, 3, :o1, 162921600 + tz.transition 1975, 10, :o2, 183484800 + tz.transition 1976, 3, :o1, 194976000 + tz.transition 1976, 10, :o2, 215539200 + tz.transition 1977, 3, :o1, 226425600 + tz.transition 1977, 10, :o2, 246988800 + tz.transition 1978, 3, :o1, 257875200 + tz.transition 1978, 10, :o2, 278438400 + tz.transition 1979, 3, :o1, 289324800 + tz.transition 1979, 10, :o2, 309888000 + tz.transition 1980, 3, :o1, 320774400 + tz.transition 1980, 10, :o2, 341337600 + tz.transition 1981, 2, :o1, 352224000 + tz.transition 1981, 10, :o2, 372787200 + tz.transition 1982, 3, :o1, 384278400 + tz.transition 1982, 10, :o2, 404841600 + tz.transition 1983, 3, :o1, 415728000 + tz.transition 1983, 10, :o2, 436291200 + tz.transition 1984, 3, :o1, 447177600 + tz.transition 1984, 10, :o2, 467740800 + tz.transition 1985, 3, :o1, 478627200 + tz.transition 1985, 10, :o2, 499190400 + tz.transition 1986, 3, :o1, 511286400 + tz.transition 1986, 10, :o2, 530035200 + tz.transition 1987, 3, :o1, 542736000 + tz.transition 1987, 10, :o2, 561484800 + tz.transition 1988, 3, :o1, 574790400 + tz.transition 1988, 10, :o2, 594144000 + tz.transition 1989, 3, :o1, 606240000 + tz.transition 1989, 10, :o2, 625593600 + tz.transition 1990, 3, :o1, 637689600 + tz.transition 1990, 10, :o2, 657043200 + tz.transition 1991, 3, :o1, 667929600 + tz.transition 1991, 10, :o2, 688492800 + tz.transition 1992, 2, :o1, 699379200 + tz.transition 1992, 10, :o2, 719942400 + tz.transition 1993, 3, :o1, 731433600 + tz.transition 1993, 10, :o2, 751996800 + tz.transition 1994, 3, :o1, 762883200 + tz.transition 1994, 10, :o2, 783446400 + tz.transition 1995, 3, :o1, 796147200 + tz.transition 1995, 10, :o2, 814896000 + tz.transition 1996, 3, :o1, 828201600 + tz.transition 1996, 10, :o2, 846345600 + tz.transition 1997, 3, :o1, 859651200 + tz.transition 1997, 10, :o2, 877795200 + tz.transition 1998, 3, :o1, 891100800 + tz.transition 1998, 10, :o2, 909244800 + tz.transition 1999, 3, :o1, 922550400 + tz.transition 1999, 10, :o2, 941299200 + tz.transition 2000, 3, :o1, 954000000 + tz.transition 2000, 8, :o2, 967305600 + tz.transition 2001, 3, :o1, 985449600 + tz.transition 2001, 10, :o2, 1004198400 + tz.transition 2002, 3, :o1, 1017504000 + tz.transition 2002, 10, :o2, 1035648000 + tz.transition 2003, 3, :o1, 1048953600 + tz.transition 2003, 10, :o2, 1067097600 + tz.transition 2004, 3, :o1, 1080403200 + tz.transition 2004, 10, :o2, 1099152000 + tz.transition 2005, 3, :o1, 1111852800 + tz.transition 2005, 10, :o2, 1130601600 + tz.transition 2006, 4, :o1, 1143907200 + tz.transition 2006, 10, :o2, 1162051200 + tz.transition 2007, 3, :o1, 1174752000 + tz.transition 2007, 10, :o2, 1193500800 + tz.transition 2008, 4, :o1, 1207411200 + tz.transition 2008, 10, :o2, 1223136000 + tz.transition 2009, 4, :o1, 1238860800 + tz.transition 2009, 10, :o2, 1254585600 + tz.transition 2010, 4, :o1, 1270310400 + tz.transition 2010, 10, :o2, 1286035200 + tz.transition 2011, 4, :o1, 1301760000 + tz.transition 2011, 10, :o2, 1317484800 + tz.transition 2012, 3, :o1, 1333209600 + tz.transition 2012, 10, :o2, 1349539200 + tz.transition 2013, 4, :o1, 1365264000 + tz.transition 2013, 10, :o2, 1380988800 + tz.transition 2014, 4, :o1, 1396713600 + tz.transition 2014, 10, :o2, 1412438400 + tz.transition 2015, 4, :o1, 1428163200 + tz.transition 2015, 10, :o2, 1443888000 + tz.transition 2016, 4, :o1, 1459612800 + tz.transition 2016, 10, :o2, 1475337600 + tz.transition 2017, 4, :o1, 1491062400 + tz.transition 2017, 9, :o2, 1506787200 + tz.transition 2018, 3, :o1, 1522512000 + tz.transition 2018, 10, :o2, 1538841600 + tz.transition 2019, 4, :o1, 1554566400 + tz.transition 2019, 10, :o2, 1570291200 + tz.transition 2020, 4, :o1, 1586016000 + tz.transition 2020, 10, :o2, 1601740800 + tz.transition 2021, 4, :o1, 1617465600 + tz.transition 2021, 10, :o2, 1633190400 + tz.transition 2022, 4, :o1, 1648915200 + tz.transition 2022, 10, :o2, 1664640000 + tz.transition 2023, 4, :o1, 1680364800 + tz.transition 2023, 9, :o2, 1696089600 + tz.transition 2024, 4, :o1, 1712419200 + tz.transition 2024, 10, :o2, 1728144000 + tz.transition 2025, 4, :o1, 1743868800 + tz.transition 2025, 10, :o2, 1759593600 + tz.transition 2026, 4, :o1, 1775318400 + tz.transition 2026, 10, :o2, 1791043200 + tz.transition 2027, 4, :o1, 1806768000 + tz.transition 2027, 10, :o2, 1822492800 + tz.transition 2028, 4, :o1, 1838217600 + tz.transition 2028, 9, :o2, 1853942400 + tz.transition 2029, 3, :o1, 1869667200 + tz.transition 2029, 10, :o2, 1885996800 + tz.transition 2030, 4, :o1, 1901721600 + tz.transition 2030, 10, :o2, 1917446400 + tz.transition 2031, 4, :o1, 1933171200 + tz.transition 2031, 10, :o2, 1948896000 + tz.transition 2032, 4, :o1, 1964620800 + tz.transition 2032, 10, :o2, 1980345600 + tz.transition 2033, 4, :o1, 1996070400 + tz.transition 2033, 10, :o2, 2011795200 + tz.transition 2034, 4, :o1, 2027520000 + tz.transition 2034, 9, :o2, 2043244800 + tz.transition 2035, 3, :o1, 2058969600 + tz.transition 2035, 10, :o2, 2075299200 + tz.transition 2036, 4, :o1, 2091024000 + tz.transition 2036, 10, :o2, 2106748800 + tz.transition 2037, 4, :o1, 2122473600 + tz.transition 2037, 10, :o2, 2138198400 + tz.transition 2038, 4, :o1, 14793103, 6 + tz.transition 2038, 10, :o2, 14794195, 6 + tz.transition 2039, 4, :o1, 14795287, 6 + tz.transition 2039, 10, :o2, 14796379, 6 + tz.transition 2040, 3, :o1, 14797471, 6 + tz.transition 2040, 10, :o2, 14798605, 6 + tz.transition 2041, 4, :o1, 14799697, 6 + tz.transition 2041, 10, :o2, 14800789, 6 + tz.transition 2042, 4, :o1, 14801881, 6 + tz.transition 2042, 10, :o2, 14802973, 6 + tz.transition 2043, 4, :o1, 14804065, 6 + tz.transition 2043, 10, :o2, 14805157, 6 + tz.transition 2044, 4, :o1, 14806249, 6 + tz.transition 2044, 10, :o2, 14807341, 6 + tz.transition 2045, 4, :o1, 14808433, 6 + tz.transition 2045, 9, :o2, 14809525, 6 + tz.transition 2046, 3, :o1, 14810617, 6 + tz.transition 2046, 10, :o2, 14811751, 6 + tz.transition 2047, 4, :o1, 14812843, 6 + tz.transition 2047, 10, :o2, 14813935, 6 + tz.transition 2048, 4, :o1, 14815027, 6 + tz.transition 2048, 10, :o2, 14816119, 6 + tz.transition 2049, 4, :o1, 14817211, 6 + tz.transition 2049, 10, :o2, 14818303, 6 + tz.transition 2050, 4, :o1, 14819395, 6 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Perth.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Perth.rb new file mode 100644 index 0000000000..d9e66f14a8 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Perth.rb @@ -0,0 +1,37 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Australia + module Perth + include TimezoneDefinition + + timezone 'Australia/Perth' do |tz| + tz.offset :o0, 27804, 0, :LMT + tz.offset :o1, 28800, 0, :WST + tz.offset :o2, 28800, 3600, :WST + + tz.transition 1895, 11, :o1, 17377402883, 7200 + tz.transition 1916, 12, :o2, 3486570001, 1440 + tz.transition 1917, 3, :o1, 58111493, 24 + tz.transition 1941, 12, :o2, 9721441, 4 + tz.transition 1942, 3, :o1, 58330733, 24 + tz.transition 1942, 9, :o2, 9722517, 4 + tz.transition 1943, 3, :o1, 58339469, 24 + tz.transition 1974, 10, :o2, 152042400 + tz.transition 1975, 3, :o1, 162928800 + tz.transition 1983, 10, :o2, 436298400 + tz.transition 1984, 3, :o1, 447184800 + tz.transition 1991, 11, :o2, 690314400 + tz.transition 1992, 2, :o1, 699386400 + tz.transition 2006, 12, :o2, 1165082400 + tz.transition 2007, 3, :o1, 1174759200 + tz.transition 2007, 10, :o2, 1193508000 + tz.transition 2008, 3, :o1, 1206813600 + tz.transition 2008, 10, :o2, 1224957600 + tz.transition 2009, 3, :o1, 1238263200 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Sydney.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Sydney.rb new file mode 100644 index 0000000000..9062bd7c3c --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Sydney.rb @@ -0,0 +1,185 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Australia + module Sydney + include TimezoneDefinition + + timezone 'Australia/Sydney' do |tz| + tz.offset :o0, 36292, 0, :LMT + tz.offset :o1, 36000, 0, :EST + tz.offset :o2, 36000, 3600, :EST + + tz.transition 1895, 1, :o1, 52125661727, 21600 + tz.transition 1916, 12, :o2, 3486569881, 1440 + tz.transition 1917, 3, :o1, 19370497, 8 + tz.transition 1941, 12, :o2, 14582161, 6 + tz.transition 1942, 3, :o1, 19443577, 8 + tz.transition 1942, 9, :o2, 14583775, 6 + tz.transition 1943, 3, :o1, 19446489, 8 + tz.transition 1943, 10, :o2, 14586001, 6 + tz.transition 1944, 3, :o1, 19449401, 8 + tz.transition 1971, 10, :o2, 57686400 + tz.transition 1972, 2, :o1, 67968000 + tz.transition 1972, 10, :o2, 89136000 + tz.transition 1973, 3, :o1, 100022400 + tz.transition 1973, 10, :o2, 120585600 + tz.transition 1974, 3, :o1, 131472000 + tz.transition 1974, 10, :o2, 152035200 + tz.transition 1975, 3, :o1, 162921600 + tz.transition 1975, 10, :o2, 183484800 + tz.transition 1976, 3, :o1, 194976000 + tz.transition 1976, 10, :o2, 215539200 + tz.transition 1977, 3, :o1, 226425600 + tz.transition 1977, 10, :o2, 246988800 + tz.transition 1978, 3, :o1, 257875200 + tz.transition 1978, 10, :o2, 278438400 + tz.transition 1979, 3, :o1, 289324800 + tz.transition 1979, 10, :o2, 309888000 + tz.transition 1980, 3, :o1, 320774400 + tz.transition 1980, 10, :o2, 341337600 + tz.transition 1981, 2, :o1, 352224000 + tz.transition 1981, 10, :o2, 372787200 + tz.transition 1982, 4, :o1, 386697600 + tz.transition 1982, 10, :o2, 404841600 + tz.transition 1983, 3, :o1, 415728000 + tz.transition 1983, 10, :o2, 436291200 + tz.transition 1984, 3, :o1, 447177600 + tz.transition 1984, 10, :o2, 467740800 + tz.transition 1985, 3, :o1, 478627200 + tz.transition 1985, 10, :o2, 499190400 + tz.transition 1986, 3, :o1, 511286400 + tz.transition 1986, 10, :o2, 530035200 + tz.transition 1987, 3, :o1, 542736000 + tz.transition 1987, 10, :o2, 562089600 + tz.transition 1988, 3, :o1, 574790400 + tz.transition 1988, 10, :o2, 594144000 + tz.transition 1989, 3, :o1, 606240000 + tz.transition 1989, 10, :o2, 625593600 + tz.transition 1990, 3, :o1, 636480000 + tz.transition 1990, 10, :o2, 657043200 + tz.transition 1991, 3, :o1, 667929600 + tz.transition 1991, 10, :o2, 688492800 + tz.transition 1992, 2, :o1, 699379200 + tz.transition 1992, 10, :o2, 719942400 + tz.transition 1993, 3, :o1, 731433600 + tz.transition 1993, 10, :o2, 751996800 + tz.transition 1994, 3, :o1, 762883200 + tz.transition 1994, 10, :o2, 783446400 + tz.transition 1995, 3, :o1, 794332800 + tz.transition 1995, 10, :o2, 814896000 + tz.transition 1996, 3, :o1, 828201600 + tz.transition 1996, 10, :o2, 846345600 + tz.transition 1997, 3, :o1, 859651200 + tz.transition 1997, 10, :o2, 877795200 + tz.transition 1998, 3, :o1, 891100800 + tz.transition 1998, 10, :o2, 909244800 + tz.transition 1999, 3, :o1, 922550400 + tz.transition 1999, 10, :o2, 941299200 + tz.transition 2000, 3, :o1, 954000000 + tz.transition 2000, 8, :o2, 967305600 + tz.transition 2001, 3, :o1, 985449600 + tz.transition 2001, 10, :o2, 1004198400 + tz.transition 2002, 3, :o1, 1017504000 + tz.transition 2002, 10, :o2, 1035648000 + tz.transition 2003, 3, :o1, 1048953600 + tz.transition 2003, 10, :o2, 1067097600 + tz.transition 2004, 3, :o1, 1080403200 + tz.transition 2004, 10, :o2, 1099152000 + tz.transition 2005, 3, :o1, 1111852800 + tz.transition 2005, 10, :o2, 1130601600 + tz.transition 2006, 4, :o1, 1143907200 + tz.transition 2006, 10, :o2, 1162051200 + tz.transition 2007, 3, :o1, 1174752000 + tz.transition 2007, 10, :o2, 1193500800 + tz.transition 2008, 4, :o1, 1207411200 + tz.transition 2008, 10, :o2, 1223136000 + tz.transition 2009, 4, :o1, 1238860800 + tz.transition 2009, 10, :o2, 1254585600 + tz.transition 2010, 4, :o1, 1270310400 + tz.transition 2010, 10, :o2, 1286035200 + tz.transition 2011, 4, :o1, 1301760000 + tz.transition 2011, 10, :o2, 1317484800 + tz.transition 2012, 3, :o1, 1333209600 + tz.transition 2012, 10, :o2, 1349539200 + tz.transition 2013, 4, :o1, 1365264000 + tz.transition 2013, 10, :o2, 1380988800 + tz.transition 2014, 4, :o1, 1396713600 + tz.transition 2014, 10, :o2, 1412438400 + tz.transition 2015, 4, :o1, 1428163200 + tz.transition 2015, 10, :o2, 1443888000 + tz.transition 2016, 4, :o1, 1459612800 + tz.transition 2016, 10, :o2, 1475337600 + tz.transition 2017, 4, :o1, 1491062400 + tz.transition 2017, 9, :o2, 1506787200 + tz.transition 2018, 3, :o1, 1522512000 + tz.transition 2018, 10, :o2, 1538841600 + tz.transition 2019, 4, :o1, 1554566400 + tz.transition 2019, 10, :o2, 1570291200 + tz.transition 2020, 4, :o1, 1586016000 + tz.transition 2020, 10, :o2, 1601740800 + tz.transition 2021, 4, :o1, 1617465600 + tz.transition 2021, 10, :o2, 1633190400 + tz.transition 2022, 4, :o1, 1648915200 + tz.transition 2022, 10, :o2, 1664640000 + tz.transition 2023, 4, :o1, 1680364800 + tz.transition 2023, 9, :o2, 1696089600 + tz.transition 2024, 4, :o1, 1712419200 + tz.transition 2024, 10, :o2, 1728144000 + tz.transition 2025, 4, :o1, 1743868800 + tz.transition 2025, 10, :o2, 1759593600 + tz.transition 2026, 4, :o1, 1775318400 + tz.transition 2026, 10, :o2, 1791043200 + tz.transition 2027, 4, :o1, 1806768000 + tz.transition 2027, 10, :o2, 1822492800 + tz.transition 2028, 4, :o1, 1838217600 + tz.transition 2028, 9, :o2, 1853942400 + tz.transition 2029, 3, :o1, 1869667200 + tz.transition 2029, 10, :o2, 1885996800 + tz.transition 2030, 4, :o1, 1901721600 + tz.transition 2030, 10, :o2, 1917446400 + tz.transition 2031, 4, :o1, 1933171200 + tz.transition 2031, 10, :o2, 1948896000 + tz.transition 2032, 4, :o1, 1964620800 + tz.transition 2032, 10, :o2, 1980345600 + tz.transition 2033, 4, :o1, 1996070400 + tz.transition 2033, 10, :o2, 2011795200 + tz.transition 2034, 4, :o1, 2027520000 + tz.transition 2034, 9, :o2, 2043244800 + tz.transition 2035, 3, :o1, 2058969600 + tz.transition 2035, 10, :o2, 2075299200 + tz.transition 2036, 4, :o1, 2091024000 + tz.transition 2036, 10, :o2, 2106748800 + tz.transition 2037, 4, :o1, 2122473600 + tz.transition 2037, 10, :o2, 2138198400 + tz.transition 2038, 4, :o1, 14793103, 6 + tz.transition 2038, 10, :o2, 14794195, 6 + tz.transition 2039, 4, :o1, 14795287, 6 + tz.transition 2039, 10, :o2, 14796379, 6 + tz.transition 2040, 3, :o1, 14797471, 6 + tz.transition 2040, 10, :o2, 14798605, 6 + tz.transition 2041, 4, :o1, 14799697, 6 + tz.transition 2041, 10, :o2, 14800789, 6 + tz.transition 2042, 4, :o1, 14801881, 6 + tz.transition 2042, 10, :o2, 14802973, 6 + tz.transition 2043, 4, :o1, 14804065, 6 + tz.transition 2043, 10, :o2, 14805157, 6 + tz.transition 2044, 4, :o1, 14806249, 6 + tz.transition 2044, 10, :o2, 14807341, 6 + tz.transition 2045, 4, :o1, 14808433, 6 + tz.transition 2045, 9, :o2, 14809525, 6 + tz.transition 2046, 3, :o1, 14810617, 6 + tz.transition 2046, 10, :o2, 14811751, 6 + tz.transition 2047, 4, :o1, 14812843, 6 + tz.transition 2047, 10, :o2, 14813935, 6 + tz.transition 2048, 4, :o1, 14815027, 6 + tz.transition 2048, 10, :o2, 14816119, 6 + tz.transition 2049, 4, :o1, 14817211, 6 + tz.transition 2049, 10, :o2, 14818303, 6 + tz.transition 2050, 4, :o1, 14819395, 6 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Etc/UTC.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Etc/UTC.rb new file mode 100644 index 0000000000..28b2c6a04c --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Etc/UTC.rb @@ -0,0 +1,16 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Etc + module UTC + include TimezoneDefinition + + timezone 'Etc/UTC' do |tz| + tz.offset :o0, 0, 0, :UTC + + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Amsterdam.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Amsterdam.rb new file mode 100644 index 0000000000..2d0c95c4bc --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Amsterdam.rb @@ -0,0 +1,228 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Amsterdam + include TimezoneDefinition + + timezone 'Europe/Amsterdam' do |tz| + tz.offset :o0, 1172, 0, :LMT + tz.offset :o1, 1172, 0, :AMT + tz.offset :o2, 1172, 3600, :NST + tz.offset :o3, 1200, 3600, :NEST + tz.offset :o4, 1200, 0, :NET + tz.offset :o5, 3600, 3600, :CEST + tz.offset :o6, 3600, 0, :CET + + tz.transition 1834, 12, :o1, 51651636907, 21600 + tz.transition 1916, 4, :o2, 52293264907, 21600 + tz.transition 1916, 9, :o1, 52296568807, 21600 + tz.transition 1917, 4, :o2, 52300826707, 21600 + tz.transition 1917, 9, :o1, 52304153107, 21600 + tz.transition 1918, 4, :o2, 52308386707, 21600 + tz.transition 1918, 9, :o1, 52312317907, 21600 + tz.transition 1919, 4, :o2, 52316400307, 21600 + tz.transition 1919, 9, :o1, 52320180307, 21600 + tz.transition 1920, 4, :o2, 52324262707, 21600 + tz.transition 1920, 9, :o1, 52328042707, 21600 + tz.transition 1921, 4, :o2, 52332125107, 21600 + tz.transition 1921, 9, :o1, 52335905107, 21600 + tz.transition 1922, 3, :o2, 52339814707, 21600 + tz.transition 1922, 10, :o1, 52344048307, 21600 + tz.transition 1923, 6, :o2, 52349145907, 21600 + tz.transition 1923, 10, :o1, 52351910707, 21600 + tz.transition 1924, 3, :o2, 52355690707, 21600 + tz.transition 1924, 10, :o1, 52359773107, 21600 + tz.transition 1925, 6, :o2, 52365021907, 21600 + tz.transition 1925, 10, :o1, 52367635507, 21600 + tz.transition 1926, 5, :o2, 52372452307, 21600 + tz.transition 1926, 10, :o1, 52375497907, 21600 + tz.transition 1927, 5, :o2, 52380336307, 21600 + tz.transition 1927, 10, :o1, 52383360307, 21600 + tz.transition 1928, 5, :o2, 52388241907, 21600 + tz.transition 1928, 10, :o1, 52391373907, 21600 + tz.transition 1929, 5, :o2, 52396125907, 21600 + tz.transition 1929, 10, :o1, 52399236307, 21600 + tz.transition 1930, 5, :o2, 52404009907, 21600 + tz.transition 1930, 10, :o1, 52407098707, 21600 + tz.transition 1931, 5, :o2, 52411893907, 21600 + tz.transition 1931, 10, :o1, 52414961107, 21600 + tz.transition 1932, 5, :o2, 52419950707, 21600 + tz.transition 1932, 10, :o1, 52422823507, 21600 + tz.transition 1933, 5, :o2, 52427683507, 21600 + tz.transition 1933, 10, :o1, 52430837107, 21600 + tz.transition 1934, 5, :o2, 52435567507, 21600 + tz.transition 1934, 10, :o1, 52438699507, 21600 + tz.transition 1935, 5, :o2, 52443451507, 21600 + tz.transition 1935, 10, :o1, 52446561907, 21600 + tz.transition 1936, 5, :o2, 52451357107, 21600 + tz.transition 1936, 10, :o1, 52454424307, 21600 + tz.transition 1937, 5, :o2, 52459392307, 21600 + tz.transition 1937, 6, :o3, 52460253607, 21600 + tz.transition 1937, 10, :o4, 174874289, 72 + tz.transition 1938, 5, :o3, 174890417, 72 + tz.transition 1938, 10, :o4, 174900497, 72 + tz.transition 1939, 5, :o3, 174916697, 72 + tz.transition 1939, 10, :o4, 174927209, 72 + tz.transition 1940, 5, :o5, 174943115, 72 + tz.transition 1942, 11, :o6, 58335973, 24 + tz.transition 1943, 3, :o5, 58339501, 24 + tz.transition 1943, 10, :o6, 58344037, 24 + tz.transition 1944, 4, :o5, 58348405, 24 + tz.transition 1944, 10, :o6, 58352773, 24 + tz.transition 1945, 4, :o5, 58357141, 24 + tz.transition 1945, 9, :o6, 58361149, 24 + tz.transition 1977, 4, :o5, 228877200 + tz.transition 1977, 9, :o6, 243997200 + tz.transition 1978, 4, :o5, 260326800 + tz.transition 1978, 10, :o6, 276051600 + tz.transition 1979, 4, :o5, 291776400 + tz.transition 1979, 9, :o6, 307501200 + tz.transition 1980, 4, :o5, 323830800 + tz.transition 1980, 9, :o6, 338950800 + tz.transition 1981, 3, :o5, 354675600 + tz.transition 1981, 9, :o6, 370400400 + tz.transition 1982, 3, :o5, 386125200 + tz.transition 1982, 9, :o6, 401850000 + tz.transition 1983, 3, :o5, 417574800 + tz.transition 1983, 9, :o6, 433299600 + tz.transition 1984, 3, :o5, 449024400 + tz.transition 1984, 9, :o6, 465354000 + tz.transition 1985, 3, :o5, 481078800 + tz.transition 1985, 9, :o6, 496803600 + tz.transition 1986, 3, :o5, 512528400 + tz.transition 1986, 9, :o6, 528253200 + tz.transition 1987, 3, :o5, 543978000 + tz.transition 1987, 9, :o6, 559702800 + tz.transition 1988, 3, :o5, 575427600 + tz.transition 1988, 9, :o6, 591152400 + tz.transition 1989, 3, :o5, 606877200 + tz.transition 1989, 9, :o6, 622602000 + tz.transition 1990, 3, :o5, 638326800 + tz.transition 1990, 9, :o6, 654656400 + tz.transition 1991, 3, :o5, 670381200 + tz.transition 1991, 9, :o6, 686106000 + tz.transition 1992, 3, :o5, 701830800 + tz.transition 1992, 9, :o6, 717555600 + tz.transition 1993, 3, :o5, 733280400 + tz.transition 1993, 9, :o6, 749005200 + tz.transition 1994, 3, :o5, 764730000 + tz.transition 1994, 9, :o6, 780454800 + tz.transition 1995, 3, :o5, 796179600 + tz.transition 1995, 9, :o6, 811904400 + tz.transition 1996, 3, :o5, 828234000 + tz.transition 1996, 10, :o6, 846378000 + tz.transition 1997, 3, :o5, 859683600 + tz.transition 1997, 10, :o6, 877827600 + tz.transition 1998, 3, :o5, 891133200 + tz.transition 1998, 10, :o6, 909277200 + tz.transition 1999, 3, :o5, 922582800 + tz.transition 1999, 10, :o6, 941331600 + tz.transition 2000, 3, :o5, 954032400 + tz.transition 2000, 10, :o6, 972781200 + tz.transition 2001, 3, :o5, 985482000 + tz.transition 2001, 10, :o6, 1004230800 + tz.transition 2002, 3, :o5, 1017536400 + tz.transition 2002, 10, :o6, 1035680400 + tz.transition 2003, 3, :o5, 1048986000 + tz.transition 2003, 10, :o6, 1067130000 + tz.transition 2004, 3, :o5, 1080435600 + tz.transition 2004, 10, :o6, 1099184400 + tz.transition 2005, 3, :o5, 1111885200 + tz.transition 2005, 10, :o6, 1130634000 + tz.transition 2006, 3, :o5, 1143334800 + tz.transition 2006, 10, :o6, 1162083600 + tz.transition 2007, 3, :o5, 1174784400 + tz.transition 2007, 10, :o6, 1193533200 + tz.transition 2008, 3, :o5, 1206838800 + tz.transition 2008, 10, :o6, 1224982800 + tz.transition 2009, 3, :o5, 1238288400 + tz.transition 2009, 10, :o6, 1256432400 + tz.transition 2010, 3, :o5, 1269738000 + tz.transition 2010, 10, :o6, 1288486800 + tz.transition 2011, 3, :o5, 1301187600 + tz.transition 2011, 10, :o6, 1319936400 + tz.transition 2012, 3, :o5, 1332637200 + tz.transition 2012, 10, :o6, 1351386000 + tz.transition 2013, 3, :o5, 1364691600 + tz.transition 2013, 10, :o6, 1382835600 + tz.transition 2014, 3, :o5, 1396141200 + tz.transition 2014, 10, :o6, 1414285200 + tz.transition 2015, 3, :o5, 1427590800 + tz.transition 2015, 10, :o6, 1445734800 + tz.transition 2016, 3, :o5, 1459040400 + tz.transition 2016, 10, :o6, 1477789200 + tz.transition 2017, 3, :o5, 1490490000 + tz.transition 2017, 10, :o6, 1509238800 + tz.transition 2018, 3, :o5, 1521939600 + tz.transition 2018, 10, :o6, 1540688400 + tz.transition 2019, 3, :o5, 1553994000 + tz.transition 2019, 10, :o6, 1572138000 + tz.transition 2020, 3, :o5, 1585443600 + tz.transition 2020, 10, :o6, 1603587600 + tz.transition 2021, 3, :o5, 1616893200 + tz.transition 2021, 10, :o6, 1635642000 + tz.transition 2022, 3, :o5, 1648342800 + tz.transition 2022, 10, :o6, 1667091600 + tz.transition 2023, 3, :o5, 1679792400 + tz.transition 2023, 10, :o6, 1698541200 + tz.transition 2024, 3, :o5, 1711846800 + tz.transition 2024, 10, :o6, 1729990800 + tz.transition 2025, 3, :o5, 1743296400 + tz.transition 2025, 10, :o6, 1761440400 + tz.transition 2026, 3, :o5, 1774746000 + tz.transition 2026, 10, :o6, 1792890000 + tz.transition 2027, 3, :o5, 1806195600 + tz.transition 2027, 10, :o6, 1824944400 + tz.transition 2028, 3, :o5, 1837645200 + tz.transition 2028, 10, :o6, 1856394000 + tz.transition 2029, 3, :o5, 1869094800 + tz.transition 2029, 10, :o6, 1887843600 + tz.transition 2030, 3, :o5, 1901149200 + tz.transition 2030, 10, :o6, 1919293200 + tz.transition 2031, 3, :o5, 1932598800 + tz.transition 2031, 10, :o6, 1950742800 + tz.transition 2032, 3, :o5, 1964048400 + tz.transition 2032, 10, :o6, 1982797200 + tz.transition 2033, 3, :o5, 1995498000 + tz.transition 2033, 10, :o6, 2014246800 + tz.transition 2034, 3, :o5, 2026947600 + tz.transition 2034, 10, :o6, 2045696400 + tz.transition 2035, 3, :o5, 2058397200 + tz.transition 2035, 10, :o6, 2077146000 + tz.transition 2036, 3, :o5, 2090451600 + tz.transition 2036, 10, :o6, 2108595600 + tz.transition 2037, 3, :o5, 2121901200 + tz.transition 2037, 10, :o6, 2140045200 + tz.transition 2038, 3, :o5, 59172253, 24 + tz.transition 2038, 10, :o6, 59177461, 24 + tz.transition 2039, 3, :o5, 59180989, 24 + tz.transition 2039, 10, :o6, 59186197, 24 + tz.transition 2040, 3, :o5, 59189725, 24 + tz.transition 2040, 10, :o6, 59194933, 24 + tz.transition 2041, 3, :o5, 59198629, 24 + tz.transition 2041, 10, :o6, 59203669, 24 + tz.transition 2042, 3, :o5, 59207365, 24 + tz.transition 2042, 10, :o6, 59212405, 24 + tz.transition 2043, 3, :o5, 59216101, 24 + tz.transition 2043, 10, :o6, 59221141, 24 + tz.transition 2044, 3, :o5, 59224837, 24 + tz.transition 2044, 10, :o6, 59230045, 24 + tz.transition 2045, 3, :o5, 59233573, 24 + tz.transition 2045, 10, :o6, 59238781, 24 + tz.transition 2046, 3, :o5, 59242309, 24 + tz.transition 2046, 10, :o6, 59247517, 24 + tz.transition 2047, 3, :o5, 59251213, 24 + tz.transition 2047, 10, :o6, 59256253, 24 + tz.transition 2048, 3, :o5, 59259949, 24 + tz.transition 2048, 10, :o6, 59264989, 24 + tz.transition 2049, 3, :o5, 59268685, 24 + tz.transition 2049, 10, :o6, 59273893, 24 + tz.transition 2050, 3, :o5, 59277421, 24 + tz.transition 2050, 10, :o6, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Athens.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Athens.rb new file mode 100644 index 0000000000..4e21e535ca --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Athens.rb @@ -0,0 +1,185 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Athens + include TimezoneDefinition + + timezone 'Europe/Athens' do |tz| + tz.offset :o0, 5692, 0, :LMT + tz.offset :o1, 5692, 0, :AMT + tz.offset :o2, 7200, 0, :EET + tz.offset :o3, 7200, 3600, :EEST + tz.offset :o4, 3600, 3600, :CEST + tz.offset :o5, 3600, 0, :CET + + tz.transition 1895, 9, :o1, 52130529377, 21600 + tz.transition 1916, 7, :o2, 3268447787, 1350 + tz.transition 1932, 7, :o3, 29122745, 12 + tz.transition 1932, 8, :o2, 19415611, 8 + tz.transition 1941, 4, :o3, 29161097, 12 + tz.transition 1941, 4, :o4, 19440915, 8 + tz.transition 1942, 11, :o5, 58335973, 24 + tz.transition 1943, 3, :o4, 58339523, 24 + tz.transition 1943, 10, :o5, 29172017, 12 + tz.transition 1944, 4, :o2, 58348427, 24 + tz.transition 1952, 6, :o3, 29210333, 12 + tz.transition 1952, 11, :o2, 19474547, 8 + tz.transition 1975, 4, :o3, 166485600 + tz.transition 1975, 11, :o2, 186184800 + tz.transition 1976, 4, :o3, 198028800 + tz.transition 1976, 10, :o2, 213753600 + tz.transition 1977, 4, :o3, 228873600 + tz.transition 1977, 9, :o2, 244080000 + tz.transition 1978, 4, :o3, 260323200 + tz.transition 1978, 9, :o2, 275446800 + tz.transition 1979, 4, :o3, 291798000 + tz.transition 1979, 9, :o2, 307407600 + tz.transition 1980, 3, :o3, 323388000 + tz.transition 1980, 9, :o2, 338936400 + tz.transition 1981, 3, :o3, 354675600 + tz.transition 1981, 9, :o2, 370400400 + tz.transition 1982, 3, :o3, 386125200 + tz.transition 1982, 9, :o2, 401850000 + tz.transition 1983, 3, :o3, 417574800 + tz.transition 1983, 9, :o2, 433299600 + tz.transition 1984, 3, :o3, 449024400 + tz.transition 1984, 9, :o2, 465354000 + tz.transition 1985, 3, :o3, 481078800 + tz.transition 1985, 9, :o2, 496803600 + tz.transition 1986, 3, :o3, 512528400 + tz.transition 1986, 9, :o2, 528253200 + tz.transition 1987, 3, :o3, 543978000 + tz.transition 1987, 9, :o2, 559702800 + tz.transition 1988, 3, :o3, 575427600 + tz.transition 1988, 9, :o2, 591152400 + tz.transition 1989, 3, :o3, 606877200 + tz.transition 1989, 9, :o2, 622602000 + tz.transition 1990, 3, :o3, 638326800 + tz.transition 1990, 9, :o2, 654656400 + tz.transition 1991, 3, :o3, 670381200 + tz.transition 1991, 9, :o2, 686106000 + tz.transition 1992, 3, :o3, 701830800 + tz.transition 1992, 9, :o2, 717555600 + tz.transition 1993, 3, :o3, 733280400 + tz.transition 1993, 9, :o2, 749005200 + tz.transition 1994, 3, :o3, 764730000 + tz.transition 1994, 9, :o2, 780454800 + tz.transition 1995, 3, :o3, 796179600 + tz.transition 1995, 9, :o2, 811904400 + tz.transition 1996, 3, :o3, 828234000 + tz.transition 1996, 10, :o2, 846378000 + tz.transition 1997, 3, :o3, 859683600 + tz.transition 1997, 10, :o2, 877827600 + tz.transition 1998, 3, :o3, 891133200 + tz.transition 1998, 10, :o2, 909277200 + tz.transition 1999, 3, :o3, 922582800 + tz.transition 1999, 10, :o2, 941331600 + tz.transition 2000, 3, :o3, 954032400 + tz.transition 2000, 10, :o2, 972781200 + tz.transition 2001, 3, :o3, 985482000 + tz.transition 2001, 10, :o2, 1004230800 + tz.transition 2002, 3, :o3, 1017536400 + tz.transition 2002, 10, :o2, 1035680400 + tz.transition 2003, 3, :o3, 1048986000 + tz.transition 2003, 10, :o2, 1067130000 + tz.transition 2004, 3, :o3, 1080435600 + tz.transition 2004, 10, :o2, 1099184400 + tz.transition 2005, 3, :o3, 1111885200 + tz.transition 2005, 10, :o2, 1130634000 + tz.transition 2006, 3, :o3, 1143334800 + tz.transition 2006, 10, :o2, 1162083600 + tz.transition 2007, 3, :o3, 1174784400 + tz.transition 2007, 10, :o2, 1193533200 + tz.transition 2008, 3, :o3, 1206838800 + tz.transition 2008, 10, :o2, 1224982800 + tz.transition 2009, 3, :o3, 1238288400 + tz.transition 2009, 10, :o2, 1256432400 + tz.transition 2010, 3, :o3, 1269738000 + tz.transition 2010, 10, :o2, 1288486800 + tz.transition 2011, 3, :o3, 1301187600 + tz.transition 2011, 10, :o2, 1319936400 + tz.transition 2012, 3, :o3, 1332637200 + tz.transition 2012, 10, :o2, 1351386000 + tz.transition 2013, 3, :o3, 1364691600 + tz.transition 2013, 10, :o2, 1382835600 + tz.transition 2014, 3, :o3, 1396141200 + tz.transition 2014, 10, :o2, 1414285200 + tz.transition 2015, 3, :o3, 1427590800 + tz.transition 2015, 10, :o2, 1445734800 + tz.transition 2016, 3, :o3, 1459040400 + tz.transition 2016, 10, :o2, 1477789200 + tz.transition 2017, 3, :o3, 1490490000 + tz.transition 2017, 10, :o2, 1509238800 + tz.transition 2018, 3, :o3, 1521939600 + tz.transition 2018, 10, :o2, 1540688400 + tz.transition 2019, 3, :o3, 1553994000 + tz.transition 2019, 10, :o2, 1572138000 + tz.transition 2020, 3, :o3, 1585443600 + tz.transition 2020, 10, :o2, 1603587600 + tz.transition 2021, 3, :o3, 1616893200 + tz.transition 2021, 10, :o2, 1635642000 + tz.transition 2022, 3, :o3, 1648342800 + tz.transition 2022, 10, :o2, 1667091600 + tz.transition 2023, 3, :o3, 1679792400 + tz.transition 2023, 10, :o2, 1698541200 + tz.transition 2024, 3, :o3, 1711846800 + tz.transition 2024, 10, :o2, 1729990800 + tz.transition 2025, 3, :o3, 1743296400 + tz.transition 2025, 10, :o2, 1761440400 + tz.transition 2026, 3, :o3, 1774746000 + tz.transition 2026, 10, :o2, 1792890000 + tz.transition 2027, 3, :o3, 1806195600 + tz.transition 2027, 10, :o2, 1824944400 + tz.transition 2028, 3, :o3, 1837645200 + tz.transition 2028, 10, :o2, 1856394000 + tz.transition 2029, 3, :o3, 1869094800 + tz.transition 2029, 10, :o2, 1887843600 + tz.transition 2030, 3, :o3, 1901149200 + tz.transition 2030, 10, :o2, 1919293200 + tz.transition 2031, 3, :o3, 1932598800 + tz.transition 2031, 10, :o2, 1950742800 + tz.transition 2032, 3, :o3, 1964048400 + tz.transition 2032, 10, :o2, 1982797200 + tz.transition 2033, 3, :o3, 1995498000 + tz.transition 2033, 10, :o2, 2014246800 + tz.transition 2034, 3, :o3, 2026947600 + tz.transition 2034, 10, :o2, 2045696400 + tz.transition 2035, 3, :o3, 2058397200 + tz.transition 2035, 10, :o2, 2077146000 + tz.transition 2036, 3, :o3, 2090451600 + tz.transition 2036, 10, :o2, 2108595600 + tz.transition 2037, 3, :o3, 2121901200 + tz.transition 2037, 10, :o2, 2140045200 + tz.transition 2038, 3, :o3, 59172253, 24 + tz.transition 2038, 10, :o2, 59177461, 24 + tz.transition 2039, 3, :o3, 59180989, 24 + tz.transition 2039, 10, :o2, 59186197, 24 + tz.transition 2040, 3, :o3, 59189725, 24 + tz.transition 2040, 10, :o2, 59194933, 24 + tz.transition 2041, 3, :o3, 59198629, 24 + tz.transition 2041, 10, :o2, 59203669, 24 + tz.transition 2042, 3, :o3, 59207365, 24 + tz.transition 2042, 10, :o2, 59212405, 24 + tz.transition 2043, 3, :o3, 59216101, 24 + tz.transition 2043, 10, :o2, 59221141, 24 + tz.transition 2044, 3, :o3, 59224837, 24 + tz.transition 2044, 10, :o2, 59230045, 24 + tz.transition 2045, 3, :o3, 59233573, 24 + tz.transition 2045, 10, :o2, 59238781, 24 + tz.transition 2046, 3, :o3, 59242309, 24 + tz.transition 2046, 10, :o2, 59247517, 24 + tz.transition 2047, 3, :o3, 59251213, 24 + tz.transition 2047, 10, :o2, 59256253, 24 + tz.transition 2048, 3, :o3, 59259949, 24 + tz.transition 2048, 10, :o2, 59264989, 24 + tz.transition 2049, 3, :o3, 59268685, 24 + tz.transition 2049, 10, :o2, 59273893, 24 + tz.transition 2050, 3, :o3, 59277421, 24 + tz.transition 2050, 10, :o2, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Belgrade.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Belgrade.rb new file mode 100644 index 0000000000..4dbd893d75 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Belgrade.rb @@ -0,0 +1,163 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Belgrade + include TimezoneDefinition + + timezone 'Europe/Belgrade' do |tz| + tz.offset :o0, 4920, 0, :LMT + tz.offset :o1, 3600, 0, :CET + tz.offset :o2, 3600, 3600, :CEST + + tz.transition 1883, 12, :o1, 1734607039, 720 + tz.transition 1941, 4, :o2, 29161241, 12 + tz.transition 1942, 11, :o1, 58335973, 24 + tz.transition 1943, 3, :o2, 58339501, 24 + tz.transition 1943, 10, :o1, 58344037, 24 + tz.transition 1944, 4, :o2, 58348405, 24 + tz.transition 1944, 10, :o1, 58352773, 24 + tz.transition 1945, 5, :o2, 58358005, 24 + tz.transition 1945, 9, :o1, 58361149, 24 + tz.transition 1983, 3, :o2, 417574800 + tz.transition 1983, 9, :o1, 433299600 + tz.transition 1984, 3, :o2, 449024400 + tz.transition 1984, 9, :o1, 465354000 + tz.transition 1985, 3, :o2, 481078800 + tz.transition 1985, 9, :o1, 496803600 + tz.transition 1986, 3, :o2, 512528400 + tz.transition 1986, 9, :o1, 528253200 + tz.transition 1987, 3, :o2, 543978000 + tz.transition 1987, 9, :o1, 559702800 + tz.transition 1988, 3, :o2, 575427600 + tz.transition 1988, 9, :o1, 591152400 + tz.transition 1989, 3, :o2, 606877200 + tz.transition 1989, 9, :o1, 622602000 + tz.transition 1990, 3, :o2, 638326800 + tz.transition 1990, 9, :o1, 654656400 + tz.transition 1991, 3, :o2, 670381200 + tz.transition 1991, 9, :o1, 686106000 + tz.transition 1992, 3, :o2, 701830800 + tz.transition 1992, 9, :o1, 717555600 + tz.transition 1993, 3, :o2, 733280400 + tz.transition 1993, 9, :o1, 749005200 + tz.transition 1994, 3, :o2, 764730000 + tz.transition 1994, 9, :o1, 780454800 + tz.transition 1995, 3, :o2, 796179600 + tz.transition 1995, 9, :o1, 811904400 + tz.transition 1996, 3, :o2, 828234000 + tz.transition 1996, 10, :o1, 846378000 + tz.transition 1997, 3, :o2, 859683600 + tz.transition 1997, 10, :o1, 877827600 + tz.transition 1998, 3, :o2, 891133200 + tz.transition 1998, 10, :o1, 909277200 + tz.transition 1999, 3, :o2, 922582800 + tz.transition 1999, 10, :o1, 941331600 + tz.transition 2000, 3, :o2, 954032400 + tz.transition 2000, 10, :o1, 972781200 + tz.transition 2001, 3, :o2, 985482000 + tz.transition 2001, 10, :o1, 1004230800 + tz.transition 2002, 3, :o2, 1017536400 + tz.transition 2002, 10, :o1, 1035680400 + tz.transition 2003, 3, :o2, 1048986000 + tz.transition 2003, 10, :o1, 1067130000 + tz.transition 2004, 3, :o2, 1080435600 + tz.transition 2004, 10, :o1, 1099184400 + tz.transition 2005, 3, :o2, 1111885200 + tz.transition 2005, 10, :o1, 1130634000 + tz.transition 2006, 3, :o2, 1143334800 + tz.transition 2006, 10, :o1, 1162083600 + tz.transition 2007, 3, :o2, 1174784400 + tz.transition 2007, 10, :o1, 1193533200 + tz.transition 2008, 3, :o2, 1206838800 + tz.transition 2008, 10, :o1, 1224982800 + tz.transition 2009, 3, :o2, 1238288400 + tz.transition 2009, 10, :o1, 1256432400 + tz.transition 2010, 3, :o2, 1269738000 + tz.transition 2010, 10, :o1, 1288486800 + tz.transition 2011, 3, :o2, 1301187600 + tz.transition 2011, 10, :o1, 1319936400 + tz.transition 2012, 3, :o2, 1332637200 + tz.transition 2012, 10, :o1, 1351386000 + tz.transition 2013, 3, :o2, 1364691600 + tz.transition 2013, 10, :o1, 1382835600 + tz.transition 2014, 3, :o2, 1396141200 + tz.transition 2014, 10, :o1, 1414285200 + tz.transition 2015, 3, :o2, 1427590800 + tz.transition 2015, 10, :o1, 1445734800 + tz.transition 2016, 3, :o2, 1459040400 + tz.transition 2016, 10, :o1, 1477789200 + tz.transition 2017, 3, :o2, 1490490000 + tz.transition 2017, 10, :o1, 1509238800 + tz.transition 2018, 3, :o2, 1521939600 + tz.transition 2018, 10, :o1, 1540688400 + tz.transition 2019, 3, :o2, 1553994000 + tz.transition 2019, 10, :o1, 1572138000 + tz.transition 2020, 3, :o2, 1585443600 + tz.transition 2020, 10, :o1, 1603587600 + tz.transition 2021, 3, :o2, 1616893200 + tz.transition 2021, 10, :o1, 1635642000 + tz.transition 2022, 3, :o2, 1648342800 + tz.transition 2022, 10, :o1, 1667091600 + tz.transition 2023, 3, :o2, 1679792400 + tz.transition 2023, 10, :o1, 1698541200 + tz.transition 2024, 3, :o2, 1711846800 + tz.transition 2024, 10, :o1, 1729990800 + tz.transition 2025, 3, :o2, 1743296400 + tz.transition 2025, 10, :o1, 1761440400 + tz.transition 2026, 3, :o2, 1774746000 + tz.transition 2026, 10, :o1, 1792890000 + tz.transition 2027, 3, :o2, 1806195600 + tz.transition 2027, 10, :o1, 1824944400 + tz.transition 2028, 3, :o2, 1837645200 + tz.transition 2028, 10, :o1, 1856394000 + tz.transition 2029, 3, :o2, 1869094800 + tz.transition 2029, 10, :o1, 1887843600 + tz.transition 2030, 3, :o2, 1901149200 + tz.transition 2030, 10, :o1, 1919293200 + tz.transition 2031, 3, :o2, 1932598800 + tz.transition 2031, 10, :o1, 1950742800 + tz.transition 2032, 3, :o2, 1964048400 + tz.transition 2032, 10, :o1, 1982797200 + tz.transition 2033, 3, :o2, 1995498000 + tz.transition 2033, 10, :o1, 2014246800 + tz.transition 2034, 3, :o2, 2026947600 + tz.transition 2034, 10, :o1, 2045696400 + tz.transition 2035, 3, :o2, 2058397200 + tz.transition 2035, 10, :o1, 2077146000 + tz.transition 2036, 3, :o2, 2090451600 + tz.transition 2036, 10, :o1, 2108595600 + tz.transition 2037, 3, :o2, 2121901200 + tz.transition 2037, 10, :o1, 2140045200 + tz.transition 2038, 3, :o2, 59172253, 24 + tz.transition 2038, 10, :o1, 59177461, 24 + tz.transition 2039, 3, :o2, 59180989, 24 + tz.transition 2039, 10, :o1, 59186197, 24 + tz.transition 2040, 3, :o2, 59189725, 24 + tz.transition 2040, 10, :o1, 59194933, 24 + tz.transition 2041, 3, :o2, 59198629, 24 + tz.transition 2041, 10, :o1, 59203669, 24 + tz.transition 2042, 3, :o2, 59207365, 24 + tz.transition 2042, 10, :o1, 59212405, 24 + tz.transition 2043, 3, :o2, 59216101, 24 + tz.transition 2043, 10, :o1, 59221141, 24 + tz.transition 2044, 3, :o2, 59224837, 24 + tz.transition 2044, 10, :o1, 59230045, 24 + tz.transition 2045, 3, :o2, 59233573, 24 + tz.transition 2045, 10, :o1, 59238781, 24 + tz.transition 2046, 3, :o2, 59242309, 24 + tz.transition 2046, 10, :o1, 59247517, 24 + tz.transition 2047, 3, :o2, 59251213, 24 + tz.transition 2047, 10, :o1, 59256253, 24 + tz.transition 2048, 3, :o2, 59259949, 24 + tz.transition 2048, 10, :o1, 59264989, 24 + tz.transition 2049, 3, :o2, 59268685, 24 + tz.transition 2049, 10, :o1, 59273893, 24 + tz.transition 2050, 3, :o2, 59277421, 24 + tz.transition 2050, 10, :o1, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Berlin.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Berlin.rb new file mode 100644 index 0000000000..721054236c --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Berlin.rb @@ -0,0 +1,188 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Berlin + include TimezoneDefinition + + timezone 'Europe/Berlin' do |tz| + tz.offset :o0, 3208, 0, :LMT + tz.offset :o1, 3600, 0, :CET + tz.offset :o2, 3600, 3600, :CEST + tz.offset :o3, 3600, 7200, :CEMT + + tz.transition 1893, 3, :o1, 26055588199, 10800 + tz.transition 1916, 4, :o2, 29051813, 12 + tz.transition 1916, 9, :o1, 58107299, 24 + tz.transition 1917, 4, :o2, 58112029, 24 + tz.transition 1917, 9, :o1, 58115725, 24 + tz.transition 1918, 4, :o2, 58120765, 24 + tz.transition 1918, 9, :o1, 58124461, 24 + tz.transition 1940, 4, :o2, 58313293, 24 + tz.transition 1942, 11, :o1, 58335973, 24 + tz.transition 1943, 3, :o2, 58339501, 24 + tz.transition 1943, 10, :o1, 58344037, 24 + tz.transition 1944, 4, :o2, 58348405, 24 + tz.transition 1944, 10, :o1, 58352773, 24 + tz.transition 1945, 4, :o2, 58357141, 24 + tz.transition 1945, 5, :o3, 4863199, 2 + tz.transition 1945, 9, :o2, 4863445, 2 + tz.transition 1945, 11, :o1, 58362661, 24 + tz.transition 1946, 4, :o2, 58366189, 24 + tz.transition 1946, 10, :o1, 58370413, 24 + tz.transition 1947, 4, :o2, 29187379, 12 + tz.transition 1947, 5, :o3, 58375597, 24 + tz.transition 1947, 6, :o2, 4864731, 2 + tz.transition 1947, 10, :o1, 58379125, 24 + tz.transition 1948, 4, :o2, 58383829, 24 + tz.transition 1948, 10, :o1, 58387861, 24 + tz.transition 1949, 4, :o2, 58392397, 24 + tz.transition 1949, 10, :o1, 58396597, 24 + tz.transition 1980, 4, :o2, 323830800 + tz.transition 1980, 9, :o1, 338950800 + tz.transition 1981, 3, :o2, 354675600 + tz.transition 1981, 9, :o1, 370400400 + tz.transition 1982, 3, :o2, 386125200 + tz.transition 1982, 9, :o1, 401850000 + tz.transition 1983, 3, :o2, 417574800 + tz.transition 1983, 9, :o1, 433299600 + tz.transition 1984, 3, :o2, 449024400 + tz.transition 1984, 9, :o1, 465354000 + tz.transition 1985, 3, :o2, 481078800 + tz.transition 1985, 9, :o1, 496803600 + tz.transition 1986, 3, :o2, 512528400 + tz.transition 1986, 9, :o1, 528253200 + tz.transition 1987, 3, :o2, 543978000 + tz.transition 1987, 9, :o1, 559702800 + tz.transition 1988, 3, :o2, 575427600 + tz.transition 1988, 9, :o1, 591152400 + tz.transition 1989, 3, :o2, 606877200 + tz.transition 1989, 9, :o1, 622602000 + tz.transition 1990, 3, :o2, 638326800 + tz.transition 1990, 9, :o1, 654656400 + tz.transition 1991, 3, :o2, 670381200 + tz.transition 1991, 9, :o1, 686106000 + tz.transition 1992, 3, :o2, 701830800 + tz.transition 1992, 9, :o1, 717555600 + tz.transition 1993, 3, :o2, 733280400 + tz.transition 1993, 9, :o1, 749005200 + tz.transition 1994, 3, :o2, 764730000 + tz.transition 1994, 9, :o1, 780454800 + tz.transition 1995, 3, :o2, 796179600 + tz.transition 1995, 9, :o1, 811904400 + tz.transition 1996, 3, :o2, 828234000 + tz.transition 1996, 10, :o1, 846378000 + tz.transition 1997, 3, :o2, 859683600 + tz.transition 1997, 10, :o1, 877827600 + tz.transition 1998, 3, :o2, 891133200 + tz.transition 1998, 10, :o1, 909277200 + tz.transition 1999, 3, :o2, 922582800 + tz.transition 1999, 10, :o1, 941331600 + tz.transition 2000, 3, :o2, 954032400 + tz.transition 2000, 10, :o1, 972781200 + tz.transition 2001, 3, :o2, 985482000 + tz.transition 2001, 10, :o1, 1004230800 + tz.transition 2002, 3, :o2, 1017536400 + tz.transition 2002, 10, :o1, 1035680400 + tz.transition 2003, 3, :o2, 1048986000 + tz.transition 2003, 10, :o1, 1067130000 + tz.transition 2004, 3, :o2, 1080435600 + tz.transition 2004, 10, :o1, 1099184400 + tz.transition 2005, 3, :o2, 1111885200 + tz.transition 2005, 10, :o1, 1130634000 + tz.transition 2006, 3, :o2, 1143334800 + tz.transition 2006, 10, :o1, 1162083600 + tz.transition 2007, 3, :o2, 1174784400 + tz.transition 2007, 10, :o1, 1193533200 + tz.transition 2008, 3, :o2, 1206838800 + tz.transition 2008, 10, :o1, 1224982800 + tz.transition 2009, 3, :o2, 1238288400 + tz.transition 2009, 10, :o1, 1256432400 + tz.transition 2010, 3, :o2, 1269738000 + tz.transition 2010, 10, :o1, 1288486800 + tz.transition 2011, 3, :o2, 1301187600 + tz.transition 2011, 10, :o1, 1319936400 + tz.transition 2012, 3, :o2, 1332637200 + tz.transition 2012, 10, :o1, 1351386000 + tz.transition 2013, 3, :o2, 1364691600 + tz.transition 2013, 10, :o1, 1382835600 + tz.transition 2014, 3, :o2, 1396141200 + tz.transition 2014, 10, :o1, 1414285200 + tz.transition 2015, 3, :o2, 1427590800 + tz.transition 2015, 10, :o1, 1445734800 + tz.transition 2016, 3, :o2, 1459040400 + tz.transition 2016, 10, :o1, 1477789200 + tz.transition 2017, 3, :o2, 1490490000 + tz.transition 2017, 10, :o1, 1509238800 + tz.transition 2018, 3, :o2, 1521939600 + tz.transition 2018, 10, :o1, 1540688400 + tz.transition 2019, 3, :o2, 1553994000 + tz.transition 2019, 10, :o1, 1572138000 + tz.transition 2020, 3, :o2, 1585443600 + tz.transition 2020, 10, :o1, 1603587600 + tz.transition 2021, 3, :o2, 1616893200 + tz.transition 2021, 10, :o1, 1635642000 + tz.transition 2022, 3, :o2, 1648342800 + tz.transition 2022, 10, :o1, 1667091600 + tz.transition 2023, 3, :o2, 1679792400 + tz.transition 2023, 10, :o1, 1698541200 + tz.transition 2024, 3, :o2, 1711846800 + tz.transition 2024, 10, :o1, 1729990800 + tz.transition 2025, 3, :o2, 1743296400 + tz.transition 2025, 10, :o1, 1761440400 + tz.transition 2026, 3, :o2, 1774746000 + tz.transition 2026, 10, :o1, 1792890000 + tz.transition 2027, 3, :o2, 1806195600 + tz.transition 2027, 10, :o1, 1824944400 + tz.transition 2028, 3, :o2, 1837645200 + tz.transition 2028, 10, :o1, 1856394000 + tz.transition 2029, 3, :o2, 1869094800 + tz.transition 2029, 10, :o1, 1887843600 + tz.transition 2030, 3, :o2, 1901149200 + tz.transition 2030, 10, :o1, 1919293200 + tz.transition 2031, 3, :o2, 1932598800 + tz.transition 2031, 10, :o1, 1950742800 + tz.transition 2032, 3, :o2, 1964048400 + tz.transition 2032, 10, :o1, 1982797200 + tz.transition 2033, 3, :o2, 1995498000 + tz.transition 2033, 10, :o1, 2014246800 + tz.transition 2034, 3, :o2, 2026947600 + tz.transition 2034, 10, :o1, 2045696400 + tz.transition 2035, 3, :o2, 2058397200 + tz.transition 2035, 10, :o1, 2077146000 + tz.transition 2036, 3, :o2, 2090451600 + tz.transition 2036, 10, :o1, 2108595600 + tz.transition 2037, 3, :o2, 2121901200 + tz.transition 2037, 10, :o1, 2140045200 + tz.transition 2038, 3, :o2, 59172253, 24 + tz.transition 2038, 10, :o1, 59177461, 24 + tz.transition 2039, 3, :o2, 59180989, 24 + tz.transition 2039, 10, :o1, 59186197, 24 + tz.transition 2040, 3, :o2, 59189725, 24 + tz.transition 2040, 10, :o1, 59194933, 24 + tz.transition 2041, 3, :o2, 59198629, 24 + tz.transition 2041, 10, :o1, 59203669, 24 + tz.transition 2042, 3, :o2, 59207365, 24 + tz.transition 2042, 10, :o1, 59212405, 24 + tz.transition 2043, 3, :o2, 59216101, 24 + tz.transition 2043, 10, :o1, 59221141, 24 + tz.transition 2044, 3, :o2, 59224837, 24 + tz.transition 2044, 10, :o1, 59230045, 24 + tz.transition 2045, 3, :o2, 59233573, 24 + tz.transition 2045, 10, :o1, 59238781, 24 + tz.transition 2046, 3, :o2, 59242309, 24 + tz.transition 2046, 10, :o1, 59247517, 24 + tz.transition 2047, 3, :o2, 59251213, 24 + tz.transition 2047, 10, :o1, 59256253, 24 + tz.transition 2048, 3, :o2, 59259949, 24 + tz.transition 2048, 10, :o1, 59264989, 24 + tz.transition 2049, 3, :o2, 59268685, 24 + tz.transition 2049, 10, :o1, 59273893, 24 + tz.transition 2050, 3, :o2, 59277421, 24 + tz.transition 2050, 10, :o1, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bratislava.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bratislava.rb new file mode 100644 index 0000000000..7a731a0b6a --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bratislava.rb @@ -0,0 +1,13 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Bratislava + include TimezoneDefinition + + linked_timezone 'Europe/Bratislava', 'Europe/Prague' + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Brussels.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Brussels.rb new file mode 100644 index 0000000000..6b0a242944 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Brussels.rb @@ -0,0 +1,232 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Brussels + include TimezoneDefinition + + timezone 'Europe/Brussels' do |tz| + tz.offset :o0, 1050, 0, :LMT + tz.offset :o1, 1050, 0, :BMT + tz.offset :o2, 0, 0, :WET + tz.offset :o3, 3600, 0, :CET + tz.offset :o4, 3600, 3600, :CEST + tz.offset :o5, 0, 3600, :WEST + + tz.transition 1879, 12, :o1, 1386844121, 576 + tz.transition 1892, 5, :o2, 1389438713, 576 + tz.transition 1914, 11, :o3, 4840889, 2 + tz.transition 1916, 4, :o4, 58103627, 24 + tz.transition 1916, 9, :o3, 58107299, 24 + tz.transition 1917, 4, :o4, 58112029, 24 + tz.transition 1917, 9, :o3, 58115725, 24 + tz.transition 1918, 4, :o4, 58120765, 24 + tz.transition 1918, 9, :o3, 58124461, 24 + tz.transition 1918, 11, :o2, 58125815, 24 + tz.transition 1919, 3, :o5, 58128467, 24 + tz.transition 1919, 10, :o2, 58133675, 24 + tz.transition 1920, 2, :o5, 58136867, 24 + tz.transition 1920, 10, :o2, 58142915, 24 + tz.transition 1921, 3, :o5, 58146323, 24 + tz.transition 1921, 10, :o2, 58151723, 24 + tz.transition 1922, 3, :o5, 58155347, 24 + tz.transition 1922, 10, :o2, 58160051, 24 + tz.transition 1923, 4, :o5, 58164755, 24 + tz.transition 1923, 10, :o2, 58168787, 24 + tz.transition 1924, 3, :o5, 58172987, 24 + tz.transition 1924, 10, :o2, 58177523, 24 + tz.transition 1925, 4, :o5, 58181891, 24 + tz.transition 1925, 10, :o2, 58186259, 24 + tz.transition 1926, 4, :o5, 58190963, 24 + tz.transition 1926, 10, :o2, 58194995, 24 + tz.transition 1927, 4, :o5, 58199531, 24 + tz.transition 1927, 10, :o2, 58203731, 24 + tz.transition 1928, 4, :o5, 58208435, 24 + tz.transition 1928, 10, :o2, 29106319, 12 + tz.transition 1929, 4, :o5, 29108671, 12 + tz.transition 1929, 10, :o2, 29110687, 12 + tz.transition 1930, 4, :o5, 29112955, 12 + tz.transition 1930, 10, :o2, 29115055, 12 + tz.transition 1931, 4, :o5, 29117407, 12 + tz.transition 1931, 10, :o2, 29119423, 12 + tz.transition 1932, 4, :o5, 29121607, 12 + tz.transition 1932, 10, :o2, 29123791, 12 + tz.transition 1933, 3, :o5, 29125891, 12 + tz.transition 1933, 10, :o2, 29128243, 12 + tz.transition 1934, 4, :o5, 29130427, 12 + tz.transition 1934, 10, :o2, 29132611, 12 + tz.transition 1935, 3, :o5, 29134711, 12 + tz.transition 1935, 10, :o2, 29136979, 12 + tz.transition 1936, 4, :o5, 29139331, 12 + tz.transition 1936, 10, :o2, 29141347, 12 + tz.transition 1937, 4, :o5, 29143531, 12 + tz.transition 1937, 10, :o2, 29145715, 12 + tz.transition 1938, 3, :o5, 29147815, 12 + tz.transition 1938, 10, :o2, 29150083, 12 + tz.transition 1939, 4, :o5, 29152435, 12 + tz.transition 1939, 11, :o2, 29155039, 12 + tz.transition 1940, 2, :o5, 29156215, 12 + tz.transition 1940, 5, :o4, 29157235, 12 + tz.transition 1942, 11, :o3, 58335973, 24 + tz.transition 1943, 3, :o4, 58339501, 24 + tz.transition 1943, 10, :o3, 58344037, 24 + tz.transition 1944, 4, :o4, 58348405, 24 + tz.transition 1944, 9, :o3, 58352413, 24 + tz.transition 1945, 4, :o4, 58357141, 24 + tz.transition 1945, 9, :o3, 58361149, 24 + tz.transition 1946, 5, :o4, 58367029, 24 + tz.transition 1946, 10, :o3, 58370413, 24 + tz.transition 1977, 4, :o4, 228877200 + tz.transition 1977, 9, :o3, 243997200 + tz.transition 1978, 4, :o4, 260326800 + tz.transition 1978, 10, :o3, 276051600 + tz.transition 1979, 4, :o4, 291776400 + tz.transition 1979, 9, :o3, 307501200 + tz.transition 1980, 4, :o4, 323830800 + tz.transition 1980, 9, :o3, 338950800 + tz.transition 1981, 3, :o4, 354675600 + tz.transition 1981, 9, :o3, 370400400 + tz.transition 1982, 3, :o4, 386125200 + tz.transition 1982, 9, :o3, 401850000 + tz.transition 1983, 3, :o4, 417574800 + tz.transition 1983, 9, :o3, 433299600 + tz.transition 1984, 3, :o4, 449024400 + tz.transition 1984, 9, :o3, 465354000 + tz.transition 1985, 3, :o4, 481078800 + tz.transition 1985, 9, :o3, 496803600 + tz.transition 1986, 3, :o4, 512528400 + tz.transition 1986, 9, :o3, 528253200 + tz.transition 1987, 3, :o4, 543978000 + tz.transition 1987, 9, :o3, 559702800 + tz.transition 1988, 3, :o4, 575427600 + tz.transition 1988, 9, :o3, 591152400 + tz.transition 1989, 3, :o4, 606877200 + tz.transition 1989, 9, :o3, 622602000 + tz.transition 1990, 3, :o4, 638326800 + tz.transition 1990, 9, :o3, 654656400 + tz.transition 1991, 3, :o4, 670381200 + tz.transition 1991, 9, :o3, 686106000 + tz.transition 1992, 3, :o4, 701830800 + tz.transition 1992, 9, :o3, 717555600 + tz.transition 1993, 3, :o4, 733280400 + tz.transition 1993, 9, :o3, 749005200 + tz.transition 1994, 3, :o4, 764730000 + tz.transition 1994, 9, :o3, 780454800 + tz.transition 1995, 3, :o4, 796179600 + tz.transition 1995, 9, :o3, 811904400 + tz.transition 1996, 3, :o4, 828234000 + tz.transition 1996, 10, :o3, 846378000 + tz.transition 1997, 3, :o4, 859683600 + tz.transition 1997, 10, :o3, 877827600 + tz.transition 1998, 3, :o4, 891133200 + tz.transition 1998, 10, :o3, 909277200 + tz.transition 1999, 3, :o4, 922582800 + tz.transition 1999, 10, :o3, 941331600 + tz.transition 2000, 3, :o4, 954032400 + tz.transition 2000, 10, :o3, 972781200 + tz.transition 2001, 3, :o4, 985482000 + tz.transition 2001, 10, :o3, 1004230800 + tz.transition 2002, 3, :o4, 1017536400 + tz.transition 2002, 10, :o3, 1035680400 + tz.transition 2003, 3, :o4, 1048986000 + tz.transition 2003, 10, :o3, 1067130000 + tz.transition 2004, 3, :o4, 1080435600 + tz.transition 2004, 10, :o3, 1099184400 + tz.transition 2005, 3, :o4, 1111885200 + tz.transition 2005, 10, :o3, 1130634000 + tz.transition 2006, 3, :o4, 1143334800 + tz.transition 2006, 10, :o3, 1162083600 + tz.transition 2007, 3, :o4, 1174784400 + tz.transition 2007, 10, :o3, 1193533200 + tz.transition 2008, 3, :o4, 1206838800 + tz.transition 2008, 10, :o3, 1224982800 + tz.transition 2009, 3, :o4, 1238288400 + tz.transition 2009, 10, :o3, 1256432400 + tz.transition 2010, 3, :o4, 1269738000 + tz.transition 2010, 10, :o3, 1288486800 + tz.transition 2011, 3, :o4, 1301187600 + tz.transition 2011, 10, :o3, 1319936400 + tz.transition 2012, 3, :o4, 1332637200 + tz.transition 2012, 10, :o3, 1351386000 + tz.transition 2013, 3, :o4, 1364691600 + tz.transition 2013, 10, :o3, 1382835600 + tz.transition 2014, 3, :o4, 1396141200 + tz.transition 2014, 10, :o3, 1414285200 + tz.transition 2015, 3, :o4, 1427590800 + tz.transition 2015, 10, :o3, 1445734800 + tz.transition 2016, 3, :o4, 1459040400 + tz.transition 2016, 10, :o3, 1477789200 + tz.transition 2017, 3, :o4, 1490490000 + tz.transition 2017, 10, :o3, 1509238800 + tz.transition 2018, 3, :o4, 1521939600 + tz.transition 2018, 10, :o3, 1540688400 + tz.transition 2019, 3, :o4, 1553994000 + tz.transition 2019, 10, :o3, 1572138000 + tz.transition 2020, 3, :o4, 1585443600 + tz.transition 2020, 10, :o3, 1603587600 + tz.transition 2021, 3, :o4, 1616893200 + tz.transition 2021, 10, :o3, 1635642000 + tz.transition 2022, 3, :o4, 1648342800 + tz.transition 2022, 10, :o3, 1667091600 + tz.transition 2023, 3, :o4, 1679792400 + tz.transition 2023, 10, :o3, 1698541200 + tz.transition 2024, 3, :o4, 1711846800 + tz.transition 2024, 10, :o3, 1729990800 + tz.transition 2025, 3, :o4, 1743296400 + tz.transition 2025, 10, :o3, 1761440400 + tz.transition 2026, 3, :o4, 1774746000 + tz.transition 2026, 10, :o3, 1792890000 + tz.transition 2027, 3, :o4, 1806195600 + tz.transition 2027, 10, :o3, 1824944400 + tz.transition 2028, 3, :o4, 1837645200 + tz.transition 2028, 10, :o3, 1856394000 + tz.transition 2029, 3, :o4, 1869094800 + tz.transition 2029, 10, :o3, 1887843600 + tz.transition 2030, 3, :o4, 1901149200 + tz.transition 2030, 10, :o3, 1919293200 + tz.transition 2031, 3, :o4, 1932598800 + tz.transition 2031, 10, :o3, 1950742800 + tz.transition 2032, 3, :o4, 1964048400 + tz.transition 2032, 10, :o3, 1982797200 + tz.transition 2033, 3, :o4, 1995498000 + tz.transition 2033, 10, :o3, 2014246800 + tz.transition 2034, 3, :o4, 2026947600 + tz.transition 2034, 10, :o3, 2045696400 + tz.transition 2035, 3, :o4, 2058397200 + tz.transition 2035, 10, :o3, 2077146000 + tz.transition 2036, 3, :o4, 2090451600 + tz.transition 2036, 10, :o3, 2108595600 + tz.transition 2037, 3, :o4, 2121901200 + tz.transition 2037, 10, :o3, 2140045200 + tz.transition 2038, 3, :o4, 59172253, 24 + tz.transition 2038, 10, :o3, 59177461, 24 + tz.transition 2039, 3, :o4, 59180989, 24 + tz.transition 2039, 10, :o3, 59186197, 24 + tz.transition 2040, 3, :o4, 59189725, 24 + tz.transition 2040, 10, :o3, 59194933, 24 + tz.transition 2041, 3, :o4, 59198629, 24 + tz.transition 2041, 10, :o3, 59203669, 24 + tz.transition 2042, 3, :o4, 59207365, 24 + tz.transition 2042, 10, :o3, 59212405, 24 + tz.transition 2043, 3, :o4, 59216101, 24 + tz.transition 2043, 10, :o3, 59221141, 24 + tz.transition 2044, 3, :o4, 59224837, 24 + tz.transition 2044, 10, :o3, 59230045, 24 + tz.transition 2045, 3, :o4, 59233573, 24 + tz.transition 2045, 10, :o3, 59238781, 24 + tz.transition 2046, 3, :o4, 59242309, 24 + tz.transition 2046, 10, :o3, 59247517, 24 + tz.transition 2047, 3, :o4, 59251213, 24 + tz.transition 2047, 10, :o3, 59256253, 24 + tz.transition 2048, 3, :o4, 59259949, 24 + tz.transition 2048, 10, :o3, 59264989, 24 + tz.transition 2049, 3, :o4, 59268685, 24 + tz.transition 2049, 10, :o3, 59273893, 24 + tz.transition 2050, 3, :o4, 59277421, 24 + tz.transition 2050, 10, :o3, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bucharest.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bucharest.rb new file mode 100644 index 0000000000..521c3c932e --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bucharest.rb @@ -0,0 +1,181 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Bucharest + include TimezoneDefinition + + timezone 'Europe/Bucharest' do |tz| + tz.offset :o0, 6264, 0, :LMT + tz.offset :o1, 6264, 0, :BMT + tz.offset :o2, 7200, 0, :EET + tz.offset :o3, 7200, 3600, :EEST + + tz.transition 1891, 9, :o1, 964802571, 400 + tz.transition 1931, 7, :o2, 970618571, 400 + tz.transition 1932, 5, :o3, 29122181, 12 + tz.transition 1932, 10, :o2, 29123789, 12 + tz.transition 1933, 4, :o3, 29125973, 12 + tz.transition 1933, 9, :o2, 29128157, 12 + tz.transition 1934, 4, :o3, 29130425, 12 + tz.transition 1934, 10, :o2, 29132609, 12 + tz.transition 1935, 4, :o3, 29134793, 12 + tz.transition 1935, 10, :o2, 29136977, 12 + tz.transition 1936, 4, :o3, 29139161, 12 + tz.transition 1936, 10, :o2, 29141345, 12 + tz.transition 1937, 4, :o3, 29143529, 12 + tz.transition 1937, 10, :o2, 29145713, 12 + tz.transition 1938, 4, :o3, 29147897, 12 + tz.transition 1938, 10, :o2, 29150081, 12 + tz.transition 1939, 4, :o3, 29152265, 12 + tz.transition 1939, 9, :o2, 29154449, 12 + tz.transition 1979, 5, :o3, 296604000 + tz.transition 1979, 9, :o2, 307486800 + tz.transition 1980, 4, :o3, 323816400 + tz.transition 1980, 9, :o2, 338940000 + tz.transition 1981, 3, :o3, 354672000 + tz.transition 1981, 9, :o2, 370396800 + tz.transition 1982, 3, :o3, 386121600 + tz.transition 1982, 9, :o2, 401846400 + tz.transition 1983, 3, :o3, 417571200 + tz.transition 1983, 9, :o2, 433296000 + tz.transition 1984, 3, :o3, 449020800 + tz.transition 1984, 9, :o2, 465350400 + tz.transition 1985, 3, :o3, 481075200 + tz.transition 1985, 9, :o2, 496800000 + tz.transition 1986, 3, :o3, 512524800 + tz.transition 1986, 9, :o2, 528249600 + tz.transition 1987, 3, :o3, 543974400 + tz.transition 1987, 9, :o2, 559699200 + tz.transition 1988, 3, :o3, 575424000 + tz.transition 1988, 9, :o2, 591148800 + tz.transition 1989, 3, :o3, 606873600 + tz.transition 1989, 9, :o2, 622598400 + tz.transition 1990, 3, :o3, 638323200 + tz.transition 1990, 9, :o2, 654652800 + tz.transition 1991, 3, :o3, 670370400 + tz.transition 1991, 9, :o2, 686095200 + tz.transition 1992, 3, :o3, 701820000 + tz.transition 1992, 9, :o2, 717544800 + tz.transition 1993, 3, :o3, 733269600 + tz.transition 1993, 9, :o2, 748994400 + tz.transition 1994, 3, :o3, 764719200 + tz.transition 1994, 9, :o2, 780440400 + tz.transition 1995, 3, :o3, 796168800 + tz.transition 1995, 9, :o2, 811890000 + tz.transition 1996, 3, :o3, 828223200 + tz.transition 1996, 10, :o2, 846363600 + tz.transition 1997, 3, :o3, 859683600 + tz.transition 1997, 10, :o2, 877827600 + tz.transition 1998, 3, :o3, 891133200 + tz.transition 1998, 10, :o2, 909277200 + tz.transition 1999, 3, :o3, 922582800 + tz.transition 1999, 10, :o2, 941331600 + tz.transition 2000, 3, :o3, 954032400 + tz.transition 2000, 10, :o2, 972781200 + tz.transition 2001, 3, :o3, 985482000 + tz.transition 2001, 10, :o2, 1004230800 + tz.transition 2002, 3, :o3, 1017536400 + tz.transition 2002, 10, :o2, 1035680400 + tz.transition 2003, 3, :o3, 1048986000 + tz.transition 2003, 10, :o2, 1067130000 + tz.transition 2004, 3, :o3, 1080435600 + tz.transition 2004, 10, :o2, 1099184400 + tz.transition 2005, 3, :o3, 1111885200 + tz.transition 2005, 10, :o2, 1130634000 + tz.transition 2006, 3, :o3, 1143334800 + tz.transition 2006, 10, :o2, 1162083600 + tz.transition 2007, 3, :o3, 1174784400 + tz.transition 2007, 10, :o2, 1193533200 + tz.transition 2008, 3, :o3, 1206838800 + tz.transition 2008, 10, :o2, 1224982800 + tz.transition 2009, 3, :o3, 1238288400 + tz.transition 2009, 10, :o2, 1256432400 + tz.transition 2010, 3, :o3, 1269738000 + tz.transition 2010, 10, :o2, 1288486800 + tz.transition 2011, 3, :o3, 1301187600 + tz.transition 2011, 10, :o2, 1319936400 + tz.transition 2012, 3, :o3, 1332637200 + tz.transition 2012, 10, :o2, 1351386000 + tz.transition 2013, 3, :o3, 1364691600 + tz.transition 2013, 10, :o2, 1382835600 + tz.transition 2014, 3, :o3, 1396141200 + tz.transition 2014, 10, :o2, 1414285200 + tz.transition 2015, 3, :o3, 1427590800 + tz.transition 2015, 10, :o2, 1445734800 + tz.transition 2016, 3, :o3, 1459040400 + tz.transition 2016, 10, :o2, 1477789200 + tz.transition 2017, 3, :o3, 1490490000 + tz.transition 2017, 10, :o2, 1509238800 + tz.transition 2018, 3, :o3, 1521939600 + tz.transition 2018, 10, :o2, 1540688400 + tz.transition 2019, 3, :o3, 1553994000 + tz.transition 2019, 10, :o2, 1572138000 + tz.transition 2020, 3, :o3, 1585443600 + tz.transition 2020, 10, :o2, 1603587600 + tz.transition 2021, 3, :o3, 1616893200 + tz.transition 2021, 10, :o2, 1635642000 + tz.transition 2022, 3, :o3, 1648342800 + tz.transition 2022, 10, :o2, 1667091600 + tz.transition 2023, 3, :o3, 1679792400 + tz.transition 2023, 10, :o2, 1698541200 + tz.transition 2024, 3, :o3, 1711846800 + tz.transition 2024, 10, :o2, 1729990800 + tz.transition 2025, 3, :o3, 1743296400 + tz.transition 2025, 10, :o2, 1761440400 + tz.transition 2026, 3, :o3, 1774746000 + tz.transition 2026, 10, :o2, 1792890000 + tz.transition 2027, 3, :o3, 1806195600 + tz.transition 2027, 10, :o2, 1824944400 + tz.transition 2028, 3, :o3, 1837645200 + tz.transition 2028, 10, :o2, 1856394000 + tz.transition 2029, 3, :o3, 1869094800 + tz.transition 2029, 10, :o2, 1887843600 + tz.transition 2030, 3, :o3, 1901149200 + tz.transition 2030, 10, :o2, 1919293200 + tz.transition 2031, 3, :o3, 1932598800 + tz.transition 2031, 10, :o2, 1950742800 + tz.transition 2032, 3, :o3, 1964048400 + tz.transition 2032, 10, :o2, 1982797200 + tz.transition 2033, 3, :o3, 1995498000 + tz.transition 2033, 10, :o2, 2014246800 + tz.transition 2034, 3, :o3, 2026947600 + tz.transition 2034, 10, :o2, 2045696400 + tz.transition 2035, 3, :o3, 2058397200 + tz.transition 2035, 10, :o2, 2077146000 + tz.transition 2036, 3, :o3, 2090451600 + tz.transition 2036, 10, :o2, 2108595600 + tz.transition 2037, 3, :o3, 2121901200 + tz.transition 2037, 10, :o2, 2140045200 + tz.transition 2038, 3, :o3, 59172253, 24 + tz.transition 2038, 10, :o2, 59177461, 24 + tz.transition 2039, 3, :o3, 59180989, 24 + tz.transition 2039, 10, :o2, 59186197, 24 + tz.transition 2040, 3, :o3, 59189725, 24 + tz.transition 2040, 10, :o2, 59194933, 24 + tz.transition 2041, 3, :o3, 59198629, 24 + tz.transition 2041, 10, :o2, 59203669, 24 + tz.transition 2042, 3, :o3, 59207365, 24 + tz.transition 2042, 10, :o2, 59212405, 24 + tz.transition 2043, 3, :o3, 59216101, 24 + tz.transition 2043, 10, :o2, 59221141, 24 + tz.transition 2044, 3, :o3, 59224837, 24 + tz.transition 2044, 10, :o2, 59230045, 24 + tz.transition 2045, 3, :o3, 59233573, 24 + tz.transition 2045, 10, :o2, 59238781, 24 + tz.transition 2046, 3, :o3, 59242309, 24 + tz.transition 2046, 10, :o2, 59247517, 24 + tz.transition 2047, 3, :o3, 59251213, 24 + tz.transition 2047, 10, :o2, 59256253, 24 + tz.transition 2048, 3, :o3, 59259949, 24 + tz.transition 2048, 10, :o2, 59264989, 24 + tz.transition 2049, 3, :o3, 59268685, 24 + tz.transition 2049, 10, :o2, 59273893, 24 + tz.transition 2050, 3, :o3, 59277421, 24 + tz.transition 2050, 10, :o2, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Budapest.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Budapest.rb new file mode 100644 index 0000000000..1f3a9738b7 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Budapest.rb @@ -0,0 +1,197 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Budapest + include TimezoneDefinition + + timezone 'Europe/Budapest' do |tz| + tz.offset :o0, 4580, 0, :LMT + tz.offset :o1, 3600, 0, :CET + tz.offset :o2, 3600, 3600, :CEST + + tz.transition 1890, 9, :o1, 10418291051, 4320 + tz.transition 1916, 4, :o2, 29051813, 12 + tz.transition 1916, 9, :o1, 58107299, 24 + tz.transition 1917, 4, :o2, 58112029, 24 + tz.transition 1917, 9, :o1, 58115725, 24 + tz.transition 1918, 4, :o2, 29060215, 12 + tz.transition 1918, 9, :o1, 58124773, 24 + tz.transition 1919, 4, :o2, 29064763, 12 + tz.transition 1919, 9, :o1, 58133197, 24 + tz.transition 1920, 4, :o2, 29069035, 12 + tz.transition 1920, 9, :o1, 58142341, 24 + tz.transition 1941, 4, :o2, 58322173, 24 + tz.transition 1942, 11, :o1, 58335973, 24 + tz.transition 1943, 3, :o2, 58339501, 24 + tz.transition 1943, 10, :o1, 58344037, 24 + tz.transition 1944, 4, :o2, 58348405, 24 + tz.transition 1944, 10, :o1, 58352773, 24 + tz.transition 1945, 5, :o2, 29178929, 12 + tz.transition 1945, 11, :o1, 29181149, 12 + tz.transition 1946, 3, :o2, 58365853, 24 + tz.transition 1946, 10, :o1, 58370389, 24 + tz.transition 1947, 4, :o2, 58374757, 24 + tz.transition 1947, 10, :o1, 58379125, 24 + tz.transition 1948, 4, :o2, 58383493, 24 + tz.transition 1948, 10, :o1, 58387861, 24 + tz.transition 1949, 4, :o2, 58392397, 24 + tz.transition 1949, 10, :o1, 58396597, 24 + tz.transition 1950, 4, :o2, 58401325, 24 + tz.transition 1950, 10, :o1, 58405861, 24 + tz.transition 1954, 5, :o2, 58437251, 24 + tz.transition 1954, 10, :o1, 29220221, 12 + tz.transition 1955, 5, :o2, 58446011, 24 + tz.transition 1955, 10, :o1, 29224601, 12 + tz.transition 1956, 6, :o2, 58455059, 24 + tz.transition 1956, 9, :o1, 29228957, 12 + tz.transition 1957, 6, :o2, 4871983, 2 + tz.transition 1957, 9, :o1, 58466653, 24 + tz.transition 1980, 4, :o2, 323827200 + tz.transition 1980, 9, :o1, 338950800 + tz.transition 1981, 3, :o2, 354675600 + tz.transition 1981, 9, :o1, 370400400 + tz.transition 1982, 3, :o2, 386125200 + tz.transition 1982, 9, :o1, 401850000 + tz.transition 1983, 3, :o2, 417574800 + tz.transition 1983, 9, :o1, 433299600 + tz.transition 1984, 3, :o2, 449024400 + tz.transition 1984, 9, :o1, 465354000 + tz.transition 1985, 3, :o2, 481078800 + tz.transition 1985, 9, :o1, 496803600 + tz.transition 1986, 3, :o2, 512528400 + tz.transition 1986, 9, :o1, 528253200 + tz.transition 1987, 3, :o2, 543978000 + tz.transition 1987, 9, :o1, 559702800 + tz.transition 1988, 3, :o2, 575427600 + tz.transition 1988, 9, :o1, 591152400 + tz.transition 1989, 3, :o2, 606877200 + tz.transition 1989, 9, :o1, 622602000 + tz.transition 1990, 3, :o2, 638326800 + tz.transition 1990, 9, :o1, 654656400 + tz.transition 1991, 3, :o2, 670381200 + tz.transition 1991, 9, :o1, 686106000 + tz.transition 1992, 3, :o2, 701830800 + tz.transition 1992, 9, :o1, 717555600 + tz.transition 1993, 3, :o2, 733280400 + tz.transition 1993, 9, :o1, 749005200 + tz.transition 1994, 3, :o2, 764730000 + tz.transition 1994, 9, :o1, 780454800 + tz.transition 1995, 3, :o2, 796179600 + tz.transition 1995, 9, :o1, 811904400 + tz.transition 1996, 3, :o2, 828234000 + tz.transition 1996, 10, :o1, 846378000 + tz.transition 1997, 3, :o2, 859683600 + tz.transition 1997, 10, :o1, 877827600 + tz.transition 1998, 3, :o2, 891133200 + tz.transition 1998, 10, :o1, 909277200 + tz.transition 1999, 3, :o2, 922582800 + tz.transition 1999, 10, :o1, 941331600 + tz.transition 2000, 3, :o2, 954032400 + tz.transition 2000, 10, :o1, 972781200 + tz.transition 2001, 3, :o2, 985482000 + tz.transition 2001, 10, :o1, 1004230800 + tz.transition 2002, 3, :o2, 1017536400 + tz.transition 2002, 10, :o1, 1035680400 + tz.transition 2003, 3, :o2, 1048986000 + tz.transition 2003, 10, :o1, 1067130000 + tz.transition 2004, 3, :o2, 1080435600 + tz.transition 2004, 10, :o1, 1099184400 + tz.transition 2005, 3, :o2, 1111885200 + tz.transition 2005, 10, :o1, 1130634000 + tz.transition 2006, 3, :o2, 1143334800 + tz.transition 2006, 10, :o1, 1162083600 + tz.transition 2007, 3, :o2, 1174784400 + tz.transition 2007, 10, :o1, 1193533200 + tz.transition 2008, 3, :o2, 1206838800 + tz.transition 2008, 10, :o1, 1224982800 + tz.transition 2009, 3, :o2, 1238288400 + tz.transition 2009, 10, :o1, 1256432400 + tz.transition 2010, 3, :o2, 1269738000 + tz.transition 2010, 10, :o1, 1288486800 + tz.transition 2011, 3, :o2, 1301187600 + tz.transition 2011, 10, :o1, 1319936400 + tz.transition 2012, 3, :o2, 1332637200 + tz.transition 2012, 10, :o1, 1351386000 + tz.transition 2013, 3, :o2, 1364691600 + tz.transition 2013, 10, :o1, 1382835600 + tz.transition 2014, 3, :o2, 1396141200 + tz.transition 2014, 10, :o1, 1414285200 + tz.transition 2015, 3, :o2, 1427590800 + tz.transition 2015, 10, :o1, 1445734800 + tz.transition 2016, 3, :o2, 1459040400 + tz.transition 2016, 10, :o1, 1477789200 + tz.transition 2017, 3, :o2, 1490490000 + tz.transition 2017, 10, :o1, 1509238800 + tz.transition 2018, 3, :o2, 1521939600 + tz.transition 2018, 10, :o1, 1540688400 + tz.transition 2019, 3, :o2, 1553994000 + tz.transition 2019, 10, :o1, 1572138000 + tz.transition 2020, 3, :o2, 1585443600 + tz.transition 2020, 10, :o1, 1603587600 + tz.transition 2021, 3, :o2, 1616893200 + tz.transition 2021, 10, :o1, 1635642000 + tz.transition 2022, 3, :o2, 1648342800 + tz.transition 2022, 10, :o1, 1667091600 + tz.transition 2023, 3, :o2, 1679792400 + tz.transition 2023, 10, :o1, 1698541200 + tz.transition 2024, 3, :o2, 1711846800 + tz.transition 2024, 10, :o1, 1729990800 + tz.transition 2025, 3, :o2, 1743296400 + tz.transition 2025, 10, :o1, 1761440400 + tz.transition 2026, 3, :o2, 1774746000 + tz.transition 2026, 10, :o1, 1792890000 + tz.transition 2027, 3, :o2, 1806195600 + tz.transition 2027, 10, :o1, 1824944400 + tz.transition 2028, 3, :o2, 1837645200 + tz.transition 2028, 10, :o1, 1856394000 + tz.transition 2029, 3, :o2, 1869094800 + tz.transition 2029, 10, :o1, 1887843600 + tz.transition 2030, 3, :o2, 1901149200 + tz.transition 2030, 10, :o1, 1919293200 + tz.transition 2031, 3, :o2, 1932598800 + tz.transition 2031, 10, :o1, 1950742800 + tz.transition 2032, 3, :o2, 1964048400 + tz.transition 2032, 10, :o1, 1982797200 + tz.transition 2033, 3, :o2, 1995498000 + tz.transition 2033, 10, :o1, 2014246800 + tz.transition 2034, 3, :o2, 2026947600 + tz.transition 2034, 10, :o1, 2045696400 + tz.transition 2035, 3, :o2, 2058397200 + tz.transition 2035, 10, :o1, 2077146000 + tz.transition 2036, 3, :o2, 2090451600 + tz.transition 2036, 10, :o1, 2108595600 + tz.transition 2037, 3, :o2, 2121901200 + tz.transition 2037, 10, :o1, 2140045200 + tz.transition 2038, 3, :o2, 59172253, 24 + tz.transition 2038, 10, :o1, 59177461, 24 + tz.transition 2039, 3, :o2, 59180989, 24 + tz.transition 2039, 10, :o1, 59186197, 24 + tz.transition 2040, 3, :o2, 59189725, 24 + tz.transition 2040, 10, :o1, 59194933, 24 + tz.transition 2041, 3, :o2, 59198629, 24 + tz.transition 2041, 10, :o1, 59203669, 24 + tz.transition 2042, 3, :o2, 59207365, 24 + tz.transition 2042, 10, :o1, 59212405, 24 + tz.transition 2043, 3, :o2, 59216101, 24 + tz.transition 2043, 10, :o1, 59221141, 24 + tz.transition 2044, 3, :o2, 59224837, 24 + tz.transition 2044, 10, :o1, 59230045, 24 + tz.transition 2045, 3, :o2, 59233573, 24 + tz.transition 2045, 10, :o1, 59238781, 24 + tz.transition 2046, 3, :o2, 59242309, 24 + tz.transition 2046, 10, :o1, 59247517, 24 + tz.transition 2047, 3, :o2, 59251213, 24 + tz.transition 2047, 10, :o1, 59256253, 24 + tz.transition 2048, 3, :o2, 59259949, 24 + tz.transition 2048, 10, :o1, 59264989, 24 + tz.transition 2049, 3, :o2, 59268685, 24 + tz.transition 2049, 10, :o1, 59273893, 24 + tz.transition 2050, 3, :o2, 59277421, 24 + tz.transition 2050, 10, :o1, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Copenhagen.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Copenhagen.rb new file mode 100644 index 0000000000..47cbaf14a7 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Copenhagen.rb @@ -0,0 +1,179 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Copenhagen + include TimezoneDefinition + + timezone 'Europe/Copenhagen' do |tz| + tz.offset :o0, 3020, 0, :LMT + tz.offset :o1, 3020, 0, :CMT + tz.offset :o2, 3600, 0, :CET + tz.offset :o3, 3600, 3600, :CEST + + tz.transition 1889, 12, :o1, 10417111769, 4320 + tz.transition 1893, 12, :o2, 10423423289, 4320 + tz.transition 1916, 5, :o3, 29051981, 12 + tz.transition 1916, 9, :o2, 19369099, 8 + tz.transition 1940, 5, :o3, 58314347, 24 + tz.transition 1942, 11, :o2, 58335973, 24 + tz.transition 1943, 3, :o3, 58339501, 24 + tz.transition 1943, 10, :o2, 58344037, 24 + tz.transition 1944, 4, :o3, 58348405, 24 + tz.transition 1944, 10, :o2, 58352773, 24 + tz.transition 1945, 4, :o3, 58357141, 24 + tz.transition 1945, 8, :o2, 58360381, 24 + tz.transition 1946, 5, :o3, 58366597, 24 + tz.transition 1946, 9, :o2, 58369549, 24 + tz.transition 1947, 5, :o3, 58375429, 24 + tz.transition 1947, 8, :o2, 58377781, 24 + tz.transition 1948, 5, :o3, 58384333, 24 + tz.transition 1948, 8, :o2, 58386517, 24 + tz.transition 1980, 4, :o3, 323830800 + tz.transition 1980, 9, :o2, 338950800 + tz.transition 1981, 3, :o3, 354675600 + tz.transition 1981, 9, :o2, 370400400 + tz.transition 1982, 3, :o3, 386125200 + tz.transition 1982, 9, :o2, 401850000 + tz.transition 1983, 3, :o3, 417574800 + tz.transition 1983, 9, :o2, 433299600 + tz.transition 1984, 3, :o3, 449024400 + tz.transition 1984, 9, :o2, 465354000 + tz.transition 1985, 3, :o3, 481078800 + tz.transition 1985, 9, :o2, 496803600 + tz.transition 1986, 3, :o3, 512528400 + tz.transition 1986, 9, :o2, 528253200 + tz.transition 1987, 3, :o3, 543978000 + tz.transition 1987, 9, :o2, 559702800 + tz.transition 1988, 3, :o3, 575427600 + tz.transition 1988, 9, :o2, 591152400 + tz.transition 1989, 3, :o3, 606877200 + tz.transition 1989, 9, :o2, 622602000 + tz.transition 1990, 3, :o3, 638326800 + tz.transition 1990, 9, :o2, 654656400 + tz.transition 1991, 3, :o3, 670381200 + tz.transition 1991, 9, :o2, 686106000 + tz.transition 1992, 3, :o3, 701830800 + tz.transition 1992, 9, :o2, 717555600 + tz.transition 1993, 3, :o3, 733280400 + tz.transition 1993, 9, :o2, 749005200 + tz.transition 1994, 3, :o3, 764730000 + tz.transition 1994, 9, :o2, 780454800 + tz.transition 1995, 3, :o3, 796179600 + tz.transition 1995, 9, :o2, 811904400 + tz.transition 1996, 3, :o3, 828234000 + tz.transition 1996, 10, :o2, 846378000 + tz.transition 1997, 3, :o3, 859683600 + tz.transition 1997, 10, :o2, 877827600 + tz.transition 1998, 3, :o3, 891133200 + tz.transition 1998, 10, :o2, 909277200 + tz.transition 1999, 3, :o3, 922582800 + tz.transition 1999, 10, :o2, 941331600 + tz.transition 2000, 3, :o3, 954032400 + tz.transition 2000, 10, :o2, 972781200 + tz.transition 2001, 3, :o3, 985482000 + tz.transition 2001, 10, :o2, 1004230800 + tz.transition 2002, 3, :o3, 1017536400 + tz.transition 2002, 10, :o2, 1035680400 + tz.transition 2003, 3, :o3, 1048986000 + tz.transition 2003, 10, :o2, 1067130000 + tz.transition 2004, 3, :o3, 1080435600 + tz.transition 2004, 10, :o2, 1099184400 + tz.transition 2005, 3, :o3, 1111885200 + tz.transition 2005, 10, :o2, 1130634000 + tz.transition 2006, 3, :o3, 1143334800 + tz.transition 2006, 10, :o2, 1162083600 + tz.transition 2007, 3, :o3, 1174784400 + tz.transition 2007, 10, :o2, 1193533200 + tz.transition 2008, 3, :o3, 1206838800 + tz.transition 2008, 10, :o2, 1224982800 + tz.transition 2009, 3, :o3, 1238288400 + tz.transition 2009, 10, :o2, 1256432400 + tz.transition 2010, 3, :o3, 1269738000 + tz.transition 2010, 10, :o2, 1288486800 + tz.transition 2011, 3, :o3, 1301187600 + tz.transition 2011, 10, :o2, 1319936400 + tz.transition 2012, 3, :o3, 1332637200 + tz.transition 2012, 10, :o2, 1351386000 + tz.transition 2013, 3, :o3, 1364691600 + tz.transition 2013, 10, :o2, 1382835600 + tz.transition 2014, 3, :o3, 1396141200 + tz.transition 2014, 10, :o2, 1414285200 + tz.transition 2015, 3, :o3, 1427590800 + tz.transition 2015, 10, :o2, 1445734800 + tz.transition 2016, 3, :o3, 1459040400 + tz.transition 2016, 10, :o2, 1477789200 + tz.transition 2017, 3, :o3, 1490490000 + tz.transition 2017, 10, :o2, 1509238800 + tz.transition 2018, 3, :o3, 1521939600 + tz.transition 2018, 10, :o2, 1540688400 + tz.transition 2019, 3, :o3, 1553994000 + tz.transition 2019, 10, :o2, 1572138000 + tz.transition 2020, 3, :o3, 1585443600 + tz.transition 2020, 10, :o2, 1603587600 + tz.transition 2021, 3, :o3, 1616893200 + tz.transition 2021, 10, :o2, 1635642000 + tz.transition 2022, 3, :o3, 1648342800 + tz.transition 2022, 10, :o2, 1667091600 + tz.transition 2023, 3, :o3, 1679792400 + tz.transition 2023, 10, :o2, 1698541200 + tz.transition 2024, 3, :o3, 1711846800 + tz.transition 2024, 10, :o2, 1729990800 + tz.transition 2025, 3, :o3, 1743296400 + tz.transition 2025, 10, :o2, 1761440400 + tz.transition 2026, 3, :o3, 1774746000 + tz.transition 2026, 10, :o2, 1792890000 + tz.transition 2027, 3, :o3, 1806195600 + tz.transition 2027, 10, :o2, 1824944400 + tz.transition 2028, 3, :o3, 1837645200 + tz.transition 2028, 10, :o2, 1856394000 + tz.transition 2029, 3, :o3, 1869094800 + tz.transition 2029, 10, :o2, 1887843600 + tz.transition 2030, 3, :o3, 1901149200 + tz.transition 2030, 10, :o2, 1919293200 + tz.transition 2031, 3, :o3, 1932598800 + tz.transition 2031, 10, :o2, 1950742800 + tz.transition 2032, 3, :o3, 1964048400 + tz.transition 2032, 10, :o2, 1982797200 + tz.transition 2033, 3, :o3, 1995498000 + tz.transition 2033, 10, :o2, 2014246800 + tz.transition 2034, 3, :o3, 2026947600 + tz.transition 2034, 10, :o2, 2045696400 + tz.transition 2035, 3, :o3, 2058397200 + tz.transition 2035, 10, :o2, 2077146000 + tz.transition 2036, 3, :o3, 2090451600 + tz.transition 2036, 10, :o2, 2108595600 + tz.transition 2037, 3, :o3, 2121901200 + tz.transition 2037, 10, :o2, 2140045200 + tz.transition 2038, 3, :o3, 59172253, 24 + tz.transition 2038, 10, :o2, 59177461, 24 + tz.transition 2039, 3, :o3, 59180989, 24 + tz.transition 2039, 10, :o2, 59186197, 24 + tz.transition 2040, 3, :o3, 59189725, 24 + tz.transition 2040, 10, :o2, 59194933, 24 + tz.transition 2041, 3, :o3, 59198629, 24 + tz.transition 2041, 10, :o2, 59203669, 24 + tz.transition 2042, 3, :o3, 59207365, 24 + tz.transition 2042, 10, :o2, 59212405, 24 + tz.transition 2043, 3, :o3, 59216101, 24 + tz.transition 2043, 10, :o2, 59221141, 24 + tz.transition 2044, 3, :o3, 59224837, 24 + tz.transition 2044, 10, :o2, 59230045, 24 + tz.transition 2045, 3, :o3, 59233573, 24 + tz.transition 2045, 10, :o2, 59238781, 24 + tz.transition 2046, 3, :o3, 59242309, 24 + tz.transition 2046, 10, :o2, 59247517, 24 + tz.transition 2047, 3, :o3, 59251213, 24 + tz.transition 2047, 10, :o2, 59256253, 24 + tz.transition 2048, 3, :o3, 59259949, 24 + tz.transition 2048, 10, :o2, 59264989, 24 + tz.transition 2049, 3, :o3, 59268685, 24 + tz.transition 2049, 10, :o2, 59273893, 24 + tz.transition 2050, 3, :o3, 59277421, 24 + tz.transition 2050, 10, :o2, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Dublin.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Dublin.rb new file mode 100644 index 0000000000..0560bb5436 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Dublin.rb @@ -0,0 +1,276 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Dublin + include TimezoneDefinition + + timezone 'Europe/Dublin' do |tz| + tz.offset :o0, -1500, 0, :LMT + tz.offset :o1, -1521, 0, :DMT + tz.offset :o2, -1521, 3600, :IST + tz.offset :o3, 0, 0, :GMT + tz.offset :o4, 0, 3600, :BST + tz.offset :o5, 0, 3600, :IST + tz.offset :o6, 3600, 0, :IST + + tz.transition 1880, 8, :o1, 693483701, 288 + tz.transition 1916, 5, :o2, 7747214723, 3200 + tz.transition 1916, 10, :o3, 7747640323, 3200 + tz.transition 1917, 4, :o4, 29055919, 12 + tz.transition 1917, 9, :o3, 29057863, 12 + tz.transition 1918, 3, :o4, 29060119, 12 + tz.transition 1918, 9, :o3, 29062399, 12 + tz.transition 1919, 3, :o4, 29064571, 12 + tz.transition 1919, 9, :o3, 29066767, 12 + tz.transition 1920, 3, :o4, 29068939, 12 + tz.transition 1920, 10, :o3, 29071471, 12 + tz.transition 1921, 4, :o4, 29073391, 12 + tz.transition 1921, 10, :o3, 29075587, 12 + tz.transition 1922, 3, :o5, 29077675, 12 + tz.transition 1922, 10, :o3, 29080027, 12 + tz.transition 1923, 4, :o5, 29082379, 12 + tz.transition 1923, 9, :o3, 29084143, 12 + tz.transition 1924, 4, :o5, 29086663, 12 + tz.transition 1924, 9, :o3, 29088595, 12 + tz.transition 1925, 4, :o5, 29091115, 12 + tz.transition 1925, 10, :o3, 29093131, 12 + tz.transition 1926, 4, :o5, 29095483, 12 + tz.transition 1926, 10, :o3, 29097499, 12 + tz.transition 1927, 4, :o5, 29099767, 12 + tz.transition 1927, 10, :o3, 29101867, 12 + tz.transition 1928, 4, :o5, 29104303, 12 + tz.transition 1928, 10, :o3, 29106319, 12 + tz.transition 1929, 4, :o5, 29108671, 12 + tz.transition 1929, 10, :o3, 29110687, 12 + tz.transition 1930, 4, :o5, 29112955, 12 + tz.transition 1930, 10, :o3, 29115055, 12 + tz.transition 1931, 4, :o5, 29117407, 12 + tz.transition 1931, 10, :o3, 29119423, 12 + tz.transition 1932, 4, :o5, 29121775, 12 + tz.transition 1932, 10, :o3, 29123791, 12 + tz.transition 1933, 4, :o5, 29126059, 12 + tz.transition 1933, 10, :o3, 29128243, 12 + tz.transition 1934, 4, :o5, 29130595, 12 + tz.transition 1934, 10, :o3, 29132611, 12 + tz.transition 1935, 4, :o5, 29134879, 12 + tz.transition 1935, 10, :o3, 29136979, 12 + tz.transition 1936, 4, :o5, 29139331, 12 + tz.transition 1936, 10, :o3, 29141347, 12 + tz.transition 1937, 4, :o5, 29143699, 12 + tz.transition 1937, 10, :o3, 29145715, 12 + tz.transition 1938, 4, :o5, 29147983, 12 + tz.transition 1938, 10, :o3, 29150083, 12 + tz.transition 1939, 4, :o5, 29152435, 12 + tz.transition 1939, 11, :o3, 29155039, 12 + tz.transition 1940, 2, :o5, 29156215, 12 + tz.transition 1946, 10, :o3, 58370389, 24 + tz.transition 1947, 3, :o5, 29187127, 12 + tz.transition 1947, 11, :o3, 58379797, 24 + tz.transition 1948, 4, :o5, 29191915, 12 + tz.transition 1948, 10, :o3, 29194267, 12 + tz.transition 1949, 4, :o5, 29196115, 12 + tz.transition 1949, 10, :o3, 29198635, 12 + tz.transition 1950, 4, :o5, 29200651, 12 + tz.transition 1950, 10, :o3, 29202919, 12 + tz.transition 1951, 4, :o5, 29205019, 12 + tz.transition 1951, 10, :o3, 29207287, 12 + tz.transition 1952, 4, :o5, 29209471, 12 + tz.transition 1952, 10, :o3, 29211739, 12 + tz.transition 1953, 4, :o5, 29213839, 12 + tz.transition 1953, 10, :o3, 29215855, 12 + tz.transition 1954, 4, :o5, 29218123, 12 + tz.transition 1954, 10, :o3, 29220223, 12 + tz.transition 1955, 4, :o5, 29222575, 12 + tz.transition 1955, 10, :o3, 29224591, 12 + tz.transition 1956, 4, :o5, 29227027, 12 + tz.transition 1956, 10, :o3, 29229043, 12 + tz.transition 1957, 4, :o5, 29231311, 12 + tz.transition 1957, 10, :o3, 29233411, 12 + tz.transition 1958, 4, :o5, 29235763, 12 + tz.transition 1958, 10, :o3, 29237779, 12 + tz.transition 1959, 4, :o5, 29240131, 12 + tz.transition 1959, 10, :o3, 29242147, 12 + tz.transition 1960, 4, :o5, 29244415, 12 + tz.transition 1960, 10, :o3, 29246515, 12 + tz.transition 1961, 3, :o5, 29248615, 12 + tz.transition 1961, 10, :o3, 29251219, 12 + tz.transition 1962, 3, :o5, 29252983, 12 + tz.transition 1962, 10, :o3, 29255587, 12 + tz.transition 1963, 3, :o5, 29257435, 12 + tz.transition 1963, 10, :o3, 29259955, 12 + tz.transition 1964, 3, :o5, 29261719, 12 + tz.transition 1964, 10, :o3, 29264323, 12 + tz.transition 1965, 3, :o5, 29266087, 12 + tz.transition 1965, 10, :o3, 29268691, 12 + tz.transition 1966, 3, :o5, 29270455, 12 + tz.transition 1966, 10, :o3, 29273059, 12 + tz.transition 1967, 3, :o5, 29274823, 12 + tz.transition 1967, 10, :o3, 29277511, 12 + tz.transition 1968, 2, :o5, 29278855, 12 + tz.transition 1968, 10, :o6, 58563755, 24 + tz.transition 1971, 10, :o3, 57722400 + tz.transition 1972, 3, :o5, 69818400 + tz.transition 1972, 10, :o3, 89172000 + tz.transition 1973, 3, :o5, 101268000 + tz.transition 1973, 10, :o3, 120621600 + tz.transition 1974, 3, :o5, 132717600 + tz.transition 1974, 10, :o3, 152071200 + tz.transition 1975, 3, :o5, 164167200 + tz.transition 1975, 10, :o3, 183520800 + tz.transition 1976, 3, :o5, 196221600 + tz.transition 1976, 10, :o3, 214970400 + tz.transition 1977, 3, :o5, 227671200 + tz.transition 1977, 10, :o3, 246420000 + tz.transition 1978, 3, :o5, 259120800 + tz.transition 1978, 10, :o3, 278474400 + tz.transition 1979, 3, :o5, 290570400 + tz.transition 1979, 10, :o3, 309924000 + tz.transition 1980, 3, :o5, 322020000 + tz.transition 1980, 10, :o3, 341373600 + tz.transition 1981, 3, :o5, 354675600 + tz.transition 1981, 10, :o3, 372819600 + tz.transition 1982, 3, :o5, 386125200 + tz.transition 1982, 10, :o3, 404269200 + tz.transition 1983, 3, :o5, 417574800 + tz.transition 1983, 10, :o3, 435718800 + tz.transition 1984, 3, :o5, 449024400 + tz.transition 1984, 10, :o3, 467773200 + tz.transition 1985, 3, :o5, 481078800 + tz.transition 1985, 10, :o3, 499222800 + tz.transition 1986, 3, :o5, 512528400 + tz.transition 1986, 10, :o3, 530672400 + tz.transition 1987, 3, :o5, 543978000 + tz.transition 1987, 10, :o3, 562122000 + tz.transition 1988, 3, :o5, 575427600 + tz.transition 1988, 10, :o3, 593571600 + tz.transition 1989, 3, :o5, 606877200 + tz.transition 1989, 10, :o3, 625626000 + tz.transition 1990, 3, :o5, 638326800 + tz.transition 1990, 10, :o3, 657075600 + tz.transition 1991, 3, :o5, 670381200 + tz.transition 1991, 10, :o3, 688525200 + tz.transition 1992, 3, :o5, 701830800 + tz.transition 1992, 10, :o3, 719974800 + tz.transition 1993, 3, :o5, 733280400 + tz.transition 1993, 10, :o3, 751424400 + tz.transition 1994, 3, :o5, 764730000 + tz.transition 1994, 10, :o3, 782874000 + tz.transition 1995, 3, :o5, 796179600 + tz.transition 1995, 10, :o3, 814323600 + tz.transition 1996, 3, :o5, 828234000 + tz.transition 1996, 10, :o3, 846378000 + tz.transition 1997, 3, :o5, 859683600 + tz.transition 1997, 10, :o3, 877827600 + tz.transition 1998, 3, :o5, 891133200 + tz.transition 1998, 10, :o3, 909277200 + tz.transition 1999, 3, :o5, 922582800 + tz.transition 1999, 10, :o3, 941331600 + tz.transition 2000, 3, :o5, 954032400 + tz.transition 2000, 10, :o3, 972781200 + tz.transition 2001, 3, :o5, 985482000 + tz.transition 2001, 10, :o3, 1004230800 + tz.transition 2002, 3, :o5, 1017536400 + tz.transition 2002, 10, :o3, 1035680400 + tz.transition 2003, 3, :o5, 1048986000 + tz.transition 2003, 10, :o3, 1067130000 + tz.transition 2004, 3, :o5, 1080435600 + tz.transition 2004, 10, :o3, 1099184400 + tz.transition 2005, 3, :o5, 1111885200 + tz.transition 2005, 10, :o3, 1130634000 + tz.transition 2006, 3, :o5, 1143334800 + tz.transition 2006, 10, :o3, 1162083600 + tz.transition 2007, 3, :o5, 1174784400 + tz.transition 2007, 10, :o3, 1193533200 + tz.transition 2008, 3, :o5, 1206838800 + tz.transition 2008, 10, :o3, 1224982800 + tz.transition 2009, 3, :o5, 1238288400 + tz.transition 2009, 10, :o3, 1256432400 + tz.transition 2010, 3, :o5, 1269738000 + tz.transition 2010, 10, :o3, 1288486800 + tz.transition 2011, 3, :o5, 1301187600 + tz.transition 2011, 10, :o3, 1319936400 + tz.transition 2012, 3, :o5, 1332637200 + tz.transition 2012, 10, :o3, 1351386000 + tz.transition 2013, 3, :o5, 1364691600 + tz.transition 2013, 10, :o3, 1382835600 + tz.transition 2014, 3, :o5, 1396141200 + tz.transition 2014, 10, :o3, 1414285200 + tz.transition 2015, 3, :o5, 1427590800 + tz.transition 2015, 10, :o3, 1445734800 + tz.transition 2016, 3, :o5, 1459040400 + tz.transition 2016, 10, :o3, 1477789200 + tz.transition 2017, 3, :o5, 1490490000 + tz.transition 2017, 10, :o3, 1509238800 + tz.transition 2018, 3, :o5, 1521939600 + tz.transition 2018, 10, :o3, 1540688400 + tz.transition 2019, 3, :o5, 1553994000 + tz.transition 2019, 10, :o3, 1572138000 + tz.transition 2020, 3, :o5, 1585443600 + tz.transition 2020, 10, :o3, 1603587600 + tz.transition 2021, 3, :o5, 1616893200 + tz.transition 2021, 10, :o3, 1635642000 + tz.transition 2022, 3, :o5, 1648342800 + tz.transition 2022, 10, :o3, 1667091600 + tz.transition 2023, 3, :o5, 1679792400 + tz.transition 2023, 10, :o3, 1698541200 + tz.transition 2024, 3, :o5, 1711846800 + tz.transition 2024, 10, :o3, 1729990800 + tz.transition 2025, 3, :o5, 1743296400 + tz.transition 2025, 10, :o3, 1761440400 + tz.transition 2026, 3, :o5, 1774746000 + tz.transition 2026, 10, :o3, 1792890000 + tz.transition 2027, 3, :o5, 1806195600 + tz.transition 2027, 10, :o3, 1824944400 + tz.transition 2028, 3, :o5, 1837645200 + tz.transition 2028, 10, :o3, 1856394000 + tz.transition 2029, 3, :o5, 1869094800 + tz.transition 2029, 10, :o3, 1887843600 + tz.transition 2030, 3, :o5, 1901149200 + tz.transition 2030, 10, :o3, 1919293200 + tz.transition 2031, 3, :o5, 1932598800 + tz.transition 2031, 10, :o3, 1950742800 + tz.transition 2032, 3, :o5, 1964048400 + tz.transition 2032, 10, :o3, 1982797200 + tz.transition 2033, 3, :o5, 1995498000 + tz.transition 2033, 10, :o3, 2014246800 + tz.transition 2034, 3, :o5, 2026947600 + tz.transition 2034, 10, :o3, 2045696400 + tz.transition 2035, 3, :o5, 2058397200 + tz.transition 2035, 10, :o3, 2077146000 + tz.transition 2036, 3, :o5, 2090451600 + tz.transition 2036, 10, :o3, 2108595600 + tz.transition 2037, 3, :o5, 2121901200 + tz.transition 2037, 10, :o3, 2140045200 + tz.transition 2038, 3, :o5, 59172253, 24 + tz.transition 2038, 10, :o3, 59177461, 24 + tz.transition 2039, 3, :o5, 59180989, 24 + tz.transition 2039, 10, :o3, 59186197, 24 + tz.transition 2040, 3, :o5, 59189725, 24 + tz.transition 2040, 10, :o3, 59194933, 24 + tz.transition 2041, 3, :o5, 59198629, 24 + tz.transition 2041, 10, :o3, 59203669, 24 + tz.transition 2042, 3, :o5, 59207365, 24 + tz.transition 2042, 10, :o3, 59212405, 24 + tz.transition 2043, 3, :o5, 59216101, 24 + tz.transition 2043, 10, :o3, 59221141, 24 + tz.transition 2044, 3, :o5, 59224837, 24 + tz.transition 2044, 10, :o3, 59230045, 24 + tz.transition 2045, 3, :o5, 59233573, 24 + tz.transition 2045, 10, :o3, 59238781, 24 + tz.transition 2046, 3, :o5, 59242309, 24 + tz.transition 2046, 10, :o3, 59247517, 24 + tz.transition 2047, 3, :o5, 59251213, 24 + tz.transition 2047, 10, :o3, 59256253, 24 + tz.transition 2048, 3, :o5, 59259949, 24 + tz.transition 2048, 10, :o3, 59264989, 24 + tz.transition 2049, 3, :o5, 59268685, 24 + tz.transition 2049, 10, :o3, 59273893, 24 + tz.transition 2050, 3, :o5, 59277421, 24 + tz.transition 2050, 10, :o3, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Helsinki.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Helsinki.rb new file mode 100644 index 0000000000..13a806bcc7 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Helsinki.rb @@ -0,0 +1,163 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Helsinki + include TimezoneDefinition + + timezone 'Europe/Helsinki' do |tz| + tz.offset :o0, 5992, 0, :LMT + tz.offset :o1, 5992, 0, :HMT + tz.offset :o2, 7200, 0, :EET + tz.offset :o3, 7200, 3600, :EEST + + tz.transition 1878, 5, :o1, 25997062651, 10800 + tz.transition 1921, 4, :o2, 26166352651, 10800 + tz.transition 1942, 4, :o3, 29165429, 12 + tz.transition 1942, 10, :o2, 19445083, 8 + tz.transition 1981, 3, :o3, 354675600 + tz.transition 1981, 9, :o2, 370400400 + tz.transition 1982, 3, :o3, 386125200 + tz.transition 1982, 9, :o2, 401850000 + tz.transition 1983, 3, :o3, 417574800 + tz.transition 1983, 9, :o2, 433299600 + tz.transition 1984, 3, :o3, 449024400 + tz.transition 1984, 9, :o2, 465354000 + tz.transition 1985, 3, :o3, 481078800 + tz.transition 1985, 9, :o2, 496803600 + tz.transition 1986, 3, :o3, 512528400 + tz.transition 1986, 9, :o2, 528253200 + tz.transition 1987, 3, :o3, 543978000 + tz.transition 1987, 9, :o2, 559702800 + tz.transition 1988, 3, :o3, 575427600 + tz.transition 1988, 9, :o2, 591152400 + tz.transition 1989, 3, :o3, 606877200 + tz.transition 1989, 9, :o2, 622602000 + tz.transition 1990, 3, :o3, 638326800 + tz.transition 1990, 9, :o2, 654656400 + tz.transition 1991, 3, :o3, 670381200 + tz.transition 1991, 9, :o2, 686106000 + tz.transition 1992, 3, :o3, 701830800 + tz.transition 1992, 9, :o2, 717555600 + tz.transition 1993, 3, :o3, 733280400 + tz.transition 1993, 9, :o2, 749005200 + tz.transition 1994, 3, :o3, 764730000 + tz.transition 1994, 9, :o2, 780454800 + tz.transition 1995, 3, :o3, 796179600 + tz.transition 1995, 9, :o2, 811904400 + tz.transition 1996, 3, :o3, 828234000 + tz.transition 1996, 10, :o2, 846378000 + tz.transition 1997, 3, :o3, 859683600 + tz.transition 1997, 10, :o2, 877827600 + tz.transition 1998, 3, :o3, 891133200 + tz.transition 1998, 10, :o2, 909277200 + tz.transition 1999, 3, :o3, 922582800 + tz.transition 1999, 10, :o2, 941331600 + tz.transition 2000, 3, :o3, 954032400 + tz.transition 2000, 10, :o2, 972781200 + tz.transition 2001, 3, :o3, 985482000 + tz.transition 2001, 10, :o2, 1004230800 + tz.transition 2002, 3, :o3, 1017536400 + tz.transition 2002, 10, :o2, 1035680400 + tz.transition 2003, 3, :o3, 1048986000 + tz.transition 2003, 10, :o2, 1067130000 + tz.transition 2004, 3, :o3, 1080435600 + tz.transition 2004, 10, :o2, 1099184400 + tz.transition 2005, 3, :o3, 1111885200 + tz.transition 2005, 10, :o2, 1130634000 + tz.transition 2006, 3, :o3, 1143334800 + tz.transition 2006, 10, :o2, 1162083600 + tz.transition 2007, 3, :o3, 1174784400 + tz.transition 2007, 10, :o2, 1193533200 + tz.transition 2008, 3, :o3, 1206838800 + tz.transition 2008, 10, :o2, 1224982800 + tz.transition 2009, 3, :o3, 1238288400 + tz.transition 2009, 10, :o2, 1256432400 + tz.transition 2010, 3, :o3, 1269738000 + tz.transition 2010, 10, :o2, 1288486800 + tz.transition 2011, 3, :o3, 1301187600 + tz.transition 2011, 10, :o2, 1319936400 + tz.transition 2012, 3, :o3, 1332637200 + tz.transition 2012, 10, :o2, 1351386000 + tz.transition 2013, 3, :o3, 1364691600 + tz.transition 2013, 10, :o2, 1382835600 + tz.transition 2014, 3, :o3, 1396141200 + tz.transition 2014, 10, :o2, 1414285200 + tz.transition 2015, 3, :o3, 1427590800 + tz.transition 2015, 10, :o2, 1445734800 + tz.transition 2016, 3, :o3, 1459040400 + tz.transition 2016, 10, :o2, 1477789200 + tz.transition 2017, 3, :o3, 1490490000 + tz.transition 2017, 10, :o2, 1509238800 + tz.transition 2018, 3, :o3, 1521939600 + tz.transition 2018, 10, :o2, 1540688400 + tz.transition 2019, 3, :o3, 1553994000 + tz.transition 2019, 10, :o2, 1572138000 + tz.transition 2020, 3, :o3, 1585443600 + tz.transition 2020, 10, :o2, 1603587600 + tz.transition 2021, 3, :o3, 1616893200 + tz.transition 2021, 10, :o2, 1635642000 + tz.transition 2022, 3, :o3, 1648342800 + tz.transition 2022, 10, :o2, 1667091600 + tz.transition 2023, 3, :o3, 1679792400 + tz.transition 2023, 10, :o2, 1698541200 + tz.transition 2024, 3, :o3, 1711846800 + tz.transition 2024, 10, :o2, 1729990800 + tz.transition 2025, 3, :o3, 1743296400 + tz.transition 2025, 10, :o2, 1761440400 + tz.transition 2026, 3, :o3, 1774746000 + tz.transition 2026, 10, :o2, 1792890000 + tz.transition 2027, 3, :o3, 1806195600 + tz.transition 2027, 10, :o2, 1824944400 + tz.transition 2028, 3, :o3, 1837645200 + tz.transition 2028, 10, :o2, 1856394000 + tz.transition 2029, 3, :o3, 1869094800 + tz.transition 2029, 10, :o2, 1887843600 + tz.transition 2030, 3, :o3, 1901149200 + tz.transition 2030, 10, :o2, 1919293200 + tz.transition 2031, 3, :o3, 1932598800 + tz.transition 2031, 10, :o2, 1950742800 + tz.transition 2032, 3, :o3, 1964048400 + tz.transition 2032, 10, :o2, 1982797200 + tz.transition 2033, 3, :o3, 1995498000 + tz.transition 2033, 10, :o2, 2014246800 + tz.transition 2034, 3, :o3, 2026947600 + tz.transition 2034, 10, :o2, 2045696400 + tz.transition 2035, 3, :o3, 2058397200 + tz.transition 2035, 10, :o2, 2077146000 + tz.transition 2036, 3, :o3, 2090451600 + tz.transition 2036, 10, :o2, 2108595600 + tz.transition 2037, 3, :o3, 2121901200 + tz.transition 2037, 10, :o2, 2140045200 + tz.transition 2038, 3, :o3, 59172253, 24 + tz.transition 2038, 10, :o2, 59177461, 24 + tz.transition 2039, 3, :o3, 59180989, 24 + tz.transition 2039, 10, :o2, 59186197, 24 + tz.transition 2040, 3, :o3, 59189725, 24 + tz.transition 2040, 10, :o2, 59194933, 24 + tz.transition 2041, 3, :o3, 59198629, 24 + tz.transition 2041, 10, :o2, 59203669, 24 + tz.transition 2042, 3, :o3, 59207365, 24 + tz.transition 2042, 10, :o2, 59212405, 24 + tz.transition 2043, 3, :o3, 59216101, 24 + tz.transition 2043, 10, :o2, 59221141, 24 + tz.transition 2044, 3, :o3, 59224837, 24 + tz.transition 2044, 10, :o2, 59230045, 24 + tz.transition 2045, 3, :o3, 59233573, 24 + tz.transition 2045, 10, :o2, 59238781, 24 + tz.transition 2046, 3, :o3, 59242309, 24 + tz.transition 2046, 10, :o2, 59247517, 24 + tz.transition 2047, 3, :o3, 59251213, 24 + tz.transition 2047, 10, :o2, 59256253, 24 + tz.transition 2048, 3, :o3, 59259949, 24 + tz.transition 2048, 10, :o2, 59264989, 24 + tz.transition 2049, 3, :o3, 59268685, 24 + tz.transition 2049, 10, :o2, 59273893, 24 + tz.transition 2050, 3, :o3, 59277421, 24 + tz.transition 2050, 10, :o2, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Istanbul.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Istanbul.rb new file mode 100644 index 0000000000..8306c47536 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Istanbul.rb @@ -0,0 +1,218 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Istanbul + include TimezoneDefinition + + timezone 'Europe/Istanbul' do |tz| + tz.offset :o0, 6952, 0, :LMT + tz.offset :o1, 7016, 0, :IMT + tz.offset :o2, 7200, 0, :EET + tz.offset :o3, 7200, 3600, :EEST + tz.offset :o4, 10800, 3600, :TRST + tz.offset :o5, 10800, 0, :TRT + + tz.transition 1879, 12, :o1, 26003326531, 10800 + tz.transition 1910, 9, :o2, 26124610523, 10800 + tz.transition 1916, 4, :o3, 29051813, 12 + tz.transition 1916, 9, :o2, 19369099, 8 + tz.transition 1920, 3, :o3, 29068937, 12 + tz.transition 1920, 10, :o2, 19380979, 8 + tz.transition 1921, 4, :o3, 29073389, 12 + tz.transition 1921, 10, :o2, 19383723, 8 + tz.transition 1922, 3, :o3, 29077673, 12 + tz.transition 1922, 10, :o2, 19386683, 8 + tz.transition 1924, 5, :o3, 29087021, 12 + tz.transition 1924, 9, :o2, 19392475, 8 + tz.transition 1925, 4, :o3, 29091257, 12 + tz.transition 1925, 9, :o2, 19395395, 8 + tz.transition 1940, 6, :o3, 29157725, 12 + tz.transition 1940, 10, :o2, 19439259, 8 + tz.transition 1940, 11, :o3, 29159573, 12 + tz.transition 1941, 9, :o2, 19442067, 8 + tz.transition 1942, 3, :o3, 29165405, 12 + tz.transition 1942, 10, :o2, 19445315, 8 + tz.transition 1945, 4, :o3, 29178569, 12 + tz.transition 1945, 10, :o2, 19453891, 8 + tz.transition 1946, 5, :o3, 29183669, 12 + tz.transition 1946, 9, :o2, 19456755, 8 + tz.transition 1947, 4, :o3, 29187545, 12 + tz.transition 1947, 10, :o2, 19459707, 8 + tz.transition 1948, 4, :o3, 29191913, 12 + tz.transition 1948, 10, :o2, 19462619, 8 + tz.transition 1949, 4, :o3, 29196197, 12 + tz.transition 1949, 10, :o2, 19465531, 8 + tz.transition 1950, 4, :o3, 29200685, 12 + tz.transition 1950, 10, :o2, 19468499, 8 + tz.transition 1951, 4, :o3, 29205101, 12 + tz.transition 1951, 10, :o2, 19471419, 8 + tz.transition 1962, 7, :o3, 29254325, 12 + tz.transition 1962, 10, :o2, 19503563, 8 + tz.transition 1964, 5, :o3, 29262365, 12 + tz.transition 1964, 9, :o2, 19509355, 8 + tz.transition 1970, 5, :o3, 10533600 + tz.transition 1970, 10, :o2, 23835600 + tz.transition 1971, 5, :o3, 41983200 + tz.transition 1971, 10, :o2, 55285200 + tz.transition 1972, 5, :o3, 74037600 + tz.transition 1972, 10, :o2, 87339600 + tz.transition 1973, 6, :o3, 107910000 + tz.transition 1973, 11, :o2, 121219200 + tz.transition 1974, 3, :o3, 133920000 + tz.transition 1974, 11, :o2, 152676000 + tz.transition 1975, 3, :o3, 165362400 + tz.transition 1975, 10, :o2, 183502800 + tz.transition 1976, 5, :o3, 202428000 + tz.transition 1976, 10, :o2, 215557200 + tz.transition 1977, 4, :o3, 228866400 + tz.transition 1977, 10, :o2, 245797200 + tz.transition 1978, 4, :o3, 260316000 + tz.transition 1978, 10, :o4, 277246800 + tz.transition 1979, 10, :o5, 308779200 + tz.transition 1980, 4, :o4, 323827200 + tz.transition 1980, 10, :o5, 340228800 + tz.transition 1981, 3, :o4, 354672000 + tz.transition 1981, 10, :o5, 371678400 + tz.transition 1982, 3, :o4, 386121600 + tz.transition 1982, 10, :o5, 403128000 + tz.transition 1983, 7, :o4, 428446800 + tz.transition 1983, 10, :o5, 433886400 + tz.transition 1985, 4, :o3, 482792400 + tz.transition 1985, 9, :o2, 496702800 + tz.transition 1986, 3, :o3, 512524800 + tz.transition 1986, 9, :o2, 528249600 + tz.transition 1987, 3, :o3, 543974400 + tz.transition 1987, 9, :o2, 559699200 + tz.transition 1988, 3, :o3, 575424000 + tz.transition 1988, 9, :o2, 591148800 + tz.transition 1989, 3, :o3, 606873600 + tz.transition 1989, 9, :o2, 622598400 + tz.transition 1990, 3, :o3, 638323200 + tz.transition 1990, 9, :o2, 654652800 + tz.transition 1991, 3, :o3, 670374000 + tz.transition 1991, 9, :o2, 686098800 + tz.transition 1992, 3, :o3, 701823600 + tz.transition 1992, 9, :o2, 717548400 + tz.transition 1993, 3, :o3, 733273200 + tz.transition 1993, 9, :o2, 748998000 + tz.transition 1994, 3, :o3, 764722800 + tz.transition 1994, 9, :o2, 780447600 + tz.transition 1995, 3, :o3, 796172400 + tz.transition 1995, 9, :o2, 811897200 + tz.transition 1996, 3, :o3, 828226800 + tz.transition 1996, 10, :o2, 846370800 + tz.transition 1997, 3, :o3, 859676400 + tz.transition 1997, 10, :o2, 877820400 + tz.transition 1998, 3, :o3, 891126000 + tz.transition 1998, 10, :o2, 909270000 + tz.transition 1999, 3, :o3, 922575600 + tz.transition 1999, 10, :o2, 941324400 + tz.transition 2000, 3, :o3, 954025200 + tz.transition 2000, 10, :o2, 972774000 + tz.transition 2001, 3, :o3, 985474800 + tz.transition 2001, 10, :o2, 1004223600 + tz.transition 2002, 3, :o3, 1017529200 + tz.transition 2002, 10, :o2, 1035673200 + tz.transition 2003, 3, :o3, 1048978800 + tz.transition 2003, 10, :o2, 1067122800 + tz.transition 2004, 3, :o3, 1080428400 + tz.transition 2004, 10, :o2, 1099177200 + tz.transition 2005, 3, :o3, 1111878000 + tz.transition 2005, 10, :o2, 1130626800 + tz.transition 2006, 3, :o3, 1143327600 + tz.transition 2006, 10, :o2, 1162076400 + tz.transition 2007, 3, :o3, 1174784400 + tz.transition 2007, 10, :o2, 1193533200 + tz.transition 2008, 3, :o3, 1206838800 + tz.transition 2008, 10, :o2, 1224982800 + tz.transition 2009, 3, :o3, 1238288400 + tz.transition 2009, 10, :o2, 1256432400 + tz.transition 2010, 3, :o3, 1269738000 + tz.transition 2010, 10, :o2, 1288486800 + tz.transition 2011, 3, :o3, 1301187600 + tz.transition 2011, 10, :o2, 1319936400 + tz.transition 2012, 3, :o3, 1332637200 + tz.transition 2012, 10, :o2, 1351386000 + tz.transition 2013, 3, :o3, 1364691600 + tz.transition 2013, 10, :o2, 1382835600 + tz.transition 2014, 3, :o3, 1396141200 + tz.transition 2014, 10, :o2, 1414285200 + tz.transition 2015, 3, :o3, 1427590800 + tz.transition 2015, 10, :o2, 1445734800 + tz.transition 2016, 3, :o3, 1459040400 + tz.transition 2016, 10, :o2, 1477789200 + tz.transition 2017, 3, :o3, 1490490000 + tz.transition 2017, 10, :o2, 1509238800 + tz.transition 2018, 3, :o3, 1521939600 + tz.transition 2018, 10, :o2, 1540688400 + tz.transition 2019, 3, :o3, 1553994000 + tz.transition 2019, 10, :o2, 1572138000 + tz.transition 2020, 3, :o3, 1585443600 + tz.transition 2020, 10, :o2, 1603587600 + tz.transition 2021, 3, :o3, 1616893200 + tz.transition 2021, 10, :o2, 1635642000 + tz.transition 2022, 3, :o3, 1648342800 + tz.transition 2022, 10, :o2, 1667091600 + tz.transition 2023, 3, :o3, 1679792400 + tz.transition 2023, 10, :o2, 1698541200 + tz.transition 2024, 3, :o3, 1711846800 + tz.transition 2024, 10, :o2, 1729990800 + tz.transition 2025, 3, :o3, 1743296400 + tz.transition 2025, 10, :o2, 1761440400 + tz.transition 2026, 3, :o3, 1774746000 + tz.transition 2026, 10, :o2, 1792890000 + tz.transition 2027, 3, :o3, 1806195600 + tz.transition 2027, 10, :o2, 1824944400 + tz.transition 2028, 3, :o3, 1837645200 + tz.transition 2028, 10, :o2, 1856394000 + tz.transition 2029, 3, :o3, 1869094800 + tz.transition 2029, 10, :o2, 1887843600 + tz.transition 2030, 3, :o3, 1901149200 + tz.transition 2030, 10, :o2, 1919293200 + tz.transition 2031, 3, :o3, 1932598800 + tz.transition 2031, 10, :o2, 1950742800 + tz.transition 2032, 3, :o3, 1964048400 + tz.transition 2032, 10, :o2, 1982797200 + tz.transition 2033, 3, :o3, 1995498000 + tz.transition 2033, 10, :o2, 2014246800 + tz.transition 2034, 3, :o3, 2026947600 + tz.transition 2034, 10, :o2, 2045696400 + tz.transition 2035, 3, :o3, 2058397200 + tz.transition 2035, 10, :o2, 2077146000 + tz.transition 2036, 3, :o3, 2090451600 + tz.transition 2036, 10, :o2, 2108595600 + tz.transition 2037, 3, :o3, 2121901200 + tz.transition 2037, 10, :o2, 2140045200 + tz.transition 2038, 3, :o3, 59172253, 24 + tz.transition 2038, 10, :o2, 59177461, 24 + tz.transition 2039, 3, :o3, 59180989, 24 + tz.transition 2039, 10, :o2, 59186197, 24 + tz.transition 2040, 3, :o3, 59189725, 24 + tz.transition 2040, 10, :o2, 59194933, 24 + tz.transition 2041, 3, :o3, 59198629, 24 + tz.transition 2041, 10, :o2, 59203669, 24 + tz.transition 2042, 3, :o3, 59207365, 24 + tz.transition 2042, 10, :o2, 59212405, 24 + tz.transition 2043, 3, :o3, 59216101, 24 + tz.transition 2043, 10, :o2, 59221141, 24 + tz.transition 2044, 3, :o3, 59224837, 24 + tz.transition 2044, 10, :o2, 59230045, 24 + tz.transition 2045, 3, :o3, 59233573, 24 + tz.transition 2045, 10, :o2, 59238781, 24 + tz.transition 2046, 3, :o3, 59242309, 24 + tz.transition 2046, 10, :o2, 59247517, 24 + tz.transition 2047, 3, :o3, 59251213, 24 + tz.transition 2047, 10, :o2, 59256253, 24 + tz.transition 2048, 3, :o3, 59259949, 24 + tz.transition 2048, 10, :o2, 59264989, 24 + tz.transition 2049, 3, :o3, 59268685, 24 + tz.transition 2049, 10, :o2, 59273893, 24 + tz.transition 2050, 3, :o3, 59277421, 24 + tz.transition 2050, 10, :o2, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Kiev.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Kiev.rb new file mode 100644 index 0000000000..513d3308be --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Kiev.rb @@ -0,0 +1,168 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Kiev + include TimezoneDefinition + + timezone 'Europe/Kiev' do |tz| + tz.offset :o0, 7324, 0, :LMT + tz.offset :o1, 7324, 0, :KMT + tz.offset :o2, 7200, 0, :EET + tz.offset :o3, 10800, 0, :MSK + tz.offset :o4, 3600, 3600, :CEST + tz.offset :o5, 3600, 0, :CET + tz.offset :o6, 10800, 3600, :MSD + tz.offset :o7, 7200, 3600, :EEST + + tz.transition 1879, 12, :o1, 52006652969, 21600 + tz.transition 1924, 5, :o2, 52356400169, 21600 + tz.transition 1930, 6, :o3, 29113781, 12 + tz.transition 1941, 9, :o4, 19442059, 8 + tz.transition 1942, 11, :o5, 58335973, 24 + tz.transition 1943, 3, :o4, 58339501, 24 + tz.transition 1943, 10, :o5, 58344037, 24 + tz.transition 1943, 11, :o3, 58344827, 24 + tz.transition 1981, 3, :o6, 354920400 + tz.transition 1981, 9, :o3, 370728000 + tz.transition 1982, 3, :o6, 386456400 + tz.transition 1982, 9, :o3, 402264000 + tz.transition 1983, 3, :o6, 417992400 + tz.transition 1983, 9, :o3, 433800000 + tz.transition 1984, 3, :o6, 449614800 + tz.transition 1984, 9, :o3, 465346800 + tz.transition 1985, 3, :o6, 481071600 + tz.transition 1985, 9, :o3, 496796400 + tz.transition 1986, 3, :o6, 512521200 + tz.transition 1986, 9, :o3, 528246000 + tz.transition 1987, 3, :o6, 543970800 + tz.transition 1987, 9, :o3, 559695600 + tz.transition 1988, 3, :o6, 575420400 + tz.transition 1988, 9, :o3, 591145200 + tz.transition 1989, 3, :o6, 606870000 + tz.transition 1989, 9, :o3, 622594800 + tz.transition 1990, 6, :o2, 646786800 + tz.transition 1992, 3, :o7, 701820000 + tz.transition 1992, 9, :o2, 717541200 + tz.transition 1993, 3, :o7, 733269600 + tz.transition 1993, 9, :o2, 748990800 + tz.transition 1994, 3, :o7, 764719200 + tz.transition 1994, 9, :o2, 780440400 + tz.transition 1995, 3, :o7, 796179600 + tz.transition 1995, 9, :o2, 811904400 + tz.transition 1996, 3, :o7, 828234000 + tz.transition 1996, 10, :o2, 846378000 + tz.transition 1997, 3, :o7, 859683600 + tz.transition 1997, 10, :o2, 877827600 + tz.transition 1998, 3, :o7, 891133200 + tz.transition 1998, 10, :o2, 909277200 + tz.transition 1999, 3, :o7, 922582800 + tz.transition 1999, 10, :o2, 941331600 + tz.transition 2000, 3, :o7, 954032400 + tz.transition 2000, 10, :o2, 972781200 + tz.transition 2001, 3, :o7, 985482000 + tz.transition 2001, 10, :o2, 1004230800 + tz.transition 2002, 3, :o7, 1017536400 + tz.transition 2002, 10, :o2, 1035680400 + tz.transition 2003, 3, :o7, 1048986000 + tz.transition 2003, 10, :o2, 1067130000 + tz.transition 2004, 3, :o7, 1080435600 + tz.transition 2004, 10, :o2, 1099184400 + tz.transition 2005, 3, :o7, 1111885200 + tz.transition 2005, 10, :o2, 1130634000 + tz.transition 2006, 3, :o7, 1143334800 + tz.transition 2006, 10, :o2, 1162083600 + tz.transition 2007, 3, :o7, 1174784400 + tz.transition 2007, 10, :o2, 1193533200 + tz.transition 2008, 3, :o7, 1206838800 + tz.transition 2008, 10, :o2, 1224982800 + tz.transition 2009, 3, :o7, 1238288400 + tz.transition 2009, 10, :o2, 1256432400 + tz.transition 2010, 3, :o7, 1269738000 + tz.transition 2010, 10, :o2, 1288486800 + tz.transition 2011, 3, :o7, 1301187600 + tz.transition 2011, 10, :o2, 1319936400 + tz.transition 2012, 3, :o7, 1332637200 + tz.transition 2012, 10, :o2, 1351386000 + tz.transition 2013, 3, :o7, 1364691600 + tz.transition 2013, 10, :o2, 1382835600 + tz.transition 2014, 3, :o7, 1396141200 + tz.transition 2014, 10, :o2, 1414285200 + tz.transition 2015, 3, :o7, 1427590800 + tz.transition 2015, 10, :o2, 1445734800 + tz.transition 2016, 3, :o7, 1459040400 + tz.transition 2016, 10, :o2, 1477789200 + tz.transition 2017, 3, :o7, 1490490000 + tz.transition 2017, 10, :o2, 1509238800 + tz.transition 2018, 3, :o7, 1521939600 + tz.transition 2018, 10, :o2, 1540688400 + tz.transition 2019, 3, :o7, 1553994000 + tz.transition 2019, 10, :o2, 1572138000 + tz.transition 2020, 3, :o7, 1585443600 + tz.transition 2020, 10, :o2, 1603587600 + tz.transition 2021, 3, :o7, 1616893200 + tz.transition 2021, 10, :o2, 1635642000 + tz.transition 2022, 3, :o7, 1648342800 + tz.transition 2022, 10, :o2, 1667091600 + tz.transition 2023, 3, :o7, 1679792400 + tz.transition 2023, 10, :o2, 1698541200 + tz.transition 2024, 3, :o7, 1711846800 + tz.transition 2024, 10, :o2, 1729990800 + tz.transition 2025, 3, :o7, 1743296400 + tz.transition 2025, 10, :o2, 1761440400 + tz.transition 2026, 3, :o7, 1774746000 + tz.transition 2026, 10, :o2, 1792890000 + tz.transition 2027, 3, :o7, 1806195600 + tz.transition 2027, 10, :o2, 1824944400 + tz.transition 2028, 3, :o7, 1837645200 + tz.transition 2028, 10, :o2, 1856394000 + tz.transition 2029, 3, :o7, 1869094800 + tz.transition 2029, 10, :o2, 1887843600 + tz.transition 2030, 3, :o7, 1901149200 + tz.transition 2030, 10, :o2, 1919293200 + tz.transition 2031, 3, :o7, 1932598800 + tz.transition 2031, 10, :o2, 1950742800 + tz.transition 2032, 3, :o7, 1964048400 + tz.transition 2032, 10, :o2, 1982797200 + tz.transition 2033, 3, :o7, 1995498000 + tz.transition 2033, 10, :o2, 2014246800 + tz.transition 2034, 3, :o7, 2026947600 + tz.transition 2034, 10, :o2, 2045696400 + tz.transition 2035, 3, :o7, 2058397200 + tz.transition 2035, 10, :o2, 2077146000 + tz.transition 2036, 3, :o7, 2090451600 + tz.transition 2036, 10, :o2, 2108595600 + tz.transition 2037, 3, :o7, 2121901200 + tz.transition 2037, 10, :o2, 2140045200 + tz.transition 2038, 3, :o7, 59172253, 24 + tz.transition 2038, 10, :o2, 59177461, 24 + tz.transition 2039, 3, :o7, 59180989, 24 + tz.transition 2039, 10, :o2, 59186197, 24 + tz.transition 2040, 3, :o7, 59189725, 24 + tz.transition 2040, 10, :o2, 59194933, 24 + tz.transition 2041, 3, :o7, 59198629, 24 + tz.transition 2041, 10, :o2, 59203669, 24 + tz.transition 2042, 3, :o7, 59207365, 24 + tz.transition 2042, 10, :o2, 59212405, 24 + tz.transition 2043, 3, :o7, 59216101, 24 + tz.transition 2043, 10, :o2, 59221141, 24 + tz.transition 2044, 3, :o7, 59224837, 24 + tz.transition 2044, 10, :o2, 59230045, 24 + tz.transition 2045, 3, :o7, 59233573, 24 + tz.transition 2045, 10, :o2, 59238781, 24 + tz.transition 2046, 3, :o7, 59242309, 24 + tz.transition 2046, 10, :o2, 59247517, 24 + tz.transition 2047, 3, :o7, 59251213, 24 + tz.transition 2047, 10, :o2, 59256253, 24 + tz.transition 2048, 3, :o7, 59259949, 24 + tz.transition 2048, 10, :o2, 59264989, 24 + tz.transition 2049, 3, :o7, 59268685, 24 + tz.transition 2049, 10, :o2, 59273893, 24 + tz.transition 2050, 3, :o7, 59277421, 24 + tz.transition 2050, 10, :o2, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Lisbon.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Lisbon.rb new file mode 100644 index 0000000000..1c6d2a3d30 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Lisbon.rb @@ -0,0 +1,268 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Lisbon + include TimezoneDefinition + + timezone 'Europe/Lisbon' do |tz| + tz.offset :o0, -2192, 0, :LMT + tz.offset :o1, 0, 0, :WET + tz.offset :o2, 0, 3600, :WEST + tz.offset :o3, 0, 7200, :WEMT + tz.offset :o4, 3600, 0, :CET + tz.offset :o5, 3600, 3600, :CEST + + tz.transition 1912, 1, :o1, 13064773637, 5400 + tz.transition 1916, 6, :o2, 58104779, 24 + tz.transition 1916, 11, :o1, 4842337, 2 + tz.transition 1917, 2, :o2, 58110923, 24 + tz.transition 1917, 10, :o1, 58116395, 24 + tz.transition 1918, 3, :o2, 58119707, 24 + tz.transition 1918, 10, :o1, 58125155, 24 + tz.transition 1919, 2, :o2, 58128443, 24 + tz.transition 1919, 10, :o1, 58133915, 24 + tz.transition 1920, 2, :o2, 58137227, 24 + tz.transition 1920, 10, :o1, 58142699, 24 + tz.transition 1921, 2, :o2, 58145987, 24 + tz.transition 1921, 10, :o1, 58151459, 24 + tz.transition 1924, 4, :o2, 58173419, 24 + tz.transition 1924, 10, :o1, 58177763, 24 + tz.transition 1926, 4, :o2, 58190963, 24 + tz.transition 1926, 10, :o1, 58194995, 24 + tz.transition 1927, 4, :o2, 58199531, 24 + tz.transition 1927, 10, :o1, 58203731, 24 + tz.transition 1928, 4, :o2, 58208435, 24 + tz.transition 1928, 10, :o1, 58212635, 24 + tz.transition 1929, 4, :o2, 58217339, 24 + tz.transition 1929, 10, :o1, 58221371, 24 + tz.transition 1931, 4, :o2, 58234811, 24 + tz.transition 1931, 10, :o1, 58238843, 24 + tz.transition 1932, 4, :o2, 58243211, 24 + tz.transition 1932, 10, :o1, 58247579, 24 + tz.transition 1934, 4, :o2, 58260851, 24 + tz.transition 1934, 10, :o1, 58265219, 24 + tz.transition 1935, 3, :o2, 58269419, 24 + tz.transition 1935, 10, :o1, 58273955, 24 + tz.transition 1936, 4, :o2, 58278659, 24 + tz.transition 1936, 10, :o1, 58282691, 24 + tz.transition 1937, 4, :o2, 58287059, 24 + tz.transition 1937, 10, :o1, 58291427, 24 + tz.transition 1938, 3, :o2, 58295627, 24 + tz.transition 1938, 10, :o1, 58300163, 24 + tz.transition 1939, 4, :o2, 58304867, 24 + tz.transition 1939, 11, :o1, 58310075, 24 + tz.transition 1940, 2, :o2, 58312427, 24 + tz.transition 1940, 10, :o1, 58317803, 24 + tz.transition 1941, 4, :o2, 58322171, 24 + tz.transition 1941, 10, :o1, 58326563, 24 + tz.transition 1942, 3, :o2, 58330403, 24 + tz.transition 1942, 4, :o3, 29165705, 12 + tz.transition 1942, 8, :o2, 29167049, 12 + tz.transition 1942, 10, :o1, 58335779, 24 + tz.transition 1943, 3, :o2, 58339139, 24 + tz.transition 1943, 4, :o3, 29169989, 12 + tz.transition 1943, 8, :o2, 29171585, 12 + tz.transition 1943, 10, :o1, 58344683, 24 + tz.transition 1944, 3, :o2, 58347875, 24 + tz.transition 1944, 4, :o3, 29174441, 12 + tz.transition 1944, 8, :o2, 29175953, 12 + tz.transition 1944, 10, :o1, 58353419, 24 + tz.transition 1945, 3, :o2, 58356611, 24 + tz.transition 1945, 4, :o3, 29178809, 12 + tz.transition 1945, 8, :o2, 29180321, 12 + tz.transition 1945, 10, :o1, 58362155, 24 + tz.transition 1946, 4, :o2, 58366019, 24 + tz.transition 1946, 10, :o1, 58370387, 24 + tz.transition 1947, 4, :o2, 29187379, 12 + tz.transition 1947, 10, :o1, 29189563, 12 + tz.transition 1948, 4, :o2, 29191747, 12 + tz.transition 1948, 10, :o1, 29193931, 12 + tz.transition 1949, 4, :o2, 29196115, 12 + tz.transition 1949, 10, :o1, 29198299, 12 + tz.transition 1951, 4, :o2, 29204851, 12 + tz.transition 1951, 10, :o1, 29207119, 12 + tz.transition 1952, 4, :o2, 29209303, 12 + tz.transition 1952, 10, :o1, 29211487, 12 + tz.transition 1953, 4, :o2, 29213671, 12 + tz.transition 1953, 10, :o1, 29215855, 12 + tz.transition 1954, 4, :o2, 29218039, 12 + tz.transition 1954, 10, :o1, 29220223, 12 + tz.transition 1955, 4, :o2, 29222407, 12 + tz.transition 1955, 10, :o1, 29224591, 12 + tz.transition 1956, 4, :o2, 29226775, 12 + tz.transition 1956, 10, :o1, 29229043, 12 + tz.transition 1957, 4, :o2, 29231227, 12 + tz.transition 1957, 10, :o1, 29233411, 12 + tz.transition 1958, 4, :o2, 29235595, 12 + tz.transition 1958, 10, :o1, 29237779, 12 + tz.transition 1959, 4, :o2, 29239963, 12 + tz.transition 1959, 10, :o1, 29242147, 12 + tz.transition 1960, 4, :o2, 29244331, 12 + tz.transition 1960, 10, :o1, 29246515, 12 + tz.transition 1961, 4, :o2, 29248699, 12 + tz.transition 1961, 10, :o1, 29250883, 12 + tz.transition 1962, 4, :o2, 29253067, 12 + tz.transition 1962, 10, :o1, 29255335, 12 + tz.transition 1963, 4, :o2, 29257519, 12 + tz.transition 1963, 10, :o1, 29259703, 12 + tz.transition 1964, 4, :o2, 29261887, 12 + tz.transition 1964, 10, :o1, 29264071, 12 + tz.transition 1965, 4, :o2, 29266255, 12 + tz.transition 1965, 10, :o1, 29268439, 12 + tz.transition 1966, 4, :o4, 29270623, 12 + tz.transition 1976, 9, :o1, 212544000 + tz.transition 1977, 3, :o2, 228268800 + tz.transition 1977, 9, :o1, 243993600 + tz.transition 1978, 4, :o2, 260323200 + tz.transition 1978, 10, :o1, 276048000 + tz.transition 1979, 4, :o2, 291772800 + tz.transition 1979, 9, :o1, 307501200 + tz.transition 1980, 3, :o2, 323222400 + tz.transition 1980, 9, :o1, 338950800 + tz.transition 1981, 3, :o2, 354675600 + tz.transition 1981, 9, :o1, 370400400 + tz.transition 1982, 3, :o2, 386125200 + tz.transition 1982, 9, :o1, 401850000 + tz.transition 1983, 3, :o2, 417578400 + tz.transition 1983, 9, :o1, 433299600 + tz.transition 1984, 3, :o2, 449024400 + tz.transition 1984, 9, :o1, 465354000 + tz.transition 1985, 3, :o2, 481078800 + tz.transition 1985, 9, :o1, 496803600 + tz.transition 1986, 3, :o2, 512528400 + tz.transition 1986, 9, :o1, 528253200 + tz.transition 1987, 3, :o2, 543978000 + tz.transition 1987, 9, :o1, 559702800 + tz.transition 1988, 3, :o2, 575427600 + tz.transition 1988, 9, :o1, 591152400 + tz.transition 1989, 3, :o2, 606877200 + tz.transition 1989, 9, :o1, 622602000 + tz.transition 1990, 3, :o2, 638326800 + tz.transition 1990, 9, :o1, 654656400 + tz.transition 1991, 3, :o2, 670381200 + tz.transition 1991, 9, :o1, 686106000 + tz.transition 1992, 3, :o2, 701830800 + tz.transition 1992, 9, :o4, 717555600 + tz.transition 1993, 3, :o5, 733280400 + tz.transition 1993, 9, :o4, 749005200 + tz.transition 1994, 3, :o5, 764730000 + tz.transition 1994, 9, :o4, 780454800 + tz.transition 1995, 3, :o5, 796179600 + tz.transition 1995, 9, :o4, 811904400 + tz.transition 1996, 3, :o2, 828234000 + tz.transition 1996, 10, :o1, 846378000 + tz.transition 1997, 3, :o2, 859683600 + tz.transition 1997, 10, :o1, 877827600 + tz.transition 1998, 3, :o2, 891133200 + tz.transition 1998, 10, :o1, 909277200 + tz.transition 1999, 3, :o2, 922582800 + tz.transition 1999, 10, :o1, 941331600 + tz.transition 2000, 3, :o2, 954032400 + tz.transition 2000, 10, :o1, 972781200 + tz.transition 2001, 3, :o2, 985482000 + tz.transition 2001, 10, :o1, 1004230800 + tz.transition 2002, 3, :o2, 1017536400 + tz.transition 2002, 10, :o1, 1035680400 + tz.transition 2003, 3, :o2, 1048986000 + tz.transition 2003, 10, :o1, 1067130000 + tz.transition 2004, 3, :o2, 1080435600 + tz.transition 2004, 10, :o1, 1099184400 + tz.transition 2005, 3, :o2, 1111885200 + tz.transition 2005, 10, :o1, 1130634000 + tz.transition 2006, 3, :o2, 1143334800 + tz.transition 2006, 10, :o1, 1162083600 + tz.transition 2007, 3, :o2, 1174784400 + tz.transition 2007, 10, :o1, 1193533200 + tz.transition 2008, 3, :o2, 1206838800 + tz.transition 2008, 10, :o1, 1224982800 + tz.transition 2009, 3, :o2, 1238288400 + tz.transition 2009, 10, :o1, 1256432400 + tz.transition 2010, 3, :o2, 1269738000 + tz.transition 2010, 10, :o1, 1288486800 + tz.transition 2011, 3, :o2, 1301187600 + tz.transition 2011, 10, :o1, 1319936400 + tz.transition 2012, 3, :o2, 1332637200 + tz.transition 2012, 10, :o1, 1351386000 + tz.transition 2013, 3, :o2, 1364691600 + tz.transition 2013, 10, :o1, 1382835600 + tz.transition 2014, 3, :o2, 1396141200 + tz.transition 2014, 10, :o1, 1414285200 + tz.transition 2015, 3, :o2, 1427590800 + tz.transition 2015, 10, :o1, 1445734800 + tz.transition 2016, 3, :o2, 1459040400 + tz.transition 2016, 10, :o1, 1477789200 + tz.transition 2017, 3, :o2, 1490490000 + tz.transition 2017, 10, :o1, 1509238800 + tz.transition 2018, 3, :o2, 1521939600 + tz.transition 2018, 10, :o1, 1540688400 + tz.transition 2019, 3, :o2, 1553994000 + tz.transition 2019, 10, :o1, 1572138000 + tz.transition 2020, 3, :o2, 1585443600 + tz.transition 2020, 10, :o1, 1603587600 + tz.transition 2021, 3, :o2, 1616893200 + tz.transition 2021, 10, :o1, 1635642000 + tz.transition 2022, 3, :o2, 1648342800 + tz.transition 2022, 10, :o1, 1667091600 + tz.transition 2023, 3, :o2, 1679792400 + tz.transition 2023, 10, :o1, 1698541200 + tz.transition 2024, 3, :o2, 1711846800 + tz.transition 2024, 10, :o1, 1729990800 + tz.transition 2025, 3, :o2, 1743296400 + tz.transition 2025, 10, :o1, 1761440400 + tz.transition 2026, 3, :o2, 1774746000 + tz.transition 2026, 10, :o1, 1792890000 + tz.transition 2027, 3, :o2, 1806195600 + tz.transition 2027, 10, :o1, 1824944400 + tz.transition 2028, 3, :o2, 1837645200 + tz.transition 2028, 10, :o1, 1856394000 + tz.transition 2029, 3, :o2, 1869094800 + tz.transition 2029, 10, :o1, 1887843600 + tz.transition 2030, 3, :o2, 1901149200 + tz.transition 2030, 10, :o1, 1919293200 + tz.transition 2031, 3, :o2, 1932598800 + tz.transition 2031, 10, :o1, 1950742800 + tz.transition 2032, 3, :o2, 1964048400 + tz.transition 2032, 10, :o1, 1982797200 + tz.transition 2033, 3, :o2, 1995498000 + tz.transition 2033, 10, :o1, 2014246800 + tz.transition 2034, 3, :o2, 2026947600 + tz.transition 2034, 10, :o1, 2045696400 + tz.transition 2035, 3, :o2, 2058397200 + tz.transition 2035, 10, :o1, 2077146000 + tz.transition 2036, 3, :o2, 2090451600 + tz.transition 2036, 10, :o1, 2108595600 + tz.transition 2037, 3, :o2, 2121901200 + tz.transition 2037, 10, :o1, 2140045200 + tz.transition 2038, 3, :o2, 59172253, 24 + tz.transition 2038, 10, :o1, 59177461, 24 + tz.transition 2039, 3, :o2, 59180989, 24 + tz.transition 2039, 10, :o1, 59186197, 24 + tz.transition 2040, 3, :o2, 59189725, 24 + tz.transition 2040, 10, :o1, 59194933, 24 + tz.transition 2041, 3, :o2, 59198629, 24 + tz.transition 2041, 10, :o1, 59203669, 24 + tz.transition 2042, 3, :o2, 59207365, 24 + tz.transition 2042, 10, :o1, 59212405, 24 + tz.transition 2043, 3, :o2, 59216101, 24 + tz.transition 2043, 10, :o1, 59221141, 24 + tz.transition 2044, 3, :o2, 59224837, 24 + tz.transition 2044, 10, :o1, 59230045, 24 + tz.transition 2045, 3, :o2, 59233573, 24 + tz.transition 2045, 10, :o1, 59238781, 24 + tz.transition 2046, 3, :o2, 59242309, 24 + tz.transition 2046, 10, :o1, 59247517, 24 + tz.transition 2047, 3, :o2, 59251213, 24 + tz.transition 2047, 10, :o1, 59256253, 24 + tz.transition 2048, 3, :o2, 59259949, 24 + tz.transition 2048, 10, :o1, 59264989, 24 + tz.transition 2049, 3, :o2, 59268685, 24 + tz.transition 2049, 10, :o1, 59273893, 24 + tz.transition 2050, 3, :o2, 59277421, 24 + tz.transition 2050, 10, :o1, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Ljubljana.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Ljubljana.rb new file mode 100644 index 0000000000..a9828e6ef8 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Ljubljana.rb @@ -0,0 +1,13 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Ljubljana + include TimezoneDefinition + + linked_timezone 'Europe/Ljubljana', 'Europe/Belgrade' + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/London.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/London.rb new file mode 100644 index 0000000000..64ce41e900 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/London.rb @@ -0,0 +1,288 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module London + include TimezoneDefinition + + timezone 'Europe/London' do |tz| + tz.offset :o0, -75, 0, :LMT + tz.offset :o1, 0, 0, :GMT + tz.offset :o2, 0, 3600, :BST + tz.offset :o3, 0, 7200, :BDST + tz.offset :o4, 3600, 0, :BST + + tz.transition 1847, 12, :o1, 2760187969, 1152 + tz.transition 1916, 5, :o2, 29052055, 12 + tz.transition 1916, 10, :o1, 29053651, 12 + tz.transition 1917, 4, :o2, 29055919, 12 + tz.transition 1917, 9, :o1, 29057863, 12 + tz.transition 1918, 3, :o2, 29060119, 12 + tz.transition 1918, 9, :o1, 29062399, 12 + tz.transition 1919, 3, :o2, 29064571, 12 + tz.transition 1919, 9, :o1, 29066767, 12 + tz.transition 1920, 3, :o2, 29068939, 12 + tz.transition 1920, 10, :o1, 29071471, 12 + tz.transition 1921, 4, :o2, 29073391, 12 + tz.transition 1921, 10, :o1, 29075587, 12 + tz.transition 1922, 3, :o2, 29077675, 12 + tz.transition 1922, 10, :o1, 29080027, 12 + tz.transition 1923, 4, :o2, 29082379, 12 + tz.transition 1923, 9, :o1, 29084143, 12 + tz.transition 1924, 4, :o2, 29086663, 12 + tz.transition 1924, 9, :o1, 29088595, 12 + tz.transition 1925, 4, :o2, 29091115, 12 + tz.transition 1925, 10, :o1, 29093131, 12 + tz.transition 1926, 4, :o2, 29095483, 12 + tz.transition 1926, 10, :o1, 29097499, 12 + tz.transition 1927, 4, :o2, 29099767, 12 + tz.transition 1927, 10, :o1, 29101867, 12 + tz.transition 1928, 4, :o2, 29104303, 12 + tz.transition 1928, 10, :o1, 29106319, 12 + tz.transition 1929, 4, :o2, 29108671, 12 + tz.transition 1929, 10, :o1, 29110687, 12 + tz.transition 1930, 4, :o2, 29112955, 12 + tz.transition 1930, 10, :o1, 29115055, 12 + tz.transition 1931, 4, :o2, 29117407, 12 + tz.transition 1931, 10, :o1, 29119423, 12 + tz.transition 1932, 4, :o2, 29121775, 12 + tz.transition 1932, 10, :o1, 29123791, 12 + tz.transition 1933, 4, :o2, 29126059, 12 + tz.transition 1933, 10, :o1, 29128243, 12 + tz.transition 1934, 4, :o2, 29130595, 12 + tz.transition 1934, 10, :o1, 29132611, 12 + tz.transition 1935, 4, :o2, 29134879, 12 + tz.transition 1935, 10, :o1, 29136979, 12 + tz.transition 1936, 4, :o2, 29139331, 12 + tz.transition 1936, 10, :o1, 29141347, 12 + tz.transition 1937, 4, :o2, 29143699, 12 + tz.transition 1937, 10, :o1, 29145715, 12 + tz.transition 1938, 4, :o2, 29147983, 12 + tz.transition 1938, 10, :o1, 29150083, 12 + tz.transition 1939, 4, :o2, 29152435, 12 + tz.transition 1939, 11, :o1, 29155039, 12 + tz.transition 1940, 2, :o2, 29156215, 12 + tz.transition 1941, 5, :o3, 58322845, 24 + tz.transition 1941, 8, :o2, 58325197, 24 + tz.transition 1942, 4, :o3, 58330909, 24 + tz.transition 1942, 8, :o2, 58333933, 24 + tz.transition 1943, 4, :o3, 58339645, 24 + tz.transition 1943, 8, :o2, 58342837, 24 + tz.transition 1944, 4, :o3, 58348381, 24 + tz.transition 1944, 9, :o2, 58352413, 24 + tz.transition 1945, 4, :o3, 58357141, 24 + tz.transition 1945, 7, :o2, 58359637, 24 + tz.transition 1945, 10, :o1, 29180827, 12 + tz.transition 1946, 4, :o2, 29183095, 12 + tz.transition 1946, 10, :o1, 29185195, 12 + tz.transition 1947, 3, :o2, 29187127, 12 + tz.transition 1947, 4, :o3, 58374925, 24 + tz.transition 1947, 8, :o2, 58377781, 24 + tz.transition 1947, 11, :o1, 29189899, 12 + tz.transition 1948, 3, :o2, 29191495, 12 + tz.transition 1948, 10, :o1, 29194267, 12 + tz.transition 1949, 4, :o2, 29196115, 12 + tz.transition 1949, 10, :o1, 29198635, 12 + tz.transition 1950, 4, :o2, 29200651, 12 + tz.transition 1950, 10, :o1, 29202919, 12 + tz.transition 1951, 4, :o2, 29205019, 12 + tz.transition 1951, 10, :o1, 29207287, 12 + tz.transition 1952, 4, :o2, 29209471, 12 + tz.transition 1952, 10, :o1, 29211739, 12 + tz.transition 1953, 4, :o2, 29213839, 12 + tz.transition 1953, 10, :o1, 29215855, 12 + tz.transition 1954, 4, :o2, 29218123, 12 + tz.transition 1954, 10, :o1, 29220223, 12 + tz.transition 1955, 4, :o2, 29222575, 12 + tz.transition 1955, 10, :o1, 29224591, 12 + tz.transition 1956, 4, :o2, 29227027, 12 + tz.transition 1956, 10, :o1, 29229043, 12 + tz.transition 1957, 4, :o2, 29231311, 12 + tz.transition 1957, 10, :o1, 29233411, 12 + tz.transition 1958, 4, :o2, 29235763, 12 + tz.transition 1958, 10, :o1, 29237779, 12 + tz.transition 1959, 4, :o2, 29240131, 12 + tz.transition 1959, 10, :o1, 29242147, 12 + tz.transition 1960, 4, :o2, 29244415, 12 + tz.transition 1960, 10, :o1, 29246515, 12 + tz.transition 1961, 3, :o2, 29248615, 12 + tz.transition 1961, 10, :o1, 29251219, 12 + tz.transition 1962, 3, :o2, 29252983, 12 + tz.transition 1962, 10, :o1, 29255587, 12 + tz.transition 1963, 3, :o2, 29257435, 12 + tz.transition 1963, 10, :o1, 29259955, 12 + tz.transition 1964, 3, :o2, 29261719, 12 + tz.transition 1964, 10, :o1, 29264323, 12 + tz.transition 1965, 3, :o2, 29266087, 12 + tz.transition 1965, 10, :o1, 29268691, 12 + tz.transition 1966, 3, :o2, 29270455, 12 + tz.transition 1966, 10, :o1, 29273059, 12 + tz.transition 1967, 3, :o2, 29274823, 12 + tz.transition 1967, 10, :o1, 29277511, 12 + tz.transition 1968, 2, :o2, 29278855, 12 + tz.transition 1968, 10, :o4, 58563755, 24 + tz.transition 1971, 10, :o1, 57722400 + tz.transition 1972, 3, :o2, 69818400 + tz.transition 1972, 10, :o1, 89172000 + tz.transition 1973, 3, :o2, 101268000 + tz.transition 1973, 10, :o1, 120621600 + tz.transition 1974, 3, :o2, 132717600 + tz.transition 1974, 10, :o1, 152071200 + tz.transition 1975, 3, :o2, 164167200 + tz.transition 1975, 10, :o1, 183520800 + tz.transition 1976, 3, :o2, 196221600 + tz.transition 1976, 10, :o1, 214970400 + tz.transition 1977, 3, :o2, 227671200 + tz.transition 1977, 10, :o1, 246420000 + tz.transition 1978, 3, :o2, 259120800 + tz.transition 1978, 10, :o1, 278474400 + tz.transition 1979, 3, :o2, 290570400 + tz.transition 1979, 10, :o1, 309924000 + tz.transition 1980, 3, :o2, 322020000 + tz.transition 1980, 10, :o1, 341373600 + tz.transition 1981, 3, :o2, 354675600 + tz.transition 1981, 10, :o1, 372819600 + tz.transition 1982, 3, :o2, 386125200 + tz.transition 1982, 10, :o1, 404269200 + tz.transition 1983, 3, :o2, 417574800 + tz.transition 1983, 10, :o1, 435718800 + tz.transition 1984, 3, :o2, 449024400 + tz.transition 1984, 10, :o1, 467773200 + tz.transition 1985, 3, :o2, 481078800 + tz.transition 1985, 10, :o1, 499222800 + tz.transition 1986, 3, :o2, 512528400 + tz.transition 1986, 10, :o1, 530672400 + tz.transition 1987, 3, :o2, 543978000 + tz.transition 1987, 10, :o1, 562122000 + tz.transition 1988, 3, :o2, 575427600 + tz.transition 1988, 10, :o1, 593571600 + tz.transition 1989, 3, :o2, 606877200 + tz.transition 1989, 10, :o1, 625626000 + tz.transition 1990, 3, :o2, 638326800 + tz.transition 1990, 10, :o1, 657075600 + tz.transition 1991, 3, :o2, 670381200 + tz.transition 1991, 10, :o1, 688525200 + tz.transition 1992, 3, :o2, 701830800 + tz.transition 1992, 10, :o1, 719974800 + tz.transition 1993, 3, :o2, 733280400 + tz.transition 1993, 10, :o1, 751424400 + tz.transition 1994, 3, :o2, 764730000 + tz.transition 1994, 10, :o1, 782874000 + tz.transition 1995, 3, :o2, 796179600 + tz.transition 1995, 10, :o1, 814323600 + tz.transition 1996, 3, :o2, 828234000 + tz.transition 1996, 10, :o1, 846378000 + tz.transition 1997, 3, :o2, 859683600 + tz.transition 1997, 10, :o1, 877827600 + tz.transition 1998, 3, :o2, 891133200 + tz.transition 1998, 10, :o1, 909277200 + tz.transition 1999, 3, :o2, 922582800 + tz.transition 1999, 10, :o1, 941331600 + tz.transition 2000, 3, :o2, 954032400 + tz.transition 2000, 10, :o1, 972781200 + tz.transition 2001, 3, :o2, 985482000 + tz.transition 2001, 10, :o1, 1004230800 + tz.transition 2002, 3, :o2, 1017536400 + tz.transition 2002, 10, :o1, 1035680400 + tz.transition 2003, 3, :o2, 1048986000 + tz.transition 2003, 10, :o1, 1067130000 + tz.transition 2004, 3, :o2, 1080435600 + tz.transition 2004, 10, :o1, 1099184400 + tz.transition 2005, 3, :o2, 1111885200 + tz.transition 2005, 10, :o1, 1130634000 + tz.transition 2006, 3, :o2, 1143334800 + tz.transition 2006, 10, :o1, 1162083600 + tz.transition 2007, 3, :o2, 1174784400 + tz.transition 2007, 10, :o1, 1193533200 + tz.transition 2008, 3, :o2, 1206838800 + tz.transition 2008, 10, :o1, 1224982800 + tz.transition 2009, 3, :o2, 1238288400 + tz.transition 2009, 10, :o1, 1256432400 + tz.transition 2010, 3, :o2, 1269738000 + tz.transition 2010, 10, :o1, 1288486800 + tz.transition 2011, 3, :o2, 1301187600 + tz.transition 2011, 10, :o1, 1319936400 + tz.transition 2012, 3, :o2, 1332637200 + tz.transition 2012, 10, :o1, 1351386000 + tz.transition 2013, 3, :o2, 1364691600 + tz.transition 2013, 10, :o1, 1382835600 + tz.transition 2014, 3, :o2, 1396141200 + tz.transition 2014, 10, :o1, 1414285200 + tz.transition 2015, 3, :o2, 1427590800 + tz.transition 2015, 10, :o1, 1445734800 + tz.transition 2016, 3, :o2, 1459040400 + tz.transition 2016, 10, :o1, 1477789200 + tz.transition 2017, 3, :o2, 1490490000 + tz.transition 2017, 10, :o1, 1509238800 + tz.transition 2018, 3, :o2, 1521939600 + tz.transition 2018, 10, :o1, 1540688400 + tz.transition 2019, 3, :o2, 1553994000 + tz.transition 2019, 10, :o1, 1572138000 + tz.transition 2020, 3, :o2, 1585443600 + tz.transition 2020, 10, :o1, 1603587600 + tz.transition 2021, 3, :o2, 1616893200 + tz.transition 2021, 10, :o1, 1635642000 + tz.transition 2022, 3, :o2, 1648342800 + tz.transition 2022, 10, :o1, 1667091600 + tz.transition 2023, 3, :o2, 1679792400 + tz.transition 2023, 10, :o1, 1698541200 + tz.transition 2024, 3, :o2, 1711846800 + tz.transition 2024, 10, :o1, 1729990800 + tz.transition 2025, 3, :o2, 1743296400 + tz.transition 2025, 10, :o1, 1761440400 + tz.transition 2026, 3, :o2, 1774746000 + tz.transition 2026, 10, :o1, 1792890000 + tz.transition 2027, 3, :o2, 1806195600 + tz.transition 2027, 10, :o1, 1824944400 + tz.transition 2028, 3, :o2, 1837645200 + tz.transition 2028, 10, :o1, 1856394000 + tz.transition 2029, 3, :o2, 1869094800 + tz.transition 2029, 10, :o1, 1887843600 + tz.transition 2030, 3, :o2, 1901149200 + tz.transition 2030, 10, :o1, 1919293200 + tz.transition 2031, 3, :o2, 1932598800 + tz.transition 2031, 10, :o1, 1950742800 + tz.transition 2032, 3, :o2, 1964048400 + tz.transition 2032, 10, :o1, 1982797200 + tz.transition 2033, 3, :o2, 1995498000 + tz.transition 2033, 10, :o1, 2014246800 + tz.transition 2034, 3, :o2, 2026947600 + tz.transition 2034, 10, :o1, 2045696400 + tz.transition 2035, 3, :o2, 2058397200 + tz.transition 2035, 10, :o1, 2077146000 + tz.transition 2036, 3, :o2, 2090451600 + tz.transition 2036, 10, :o1, 2108595600 + tz.transition 2037, 3, :o2, 2121901200 + tz.transition 2037, 10, :o1, 2140045200 + tz.transition 2038, 3, :o2, 59172253, 24 + tz.transition 2038, 10, :o1, 59177461, 24 + tz.transition 2039, 3, :o2, 59180989, 24 + tz.transition 2039, 10, :o1, 59186197, 24 + tz.transition 2040, 3, :o2, 59189725, 24 + tz.transition 2040, 10, :o1, 59194933, 24 + tz.transition 2041, 3, :o2, 59198629, 24 + tz.transition 2041, 10, :o1, 59203669, 24 + tz.transition 2042, 3, :o2, 59207365, 24 + tz.transition 2042, 10, :o1, 59212405, 24 + tz.transition 2043, 3, :o2, 59216101, 24 + tz.transition 2043, 10, :o1, 59221141, 24 + tz.transition 2044, 3, :o2, 59224837, 24 + tz.transition 2044, 10, :o1, 59230045, 24 + tz.transition 2045, 3, :o2, 59233573, 24 + tz.transition 2045, 10, :o1, 59238781, 24 + tz.transition 2046, 3, :o2, 59242309, 24 + tz.transition 2046, 10, :o1, 59247517, 24 + tz.transition 2047, 3, :o2, 59251213, 24 + tz.transition 2047, 10, :o1, 59256253, 24 + tz.transition 2048, 3, :o2, 59259949, 24 + tz.transition 2048, 10, :o1, 59264989, 24 + tz.transition 2049, 3, :o2, 59268685, 24 + tz.transition 2049, 10, :o1, 59273893, 24 + tz.transition 2050, 3, :o2, 59277421, 24 + tz.transition 2050, 10, :o1, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Madrid.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Madrid.rb new file mode 100644 index 0000000000..1fb568239a --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Madrid.rb @@ -0,0 +1,211 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Madrid + include TimezoneDefinition + + timezone 'Europe/Madrid' do |tz| + tz.offset :o0, -884, 0, :LMT + tz.offset :o1, 0, 0, :WET + tz.offset :o2, 0, 3600, :WEST + tz.offset :o3, 0, 7200, :WEMT + tz.offset :o4, 3600, 0, :CET + tz.offset :o5, 3600, 3600, :CEST + + tz.transition 1901, 1, :o1, 52172327021, 21600 + tz.transition 1917, 5, :o2, 58112507, 24 + tz.transition 1917, 10, :o1, 58116203, 24 + tz.transition 1918, 4, :o2, 58120787, 24 + tz.transition 1918, 10, :o1, 58124963, 24 + tz.transition 1919, 4, :o2, 58129307, 24 + tz.transition 1919, 10, :o1, 58133723, 24 + tz.transition 1924, 4, :o2, 58173419, 24 + tz.transition 1924, 10, :o1, 58177523, 24 + tz.transition 1926, 4, :o2, 58190963, 24 + tz.transition 1926, 10, :o1, 58194995, 24 + tz.transition 1927, 4, :o2, 58199531, 24 + tz.transition 1927, 10, :o1, 58203731, 24 + tz.transition 1928, 4, :o2, 58208435, 24 + tz.transition 1928, 10, :o1, 58212635, 24 + tz.transition 1929, 4, :o2, 58217339, 24 + tz.transition 1929, 10, :o1, 58221371, 24 + tz.transition 1937, 5, :o2, 58288235, 24 + tz.transition 1937, 10, :o1, 58291427, 24 + tz.transition 1938, 3, :o2, 58295531, 24 + tz.transition 1938, 10, :o1, 58300163, 24 + tz.transition 1939, 4, :o2, 58304867, 24 + tz.transition 1939, 10, :o1, 58309067, 24 + tz.transition 1940, 3, :o2, 58312931, 24 + tz.transition 1942, 5, :o3, 29165789, 12 + tz.transition 1942, 9, :o2, 29167253, 12 + tz.transition 1943, 4, :o3, 29169989, 12 + tz.transition 1943, 10, :o2, 29172017, 12 + tz.transition 1944, 4, :o3, 29174357, 12 + tz.transition 1944, 10, :o2, 29176493, 12 + tz.transition 1945, 4, :o3, 29178725, 12 + tz.transition 1945, 9, :o2, 58361483, 24 + tz.transition 1946, 4, :o3, 29183093, 12 + tz.transition 1946, 9, :o4, 29185121, 12 + tz.transition 1949, 4, :o5, 29196449, 12 + tz.transition 1949, 9, :o4, 58396547, 24 + tz.transition 1974, 4, :o5, 135122400 + tz.transition 1974, 10, :o4, 150246000 + tz.transition 1975, 4, :o5, 167176800 + tz.transition 1975, 10, :o4, 181695600 + tz.transition 1976, 3, :o5, 196812000 + tz.transition 1976, 9, :o4, 212540400 + tz.transition 1977, 4, :o5, 228866400 + tz.transition 1977, 9, :o4, 243990000 + tz.transition 1978, 4, :o5, 260402400 + tz.transition 1978, 9, :o4, 276044400 + tz.transition 1979, 4, :o5, 291776400 + tz.transition 1979, 9, :o4, 307501200 + tz.transition 1980, 4, :o5, 323830800 + tz.transition 1980, 9, :o4, 338950800 + tz.transition 1981, 3, :o5, 354675600 + tz.transition 1981, 9, :o4, 370400400 + tz.transition 1982, 3, :o5, 386125200 + tz.transition 1982, 9, :o4, 401850000 + tz.transition 1983, 3, :o5, 417574800 + tz.transition 1983, 9, :o4, 433299600 + tz.transition 1984, 3, :o5, 449024400 + tz.transition 1984, 9, :o4, 465354000 + tz.transition 1985, 3, :o5, 481078800 + tz.transition 1985, 9, :o4, 496803600 + tz.transition 1986, 3, :o5, 512528400 + tz.transition 1986, 9, :o4, 528253200 + tz.transition 1987, 3, :o5, 543978000 + tz.transition 1987, 9, :o4, 559702800 + tz.transition 1988, 3, :o5, 575427600 + tz.transition 1988, 9, :o4, 591152400 + tz.transition 1989, 3, :o5, 606877200 + tz.transition 1989, 9, :o4, 622602000 + tz.transition 1990, 3, :o5, 638326800 + tz.transition 1990, 9, :o4, 654656400 + tz.transition 1991, 3, :o5, 670381200 + tz.transition 1991, 9, :o4, 686106000 + tz.transition 1992, 3, :o5, 701830800 + tz.transition 1992, 9, :o4, 717555600 + tz.transition 1993, 3, :o5, 733280400 + tz.transition 1993, 9, :o4, 749005200 + tz.transition 1994, 3, :o5, 764730000 + tz.transition 1994, 9, :o4, 780454800 + tz.transition 1995, 3, :o5, 796179600 + tz.transition 1995, 9, :o4, 811904400 + tz.transition 1996, 3, :o5, 828234000 + tz.transition 1996, 10, :o4, 846378000 + tz.transition 1997, 3, :o5, 859683600 + tz.transition 1997, 10, :o4, 877827600 + tz.transition 1998, 3, :o5, 891133200 + tz.transition 1998, 10, :o4, 909277200 + tz.transition 1999, 3, :o5, 922582800 + tz.transition 1999, 10, :o4, 941331600 + tz.transition 2000, 3, :o5, 954032400 + tz.transition 2000, 10, :o4, 972781200 + tz.transition 2001, 3, :o5, 985482000 + tz.transition 2001, 10, :o4, 1004230800 + tz.transition 2002, 3, :o5, 1017536400 + tz.transition 2002, 10, :o4, 1035680400 + tz.transition 2003, 3, :o5, 1048986000 + tz.transition 2003, 10, :o4, 1067130000 + tz.transition 2004, 3, :o5, 1080435600 + tz.transition 2004, 10, :o4, 1099184400 + tz.transition 2005, 3, :o5, 1111885200 + tz.transition 2005, 10, :o4, 1130634000 + tz.transition 2006, 3, :o5, 1143334800 + tz.transition 2006, 10, :o4, 1162083600 + tz.transition 2007, 3, :o5, 1174784400 + tz.transition 2007, 10, :o4, 1193533200 + tz.transition 2008, 3, :o5, 1206838800 + tz.transition 2008, 10, :o4, 1224982800 + tz.transition 2009, 3, :o5, 1238288400 + tz.transition 2009, 10, :o4, 1256432400 + tz.transition 2010, 3, :o5, 1269738000 + tz.transition 2010, 10, :o4, 1288486800 + tz.transition 2011, 3, :o5, 1301187600 + tz.transition 2011, 10, :o4, 1319936400 + tz.transition 2012, 3, :o5, 1332637200 + tz.transition 2012, 10, :o4, 1351386000 + tz.transition 2013, 3, :o5, 1364691600 + tz.transition 2013, 10, :o4, 1382835600 + tz.transition 2014, 3, :o5, 1396141200 + tz.transition 2014, 10, :o4, 1414285200 + tz.transition 2015, 3, :o5, 1427590800 + tz.transition 2015, 10, :o4, 1445734800 + tz.transition 2016, 3, :o5, 1459040400 + tz.transition 2016, 10, :o4, 1477789200 + tz.transition 2017, 3, :o5, 1490490000 + tz.transition 2017, 10, :o4, 1509238800 + tz.transition 2018, 3, :o5, 1521939600 + tz.transition 2018, 10, :o4, 1540688400 + tz.transition 2019, 3, :o5, 1553994000 + tz.transition 2019, 10, :o4, 1572138000 + tz.transition 2020, 3, :o5, 1585443600 + tz.transition 2020, 10, :o4, 1603587600 + tz.transition 2021, 3, :o5, 1616893200 + tz.transition 2021, 10, :o4, 1635642000 + tz.transition 2022, 3, :o5, 1648342800 + tz.transition 2022, 10, :o4, 1667091600 + tz.transition 2023, 3, :o5, 1679792400 + tz.transition 2023, 10, :o4, 1698541200 + tz.transition 2024, 3, :o5, 1711846800 + tz.transition 2024, 10, :o4, 1729990800 + tz.transition 2025, 3, :o5, 1743296400 + tz.transition 2025, 10, :o4, 1761440400 + tz.transition 2026, 3, :o5, 1774746000 + tz.transition 2026, 10, :o4, 1792890000 + tz.transition 2027, 3, :o5, 1806195600 + tz.transition 2027, 10, :o4, 1824944400 + tz.transition 2028, 3, :o5, 1837645200 + tz.transition 2028, 10, :o4, 1856394000 + tz.transition 2029, 3, :o5, 1869094800 + tz.transition 2029, 10, :o4, 1887843600 + tz.transition 2030, 3, :o5, 1901149200 + tz.transition 2030, 10, :o4, 1919293200 + tz.transition 2031, 3, :o5, 1932598800 + tz.transition 2031, 10, :o4, 1950742800 + tz.transition 2032, 3, :o5, 1964048400 + tz.transition 2032, 10, :o4, 1982797200 + tz.transition 2033, 3, :o5, 1995498000 + tz.transition 2033, 10, :o4, 2014246800 + tz.transition 2034, 3, :o5, 2026947600 + tz.transition 2034, 10, :o4, 2045696400 + tz.transition 2035, 3, :o5, 2058397200 + tz.transition 2035, 10, :o4, 2077146000 + tz.transition 2036, 3, :o5, 2090451600 + tz.transition 2036, 10, :o4, 2108595600 + tz.transition 2037, 3, :o5, 2121901200 + tz.transition 2037, 10, :o4, 2140045200 + tz.transition 2038, 3, :o5, 59172253, 24 + tz.transition 2038, 10, :o4, 59177461, 24 + tz.transition 2039, 3, :o5, 59180989, 24 + tz.transition 2039, 10, :o4, 59186197, 24 + tz.transition 2040, 3, :o5, 59189725, 24 + tz.transition 2040, 10, :o4, 59194933, 24 + tz.transition 2041, 3, :o5, 59198629, 24 + tz.transition 2041, 10, :o4, 59203669, 24 + tz.transition 2042, 3, :o5, 59207365, 24 + tz.transition 2042, 10, :o4, 59212405, 24 + tz.transition 2043, 3, :o5, 59216101, 24 + tz.transition 2043, 10, :o4, 59221141, 24 + tz.transition 2044, 3, :o5, 59224837, 24 + tz.transition 2044, 10, :o4, 59230045, 24 + tz.transition 2045, 3, :o5, 59233573, 24 + tz.transition 2045, 10, :o4, 59238781, 24 + tz.transition 2046, 3, :o5, 59242309, 24 + tz.transition 2046, 10, :o4, 59247517, 24 + tz.transition 2047, 3, :o5, 59251213, 24 + tz.transition 2047, 10, :o4, 59256253, 24 + tz.transition 2048, 3, :o5, 59259949, 24 + tz.transition 2048, 10, :o4, 59264989, 24 + tz.transition 2049, 3, :o5, 59268685, 24 + tz.transition 2049, 10, :o4, 59273893, 24 + tz.transition 2050, 3, :o5, 59277421, 24 + tz.transition 2050, 10, :o4, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Minsk.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Minsk.rb new file mode 100644 index 0000000000..fa15816cc8 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Minsk.rb @@ -0,0 +1,170 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Minsk + include TimezoneDefinition + + timezone 'Europe/Minsk' do |tz| + tz.offset :o0, 6616, 0, :LMT + tz.offset :o1, 6600, 0, :MMT + tz.offset :o2, 7200, 0, :EET + tz.offset :o3, 10800, 0, :MSK + tz.offset :o4, 3600, 3600, :CEST + tz.offset :o5, 3600, 0, :CET + tz.offset :o6, 10800, 3600, :MSD + tz.offset :o7, 7200, 3600, :EEST + + tz.transition 1879, 12, :o1, 26003326573, 10800 + tz.transition 1924, 5, :o2, 349042669, 144 + tz.transition 1930, 6, :o3, 29113781, 12 + tz.transition 1941, 6, :o4, 19441387, 8 + tz.transition 1942, 11, :o5, 58335973, 24 + tz.transition 1943, 3, :o4, 58339501, 24 + tz.transition 1943, 10, :o5, 58344037, 24 + tz.transition 1944, 4, :o4, 58348405, 24 + tz.transition 1944, 7, :o3, 29175293, 12 + tz.transition 1981, 3, :o6, 354920400 + tz.transition 1981, 9, :o3, 370728000 + tz.transition 1982, 3, :o6, 386456400 + tz.transition 1982, 9, :o3, 402264000 + tz.transition 1983, 3, :o6, 417992400 + tz.transition 1983, 9, :o3, 433800000 + tz.transition 1984, 3, :o6, 449614800 + tz.transition 1984, 9, :o3, 465346800 + tz.transition 1985, 3, :o6, 481071600 + tz.transition 1985, 9, :o3, 496796400 + tz.transition 1986, 3, :o6, 512521200 + tz.transition 1986, 9, :o3, 528246000 + tz.transition 1987, 3, :o6, 543970800 + tz.transition 1987, 9, :o3, 559695600 + tz.transition 1988, 3, :o6, 575420400 + tz.transition 1988, 9, :o3, 591145200 + tz.transition 1989, 3, :o6, 606870000 + tz.transition 1989, 9, :o3, 622594800 + tz.transition 1991, 3, :o7, 670374000 + tz.transition 1991, 9, :o2, 686102400 + tz.transition 1992, 3, :o7, 701820000 + tz.transition 1992, 9, :o2, 717544800 + tz.transition 1993, 3, :o7, 733276800 + tz.transition 1993, 9, :o2, 749001600 + tz.transition 1994, 3, :o7, 764726400 + tz.transition 1994, 9, :o2, 780451200 + tz.transition 1995, 3, :o7, 796176000 + tz.transition 1995, 9, :o2, 811900800 + tz.transition 1996, 3, :o7, 828230400 + tz.transition 1996, 10, :o2, 846374400 + tz.transition 1997, 3, :o7, 859680000 + tz.transition 1997, 10, :o2, 877824000 + tz.transition 1998, 3, :o7, 891129600 + tz.transition 1998, 10, :o2, 909273600 + tz.transition 1999, 3, :o7, 922579200 + tz.transition 1999, 10, :o2, 941328000 + tz.transition 2000, 3, :o7, 954028800 + tz.transition 2000, 10, :o2, 972777600 + tz.transition 2001, 3, :o7, 985478400 + tz.transition 2001, 10, :o2, 1004227200 + tz.transition 2002, 3, :o7, 1017532800 + tz.transition 2002, 10, :o2, 1035676800 + tz.transition 2003, 3, :o7, 1048982400 + tz.transition 2003, 10, :o2, 1067126400 + tz.transition 2004, 3, :o7, 1080432000 + tz.transition 2004, 10, :o2, 1099180800 + tz.transition 2005, 3, :o7, 1111881600 + tz.transition 2005, 10, :o2, 1130630400 + tz.transition 2006, 3, :o7, 1143331200 + tz.transition 2006, 10, :o2, 1162080000 + tz.transition 2007, 3, :o7, 1174780800 + tz.transition 2007, 10, :o2, 1193529600 + tz.transition 2008, 3, :o7, 1206835200 + tz.transition 2008, 10, :o2, 1224979200 + tz.transition 2009, 3, :o7, 1238284800 + tz.transition 2009, 10, :o2, 1256428800 + tz.transition 2010, 3, :o7, 1269734400 + tz.transition 2010, 10, :o2, 1288483200 + tz.transition 2011, 3, :o7, 1301184000 + tz.transition 2011, 10, :o2, 1319932800 + tz.transition 2012, 3, :o7, 1332633600 + tz.transition 2012, 10, :o2, 1351382400 + tz.transition 2013, 3, :o7, 1364688000 + tz.transition 2013, 10, :o2, 1382832000 + tz.transition 2014, 3, :o7, 1396137600 + tz.transition 2014, 10, :o2, 1414281600 + tz.transition 2015, 3, :o7, 1427587200 + tz.transition 2015, 10, :o2, 1445731200 + tz.transition 2016, 3, :o7, 1459036800 + tz.transition 2016, 10, :o2, 1477785600 + tz.transition 2017, 3, :o7, 1490486400 + tz.transition 2017, 10, :o2, 1509235200 + tz.transition 2018, 3, :o7, 1521936000 + tz.transition 2018, 10, :o2, 1540684800 + tz.transition 2019, 3, :o7, 1553990400 + tz.transition 2019, 10, :o2, 1572134400 + tz.transition 2020, 3, :o7, 1585440000 + tz.transition 2020, 10, :o2, 1603584000 + tz.transition 2021, 3, :o7, 1616889600 + tz.transition 2021, 10, :o2, 1635638400 + tz.transition 2022, 3, :o7, 1648339200 + tz.transition 2022, 10, :o2, 1667088000 + tz.transition 2023, 3, :o7, 1679788800 + tz.transition 2023, 10, :o2, 1698537600 + tz.transition 2024, 3, :o7, 1711843200 + tz.transition 2024, 10, :o2, 1729987200 + tz.transition 2025, 3, :o7, 1743292800 + tz.transition 2025, 10, :o2, 1761436800 + tz.transition 2026, 3, :o7, 1774742400 + tz.transition 2026, 10, :o2, 1792886400 + tz.transition 2027, 3, :o7, 1806192000 + tz.transition 2027, 10, :o2, 1824940800 + tz.transition 2028, 3, :o7, 1837641600 + tz.transition 2028, 10, :o2, 1856390400 + tz.transition 2029, 3, :o7, 1869091200 + tz.transition 2029, 10, :o2, 1887840000 + tz.transition 2030, 3, :o7, 1901145600 + tz.transition 2030, 10, :o2, 1919289600 + tz.transition 2031, 3, :o7, 1932595200 + tz.transition 2031, 10, :o2, 1950739200 + tz.transition 2032, 3, :o7, 1964044800 + tz.transition 2032, 10, :o2, 1982793600 + tz.transition 2033, 3, :o7, 1995494400 + tz.transition 2033, 10, :o2, 2014243200 + tz.transition 2034, 3, :o7, 2026944000 + tz.transition 2034, 10, :o2, 2045692800 + tz.transition 2035, 3, :o7, 2058393600 + tz.transition 2035, 10, :o2, 2077142400 + tz.transition 2036, 3, :o7, 2090448000 + tz.transition 2036, 10, :o2, 2108592000 + tz.transition 2037, 3, :o7, 2121897600 + tz.transition 2037, 10, :o2, 2140041600 + tz.transition 2038, 3, :o7, 4931021, 2 + tz.transition 2038, 10, :o2, 4931455, 2 + tz.transition 2039, 3, :o7, 4931749, 2 + tz.transition 2039, 10, :o2, 4932183, 2 + tz.transition 2040, 3, :o7, 4932477, 2 + tz.transition 2040, 10, :o2, 4932911, 2 + tz.transition 2041, 3, :o7, 4933219, 2 + tz.transition 2041, 10, :o2, 4933639, 2 + tz.transition 2042, 3, :o7, 4933947, 2 + tz.transition 2042, 10, :o2, 4934367, 2 + tz.transition 2043, 3, :o7, 4934675, 2 + tz.transition 2043, 10, :o2, 4935095, 2 + tz.transition 2044, 3, :o7, 4935403, 2 + tz.transition 2044, 10, :o2, 4935837, 2 + tz.transition 2045, 3, :o7, 4936131, 2 + tz.transition 2045, 10, :o2, 4936565, 2 + tz.transition 2046, 3, :o7, 4936859, 2 + tz.transition 2046, 10, :o2, 4937293, 2 + tz.transition 2047, 3, :o7, 4937601, 2 + tz.transition 2047, 10, :o2, 4938021, 2 + tz.transition 2048, 3, :o7, 4938329, 2 + tz.transition 2048, 10, :o2, 4938749, 2 + tz.transition 2049, 3, :o7, 4939057, 2 + tz.transition 2049, 10, :o2, 4939491, 2 + tz.transition 2050, 3, :o7, 4939785, 2 + tz.transition 2050, 10, :o2, 4940219, 2 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Moscow.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Moscow.rb new file mode 100644 index 0000000000..ef269b675b --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Moscow.rb @@ -0,0 +1,181 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Moscow + include TimezoneDefinition + + timezone 'Europe/Moscow' do |tz| + tz.offset :o0, 9020, 0, :LMT + tz.offset :o1, 9000, 0, :MMT + tz.offset :o2, 9048, 0, :MMT + tz.offset :o3, 9048, 3600, :MST + tz.offset :o4, 9048, 7200, :MDST + tz.offset :o5, 10800, 3600, :MSD + tz.offset :o6, 10800, 0, :MSK + tz.offset :o7, 10800, 7200, :MSD + tz.offset :o8, 7200, 0, :EET + tz.offset :o9, 7200, 3600, :EEST + + tz.transition 1879, 12, :o1, 10401330509, 4320 + tz.transition 1916, 7, :o2, 116210275, 48 + tz.transition 1917, 7, :o3, 8717080873, 3600 + tz.transition 1917, 12, :o2, 8717725273, 3600 + tz.transition 1918, 5, :o4, 8718283123, 3600 + tz.transition 1918, 9, :o3, 8718668473, 3600 + tz.transition 1919, 5, :o4, 8719597123, 3600 + tz.transition 1919, 6, :o5, 8719705423, 3600 + tz.transition 1919, 8, :o6, 7266559, 3 + tz.transition 1921, 2, :o5, 7268206, 3 + tz.transition 1921, 3, :o7, 58146463, 24 + tz.transition 1921, 8, :o5, 58150399, 24 + tz.transition 1921, 9, :o6, 7268890, 3 + tz.transition 1922, 9, :o8, 19386627, 8 + tz.transition 1930, 6, :o6, 29113781, 12 + tz.transition 1981, 3, :o5, 354920400 + tz.transition 1981, 9, :o6, 370728000 + tz.transition 1982, 3, :o5, 386456400 + tz.transition 1982, 9, :o6, 402264000 + tz.transition 1983, 3, :o5, 417992400 + tz.transition 1983, 9, :o6, 433800000 + tz.transition 1984, 3, :o5, 449614800 + tz.transition 1984, 9, :o6, 465346800 + tz.transition 1985, 3, :o5, 481071600 + tz.transition 1985, 9, :o6, 496796400 + tz.transition 1986, 3, :o5, 512521200 + tz.transition 1986, 9, :o6, 528246000 + tz.transition 1987, 3, :o5, 543970800 + tz.transition 1987, 9, :o6, 559695600 + tz.transition 1988, 3, :o5, 575420400 + tz.transition 1988, 9, :o6, 591145200 + tz.transition 1989, 3, :o5, 606870000 + tz.transition 1989, 9, :o6, 622594800 + tz.transition 1990, 3, :o5, 638319600 + tz.transition 1990, 9, :o6, 654649200 + tz.transition 1991, 3, :o9, 670374000 + tz.transition 1991, 9, :o8, 686102400 + tz.transition 1992, 1, :o6, 695779200 + tz.transition 1992, 3, :o5, 701812800 + tz.transition 1992, 9, :o6, 717534000 + tz.transition 1993, 3, :o5, 733273200 + tz.transition 1993, 9, :o6, 748998000 + tz.transition 1994, 3, :o5, 764722800 + tz.transition 1994, 9, :o6, 780447600 + tz.transition 1995, 3, :o5, 796172400 + tz.transition 1995, 9, :o6, 811897200 + tz.transition 1996, 3, :o5, 828226800 + tz.transition 1996, 10, :o6, 846370800 + tz.transition 1997, 3, :o5, 859676400 + tz.transition 1997, 10, :o6, 877820400 + tz.transition 1998, 3, :o5, 891126000 + tz.transition 1998, 10, :o6, 909270000 + tz.transition 1999, 3, :o5, 922575600 + tz.transition 1999, 10, :o6, 941324400 + tz.transition 2000, 3, :o5, 954025200 + tz.transition 2000, 10, :o6, 972774000 + tz.transition 2001, 3, :o5, 985474800 + tz.transition 2001, 10, :o6, 1004223600 + tz.transition 2002, 3, :o5, 1017529200 + tz.transition 2002, 10, :o6, 1035673200 + tz.transition 2003, 3, :o5, 1048978800 + tz.transition 2003, 10, :o6, 1067122800 + tz.transition 2004, 3, :o5, 1080428400 + tz.transition 2004, 10, :o6, 1099177200 + tz.transition 2005, 3, :o5, 1111878000 + tz.transition 2005, 10, :o6, 1130626800 + tz.transition 2006, 3, :o5, 1143327600 + tz.transition 2006, 10, :o6, 1162076400 + tz.transition 2007, 3, :o5, 1174777200 + tz.transition 2007, 10, :o6, 1193526000 + tz.transition 2008, 3, :o5, 1206831600 + tz.transition 2008, 10, :o6, 1224975600 + tz.transition 2009, 3, :o5, 1238281200 + tz.transition 2009, 10, :o6, 1256425200 + tz.transition 2010, 3, :o5, 1269730800 + tz.transition 2010, 10, :o6, 1288479600 + tz.transition 2011, 3, :o5, 1301180400 + tz.transition 2011, 10, :o6, 1319929200 + tz.transition 2012, 3, :o5, 1332630000 + tz.transition 2012, 10, :o6, 1351378800 + tz.transition 2013, 3, :o5, 1364684400 + tz.transition 2013, 10, :o6, 1382828400 + tz.transition 2014, 3, :o5, 1396134000 + tz.transition 2014, 10, :o6, 1414278000 + tz.transition 2015, 3, :o5, 1427583600 + tz.transition 2015, 10, :o6, 1445727600 + tz.transition 2016, 3, :o5, 1459033200 + tz.transition 2016, 10, :o6, 1477782000 + tz.transition 2017, 3, :o5, 1490482800 + tz.transition 2017, 10, :o6, 1509231600 + tz.transition 2018, 3, :o5, 1521932400 + tz.transition 2018, 10, :o6, 1540681200 + tz.transition 2019, 3, :o5, 1553986800 + tz.transition 2019, 10, :o6, 1572130800 + tz.transition 2020, 3, :o5, 1585436400 + tz.transition 2020, 10, :o6, 1603580400 + tz.transition 2021, 3, :o5, 1616886000 + tz.transition 2021, 10, :o6, 1635634800 + tz.transition 2022, 3, :o5, 1648335600 + tz.transition 2022, 10, :o6, 1667084400 + tz.transition 2023, 3, :o5, 1679785200 + tz.transition 2023, 10, :o6, 1698534000 + tz.transition 2024, 3, :o5, 1711839600 + tz.transition 2024, 10, :o6, 1729983600 + tz.transition 2025, 3, :o5, 1743289200 + tz.transition 2025, 10, :o6, 1761433200 + tz.transition 2026, 3, :o5, 1774738800 + tz.transition 2026, 10, :o6, 1792882800 + tz.transition 2027, 3, :o5, 1806188400 + tz.transition 2027, 10, :o6, 1824937200 + tz.transition 2028, 3, :o5, 1837638000 + tz.transition 2028, 10, :o6, 1856386800 + tz.transition 2029, 3, :o5, 1869087600 + tz.transition 2029, 10, :o6, 1887836400 + tz.transition 2030, 3, :o5, 1901142000 + tz.transition 2030, 10, :o6, 1919286000 + tz.transition 2031, 3, :o5, 1932591600 + tz.transition 2031, 10, :o6, 1950735600 + tz.transition 2032, 3, :o5, 1964041200 + tz.transition 2032, 10, :o6, 1982790000 + tz.transition 2033, 3, :o5, 1995490800 + tz.transition 2033, 10, :o6, 2014239600 + tz.transition 2034, 3, :o5, 2026940400 + tz.transition 2034, 10, :o6, 2045689200 + tz.transition 2035, 3, :o5, 2058390000 + tz.transition 2035, 10, :o6, 2077138800 + tz.transition 2036, 3, :o5, 2090444400 + tz.transition 2036, 10, :o6, 2108588400 + tz.transition 2037, 3, :o5, 2121894000 + tz.transition 2037, 10, :o6, 2140038000 + tz.transition 2038, 3, :o5, 59172251, 24 + tz.transition 2038, 10, :o6, 59177459, 24 + tz.transition 2039, 3, :o5, 59180987, 24 + tz.transition 2039, 10, :o6, 59186195, 24 + tz.transition 2040, 3, :o5, 59189723, 24 + tz.transition 2040, 10, :o6, 59194931, 24 + tz.transition 2041, 3, :o5, 59198627, 24 + tz.transition 2041, 10, :o6, 59203667, 24 + tz.transition 2042, 3, :o5, 59207363, 24 + tz.transition 2042, 10, :o6, 59212403, 24 + tz.transition 2043, 3, :o5, 59216099, 24 + tz.transition 2043, 10, :o6, 59221139, 24 + tz.transition 2044, 3, :o5, 59224835, 24 + tz.transition 2044, 10, :o6, 59230043, 24 + tz.transition 2045, 3, :o5, 59233571, 24 + tz.transition 2045, 10, :o6, 59238779, 24 + tz.transition 2046, 3, :o5, 59242307, 24 + tz.transition 2046, 10, :o6, 59247515, 24 + tz.transition 2047, 3, :o5, 59251211, 24 + tz.transition 2047, 10, :o6, 59256251, 24 + tz.transition 2048, 3, :o5, 59259947, 24 + tz.transition 2048, 10, :o6, 59264987, 24 + tz.transition 2049, 3, :o5, 59268683, 24 + tz.transition 2049, 10, :o6, 59273891, 24 + tz.transition 2050, 3, :o5, 59277419, 24 + tz.transition 2050, 10, :o6, 59282627, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Paris.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Paris.rb new file mode 100644 index 0000000000..e3236c0ba1 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Paris.rb @@ -0,0 +1,232 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Paris + include TimezoneDefinition + + timezone 'Europe/Paris' do |tz| + tz.offset :o0, 561, 0, :LMT + tz.offset :o1, 561, 0, :PMT + tz.offset :o2, 0, 0, :WET + tz.offset :o3, 0, 3600, :WEST + tz.offset :o4, 3600, 3600, :CEST + tz.offset :o5, 3600, 0, :CET + tz.offset :o6, 0, 7200, :WEMT + + tz.transition 1891, 3, :o1, 69460027033, 28800 + tz.transition 1911, 3, :o2, 69670267033, 28800 + tz.transition 1916, 6, :o3, 58104707, 24 + tz.transition 1916, 10, :o2, 58107323, 24 + tz.transition 1917, 3, :o3, 58111499, 24 + tz.transition 1917, 10, :o2, 58116227, 24 + tz.transition 1918, 3, :o3, 58119899, 24 + tz.transition 1918, 10, :o2, 58124963, 24 + tz.transition 1919, 3, :o3, 58128467, 24 + tz.transition 1919, 10, :o2, 58133699, 24 + tz.transition 1920, 2, :o3, 58136867, 24 + tz.transition 1920, 10, :o2, 58142915, 24 + tz.transition 1921, 3, :o3, 58146323, 24 + tz.transition 1921, 10, :o2, 58151723, 24 + tz.transition 1922, 3, :o3, 58155347, 24 + tz.transition 1922, 10, :o2, 58160051, 24 + tz.transition 1923, 5, :o3, 58165595, 24 + tz.transition 1923, 10, :o2, 58168787, 24 + tz.transition 1924, 3, :o3, 58172987, 24 + tz.transition 1924, 10, :o2, 58177523, 24 + tz.transition 1925, 4, :o3, 58181891, 24 + tz.transition 1925, 10, :o2, 58186259, 24 + tz.transition 1926, 4, :o3, 58190963, 24 + tz.transition 1926, 10, :o2, 58194995, 24 + tz.transition 1927, 4, :o3, 58199531, 24 + tz.transition 1927, 10, :o2, 58203731, 24 + tz.transition 1928, 4, :o3, 58208435, 24 + tz.transition 1928, 10, :o2, 58212635, 24 + tz.transition 1929, 4, :o3, 58217339, 24 + tz.transition 1929, 10, :o2, 58221371, 24 + tz.transition 1930, 4, :o3, 58225907, 24 + tz.transition 1930, 10, :o2, 58230107, 24 + tz.transition 1931, 4, :o3, 58234811, 24 + tz.transition 1931, 10, :o2, 58238843, 24 + tz.transition 1932, 4, :o3, 58243211, 24 + tz.transition 1932, 10, :o2, 58247579, 24 + tz.transition 1933, 3, :o3, 58251779, 24 + tz.transition 1933, 10, :o2, 58256483, 24 + tz.transition 1934, 4, :o3, 58260851, 24 + tz.transition 1934, 10, :o2, 58265219, 24 + tz.transition 1935, 3, :o3, 58269419, 24 + tz.transition 1935, 10, :o2, 58273955, 24 + tz.transition 1936, 4, :o3, 58278659, 24 + tz.transition 1936, 10, :o2, 58282691, 24 + tz.transition 1937, 4, :o3, 58287059, 24 + tz.transition 1937, 10, :o2, 58291427, 24 + tz.transition 1938, 3, :o3, 58295627, 24 + tz.transition 1938, 10, :o2, 58300163, 24 + tz.transition 1939, 4, :o3, 58304867, 24 + tz.transition 1939, 11, :o2, 58310075, 24 + tz.transition 1940, 2, :o3, 29156215, 12 + tz.transition 1940, 6, :o4, 29157545, 12 + tz.transition 1942, 11, :o5, 58335973, 24 + tz.transition 1943, 3, :o4, 58339501, 24 + tz.transition 1943, 10, :o5, 58344037, 24 + tz.transition 1944, 4, :o4, 58348405, 24 + tz.transition 1944, 8, :o6, 29175929, 12 + tz.transition 1944, 10, :o3, 58352915, 24 + tz.transition 1945, 4, :o6, 58357141, 24 + tz.transition 1945, 9, :o5, 58361149, 24 + tz.transition 1976, 3, :o4, 196819200 + tz.transition 1976, 9, :o5, 212540400 + tz.transition 1977, 4, :o4, 228877200 + tz.transition 1977, 9, :o5, 243997200 + tz.transition 1978, 4, :o4, 260326800 + tz.transition 1978, 10, :o5, 276051600 + tz.transition 1979, 4, :o4, 291776400 + tz.transition 1979, 9, :o5, 307501200 + tz.transition 1980, 4, :o4, 323830800 + tz.transition 1980, 9, :o5, 338950800 + tz.transition 1981, 3, :o4, 354675600 + tz.transition 1981, 9, :o5, 370400400 + tz.transition 1982, 3, :o4, 386125200 + tz.transition 1982, 9, :o5, 401850000 + tz.transition 1983, 3, :o4, 417574800 + tz.transition 1983, 9, :o5, 433299600 + tz.transition 1984, 3, :o4, 449024400 + tz.transition 1984, 9, :o5, 465354000 + tz.transition 1985, 3, :o4, 481078800 + tz.transition 1985, 9, :o5, 496803600 + tz.transition 1986, 3, :o4, 512528400 + tz.transition 1986, 9, :o5, 528253200 + tz.transition 1987, 3, :o4, 543978000 + tz.transition 1987, 9, :o5, 559702800 + tz.transition 1988, 3, :o4, 575427600 + tz.transition 1988, 9, :o5, 591152400 + tz.transition 1989, 3, :o4, 606877200 + tz.transition 1989, 9, :o5, 622602000 + tz.transition 1990, 3, :o4, 638326800 + tz.transition 1990, 9, :o5, 654656400 + tz.transition 1991, 3, :o4, 670381200 + tz.transition 1991, 9, :o5, 686106000 + tz.transition 1992, 3, :o4, 701830800 + tz.transition 1992, 9, :o5, 717555600 + tz.transition 1993, 3, :o4, 733280400 + tz.transition 1993, 9, :o5, 749005200 + tz.transition 1994, 3, :o4, 764730000 + tz.transition 1994, 9, :o5, 780454800 + tz.transition 1995, 3, :o4, 796179600 + tz.transition 1995, 9, :o5, 811904400 + tz.transition 1996, 3, :o4, 828234000 + tz.transition 1996, 10, :o5, 846378000 + tz.transition 1997, 3, :o4, 859683600 + tz.transition 1997, 10, :o5, 877827600 + tz.transition 1998, 3, :o4, 891133200 + tz.transition 1998, 10, :o5, 909277200 + tz.transition 1999, 3, :o4, 922582800 + tz.transition 1999, 10, :o5, 941331600 + tz.transition 2000, 3, :o4, 954032400 + tz.transition 2000, 10, :o5, 972781200 + tz.transition 2001, 3, :o4, 985482000 + tz.transition 2001, 10, :o5, 1004230800 + tz.transition 2002, 3, :o4, 1017536400 + tz.transition 2002, 10, :o5, 1035680400 + tz.transition 2003, 3, :o4, 1048986000 + tz.transition 2003, 10, :o5, 1067130000 + tz.transition 2004, 3, :o4, 1080435600 + tz.transition 2004, 10, :o5, 1099184400 + tz.transition 2005, 3, :o4, 1111885200 + tz.transition 2005, 10, :o5, 1130634000 + tz.transition 2006, 3, :o4, 1143334800 + tz.transition 2006, 10, :o5, 1162083600 + tz.transition 2007, 3, :o4, 1174784400 + tz.transition 2007, 10, :o5, 1193533200 + tz.transition 2008, 3, :o4, 1206838800 + tz.transition 2008, 10, :o5, 1224982800 + tz.transition 2009, 3, :o4, 1238288400 + tz.transition 2009, 10, :o5, 1256432400 + tz.transition 2010, 3, :o4, 1269738000 + tz.transition 2010, 10, :o5, 1288486800 + tz.transition 2011, 3, :o4, 1301187600 + tz.transition 2011, 10, :o5, 1319936400 + tz.transition 2012, 3, :o4, 1332637200 + tz.transition 2012, 10, :o5, 1351386000 + tz.transition 2013, 3, :o4, 1364691600 + tz.transition 2013, 10, :o5, 1382835600 + tz.transition 2014, 3, :o4, 1396141200 + tz.transition 2014, 10, :o5, 1414285200 + tz.transition 2015, 3, :o4, 1427590800 + tz.transition 2015, 10, :o5, 1445734800 + tz.transition 2016, 3, :o4, 1459040400 + tz.transition 2016, 10, :o5, 1477789200 + tz.transition 2017, 3, :o4, 1490490000 + tz.transition 2017, 10, :o5, 1509238800 + tz.transition 2018, 3, :o4, 1521939600 + tz.transition 2018, 10, :o5, 1540688400 + tz.transition 2019, 3, :o4, 1553994000 + tz.transition 2019, 10, :o5, 1572138000 + tz.transition 2020, 3, :o4, 1585443600 + tz.transition 2020, 10, :o5, 1603587600 + tz.transition 2021, 3, :o4, 1616893200 + tz.transition 2021, 10, :o5, 1635642000 + tz.transition 2022, 3, :o4, 1648342800 + tz.transition 2022, 10, :o5, 1667091600 + tz.transition 2023, 3, :o4, 1679792400 + tz.transition 2023, 10, :o5, 1698541200 + tz.transition 2024, 3, :o4, 1711846800 + tz.transition 2024, 10, :o5, 1729990800 + tz.transition 2025, 3, :o4, 1743296400 + tz.transition 2025, 10, :o5, 1761440400 + tz.transition 2026, 3, :o4, 1774746000 + tz.transition 2026, 10, :o5, 1792890000 + tz.transition 2027, 3, :o4, 1806195600 + tz.transition 2027, 10, :o5, 1824944400 + tz.transition 2028, 3, :o4, 1837645200 + tz.transition 2028, 10, :o5, 1856394000 + tz.transition 2029, 3, :o4, 1869094800 + tz.transition 2029, 10, :o5, 1887843600 + tz.transition 2030, 3, :o4, 1901149200 + tz.transition 2030, 10, :o5, 1919293200 + tz.transition 2031, 3, :o4, 1932598800 + tz.transition 2031, 10, :o5, 1950742800 + tz.transition 2032, 3, :o4, 1964048400 + tz.transition 2032, 10, :o5, 1982797200 + tz.transition 2033, 3, :o4, 1995498000 + tz.transition 2033, 10, :o5, 2014246800 + tz.transition 2034, 3, :o4, 2026947600 + tz.transition 2034, 10, :o5, 2045696400 + tz.transition 2035, 3, :o4, 2058397200 + tz.transition 2035, 10, :o5, 2077146000 + tz.transition 2036, 3, :o4, 2090451600 + tz.transition 2036, 10, :o5, 2108595600 + tz.transition 2037, 3, :o4, 2121901200 + tz.transition 2037, 10, :o5, 2140045200 + tz.transition 2038, 3, :o4, 59172253, 24 + tz.transition 2038, 10, :o5, 59177461, 24 + tz.transition 2039, 3, :o4, 59180989, 24 + tz.transition 2039, 10, :o5, 59186197, 24 + tz.transition 2040, 3, :o4, 59189725, 24 + tz.transition 2040, 10, :o5, 59194933, 24 + tz.transition 2041, 3, :o4, 59198629, 24 + tz.transition 2041, 10, :o5, 59203669, 24 + tz.transition 2042, 3, :o4, 59207365, 24 + tz.transition 2042, 10, :o5, 59212405, 24 + tz.transition 2043, 3, :o4, 59216101, 24 + tz.transition 2043, 10, :o5, 59221141, 24 + tz.transition 2044, 3, :o4, 59224837, 24 + tz.transition 2044, 10, :o5, 59230045, 24 + tz.transition 2045, 3, :o4, 59233573, 24 + tz.transition 2045, 10, :o5, 59238781, 24 + tz.transition 2046, 3, :o4, 59242309, 24 + tz.transition 2046, 10, :o5, 59247517, 24 + tz.transition 2047, 3, :o4, 59251213, 24 + tz.transition 2047, 10, :o5, 59256253, 24 + tz.transition 2048, 3, :o4, 59259949, 24 + tz.transition 2048, 10, :o5, 59264989, 24 + tz.transition 2049, 3, :o4, 59268685, 24 + tz.transition 2049, 10, :o5, 59273893, 24 + tz.transition 2050, 3, :o4, 59277421, 24 + tz.transition 2050, 10, :o5, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Prague.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Prague.rb new file mode 100644 index 0000000000..bcabee96c1 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Prague.rb @@ -0,0 +1,187 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Prague + include TimezoneDefinition + + timezone 'Europe/Prague' do |tz| + tz.offset :o0, 3464, 0, :LMT + tz.offset :o1, 3464, 0, :PMT + tz.offset :o2, 3600, 0, :CET + tz.offset :o3, 3600, 3600, :CEST + + tz.transition 1849, 12, :o1, 25884991367, 10800 + tz.transition 1891, 9, :o2, 26049669767, 10800 + tz.transition 1916, 4, :o3, 29051813, 12 + tz.transition 1916, 9, :o2, 58107299, 24 + tz.transition 1917, 4, :o3, 58112029, 24 + tz.transition 1917, 9, :o2, 58115725, 24 + tz.transition 1918, 4, :o3, 58120765, 24 + tz.transition 1918, 9, :o2, 58124461, 24 + tz.transition 1940, 4, :o3, 58313293, 24 + tz.transition 1942, 11, :o2, 58335973, 24 + tz.transition 1943, 3, :o3, 58339501, 24 + tz.transition 1943, 10, :o2, 58344037, 24 + tz.transition 1944, 4, :o3, 58348405, 24 + tz.transition 1944, 9, :o2, 58352413, 24 + tz.transition 1945, 4, :o3, 58357285, 24 + tz.transition 1945, 11, :o2, 58362661, 24 + tz.transition 1946, 5, :o3, 58366717, 24 + tz.transition 1946, 10, :o2, 58370389, 24 + tz.transition 1947, 4, :o3, 58375093, 24 + tz.transition 1947, 10, :o2, 58379125, 24 + tz.transition 1948, 4, :o3, 58383829, 24 + tz.transition 1948, 10, :o2, 58387861, 24 + tz.transition 1949, 4, :o3, 58392373, 24 + tz.transition 1949, 10, :o2, 58396597, 24 + tz.transition 1979, 4, :o3, 291776400 + tz.transition 1979, 9, :o2, 307501200 + tz.transition 1980, 4, :o3, 323830800 + tz.transition 1980, 9, :o2, 338950800 + tz.transition 1981, 3, :o3, 354675600 + tz.transition 1981, 9, :o2, 370400400 + tz.transition 1982, 3, :o3, 386125200 + tz.transition 1982, 9, :o2, 401850000 + tz.transition 1983, 3, :o3, 417574800 + tz.transition 1983, 9, :o2, 433299600 + tz.transition 1984, 3, :o3, 449024400 + tz.transition 1984, 9, :o2, 465354000 + tz.transition 1985, 3, :o3, 481078800 + tz.transition 1985, 9, :o2, 496803600 + tz.transition 1986, 3, :o3, 512528400 + tz.transition 1986, 9, :o2, 528253200 + tz.transition 1987, 3, :o3, 543978000 + tz.transition 1987, 9, :o2, 559702800 + tz.transition 1988, 3, :o3, 575427600 + tz.transition 1988, 9, :o2, 591152400 + tz.transition 1989, 3, :o3, 606877200 + tz.transition 1989, 9, :o2, 622602000 + tz.transition 1990, 3, :o3, 638326800 + tz.transition 1990, 9, :o2, 654656400 + tz.transition 1991, 3, :o3, 670381200 + tz.transition 1991, 9, :o2, 686106000 + tz.transition 1992, 3, :o3, 701830800 + tz.transition 1992, 9, :o2, 717555600 + tz.transition 1993, 3, :o3, 733280400 + tz.transition 1993, 9, :o2, 749005200 + tz.transition 1994, 3, :o3, 764730000 + tz.transition 1994, 9, :o2, 780454800 + tz.transition 1995, 3, :o3, 796179600 + tz.transition 1995, 9, :o2, 811904400 + tz.transition 1996, 3, :o3, 828234000 + tz.transition 1996, 10, :o2, 846378000 + tz.transition 1997, 3, :o3, 859683600 + tz.transition 1997, 10, :o2, 877827600 + tz.transition 1998, 3, :o3, 891133200 + tz.transition 1998, 10, :o2, 909277200 + tz.transition 1999, 3, :o3, 922582800 + tz.transition 1999, 10, :o2, 941331600 + tz.transition 2000, 3, :o3, 954032400 + tz.transition 2000, 10, :o2, 972781200 + tz.transition 2001, 3, :o3, 985482000 + tz.transition 2001, 10, :o2, 1004230800 + tz.transition 2002, 3, :o3, 1017536400 + tz.transition 2002, 10, :o2, 1035680400 + tz.transition 2003, 3, :o3, 1048986000 + tz.transition 2003, 10, :o2, 1067130000 + tz.transition 2004, 3, :o3, 1080435600 + tz.transition 2004, 10, :o2, 1099184400 + tz.transition 2005, 3, :o3, 1111885200 + tz.transition 2005, 10, :o2, 1130634000 + tz.transition 2006, 3, :o3, 1143334800 + tz.transition 2006, 10, :o2, 1162083600 + tz.transition 2007, 3, :o3, 1174784400 + tz.transition 2007, 10, :o2, 1193533200 + tz.transition 2008, 3, :o3, 1206838800 + tz.transition 2008, 10, :o2, 1224982800 + tz.transition 2009, 3, :o3, 1238288400 + tz.transition 2009, 10, :o2, 1256432400 + tz.transition 2010, 3, :o3, 1269738000 + tz.transition 2010, 10, :o2, 1288486800 + tz.transition 2011, 3, :o3, 1301187600 + tz.transition 2011, 10, :o2, 1319936400 + tz.transition 2012, 3, :o3, 1332637200 + tz.transition 2012, 10, :o2, 1351386000 + tz.transition 2013, 3, :o3, 1364691600 + tz.transition 2013, 10, :o2, 1382835600 + tz.transition 2014, 3, :o3, 1396141200 + tz.transition 2014, 10, :o2, 1414285200 + tz.transition 2015, 3, :o3, 1427590800 + tz.transition 2015, 10, :o2, 1445734800 + tz.transition 2016, 3, :o3, 1459040400 + tz.transition 2016, 10, :o2, 1477789200 + tz.transition 2017, 3, :o3, 1490490000 + tz.transition 2017, 10, :o2, 1509238800 + tz.transition 2018, 3, :o3, 1521939600 + tz.transition 2018, 10, :o2, 1540688400 + tz.transition 2019, 3, :o3, 1553994000 + tz.transition 2019, 10, :o2, 1572138000 + tz.transition 2020, 3, :o3, 1585443600 + tz.transition 2020, 10, :o2, 1603587600 + tz.transition 2021, 3, :o3, 1616893200 + tz.transition 2021, 10, :o2, 1635642000 + tz.transition 2022, 3, :o3, 1648342800 + tz.transition 2022, 10, :o2, 1667091600 + tz.transition 2023, 3, :o3, 1679792400 + tz.transition 2023, 10, :o2, 1698541200 + tz.transition 2024, 3, :o3, 1711846800 + tz.transition 2024, 10, :o2, 1729990800 + tz.transition 2025, 3, :o3, 1743296400 + tz.transition 2025, 10, :o2, 1761440400 + tz.transition 2026, 3, :o3, 1774746000 + tz.transition 2026, 10, :o2, 1792890000 + tz.transition 2027, 3, :o3, 1806195600 + tz.transition 2027, 10, :o2, 1824944400 + tz.transition 2028, 3, :o3, 1837645200 + tz.transition 2028, 10, :o2, 1856394000 + tz.transition 2029, 3, :o3, 1869094800 + tz.transition 2029, 10, :o2, 1887843600 + tz.transition 2030, 3, :o3, 1901149200 + tz.transition 2030, 10, :o2, 1919293200 + tz.transition 2031, 3, :o3, 1932598800 + tz.transition 2031, 10, :o2, 1950742800 + tz.transition 2032, 3, :o3, 1964048400 + tz.transition 2032, 10, :o2, 1982797200 + tz.transition 2033, 3, :o3, 1995498000 + tz.transition 2033, 10, :o2, 2014246800 + tz.transition 2034, 3, :o3, 2026947600 + tz.transition 2034, 10, :o2, 2045696400 + tz.transition 2035, 3, :o3, 2058397200 + tz.transition 2035, 10, :o2, 2077146000 + tz.transition 2036, 3, :o3, 2090451600 + tz.transition 2036, 10, :o2, 2108595600 + tz.transition 2037, 3, :o3, 2121901200 + tz.transition 2037, 10, :o2, 2140045200 + tz.transition 2038, 3, :o3, 59172253, 24 + tz.transition 2038, 10, :o2, 59177461, 24 + tz.transition 2039, 3, :o3, 59180989, 24 + tz.transition 2039, 10, :o2, 59186197, 24 + tz.transition 2040, 3, :o3, 59189725, 24 + tz.transition 2040, 10, :o2, 59194933, 24 + tz.transition 2041, 3, :o3, 59198629, 24 + tz.transition 2041, 10, :o2, 59203669, 24 + tz.transition 2042, 3, :o3, 59207365, 24 + tz.transition 2042, 10, :o2, 59212405, 24 + tz.transition 2043, 3, :o3, 59216101, 24 + tz.transition 2043, 10, :o2, 59221141, 24 + tz.transition 2044, 3, :o3, 59224837, 24 + tz.transition 2044, 10, :o2, 59230045, 24 + tz.transition 2045, 3, :o3, 59233573, 24 + tz.transition 2045, 10, :o2, 59238781, 24 + tz.transition 2046, 3, :o3, 59242309, 24 + tz.transition 2046, 10, :o2, 59247517, 24 + tz.transition 2047, 3, :o3, 59251213, 24 + tz.transition 2047, 10, :o2, 59256253, 24 + tz.transition 2048, 3, :o3, 59259949, 24 + tz.transition 2048, 10, :o2, 59264989, 24 + tz.transition 2049, 3, :o3, 59268685, 24 + tz.transition 2049, 10, :o2, 59273893, 24 + tz.transition 2050, 3, :o3, 59277421, 24 + tz.transition 2050, 10, :o2, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Riga.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Riga.rb new file mode 100644 index 0000000000..784837f758 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Riga.rb @@ -0,0 +1,176 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Riga + include TimezoneDefinition + + timezone 'Europe/Riga' do |tz| + tz.offset :o0, 5784, 0, :LMT + tz.offset :o1, 5784, 0, :RMT + tz.offset :o2, 5784, 3600, :LST + tz.offset :o3, 7200, 0, :EET + tz.offset :o4, 10800, 0, :MSK + tz.offset :o5, 3600, 3600, :CEST + tz.offset :o6, 3600, 0, :CET + tz.offset :o7, 10800, 3600, :MSD + tz.offset :o8, 7200, 3600, :EEST + + tz.transition 1879, 12, :o1, 8667775559, 3600 + tz.transition 1918, 4, :o2, 8718114659, 3600 + tz.transition 1918, 9, :o1, 8718669059, 3600 + tz.transition 1919, 4, :o2, 8719378259, 3600 + tz.transition 1919, 5, :o1, 8719561859, 3600 + tz.transition 1926, 5, :o3, 8728727159, 3600 + tz.transition 1940, 8, :o4, 29158157, 12 + tz.transition 1941, 6, :o5, 19441411, 8 + tz.transition 1942, 11, :o6, 58335973, 24 + tz.transition 1943, 3, :o5, 58339501, 24 + tz.transition 1943, 10, :o6, 58344037, 24 + tz.transition 1944, 4, :o5, 58348405, 24 + tz.transition 1944, 10, :o6, 58352773, 24 + tz.transition 1944, 10, :o4, 58353035, 24 + tz.transition 1981, 3, :o7, 354920400 + tz.transition 1981, 9, :o4, 370728000 + tz.transition 1982, 3, :o7, 386456400 + tz.transition 1982, 9, :o4, 402264000 + tz.transition 1983, 3, :o7, 417992400 + tz.transition 1983, 9, :o4, 433800000 + tz.transition 1984, 3, :o7, 449614800 + tz.transition 1984, 9, :o4, 465346800 + tz.transition 1985, 3, :o7, 481071600 + tz.transition 1985, 9, :o4, 496796400 + tz.transition 1986, 3, :o7, 512521200 + tz.transition 1986, 9, :o4, 528246000 + tz.transition 1987, 3, :o7, 543970800 + tz.transition 1987, 9, :o4, 559695600 + tz.transition 1988, 3, :o7, 575420400 + tz.transition 1988, 9, :o4, 591145200 + tz.transition 1989, 3, :o8, 606870000 + tz.transition 1989, 9, :o3, 622598400 + tz.transition 1990, 3, :o8, 638323200 + tz.transition 1990, 9, :o3, 654652800 + tz.transition 1991, 3, :o8, 670377600 + tz.transition 1991, 9, :o3, 686102400 + tz.transition 1992, 3, :o8, 701827200 + tz.transition 1992, 9, :o3, 717552000 + tz.transition 1993, 3, :o8, 733276800 + tz.transition 1993, 9, :o3, 749001600 + tz.transition 1994, 3, :o8, 764726400 + tz.transition 1994, 9, :o3, 780451200 + tz.transition 1995, 3, :o8, 796176000 + tz.transition 1995, 9, :o3, 811900800 + tz.transition 1996, 3, :o8, 828230400 + tz.transition 1996, 9, :o3, 843955200 + tz.transition 1997, 3, :o8, 859683600 + tz.transition 1997, 10, :o3, 877827600 + tz.transition 1998, 3, :o8, 891133200 + tz.transition 1998, 10, :o3, 909277200 + tz.transition 1999, 3, :o8, 922582800 + tz.transition 1999, 10, :o3, 941331600 + tz.transition 2001, 3, :o8, 985482000 + tz.transition 2001, 10, :o3, 1004230800 + tz.transition 2002, 3, :o8, 1017536400 + tz.transition 2002, 10, :o3, 1035680400 + tz.transition 2003, 3, :o8, 1048986000 + tz.transition 2003, 10, :o3, 1067130000 + tz.transition 2004, 3, :o8, 1080435600 + tz.transition 2004, 10, :o3, 1099184400 + tz.transition 2005, 3, :o8, 1111885200 + tz.transition 2005, 10, :o3, 1130634000 + tz.transition 2006, 3, :o8, 1143334800 + tz.transition 2006, 10, :o3, 1162083600 + tz.transition 2007, 3, :o8, 1174784400 + tz.transition 2007, 10, :o3, 1193533200 + tz.transition 2008, 3, :o8, 1206838800 + tz.transition 2008, 10, :o3, 1224982800 + tz.transition 2009, 3, :o8, 1238288400 + tz.transition 2009, 10, :o3, 1256432400 + tz.transition 2010, 3, :o8, 1269738000 + tz.transition 2010, 10, :o3, 1288486800 + tz.transition 2011, 3, :o8, 1301187600 + tz.transition 2011, 10, :o3, 1319936400 + tz.transition 2012, 3, :o8, 1332637200 + tz.transition 2012, 10, :o3, 1351386000 + tz.transition 2013, 3, :o8, 1364691600 + tz.transition 2013, 10, :o3, 1382835600 + tz.transition 2014, 3, :o8, 1396141200 + tz.transition 2014, 10, :o3, 1414285200 + tz.transition 2015, 3, :o8, 1427590800 + tz.transition 2015, 10, :o3, 1445734800 + tz.transition 2016, 3, :o8, 1459040400 + tz.transition 2016, 10, :o3, 1477789200 + tz.transition 2017, 3, :o8, 1490490000 + tz.transition 2017, 10, :o3, 1509238800 + tz.transition 2018, 3, :o8, 1521939600 + tz.transition 2018, 10, :o3, 1540688400 + tz.transition 2019, 3, :o8, 1553994000 + tz.transition 2019, 10, :o3, 1572138000 + tz.transition 2020, 3, :o8, 1585443600 + tz.transition 2020, 10, :o3, 1603587600 + tz.transition 2021, 3, :o8, 1616893200 + tz.transition 2021, 10, :o3, 1635642000 + tz.transition 2022, 3, :o8, 1648342800 + tz.transition 2022, 10, :o3, 1667091600 + tz.transition 2023, 3, :o8, 1679792400 + tz.transition 2023, 10, :o3, 1698541200 + tz.transition 2024, 3, :o8, 1711846800 + tz.transition 2024, 10, :o3, 1729990800 + tz.transition 2025, 3, :o8, 1743296400 + tz.transition 2025, 10, :o3, 1761440400 + tz.transition 2026, 3, :o8, 1774746000 + tz.transition 2026, 10, :o3, 1792890000 + tz.transition 2027, 3, :o8, 1806195600 + tz.transition 2027, 10, :o3, 1824944400 + tz.transition 2028, 3, :o8, 1837645200 + tz.transition 2028, 10, :o3, 1856394000 + tz.transition 2029, 3, :o8, 1869094800 + tz.transition 2029, 10, :o3, 1887843600 + tz.transition 2030, 3, :o8, 1901149200 + tz.transition 2030, 10, :o3, 1919293200 + tz.transition 2031, 3, :o8, 1932598800 + tz.transition 2031, 10, :o3, 1950742800 + tz.transition 2032, 3, :o8, 1964048400 + tz.transition 2032, 10, :o3, 1982797200 + tz.transition 2033, 3, :o8, 1995498000 + tz.transition 2033, 10, :o3, 2014246800 + tz.transition 2034, 3, :o8, 2026947600 + tz.transition 2034, 10, :o3, 2045696400 + tz.transition 2035, 3, :o8, 2058397200 + tz.transition 2035, 10, :o3, 2077146000 + tz.transition 2036, 3, :o8, 2090451600 + tz.transition 2036, 10, :o3, 2108595600 + tz.transition 2037, 3, :o8, 2121901200 + tz.transition 2037, 10, :o3, 2140045200 + tz.transition 2038, 3, :o8, 59172253, 24 + tz.transition 2038, 10, :o3, 59177461, 24 + tz.transition 2039, 3, :o8, 59180989, 24 + tz.transition 2039, 10, :o3, 59186197, 24 + tz.transition 2040, 3, :o8, 59189725, 24 + tz.transition 2040, 10, :o3, 59194933, 24 + tz.transition 2041, 3, :o8, 59198629, 24 + tz.transition 2041, 10, :o3, 59203669, 24 + tz.transition 2042, 3, :o8, 59207365, 24 + tz.transition 2042, 10, :o3, 59212405, 24 + tz.transition 2043, 3, :o8, 59216101, 24 + tz.transition 2043, 10, :o3, 59221141, 24 + tz.transition 2044, 3, :o8, 59224837, 24 + tz.transition 2044, 10, :o3, 59230045, 24 + tz.transition 2045, 3, :o8, 59233573, 24 + tz.transition 2045, 10, :o3, 59238781, 24 + tz.transition 2046, 3, :o8, 59242309, 24 + tz.transition 2046, 10, :o3, 59247517, 24 + tz.transition 2047, 3, :o8, 59251213, 24 + tz.transition 2047, 10, :o3, 59256253, 24 + tz.transition 2048, 3, :o8, 59259949, 24 + tz.transition 2048, 10, :o3, 59264989, 24 + tz.transition 2049, 3, :o8, 59268685, 24 + tz.transition 2049, 10, :o3, 59273893, 24 + tz.transition 2050, 3, :o8, 59277421, 24 + tz.transition 2050, 10, :o3, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Rome.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Rome.rb new file mode 100644 index 0000000000..aa7b43d9d2 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Rome.rb @@ -0,0 +1,215 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Rome + include TimezoneDefinition + + timezone 'Europe/Rome' do |tz| + tz.offset :o0, 2996, 0, :LMT + tz.offset :o1, 2996, 0, :RMT + tz.offset :o2, 3600, 0, :CET + tz.offset :o3, 3600, 3600, :CEST + + tz.transition 1866, 9, :o1, 51901915651, 21600 + tz.transition 1893, 10, :o2, 52115798851, 21600 + tz.transition 1916, 6, :o3, 58104419, 24 + tz.transition 1916, 9, :o2, 58107299, 24 + tz.transition 1917, 3, :o3, 58111667, 24 + tz.transition 1917, 9, :o2, 58116035, 24 + tz.transition 1918, 3, :o3, 58119899, 24 + tz.transition 1918, 10, :o2, 58124939, 24 + tz.transition 1919, 3, :o3, 58128467, 24 + tz.transition 1919, 10, :o2, 58133675, 24 + tz.transition 1920, 3, :o3, 58137707, 24 + tz.transition 1920, 9, :o2, 58142075, 24 + tz.transition 1940, 6, :o3, 58315091, 24 + tz.transition 1942, 11, :o2, 58335973, 24 + tz.transition 1943, 3, :o3, 58339501, 24 + tz.transition 1943, 10, :o2, 58344037, 24 + tz.transition 1944, 4, :o3, 58348405, 24 + tz.transition 1944, 9, :o2, 58352411, 24 + tz.transition 1945, 4, :o3, 58357141, 24 + tz.transition 1945, 9, :o2, 58361123, 24 + tz.transition 1946, 3, :o3, 58365517, 24 + tz.transition 1946, 10, :o2, 58370389, 24 + tz.transition 1947, 3, :o3, 58374251, 24 + tz.transition 1947, 10, :o2, 58379123, 24 + tz.transition 1948, 2, :o3, 58382653, 24 + tz.transition 1948, 10, :o2, 58387861, 24 + tz.transition 1966, 5, :o3, 58542419, 24 + tz.transition 1966, 9, :o2, 29272721, 12 + tz.transition 1967, 5, :o3, 58551323, 24 + tz.transition 1967, 9, :o2, 29277089, 12 + tz.transition 1968, 5, :o3, 58560059, 24 + tz.transition 1968, 9, :o2, 29281457, 12 + tz.transition 1969, 5, :o3, 58568963, 24 + tz.transition 1969, 9, :o2, 29285909, 12 + tz.transition 1970, 5, :o3, 12956400 + tz.transition 1970, 9, :o2, 23234400 + tz.transition 1971, 5, :o3, 43801200 + tz.transition 1971, 9, :o2, 54687600 + tz.transition 1972, 5, :o3, 75855600 + tz.transition 1972, 9, :o2, 86738400 + tz.transition 1973, 6, :o3, 107910000 + tz.transition 1973, 9, :o2, 118188000 + tz.transition 1974, 5, :o3, 138754800 + tz.transition 1974, 9, :o2, 149637600 + tz.transition 1975, 5, :o3, 170809200 + tz.transition 1975, 9, :o2, 181090800 + tz.transition 1976, 5, :o3, 202258800 + tz.transition 1976, 9, :o2, 212540400 + tz.transition 1977, 5, :o3, 233103600 + tz.transition 1977, 9, :o2, 243990000 + tz.transition 1978, 5, :o3, 265158000 + tz.transition 1978, 9, :o2, 276044400 + tz.transition 1979, 5, :o3, 296607600 + tz.transition 1979, 9, :o2, 307494000 + tz.transition 1980, 4, :o3, 323830800 + tz.transition 1980, 9, :o2, 338950800 + tz.transition 1981, 3, :o3, 354675600 + tz.transition 1981, 9, :o2, 370400400 + tz.transition 1982, 3, :o3, 386125200 + tz.transition 1982, 9, :o2, 401850000 + tz.transition 1983, 3, :o3, 417574800 + tz.transition 1983, 9, :o2, 433299600 + tz.transition 1984, 3, :o3, 449024400 + tz.transition 1984, 9, :o2, 465354000 + tz.transition 1985, 3, :o3, 481078800 + tz.transition 1985, 9, :o2, 496803600 + tz.transition 1986, 3, :o3, 512528400 + tz.transition 1986, 9, :o2, 528253200 + tz.transition 1987, 3, :o3, 543978000 + tz.transition 1987, 9, :o2, 559702800 + tz.transition 1988, 3, :o3, 575427600 + tz.transition 1988, 9, :o2, 591152400 + tz.transition 1989, 3, :o3, 606877200 + tz.transition 1989, 9, :o2, 622602000 + tz.transition 1990, 3, :o3, 638326800 + tz.transition 1990, 9, :o2, 654656400 + tz.transition 1991, 3, :o3, 670381200 + tz.transition 1991, 9, :o2, 686106000 + tz.transition 1992, 3, :o3, 701830800 + tz.transition 1992, 9, :o2, 717555600 + tz.transition 1993, 3, :o3, 733280400 + tz.transition 1993, 9, :o2, 749005200 + tz.transition 1994, 3, :o3, 764730000 + tz.transition 1994, 9, :o2, 780454800 + tz.transition 1995, 3, :o3, 796179600 + tz.transition 1995, 9, :o2, 811904400 + tz.transition 1996, 3, :o3, 828234000 + tz.transition 1996, 10, :o2, 846378000 + tz.transition 1997, 3, :o3, 859683600 + tz.transition 1997, 10, :o2, 877827600 + tz.transition 1998, 3, :o3, 891133200 + tz.transition 1998, 10, :o2, 909277200 + tz.transition 1999, 3, :o3, 922582800 + tz.transition 1999, 10, :o2, 941331600 + tz.transition 2000, 3, :o3, 954032400 + tz.transition 2000, 10, :o2, 972781200 + tz.transition 2001, 3, :o3, 985482000 + tz.transition 2001, 10, :o2, 1004230800 + tz.transition 2002, 3, :o3, 1017536400 + tz.transition 2002, 10, :o2, 1035680400 + tz.transition 2003, 3, :o3, 1048986000 + tz.transition 2003, 10, :o2, 1067130000 + tz.transition 2004, 3, :o3, 1080435600 + tz.transition 2004, 10, :o2, 1099184400 + tz.transition 2005, 3, :o3, 1111885200 + tz.transition 2005, 10, :o2, 1130634000 + tz.transition 2006, 3, :o3, 1143334800 + tz.transition 2006, 10, :o2, 1162083600 + tz.transition 2007, 3, :o3, 1174784400 + tz.transition 2007, 10, :o2, 1193533200 + tz.transition 2008, 3, :o3, 1206838800 + tz.transition 2008, 10, :o2, 1224982800 + tz.transition 2009, 3, :o3, 1238288400 + tz.transition 2009, 10, :o2, 1256432400 + tz.transition 2010, 3, :o3, 1269738000 + tz.transition 2010, 10, :o2, 1288486800 + tz.transition 2011, 3, :o3, 1301187600 + tz.transition 2011, 10, :o2, 1319936400 + tz.transition 2012, 3, :o3, 1332637200 + tz.transition 2012, 10, :o2, 1351386000 + tz.transition 2013, 3, :o3, 1364691600 + tz.transition 2013, 10, :o2, 1382835600 + tz.transition 2014, 3, :o3, 1396141200 + tz.transition 2014, 10, :o2, 1414285200 + tz.transition 2015, 3, :o3, 1427590800 + tz.transition 2015, 10, :o2, 1445734800 + tz.transition 2016, 3, :o3, 1459040400 + tz.transition 2016, 10, :o2, 1477789200 + tz.transition 2017, 3, :o3, 1490490000 + tz.transition 2017, 10, :o2, 1509238800 + tz.transition 2018, 3, :o3, 1521939600 + tz.transition 2018, 10, :o2, 1540688400 + tz.transition 2019, 3, :o3, 1553994000 + tz.transition 2019, 10, :o2, 1572138000 + tz.transition 2020, 3, :o3, 1585443600 + tz.transition 2020, 10, :o2, 1603587600 + tz.transition 2021, 3, :o3, 1616893200 + tz.transition 2021, 10, :o2, 1635642000 + tz.transition 2022, 3, :o3, 1648342800 + tz.transition 2022, 10, :o2, 1667091600 + tz.transition 2023, 3, :o3, 1679792400 + tz.transition 2023, 10, :o2, 1698541200 + tz.transition 2024, 3, :o3, 1711846800 + tz.transition 2024, 10, :o2, 1729990800 + tz.transition 2025, 3, :o3, 1743296400 + tz.transition 2025, 10, :o2, 1761440400 + tz.transition 2026, 3, :o3, 1774746000 + tz.transition 2026, 10, :o2, 1792890000 + tz.transition 2027, 3, :o3, 1806195600 + tz.transition 2027, 10, :o2, 1824944400 + tz.transition 2028, 3, :o3, 1837645200 + tz.transition 2028, 10, :o2, 1856394000 + tz.transition 2029, 3, :o3, 1869094800 + tz.transition 2029, 10, :o2, 1887843600 + tz.transition 2030, 3, :o3, 1901149200 + tz.transition 2030, 10, :o2, 1919293200 + tz.transition 2031, 3, :o3, 1932598800 + tz.transition 2031, 10, :o2, 1950742800 + tz.transition 2032, 3, :o3, 1964048400 + tz.transition 2032, 10, :o2, 1982797200 + tz.transition 2033, 3, :o3, 1995498000 + tz.transition 2033, 10, :o2, 2014246800 + tz.transition 2034, 3, :o3, 2026947600 + tz.transition 2034, 10, :o2, 2045696400 + tz.transition 2035, 3, :o3, 2058397200 + tz.transition 2035, 10, :o2, 2077146000 + tz.transition 2036, 3, :o3, 2090451600 + tz.transition 2036, 10, :o2, 2108595600 + tz.transition 2037, 3, :o3, 2121901200 + tz.transition 2037, 10, :o2, 2140045200 + tz.transition 2038, 3, :o3, 59172253, 24 + tz.transition 2038, 10, :o2, 59177461, 24 + tz.transition 2039, 3, :o3, 59180989, 24 + tz.transition 2039, 10, :o2, 59186197, 24 + tz.transition 2040, 3, :o3, 59189725, 24 + tz.transition 2040, 10, :o2, 59194933, 24 + tz.transition 2041, 3, :o3, 59198629, 24 + tz.transition 2041, 10, :o2, 59203669, 24 + tz.transition 2042, 3, :o3, 59207365, 24 + tz.transition 2042, 10, :o2, 59212405, 24 + tz.transition 2043, 3, :o3, 59216101, 24 + tz.transition 2043, 10, :o2, 59221141, 24 + tz.transition 2044, 3, :o3, 59224837, 24 + tz.transition 2044, 10, :o2, 59230045, 24 + tz.transition 2045, 3, :o3, 59233573, 24 + tz.transition 2045, 10, :o2, 59238781, 24 + tz.transition 2046, 3, :o3, 59242309, 24 + tz.transition 2046, 10, :o2, 59247517, 24 + tz.transition 2047, 3, :o3, 59251213, 24 + tz.transition 2047, 10, :o2, 59256253, 24 + tz.transition 2048, 3, :o3, 59259949, 24 + tz.transition 2048, 10, :o2, 59264989, 24 + tz.transition 2049, 3, :o3, 59268685, 24 + tz.transition 2049, 10, :o2, 59273893, 24 + tz.transition 2050, 3, :o3, 59277421, 24 + tz.transition 2050, 10, :o2, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sarajevo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sarajevo.rb new file mode 100644 index 0000000000..068c5fe6ad --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sarajevo.rb @@ -0,0 +1,13 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Sarajevo + include TimezoneDefinition + + linked_timezone 'Europe/Sarajevo', 'Europe/Belgrade' + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Skopje.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Skopje.rb new file mode 100644 index 0000000000..10b71f285e --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Skopje.rb @@ -0,0 +1,13 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Skopje + include TimezoneDefinition + + linked_timezone 'Europe/Skopje', 'Europe/Belgrade' + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sofia.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sofia.rb new file mode 100644 index 0000000000..38a70eceb9 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sofia.rb @@ -0,0 +1,173 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Sofia + include TimezoneDefinition + + timezone 'Europe/Sofia' do |tz| + tz.offset :o0, 5596, 0, :LMT + tz.offset :o1, 7016, 0, :IMT + tz.offset :o2, 7200, 0, :EET + tz.offset :o3, 3600, 0, :CET + tz.offset :o4, 3600, 3600, :CEST + tz.offset :o5, 7200, 3600, :EEST + + tz.transition 1879, 12, :o1, 52006653401, 21600 + tz.transition 1894, 11, :o2, 26062154123, 10800 + tz.transition 1942, 11, :o3, 58335973, 24 + tz.transition 1943, 3, :o4, 58339501, 24 + tz.transition 1943, 10, :o3, 58344037, 24 + tz.transition 1944, 4, :o4, 58348405, 24 + tz.transition 1944, 10, :o3, 58352773, 24 + tz.transition 1945, 4, :o2, 29178571, 12 + tz.transition 1979, 3, :o5, 291762000 + tz.transition 1979, 9, :o2, 307576800 + tz.transition 1980, 4, :o5, 323816400 + tz.transition 1980, 9, :o2, 339026400 + tz.transition 1981, 4, :o5, 355266000 + tz.transition 1981, 9, :o2, 370393200 + tz.transition 1982, 4, :o5, 386715600 + tz.transition 1982, 9, :o2, 401846400 + tz.transition 1983, 3, :o5, 417571200 + tz.transition 1983, 9, :o2, 433296000 + tz.transition 1984, 3, :o5, 449020800 + tz.transition 1984, 9, :o2, 465350400 + tz.transition 1985, 3, :o5, 481075200 + tz.transition 1985, 9, :o2, 496800000 + tz.transition 1986, 3, :o5, 512524800 + tz.transition 1986, 9, :o2, 528249600 + tz.transition 1987, 3, :o5, 543974400 + tz.transition 1987, 9, :o2, 559699200 + tz.transition 1988, 3, :o5, 575424000 + tz.transition 1988, 9, :o2, 591148800 + tz.transition 1989, 3, :o5, 606873600 + tz.transition 1989, 9, :o2, 622598400 + tz.transition 1990, 3, :o5, 638323200 + tz.transition 1990, 9, :o2, 654652800 + tz.transition 1991, 3, :o5, 670370400 + tz.transition 1991, 9, :o2, 686091600 + tz.transition 1992, 3, :o5, 701820000 + tz.transition 1992, 9, :o2, 717541200 + tz.transition 1993, 3, :o5, 733269600 + tz.transition 1993, 9, :o2, 748990800 + tz.transition 1994, 3, :o5, 764719200 + tz.transition 1994, 9, :o2, 780440400 + tz.transition 1995, 3, :o5, 796168800 + tz.transition 1995, 9, :o2, 811890000 + tz.transition 1996, 3, :o5, 828223200 + tz.transition 1996, 10, :o2, 846363600 + tz.transition 1997, 3, :o5, 859683600 + tz.transition 1997, 10, :o2, 877827600 + tz.transition 1998, 3, :o5, 891133200 + tz.transition 1998, 10, :o2, 909277200 + tz.transition 1999, 3, :o5, 922582800 + tz.transition 1999, 10, :o2, 941331600 + tz.transition 2000, 3, :o5, 954032400 + tz.transition 2000, 10, :o2, 972781200 + tz.transition 2001, 3, :o5, 985482000 + tz.transition 2001, 10, :o2, 1004230800 + tz.transition 2002, 3, :o5, 1017536400 + tz.transition 2002, 10, :o2, 1035680400 + tz.transition 2003, 3, :o5, 1048986000 + tz.transition 2003, 10, :o2, 1067130000 + tz.transition 2004, 3, :o5, 1080435600 + tz.transition 2004, 10, :o2, 1099184400 + tz.transition 2005, 3, :o5, 1111885200 + tz.transition 2005, 10, :o2, 1130634000 + tz.transition 2006, 3, :o5, 1143334800 + tz.transition 2006, 10, :o2, 1162083600 + tz.transition 2007, 3, :o5, 1174784400 + tz.transition 2007, 10, :o2, 1193533200 + tz.transition 2008, 3, :o5, 1206838800 + tz.transition 2008, 10, :o2, 1224982800 + tz.transition 2009, 3, :o5, 1238288400 + tz.transition 2009, 10, :o2, 1256432400 + tz.transition 2010, 3, :o5, 1269738000 + tz.transition 2010, 10, :o2, 1288486800 + tz.transition 2011, 3, :o5, 1301187600 + tz.transition 2011, 10, :o2, 1319936400 + tz.transition 2012, 3, :o5, 1332637200 + tz.transition 2012, 10, :o2, 1351386000 + tz.transition 2013, 3, :o5, 1364691600 + tz.transition 2013, 10, :o2, 1382835600 + tz.transition 2014, 3, :o5, 1396141200 + tz.transition 2014, 10, :o2, 1414285200 + tz.transition 2015, 3, :o5, 1427590800 + tz.transition 2015, 10, :o2, 1445734800 + tz.transition 2016, 3, :o5, 1459040400 + tz.transition 2016, 10, :o2, 1477789200 + tz.transition 2017, 3, :o5, 1490490000 + tz.transition 2017, 10, :o2, 1509238800 + tz.transition 2018, 3, :o5, 1521939600 + tz.transition 2018, 10, :o2, 1540688400 + tz.transition 2019, 3, :o5, 1553994000 + tz.transition 2019, 10, :o2, 1572138000 + tz.transition 2020, 3, :o5, 1585443600 + tz.transition 2020, 10, :o2, 1603587600 + tz.transition 2021, 3, :o5, 1616893200 + tz.transition 2021, 10, :o2, 1635642000 + tz.transition 2022, 3, :o5, 1648342800 + tz.transition 2022, 10, :o2, 1667091600 + tz.transition 2023, 3, :o5, 1679792400 + tz.transition 2023, 10, :o2, 1698541200 + tz.transition 2024, 3, :o5, 1711846800 + tz.transition 2024, 10, :o2, 1729990800 + tz.transition 2025, 3, :o5, 1743296400 + tz.transition 2025, 10, :o2, 1761440400 + tz.transition 2026, 3, :o5, 1774746000 + tz.transition 2026, 10, :o2, 1792890000 + tz.transition 2027, 3, :o5, 1806195600 + tz.transition 2027, 10, :o2, 1824944400 + tz.transition 2028, 3, :o5, 1837645200 + tz.transition 2028, 10, :o2, 1856394000 + tz.transition 2029, 3, :o5, 1869094800 + tz.transition 2029, 10, :o2, 1887843600 + tz.transition 2030, 3, :o5, 1901149200 + tz.transition 2030, 10, :o2, 1919293200 + tz.transition 2031, 3, :o5, 1932598800 + tz.transition 2031, 10, :o2, 1950742800 + tz.transition 2032, 3, :o5, 1964048400 + tz.transition 2032, 10, :o2, 1982797200 + tz.transition 2033, 3, :o5, 1995498000 + tz.transition 2033, 10, :o2, 2014246800 + tz.transition 2034, 3, :o5, 2026947600 + tz.transition 2034, 10, :o2, 2045696400 + tz.transition 2035, 3, :o5, 2058397200 + tz.transition 2035, 10, :o2, 2077146000 + tz.transition 2036, 3, :o5, 2090451600 + tz.transition 2036, 10, :o2, 2108595600 + tz.transition 2037, 3, :o5, 2121901200 + tz.transition 2037, 10, :o2, 2140045200 + tz.transition 2038, 3, :o5, 59172253, 24 + tz.transition 2038, 10, :o2, 59177461, 24 + tz.transition 2039, 3, :o5, 59180989, 24 + tz.transition 2039, 10, :o2, 59186197, 24 + tz.transition 2040, 3, :o5, 59189725, 24 + tz.transition 2040, 10, :o2, 59194933, 24 + tz.transition 2041, 3, :o5, 59198629, 24 + tz.transition 2041, 10, :o2, 59203669, 24 + tz.transition 2042, 3, :o5, 59207365, 24 + tz.transition 2042, 10, :o2, 59212405, 24 + tz.transition 2043, 3, :o5, 59216101, 24 + tz.transition 2043, 10, :o2, 59221141, 24 + tz.transition 2044, 3, :o5, 59224837, 24 + tz.transition 2044, 10, :o2, 59230045, 24 + tz.transition 2045, 3, :o5, 59233573, 24 + tz.transition 2045, 10, :o2, 59238781, 24 + tz.transition 2046, 3, :o5, 59242309, 24 + tz.transition 2046, 10, :o2, 59247517, 24 + tz.transition 2047, 3, :o5, 59251213, 24 + tz.transition 2047, 10, :o2, 59256253, 24 + tz.transition 2048, 3, :o5, 59259949, 24 + tz.transition 2048, 10, :o2, 59264989, 24 + tz.transition 2049, 3, :o5, 59268685, 24 + tz.transition 2049, 10, :o2, 59273893, 24 + tz.transition 2050, 3, :o5, 59277421, 24 + tz.transition 2050, 10, :o2, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Stockholm.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Stockholm.rb new file mode 100644 index 0000000000..43db70fa61 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Stockholm.rb @@ -0,0 +1,165 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Stockholm + include TimezoneDefinition + + timezone 'Europe/Stockholm' do |tz| + tz.offset :o0, 4332, 0, :LMT + tz.offset :o1, 3614, 0, :SET + tz.offset :o2, 3600, 0, :CET + tz.offset :o3, 3600, 3600, :CEST + + tz.transition 1878, 12, :o1, 17332923239, 7200 + tz.transition 1899, 12, :o2, 104328883793, 43200 + tz.transition 1916, 5, :o3, 29051981, 12 + tz.transition 1916, 9, :o2, 58107299, 24 + tz.transition 1980, 4, :o3, 323830800 + tz.transition 1980, 9, :o2, 338950800 + tz.transition 1981, 3, :o3, 354675600 + tz.transition 1981, 9, :o2, 370400400 + tz.transition 1982, 3, :o3, 386125200 + tz.transition 1982, 9, :o2, 401850000 + tz.transition 1983, 3, :o3, 417574800 + tz.transition 1983, 9, :o2, 433299600 + tz.transition 1984, 3, :o3, 449024400 + tz.transition 1984, 9, :o2, 465354000 + tz.transition 1985, 3, :o3, 481078800 + tz.transition 1985, 9, :o2, 496803600 + tz.transition 1986, 3, :o3, 512528400 + tz.transition 1986, 9, :o2, 528253200 + tz.transition 1987, 3, :o3, 543978000 + tz.transition 1987, 9, :o2, 559702800 + tz.transition 1988, 3, :o3, 575427600 + tz.transition 1988, 9, :o2, 591152400 + tz.transition 1989, 3, :o3, 606877200 + tz.transition 1989, 9, :o2, 622602000 + tz.transition 1990, 3, :o3, 638326800 + tz.transition 1990, 9, :o2, 654656400 + tz.transition 1991, 3, :o3, 670381200 + tz.transition 1991, 9, :o2, 686106000 + tz.transition 1992, 3, :o3, 701830800 + tz.transition 1992, 9, :o2, 717555600 + tz.transition 1993, 3, :o3, 733280400 + tz.transition 1993, 9, :o2, 749005200 + tz.transition 1994, 3, :o3, 764730000 + tz.transition 1994, 9, :o2, 780454800 + tz.transition 1995, 3, :o3, 796179600 + tz.transition 1995, 9, :o2, 811904400 + tz.transition 1996, 3, :o3, 828234000 + tz.transition 1996, 10, :o2, 846378000 + tz.transition 1997, 3, :o3, 859683600 + tz.transition 1997, 10, :o2, 877827600 + tz.transition 1998, 3, :o3, 891133200 + tz.transition 1998, 10, :o2, 909277200 + tz.transition 1999, 3, :o3, 922582800 + tz.transition 1999, 10, :o2, 941331600 + tz.transition 2000, 3, :o3, 954032400 + tz.transition 2000, 10, :o2, 972781200 + tz.transition 2001, 3, :o3, 985482000 + tz.transition 2001, 10, :o2, 1004230800 + tz.transition 2002, 3, :o3, 1017536400 + tz.transition 2002, 10, :o2, 1035680400 + tz.transition 2003, 3, :o3, 1048986000 + tz.transition 2003, 10, :o2, 1067130000 + tz.transition 2004, 3, :o3, 1080435600 + tz.transition 2004, 10, :o2, 1099184400 + tz.transition 2005, 3, :o3, 1111885200 + tz.transition 2005, 10, :o2, 1130634000 + tz.transition 2006, 3, :o3, 1143334800 + tz.transition 2006, 10, :o2, 1162083600 + tz.transition 2007, 3, :o3, 1174784400 + tz.transition 2007, 10, :o2, 1193533200 + tz.transition 2008, 3, :o3, 1206838800 + tz.transition 2008, 10, :o2, 1224982800 + tz.transition 2009, 3, :o3, 1238288400 + tz.transition 2009, 10, :o2, 1256432400 + tz.transition 2010, 3, :o3, 1269738000 + tz.transition 2010, 10, :o2, 1288486800 + tz.transition 2011, 3, :o3, 1301187600 + tz.transition 2011, 10, :o2, 1319936400 + tz.transition 2012, 3, :o3, 1332637200 + tz.transition 2012, 10, :o2, 1351386000 + tz.transition 2013, 3, :o3, 1364691600 + tz.transition 2013, 10, :o2, 1382835600 + tz.transition 2014, 3, :o3, 1396141200 + tz.transition 2014, 10, :o2, 1414285200 + tz.transition 2015, 3, :o3, 1427590800 + tz.transition 2015, 10, :o2, 1445734800 + tz.transition 2016, 3, :o3, 1459040400 + tz.transition 2016, 10, :o2, 1477789200 + tz.transition 2017, 3, :o3, 1490490000 + tz.transition 2017, 10, :o2, 1509238800 + tz.transition 2018, 3, :o3, 1521939600 + tz.transition 2018, 10, :o2, 1540688400 + tz.transition 2019, 3, :o3, 1553994000 + tz.transition 2019, 10, :o2, 1572138000 + tz.transition 2020, 3, :o3, 1585443600 + tz.transition 2020, 10, :o2, 1603587600 + tz.transition 2021, 3, :o3, 1616893200 + tz.transition 2021, 10, :o2, 1635642000 + tz.transition 2022, 3, :o3, 1648342800 + tz.transition 2022, 10, :o2, 1667091600 + tz.transition 2023, 3, :o3, 1679792400 + tz.transition 2023, 10, :o2, 1698541200 + tz.transition 2024, 3, :o3, 1711846800 + tz.transition 2024, 10, :o2, 1729990800 + tz.transition 2025, 3, :o3, 1743296400 + tz.transition 2025, 10, :o2, 1761440400 + tz.transition 2026, 3, :o3, 1774746000 + tz.transition 2026, 10, :o2, 1792890000 + tz.transition 2027, 3, :o3, 1806195600 + tz.transition 2027, 10, :o2, 1824944400 + tz.transition 2028, 3, :o3, 1837645200 + tz.transition 2028, 10, :o2, 1856394000 + tz.transition 2029, 3, :o3, 1869094800 + tz.transition 2029, 10, :o2, 1887843600 + tz.transition 2030, 3, :o3, 1901149200 + tz.transition 2030, 10, :o2, 1919293200 + tz.transition 2031, 3, :o3, 1932598800 + tz.transition 2031, 10, :o2, 1950742800 + tz.transition 2032, 3, :o3, 1964048400 + tz.transition 2032, 10, :o2, 1982797200 + tz.transition 2033, 3, :o3, 1995498000 + tz.transition 2033, 10, :o2, 2014246800 + tz.transition 2034, 3, :o3, 2026947600 + tz.transition 2034, 10, :o2, 2045696400 + tz.transition 2035, 3, :o3, 2058397200 + tz.transition 2035, 10, :o2, 2077146000 + tz.transition 2036, 3, :o3, 2090451600 + tz.transition 2036, 10, :o2, 2108595600 + tz.transition 2037, 3, :o3, 2121901200 + tz.transition 2037, 10, :o2, 2140045200 + tz.transition 2038, 3, :o3, 59172253, 24 + tz.transition 2038, 10, :o2, 59177461, 24 + tz.transition 2039, 3, :o3, 59180989, 24 + tz.transition 2039, 10, :o2, 59186197, 24 + tz.transition 2040, 3, :o3, 59189725, 24 + tz.transition 2040, 10, :o2, 59194933, 24 + tz.transition 2041, 3, :o3, 59198629, 24 + tz.transition 2041, 10, :o2, 59203669, 24 + tz.transition 2042, 3, :o3, 59207365, 24 + tz.transition 2042, 10, :o2, 59212405, 24 + tz.transition 2043, 3, :o3, 59216101, 24 + tz.transition 2043, 10, :o2, 59221141, 24 + tz.transition 2044, 3, :o3, 59224837, 24 + tz.transition 2044, 10, :o2, 59230045, 24 + tz.transition 2045, 3, :o3, 59233573, 24 + tz.transition 2045, 10, :o2, 59238781, 24 + tz.transition 2046, 3, :o3, 59242309, 24 + tz.transition 2046, 10, :o2, 59247517, 24 + tz.transition 2047, 3, :o3, 59251213, 24 + tz.transition 2047, 10, :o2, 59256253, 24 + tz.transition 2048, 3, :o3, 59259949, 24 + tz.transition 2048, 10, :o2, 59264989, 24 + tz.transition 2049, 3, :o3, 59268685, 24 + tz.transition 2049, 10, :o2, 59273893, 24 + tz.transition 2050, 3, :o3, 59277421, 24 + tz.transition 2050, 10, :o2, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Tallinn.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Tallinn.rb new file mode 100644 index 0000000000..de5a8569f3 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Tallinn.rb @@ -0,0 +1,172 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Tallinn + include TimezoneDefinition + + timezone 'Europe/Tallinn' do |tz| + tz.offset :o0, 5940, 0, :LMT + tz.offset :o1, 5940, 0, :TMT + tz.offset :o2, 3600, 0, :CET + tz.offset :o3, 3600, 3600, :CEST + tz.offset :o4, 7200, 0, :EET + tz.offset :o5, 10800, 0, :MSK + tz.offset :o6, 10800, 3600, :MSD + tz.offset :o7, 7200, 3600, :EEST + + tz.transition 1879, 12, :o1, 385234469, 160 + tz.transition 1918, 1, :o2, 387460069, 160 + tz.transition 1918, 4, :o3, 58120765, 24 + tz.transition 1918, 9, :o2, 58124461, 24 + tz.transition 1919, 6, :o1, 58131371, 24 + tz.transition 1921, 4, :o4, 387649669, 160 + tz.transition 1940, 8, :o5, 29158169, 12 + tz.transition 1941, 9, :o3, 19442019, 8 + tz.transition 1942, 11, :o2, 58335973, 24 + tz.transition 1943, 3, :o3, 58339501, 24 + tz.transition 1943, 10, :o2, 58344037, 24 + tz.transition 1944, 4, :o3, 58348405, 24 + tz.transition 1944, 9, :o5, 29176265, 12 + tz.transition 1981, 3, :o6, 354920400 + tz.transition 1981, 9, :o5, 370728000 + tz.transition 1982, 3, :o6, 386456400 + tz.transition 1982, 9, :o5, 402264000 + tz.transition 1983, 3, :o6, 417992400 + tz.transition 1983, 9, :o5, 433800000 + tz.transition 1984, 3, :o6, 449614800 + tz.transition 1984, 9, :o5, 465346800 + tz.transition 1985, 3, :o6, 481071600 + tz.transition 1985, 9, :o5, 496796400 + tz.transition 1986, 3, :o6, 512521200 + tz.transition 1986, 9, :o5, 528246000 + tz.transition 1987, 3, :o6, 543970800 + tz.transition 1987, 9, :o5, 559695600 + tz.transition 1988, 3, :o6, 575420400 + tz.transition 1988, 9, :o5, 591145200 + tz.transition 1989, 3, :o7, 606870000 + tz.transition 1989, 9, :o4, 622598400 + tz.transition 1990, 3, :o7, 638323200 + tz.transition 1990, 9, :o4, 654652800 + tz.transition 1991, 3, :o7, 670377600 + tz.transition 1991, 9, :o4, 686102400 + tz.transition 1992, 3, :o7, 701827200 + tz.transition 1992, 9, :o4, 717552000 + tz.transition 1993, 3, :o7, 733276800 + tz.transition 1993, 9, :o4, 749001600 + tz.transition 1994, 3, :o7, 764726400 + tz.transition 1994, 9, :o4, 780451200 + tz.transition 1995, 3, :o7, 796176000 + tz.transition 1995, 9, :o4, 811900800 + tz.transition 1996, 3, :o7, 828230400 + tz.transition 1996, 10, :o4, 846374400 + tz.transition 1997, 3, :o7, 859680000 + tz.transition 1997, 10, :o4, 877824000 + tz.transition 1998, 3, :o7, 891129600 + tz.transition 1998, 10, :o4, 909277200 + tz.transition 1999, 3, :o7, 922582800 + tz.transition 1999, 10, :o4, 941331600 + tz.transition 2002, 3, :o7, 1017536400 + tz.transition 2002, 10, :o4, 1035680400 + tz.transition 2003, 3, :o7, 1048986000 + tz.transition 2003, 10, :o4, 1067130000 + tz.transition 2004, 3, :o7, 1080435600 + tz.transition 2004, 10, :o4, 1099184400 + tz.transition 2005, 3, :o7, 1111885200 + tz.transition 2005, 10, :o4, 1130634000 + tz.transition 2006, 3, :o7, 1143334800 + tz.transition 2006, 10, :o4, 1162083600 + tz.transition 2007, 3, :o7, 1174784400 + tz.transition 2007, 10, :o4, 1193533200 + tz.transition 2008, 3, :o7, 1206838800 + tz.transition 2008, 10, :o4, 1224982800 + tz.transition 2009, 3, :o7, 1238288400 + tz.transition 2009, 10, :o4, 1256432400 + tz.transition 2010, 3, :o7, 1269738000 + tz.transition 2010, 10, :o4, 1288486800 + tz.transition 2011, 3, :o7, 1301187600 + tz.transition 2011, 10, :o4, 1319936400 + tz.transition 2012, 3, :o7, 1332637200 + tz.transition 2012, 10, :o4, 1351386000 + tz.transition 2013, 3, :o7, 1364691600 + tz.transition 2013, 10, :o4, 1382835600 + tz.transition 2014, 3, :o7, 1396141200 + tz.transition 2014, 10, :o4, 1414285200 + tz.transition 2015, 3, :o7, 1427590800 + tz.transition 2015, 10, :o4, 1445734800 + tz.transition 2016, 3, :o7, 1459040400 + tz.transition 2016, 10, :o4, 1477789200 + tz.transition 2017, 3, :o7, 1490490000 + tz.transition 2017, 10, :o4, 1509238800 + tz.transition 2018, 3, :o7, 1521939600 + tz.transition 2018, 10, :o4, 1540688400 + tz.transition 2019, 3, :o7, 1553994000 + tz.transition 2019, 10, :o4, 1572138000 + tz.transition 2020, 3, :o7, 1585443600 + tz.transition 2020, 10, :o4, 1603587600 + tz.transition 2021, 3, :o7, 1616893200 + tz.transition 2021, 10, :o4, 1635642000 + tz.transition 2022, 3, :o7, 1648342800 + tz.transition 2022, 10, :o4, 1667091600 + tz.transition 2023, 3, :o7, 1679792400 + tz.transition 2023, 10, :o4, 1698541200 + tz.transition 2024, 3, :o7, 1711846800 + tz.transition 2024, 10, :o4, 1729990800 + tz.transition 2025, 3, :o7, 1743296400 + tz.transition 2025, 10, :o4, 1761440400 + tz.transition 2026, 3, :o7, 1774746000 + tz.transition 2026, 10, :o4, 1792890000 + tz.transition 2027, 3, :o7, 1806195600 + tz.transition 2027, 10, :o4, 1824944400 + tz.transition 2028, 3, :o7, 1837645200 + tz.transition 2028, 10, :o4, 1856394000 + tz.transition 2029, 3, :o7, 1869094800 + tz.transition 2029, 10, :o4, 1887843600 + tz.transition 2030, 3, :o7, 1901149200 + tz.transition 2030, 10, :o4, 1919293200 + tz.transition 2031, 3, :o7, 1932598800 + tz.transition 2031, 10, :o4, 1950742800 + tz.transition 2032, 3, :o7, 1964048400 + tz.transition 2032, 10, :o4, 1982797200 + tz.transition 2033, 3, :o7, 1995498000 + tz.transition 2033, 10, :o4, 2014246800 + tz.transition 2034, 3, :o7, 2026947600 + tz.transition 2034, 10, :o4, 2045696400 + tz.transition 2035, 3, :o7, 2058397200 + tz.transition 2035, 10, :o4, 2077146000 + tz.transition 2036, 3, :o7, 2090451600 + tz.transition 2036, 10, :o4, 2108595600 + tz.transition 2037, 3, :o7, 2121901200 + tz.transition 2037, 10, :o4, 2140045200 + tz.transition 2038, 3, :o7, 59172253, 24 + tz.transition 2038, 10, :o4, 59177461, 24 + tz.transition 2039, 3, :o7, 59180989, 24 + tz.transition 2039, 10, :o4, 59186197, 24 + tz.transition 2040, 3, :o7, 59189725, 24 + tz.transition 2040, 10, :o4, 59194933, 24 + tz.transition 2041, 3, :o7, 59198629, 24 + tz.transition 2041, 10, :o4, 59203669, 24 + tz.transition 2042, 3, :o7, 59207365, 24 + tz.transition 2042, 10, :o4, 59212405, 24 + tz.transition 2043, 3, :o7, 59216101, 24 + tz.transition 2043, 10, :o4, 59221141, 24 + tz.transition 2044, 3, :o7, 59224837, 24 + tz.transition 2044, 10, :o4, 59230045, 24 + tz.transition 2045, 3, :o7, 59233573, 24 + tz.transition 2045, 10, :o4, 59238781, 24 + tz.transition 2046, 3, :o7, 59242309, 24 + tz.transition 2046, 10, :o4, 59247517, 24 + tz.transition 2047, 3, :o7, 59251213, 24 + tz.transition 2047, 10, :o4, 59256253, 24 + tz.transition 2048, 3, :o7, 59259949, 24 + tz.transition 2048, 10, :o4, 59264989, 24 + tz.transition 2049, 3, :o7, 59268685, 24 + tz.transition 2049, 10, :o4, 59273893, 24 + tz.transition 2050, 3, :o7, 59277421, 24 + tz.transition 2050, 10, :o4, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vienna.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vienna.rb new file mode 100644 index 0000000000..990aabab66 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vienna.rb @@ -0,0 +1,183 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Vienna + include TimezoneDefinition + + timezone 'Europe/Vienna' do |tz| + tz.offset :o0, 3920, 0, :LMT + tz.offset :o1, 3600, 0, :CET + tz.offset :o2, 3600, 3600, :CEST + + tz.transition 1893, 3, :o1, 2605558811, 1080 + tz.transition 1916, 4, :o2, 29051813, 12 + tz.transition 1916, 9, :o1, 58107299, 24 + tz.transition 1917, 4, :o2, 58112029, 24 + tz.transition 1917, 9, :o1, 58115725, 24 + tz.transition 1918, 4, :o2, 58120765, 24 + tz.transition 1918, 9, :o1, 58124461, 24 + tz.transition 1920, 4, :o2, 58138069, 24 + tz.transition 1920, 9, :o1, 58141933, 24 + tz.transition 1940, 4, :o2, 58313293, 24 + tz.transition 1942, 11, :o1, 58335973, 24 + tz.transition 1943, 3, :o2, 58339501, 24 + tz.transition 1943, 10, :o1, 58344037, 24 + tz.transition 1944, 4, :o2, 58348405, 24 + tz.transition 1944, 10, :o1, 58352773, 24 + tz.transition 1945, 4, :o2, 58357141, 24 + tz.transition 1945, 4, :o1, 58357381, 24 + tz.transition 1946, 4, :o2, 58366189, 24 + tz.transition 1946, 10, :o1, 58370389, 24 + tz.transition 1947, 4, :o2, 58374757, 24 + tz.transition 1947, 10, :o1, 58379125, 24 + tz.transition 1948, 4, :o2, 58383829, 24 + tz.transition 1948, 10, :o1, 58387861, 24 + tz.transition 1980, 4, :o2, 323823600 + tz.transition 1980, 9, :o1, 338940000 + tz.transition 1981, 3, :o2, 354675600 + tz.transition 1981, 9, :o1, 370400400 + tz.transition 1982, 3, :o2, 386125200 + tz.transition 1982, 9, :o1, 401850000 + tz.transition 1983, 3, :o2, 417574800 + tz.transition 1983, 9, :o1, 433299600 + tz.transition 1984, 3, :o2, 449024400 + tz.transition 1984, 9, :o1, 465354000 + tz.transition 1985, 3, :o2, 481078800 + tz.transition 1985, 9, :o1, 496803600 + tz.transition 1986, 3, :o2, 512528400 + tz.transition 1986, 9, :o1, 528253200 + tz.transition 1987, 3, :o2, 543978000 + tz.transition 1987, 9, :o1, 559702800 + tz.transition 1988, 3, :o2, 575427600 + tz.transition 1988, 9, :o1, 591152400 + tz.transition 1989, 3, :o2, 606877200 + tz.transition 1989, 9, :o1, 622602000 + tz.transition 1990, 3, :o2, 638326800 + tz.transition 1990, 9, :o1, 654656400 + tz.transition 1991, 3, :o2, 670381200 + tz.transition 1991, 9, :o1, 686106000 + tz.transition 1992, 3, :o2, 701830800 + tz.transition 1992, 9, :o1, 717555600 + tz.transition 1993, 3, :o2, 733280400 + tz.transition 1993, 9, :o1, 749005200 + tz.transition 1994, 3, :o2, 764730000 + tz.transition 1994, 9, :o1, 780454800 + tz.transition 1995, 3, :o2, 796179600 + tz.transition 1995, 9, :o1, 811904400 + tz.transition 1996, 3, :o2, 828234000 + tz.transition 1996, 10, :o1, 846378000 + tz.transition 1997, 3, :o2, 859683600 + tz.transition 1997, 10, :o1, 877827600 + tz.transition 1998, 3, :o2, 891133200 + tz.transition 1998, 10, :o1, 909277200 + tz.transition 1999, 3, :o2, 922582800 + tz.transition 1999, 10, :o1, 941331600 + tz.transition 2000, 3, :o2, 954032400 + tz.transition 2000, 10, :o1, 972781200 + tz.transition 2001, 3, :o2, 985482000 + tz.transition 2001, 10, :o1, 1004230800 + tz.transition 2002, 3, :o2, 1017536400 + tz.transition 2002, 10, :o1, 1035680400 + tz.transition 2003, 3, :o2, 1048986000 + tz.transition 2003, 10, :o1, 1067130000 + tz.transition 2004, 3, :o2, 1080435600 + tz.transition 2004, 10, :o1, 1099184400 + tz.transition 2005, 3, :o2, 1111885200 + tz.transition 2005, 10, :o1, 1130634000 + tz.transition 2006, 3, :o2, 1143334800 + tz.transition 2006, 10, :o1, 1162083600 + tz.transition 2007, 3, :o2, 1174784400 + tz.transition 2007, 10, :o1, 1193533200 + tz.transition 2008, 3, :o2, 1206838800 + tz.transition 2008, 10, :o1, 1224982800 + tz.transition 2009, 3, :o2, 1238288400 + tz.transition 2009, 10, :o1, 1256432400 + tz.transition 2010, 3, :o2, 1269738000 + tz.transition 2010, 10, :o1, 1288486800 + tz.transition 2011, 3, :o2, 1301187600 + tz.transition 2011, 10, :o1, 1319936400 + tz.transition 2012, 3, :o2, 1332637200 + tz.transition 2012, 10, :o1, 1351386000 + tz.transition 2013, 3, :o2, 1364691600 + tz.transition 2013, 10, :o1, 1382835600 + tz.transition 2014, 3, :o2, 1396141200 + tz.transition 2014, 10, :o1, 1414285200 + tz.transition 2015, 3, :o2, 1427590800 + tz.transition 2015, 10, :o1, 1445734800 + tz.transition 2016, 3, :o2, 1459040400 + tz.transition 2016, 10, :o1, 1477789200 + tz.transition 2017, 3, :o2, 1490490000 + tz.transition 2017, 10, :o1, 1509238800 + tz.transition 2018, 3, :o2, 1521939600 + tz.transition 2018, 10, :o1, 1540688400 + tz.transition 2019, 3, :o2, 1553994000 + tz.transition 2019, 10, :o1, 1572138000 + tz.transition 2020, 3, :o2, 1585443600 + tz.transition 2020, 10, :o1, 1603587600 + tz.transition 2021, 3, :o2, 1616893200 + tz.transition 2021, 10, :o1, 1635642000 + tz.transition 2022, 3, :o2, 1648342800 + tz.transition 2022, 10, :o1, 1667091600 + tz.transition 2023, 3, :o2, 1679792400 + tz.transition 2023, 10, :o1, 1698541200 + tz.transition 2024, 3, :o2, 1711846800 + tz.transition 2024, 10, :o1, 1729990800 + tz.transition 2025, 3, :o2, 1743296400 + tz.transition 2025, 10, :o1, 1761440400 + tz.transition 2026, 3, :o2, 1774746000 + tz.transition 2026, 10, :o1, 1792890000 + tz.transition 2027, 3, :o2, 1806195600 + tz.transition 2027, 10, :o1, 1824944400 + tz.transition 2028, 3, :o2, 1837645200 + tz.transition 2028, 10, :o1, 1856394000 + tz.transition 2029, 3, :o2, 1869094800 + tz.transition 2029, 10, :o1, 1887843600 + tz.transition 2030, 3, :o2, 1901149200 + tz.transition 2030, 10, :o1, 1919293200 + tz.transition 2031, 3, :o2, 1932598800 + tz.transition 2031, 10, :o1, 1950742800 + tz.transition 2032, 3, :o2, 1964048400 + tz.transition 2032, 10, :o1, 1982797200 + tz.transition 2033, 3, :o2, 1995498000 + tz.transition 2033, 10, :o1, 2014246800 + tz.transition 2034, 3, :o2, 2026947600 + tz.transition 2034, 10, :o1, 2045696400 + tz.transition 2035, 3, :o2, 2058397200 + tz.transition 2035, 10, :o1, 2077146000 + tz.transition 2036, 3, :o2, 2090451600 + tz.transition 2036, 10, :o1, 2108595600 + tz.transition 2037, 3, :o2, 2121901200 + tz.transition 2037, 10, :o1, 2140045200 + tz.transition 2038, 3, :o2, 59172253, 24 + tz.transition 2038, 10, :o1, 59177461, 24 + tz.transition 2039, 3, :o2, 59180989, 24 + tz.transition 2039, 10, :o1, 59186197, 24 + tz.transition 2040, 3, :o2, 59189725, 24 + tz.transition 2040, 10, :o1, 59194933, 24 + tz.transition 2041, 3, :o2, 59198629, 24 + tz.transition 2041, 10, :o1, 59203669, 24 + tz.transition 2042, 3, :o2, 59207365, 24 + tz.transition 2042, 10, :o1, 59212405, 24 + tz.transition 2043, 3, :o2, 59216101, 24 + tz.transition 2043, 10, :o1, 59221141, 24 + tz.transition 2044, 3, :o2, 59224837, 24 + tz.transition 2044, 10, :o1, 59230045, 24 + tz.transition 2045, 3, :o2, 59233573, 24 + tz.transition 2045, 10, :o1, 59238781, 24 + tz.transition 2046, 3, :o2, 59242309, 24 + tz.transition 2046, 10, :o1, 59247517, 24 + tz.transition 2047, 3, :o2, 59251213, 24 + tz.transition 2047, 10, :o1, 59256253, 24 + tz.transition 2048, 3, :o2, 59259949, 24 + tz.transition 2048, 10, :o1, 59264989, 24 + tz.transition 2049, 3, :o2, 59268685, 24 + tz.transition 2049, 10, :o1, 59273893, 24 + tz.transition 2050, 3, :o2, 59277421, 24 + tz.transition 2050, 10, :o1, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vilnius.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vilnius.rb new file mode 100644 index 0000000000..d89d095a75 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vilnius.rb @@ -0,0 +1,170 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Vilnius + include TimezoneDefinition + + timezone 'Europe/Vilnius' do |tz| + tz.offset :o0, 6076, 0, :LMT + tz.offset :o1, 5040, 0, :WMT + tz.offset :o2, 5736, 0, :KMT + tz.offset :o3, 3600, 0, :CET + tz.offset :o4, 7200, 0, :EET + tz.offset :o5, 10800, 0, :MSK + tz.offset :o6, 3600, 3600, :CEST + tz.offset :o7, 10800, 3600, :MSD + tz.offset :o8, 7200, 3600, :EEST + + tz.transition 1879, 12, :o1, 52006653281, 21600 + tz.transition 1916, 12, :o2, 290547533, 120 + tz.transition 1919, 10, :o3, 8720069161, 3600 + tz.transition 1920, 7, :o4, 58140419, 24 + tz.transition 1920, 10, :o3, 29071277, 12 + tz.transition 1940, 8, :o5, 58316267, 24 + tz.transition 1941, 6, :o6, 19441355, 8 + tz.transition 1942, 11, :o3, 58335973, 24 + tz.transition 1943, 3, :o6, 58339501, 24 + tz.transition 1943, 10, :o3, 58344037, 24 + tz.transition 1944, 4, :o6, 58348405, 24 + tz.transition 1944, 7, :o5, 29175641, 12 + tz.transition 1981, 3, :o7, 354920400 + tz.transition 1981, 9, :o5, 370728000 + tz.transition 1982, 3, :o7, 386456400 + tz.transition 1982, 9, :o5, 402264000 + tz.transition 1983, 3, :o7, 417992400 + tz.transition 1983, 9, :o5, 433800000 + tz.transition 1984, 3, :o7, 449614800 + tz.transition 1984, 9, :o5, 465346800 + tz.transition 1985, 3, :o7, 481071600 + tz.transition 1985, 9, :o5, 496796400 + tz.transition 1986, 3, :o7, 512521200 + tz.transition 1986, 9, :o5, 528246000 + tz.transition 1987, 3, :o7, 543970800 + tz.transition 1987, 9, :o5, 559695600 + tz.transition 1988, 3, :o7, 575420400 + tz.transition 1988, 9, :o5, 591145200 + tz.transition 1989, 3, :o7, 606870000 + tz.transition 1989, 9, :o5, 622594800 + tz.transition 1990, 3, :o7, 638319600 + tz.transition 1990, 9, :o5, 654649200 + tz.transition 1991, 3, :o8, 670374000 + tz.transition 1991, 9, :o4, 686102400 + tz.transition 1992, 3, :o8, 701827200 + tz.transition 1992, 9, :o4, 717552000 + tz.transition 1993, 3, :o8, 733276800 + tz.transition 1993, 9, :o4, 749001600 + tz.transition 1994, 3, :o8, 764726400 + tz.transition 1994, 9, :o4, 780451200 + tz.transition 1995, 3, :o8, 796176000 + tz.transition 1995, 9, :o4, 811900800 + tz.transition 1996, 3, :o8, 828230400 + tz.transition 1996, 10, :o4, 846374400 + tz.transition 1997, 3, :o8, 859680000 + tz.transition 1997, 10, :o4, 877824000 + tz.transition 1998, 3, :o6, 891133200 + tz.transition 1998, 10, :o3, 909277200 + tz.transition 1999, 3, :o6, 922582800 + tz.transition 1999, 10, :o4, 941331600 + tz.transition 2003, 3, :o8, 1048986000 + tz.transition 2003, 10, :o4, 1067130000 + tz.transition 2004, 3, :o8, 1080435600 + tz.transition 2004, 10, :o4, 1099184400 + tz.transition 2005, 3, :o8, 1111885200 + tz.transition 2005, 10, :o4, 1130634000 + tz.transition 2006, 3, :o8, 1143334800 + tz.transition 2006, 10, :o4, 1162083600 + tz.transition 2007, 3, :o8, 1174784400 + tz.transition 2007, 10, :o4, 1193533200 + tz.transition 2008, 3, :o8, 1206838800 + tz.transition 2008, 10, :o4, 1224982800 + tz.transition 2009, 3, :o8, 1238288400 + tz.transition 2009, 10, :o4, 1256432400 + tz.transition 2010, 3, :o8, 1269738000 + tz.transition 2010, 10, :o4, 1288486800 + tz.transition 2011, 3, :o8, 1301187600 + tz.transition 2011, 10, :o4, 1319936400 + tz.transition 2012, 3, :o8, 1332637200 + tz.transition 2012, 10, :o4, 1351386000 + tz.transition 2013, 3, :o8, 1364691600 + tz.transition 2013, 10, :o4, 1382835600 + tz.transition 2014, 3, :o8, 1396141200 + tz.transition 2014, 10, :o4, 1414285200 + tz.transition 2015, 3, :o8, 1427590800 + tz.transition 2015, 10, :o4, 1445734800 + tz.transition 2016, 3, :o8, 1459040400 + tz.transition 2016, 10, :o4, 1477789200 + tz.transition 2017, 3, :o8, 1490490000 + tz.transition 2017, 10, :o4, 1509238800 + tz.transition 2018, 3, :o8, 1521939600 + tz.transition 2018, 10, :o4, 1540688400 + tz.transition 2019, 3, :o8, 1553994000 + tz.transition 2019, 10, :o4, 1572138000 + tz.transition 2020, 3, :o8, 1585443600 + tz.transition 2020, 10, :o4, 1603587600 + tz.transition 2021, 3, :o8, 1616893200 + tz.transition 2021, 10, :o4, 1635642000 + tz.transition 2022, 3, :o8, 1648342800 + tz.transition 2022, 10, :o4, 1667091600 + tz.transition 2023, 3, :o8, 1679792400 + tz.transition 2023, 10, :o4, 1698541200 + tz.transition 2024, 3, :o8, 1711846800 + tz.transition 2024, 10, :o4, 1729990800 + tz.transition 2025, 3, :o8, 1743296400 + tz.transition 2025, 10, :o4, 1761440400 + tz.transition 2026, 3, :o8, 1774746000 + tz.transition 2026, 10, :o4, 1792890000 + tz.transition 2027, 3, :o8, 1806195600 + tz.transition 2027, 10, :o4, 1824944400 + tz.transition 2028, 3, :o8, 1837645200 + tz.transition 2028, 10, :o4, 1856394000 + tz.transition 2029, 3, :o8, 1869094800 + tz.transition 2029, 10, :o4, 1887843600 + tz.transition 2030, 3, :o8, 1901149200 + tz.transition 2030, 10, :o4, 1919293200 + tz.transition 2031, 3, :o8, 1932598800 + tz.transition 2031, 10, :o4, 1950742800 + tz.transition 2032, 3, :o8, 1964048400 + tz.transition 2032, 10, :o4, 1982797200 + tz.transition 2033, 3, :o8, 1995498000 + tz.transition 2033, 10, :o4, 2014246800 + tz.transition 2034, 3, :o8, 2026947600 + tz.transition 2034, 10, :o4, 2045696400 + tz.transition 2035, 3, :o8, 2058397200 + tz.transition 2035, 10, :o4, 2077146000 + tz.transition 2036, 3, :o8, 2090451600 + tz.transition 2036, 10, :o4, 2108595600 + tz.transition 2037, 3, :o8, 2121901200 + tz.transition 2037, 10, :o4, 2140045200 + tz.transition 2038, 3, :o8, 59172253, 24 + tz.transition 2038, 10, :o4, 59177461, 24 + tz.transition 2039, 3, :o8, 59180989, 24 + tz.transition 2039, 10, :o4, 59186197, 24 + tz.transition 2040, 3, :o8, 59189725, 24 + tz.transition 2040, 10, :o4, 59194933, 24 + tz.transition 2041, 3, :o8, 59198629, 24 + tz.transition 2041, 10, :o4, 59203669, 24 + tz.transition 2042, 3, :o8, 59207365, 24 + tz.transition 2042, 10, :o4, 59212405, 24 + tz.transition 2043, 3, :o8, 59216101, 24 + tz.transition 2043, 10, :o4, 59221141, 24 + tz.transition 2044, 3, :o8, 59224837, 24 + tz.transition 2044, 10, :o4, 59230045, 24 + tz.transition 2045, 3, :o8, 59233573, 24 + tz.transition 2045, 10, :o4, 59238781, 24 + tz.transition 2046, 3, :o8, 59242309, 24 + tz.transition 2046, 10, :o4, 59247517, 24 + tz.transition 2047, 3, :o8, 59251213, 24 + tz.transition 2047, 10, :o4, 59256253, 24 + tz.transition 2048, 3, :o8, 59259949, 24 + tz.transition 2048, 10, :o4, 59264989, 24 + tz.transition 2049, 3, :o8, 59268685, 24 + tz.transition 2049, 10, :o4, 59273893, 24 + tz.transition 2050, 3, :o8, 59277421, 24 + tz.transition 2050, 10, :o4, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Warsaw.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Warsaw.rb new file mode 100644 index 0000000000..7fa51c2691 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Warsaw.rb @@ -0,0 +1,212 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Warsaw + include TimezoneDefinition + + timezone 'Europe/Warsaw' do |tz| + tz.offset :o0, 5040, 0, :LMT + tz.offset :o1, 5040, 0, :WMT + tz.offset :o2, 3600, 0, :CET + tz.offset :o3, 3600, 3600, :CEST + tz.offset :o4, 7200, 0, :EET + tz.offset :o5, 7200, 3600, :EEST + + tz.transition 1879, 12, :o1, 288925853, 120 + tz.transition 1915, 8, :o2, 290485733, 120 + tz.transition 1916, 4, :o3, 29051813, 12 + tz.transition 1916, 9, :o2, 58107299, 24 + tz.transition 1917, 4, :o3, 58112029, 24 + tz.transition 1917, 9, :o2, 58115725, 24 + tz.transition 1918, 4, :o3, 58120765, 24 + tz.transition 1918, 9, :o4, 58124461, 24 + tz.transition 1919, 4, :o5, 4844127, 2 + tz.transition 1919, 9, :o4, 4844435, 2 + tz.transition 1922, 5, :o2, 29078477, 12 + tz.transition 1940, 6, :o3, 58315285, 24 + tz.transition 1942, 11, :o2, 58335973, 24 + tz.transition 1943, 3, :o3, 58339501, 24 + tz.transition 1943, 10, :o2, 58344037, 24 + tz.transition 1944, 4, :o3, 58348405, 24 + tz.transition 1944, 10, :o2, 4862735, 2 + tz.transition 1945, 4, :o3, 58357787, 24 + tz.transition 1945, 10, :o2, 29181125, 12 + tz.transition 1946, 4, :o3, 58366187, 24 + tz.transition 1946, 10, :o2, 58370413, 24 + tz.transition 1947, 5, :o3, 58375429, 24 + tz.transition 1947, 10, :o2, 58379125, 24 + tz.transition 1948, 4, :o3, 58383829, 24 + tz.transition 1948, 10, :o2, 58387861, 24 + tz.transition 1949, 4, :o3, 58392397, 24 + tz.transition 1949, 10, :o2, 58396597, 24 + tz.transition 1957, 6, :o3, 4871983, 2 + tz.transition 1957, 9, :o2, 4872221, 2 + tz.transition 1958, 3, :o3, 4872585, 2 + tz.transition 1958, 9, :o2, 4872949, 2 + tz.transition 1959, 5, :o3, 4873439, 2 + tz.transition 1959, 10, :o2, 4873691, 2 + tz.transition 1960, 4, :o3, 4874055, 2 + tz.transition 1960, 10, :o2, 4874419, 2 + tz.transition 1961, 5, :o3, 4874895, 2 + tz.transition 1961, 10, :o2, 4875147, 2 + tz.transition 1962, 5, :o3, 4875623, 2 + tz.transition 1962, 9, :o2, 4875875, 2 + tz.transition 1963, 5, :o3, 4876351, 2 + tz.transition 1963, 9, :o2, 4876603, 2 + tz.transition 1964, 5, :o3, 4877093, 2 + tz.transition 1964, 9, :o2, 4877331, 2 + tz.transition 1977, 4, :o3, 228873600 + tz.transition 1977, 9, :o2, 243993600 + tz.transition 1978, 4, :o3, 260323200 + tz.transition 1978, 10, :o2, 276048000 + tz.transition 1979, 4, :o3, 291772800 + tz.transition 1979, 9, :o2, 307497600 + tz.transition 1980, 4, :o3, 323827200 + tz.transition 1980, 9, :o2, 338947200 + tz.transition 1981, 3, :o3, 354672000 + tz.transition 1981, 9, :o2, 370396800 + tz.transition 1982, 3, :o3, 386121600 + tz.transition 1982, 9, :o2, 401846400 + tz.transition 1983, 3, :o3, 417571200 + tz.transition 1983, 9, :o2, 433296000 + tz.transition 1984, 3, :o3, 449020800 + tz.transition 1984, 9, :o2, 465350400 + tz.transition 1985, 3, :o3, 481075200 + tz.transition 1985, 9, :o2, 496800000 + tz.transition 1986, 3, :o3, 512524800 + tz.transition 1986, 9, :o2, 528249600 + tz.transition 1987, 3, :o3, 543974400 + tz.transition 1987, 9, :o2, 559699200 + tz.transition 1988, 3, :o3, 575427600 + tz.transition 1988, 9, :o2, 591152400 + tz.transition 1989, 3, :o3, 606877200 + tz.transition 1989, 9, :o2, 622602000 + tz.transition 1990, 3, :o3, 638326800 + tz.transition 1990, 9, :o2, 654656400 + tz.transition 1991, 3, :o3, 670381200 + tz.transition 1991, 9, :o2, 686106000 + tz.transition 1992, 3, :o3, 701830800 + tz.transition 1992, 9, :o2, 717555600 + tz.transition 1993, 3, :o3, 733280400 + tz.transition 1993, 9, :o2, 749005200 + tz.transition 1994, 3, :o3, 764730000 + tz.transition 1994, 9, :o2, 780454800 + tz.transition 1995, 3, :o3, 796179600 + tz.transition 1995, 9, :o2, 811904400 + tz.transition 1996, 3, :o3, 828234000 + tz.transition 1996, 10, :o2, 846378000 + tz.transition 1997, 3, :o3, 859683600 + tz.transition 1997, 10, :o2, 877827600 + tz.transition 1998, 3, :o3, 891133200 + tz.transition 1998, 10, :o2, 909277200 + tz.transition 1999, 3, :o3, 922582800 + tz.transition 1999, 10, :o2, 941331600 + tz.transition 2000, 3, :o3, 954032400 + tz.transition 2000, 10, :o2, 972781200 + tz.transition 2001, 3, :o3, 985482000 + tz.transition 2001, 10, :o2, 1004230800 + tz.transition 2002, 3, :o3, 1017536400 + tz.transition 2002, 10, :o2, 1035680400 + tz.transition 2003, 3, :o3, 1048986000 + tz.transition 2003, 10, :o2, 1067130000 + tz.transition 2004, 3, :o3, 1080435600 + tz.transition 2004, 10, :o2, 1099184400 + tz.transition 2005, 3, :o3, 1111885200 + tz.transition 2005, 10, :o2, 1130634000 + tz.transition 2006, 3, :o3, 1143334800 + tz.transition 2006, 10, :o2, 1162083600 + tz.transition 2007, 3, :o3, 1174784400 + tz.transition 2007, 10, :o2, 1193533200 + tz.transition 2008, 3, :o3, 1206838800 + tz.transition 2008, 10, :o2, 1224982800 + tz.transition 2009, 3, :o3, 1238288400 + tz.transition 2009, 10, :o2, 1256432400 + tz.transition 2010, 3, :o3, 1269738000 + tz.transition 2010, 10, :o2, 1288486800 + tz.transition 2011, 3, :o3, 1301187600 + tz.transition 2011, 10, :o2, 1319936400 + tz.transition 2012, 3, :o3, 1332637200 + tz.transition 2012, 10, :o2, 1351386000 + tz.transition 2013, 3, :o3, 1364691600 + tz.transition 2013, 10, :o2, 1382835600 + tz.transition 2014, 3, :o3, 1396141200 + tz.transition 2014, 10, :o2, 1414285200 + tz.transition 2015, 3, :o3, 1427590800 + tz.transition 2015, 10, :o2, 1445734800 + tz.transition 2016, 3, :o3, 1459040400 + tz.transition 2016, 10, :o2, 1477789200 + tz.transition 2017, 3, :o3, 1490490000 + tz.transition 2017, 10, :o2, 1509238800 + tz.transition 2018, 3, :o3, 1521939600 + tz.transition 2018, 10, :o2, 1540688400 + tz.transition 2019, 3, :o3, 1553994000 + tz.transition 2019, 10, :o2, 1572138000 + tz.transition 2020, 3, :o3, 1585443600 + tz.transition 2020, 10, :o2, 1603587600 + tz.transition 2021, 3, :o3, 1616893200 + tz.transition 2021, 10, :o2, 1635642000 + tz.transition 2022, 3, :o3, 1648342800 + tz.transition 2022, 10, :o2, 1667091600 + tz.transition 2023, 3, :o3, 1679792400 + tz.transition 2023, 10, :o2, 1698541200 + tz.transition 2024, 3, :o3, 1711846800 + tz.transition 2024, 10, :o2, 1729990800 + tz.transition 2025, 3, :o3, 1743296400 + tz.transition 2025, 10, :o2, 1761440400 + tz.transition 2026, 3, :o3, 1774746000 + tz.transition 2026, 10, :o2, 1792890000 + tz.transition 2027, 3, :o3, 1806195600 + tz.transition 2027, 10, :o2, 1824944400 + tz.transition 2028, 3, :o3, 1837645200 + tz.transition 2028, 10, :o2, 1856394000 + tz.transition 2029, 3, :o3, 1869094800 + tz.transition 2029, 10, :o2, 1887843600 + tz.transition 2030, 3, :o3, 1901149200 + tz.transition 2030, 10, :o2, 1919293200 + tz.transition 2031, 3, :o3, 1932598800 + tz.transition 2031, 10, :o2, 1950742800 + tz.transition 2032, 3, :o3, 1964048400 + tz.transition 2032, 10, :o2, 1982797200 + tz.transition 2033, 3, :o3, 1995498000 + tz.transition 2033, 10, :o2, 2014246800 + tz.transition 2034, 3, :o3, 2026947600 + tz.transition 2034, 10, :o2, 2045696400 + tz.transition 2035, 3, :o3, 2058397200 + tz.transition 2035, 10, :o2, 2077146000 + tz.transition 2036, 3, :o3, 2090451600 + tz.transition 2036, 10, :o2, 2108595600 + tz.transition 2037, 3, :o3, 2121901200 + tz.transition 2037, 10, :o2, 2140045200 + tz.transition 2038, 3, :o3, 59172253, 24 + tz.transition 2038, 10, :o2, 59177461, 24 + tz.transition 2039, 3, :o3, 59180989, 24 + tz.transition 2039, 10, :o2, 59186197, 24 + tz.transition 2040, 3, :o3, 59189725, 24 + tz.transition 2040, 10, :o2, 59194933, 24 + tz.transition 2041, 3, :o3, 59198629, 24 + tz.transition 2041, 10, :o2, 59203669, 24 + tz.transition 2042, 3, :o3, 59207365, 24 + tz.transition 2042, 10, :o2, 59212405, 24 + tz.transition 2043, 3, :o3, 59216101, 24 + tz.transition 2043, 10, :o2, 59221141, 24 + tz.transition 2044, 3, :o3, 59224837, 24 + tz.transition 2044, 10, :o2, 59230045, 24 + tz.transition 2045, 3, :o3, 59233573, 24 + tz.transition 2045, 10, :o2, 59238781, 24 + tz.transition 2046, 3, :o3, 59242309, 24 + tz.transition 2046, 10, :o2, 59247517, 24 + tz.transition 2047, 3, :o3, 59251213, 24 + tz.transition 2047, 10, :o2, 59256253, 24 + tz.transition 2048, 3, :o3, 59259949, 24 + tz.transition 2048, 10, :o2, 59264989, 24 + tz.transition 2049, 3, :o3, 59268685, 24 + tz.transition 2049, 10, :o2, 59273893, 24 + tz.transition 2050, 3, :o3, 59277421, 24 + tz.transition 2050, 10, :o2, 59282629, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Zagreb.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Zagreb.rb new file mode 100644 index 0000000000..ecdd903d28 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Zagreb.rb @@ -0,0 +1,13 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Europe + module Zagreb + include TimezoneDefinition + + linked_timezone 'Europe/Zagreb', 'Europe/Belgrade' + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Auckland.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Auckland.rb new file mode 100644 index 0000000000..a524fd6b6b --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Auckland.rb @@ -0,0 +1,202 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Pacific + module Auckland + include TimezoneDefinition + + timezone 'Pacific/Auckland' do |tz| + tz.offset :o0, 41944, 0, :LMT + tz.offset :o1, 41400, 0, :NZMT + tz.offset :o2, 41400, 3600, :NZST + tz.offset :o3, 41400, 1800, :NZST + tz.offset :o4, 43200, 0, :NZST + tz.offset :o5, 43200, 3600, :NZDT + + tz.transition 1868, 11, :o1, 25959290557, 10800 + tz.transition 1927, 11, :o2, 116409125, 48 + tz.transition 1928, 3, :o1, 38804945, 16 + tz.transition 1928, 10, :o3, 116425589, 48 + tz.transition 1929, 3, :o1, 29108245, 12 + tz.transition 1929, 10, :o3, 116443061, 48 + tz.transition 1930, 3, :o1, 29112613, 12 + tz.transition 1930, 10, :o3, 116460533, 48 + tz.transition 1931, 3, :o1, 29116981, 12 + tz.transition 1931, 10, :o3, 116478005, 48 + tz.transition 1932, 3, :o1, 29121433, 12 + tz.transition 1932, 10, :o3, 116495477, 48 + tz.transition 1933, 3, :o1, 29125801, 12 + tz.transition 1933, 10, :o3, 116512949, 48 + tz.transition 1934, 4, :o1, 29130673, 12 + tz.transition 1934, 9, :o3, 116530085, 48 + tz.transition 1935, 4, :o1, 29135041, 12 + tz.transition 1935, 9, :o3, 116547557, 48 + tz.transition 1936, 4, :o1, 29139409, 12 + tz.transition 1936, 9, :o3, 116565029, 48 + tz.transition 1937, 4, :o1, 29143777, 12 + tz.transition 1937, 9, :o3, 116582501, 48 + tz.transition 1938, 4, :o1, 29148145, 12 + tz.transition 1938, 9, :o3, 116599973, 48 + tz.transition 1939, 4, :o1, 29152597, 12 + tz.transition 1939, 9, :o3, 116617445, 48 + tz.transition 1940, 4, :o1, 29156965, 12 + tz.transition 1940, 9, :o3, 116635253, 48 + tz.transition 1945, 12, :o4, 2431821, 1 + tz.transition 1974, 11, :o5, 152632800 + tz.transition 1975, 2, :o4, 162309600 + tz.transition 1975, 10, :o5, 183477600 + tz.transition 1976, 3, :o4, 194968800 + tz.transition 1976, 10, :o5, 215532000 + tz.transition 1977, 3, :o4, 226418400 + tz.transition 1977, 10, :o5, 246981600 + tz.transition 1978, 3, :o4, 257868000 + tz.transition 1978, 10, :o5, 278431200 + tz.transition 1979, 3, :o4, 289317600 + tz.transition 1979, 10, :o5, 309880800 + tz.transition 1980, 3, :o4, 320767200 + tz.transition 1980, 10, :o5, 341330400 + tz.transition 1981, 2, :o4, 352216800 + tz.transition 1981, 10, :o5, 372780000 + tz.transition 1982, 3, :o4, 384271200 + tz.transition 1982, 10, :o5, 404834400 + tz.transition 1983, 3, :o4, 415720800 + tz.transition 1983, 10, :o5, 436284000 + tz.transition 1984, 3, :o4, 447170400 + tz.transition 1984, 10, :o5, 467733600 + tz.transition 1985, 3, :o4, 478620000 + tz.transition 1985, 10, :o5, 499183200 + tz.transition 1986, 3, :o4, 510069600 + tz.transition 1986, 10, :o5, 530632800 + tz.transition 1987, 2, :o4, 541519200 + tz.transition 1987, 10, :o5, 562082400 + tz.transition 1988, 3, :o4, 573573600 + tz.transition 1988, 10, :o5, 594136800 + tz.transition 1989, 3, :o4, 605023200 + tz.transition 1989, 10, :o5, 623772000 + tz.transition 1990, 3, :o4, 637682400 + tz.transition 1990, 10, :o5, 655221600 + tz.transition 1991, 3, :o4, 669132000 + tz.transition 1991, 10, :o5, 686671200 + tz.transition 1992, 3, :o4, 700581600 + tz.transition 1992, 10, :o5, 718120800 + tz.transition 1993, 3, :o4, 732636000 + tz.transition 1993, 10, :o5, 749570400 + tz.transition 1994, 3, :o4, 764085600 + tz.transition 1994, 10, :o5, 781020000 + tz.transition 1995, 3, :o4, 795535200 + tz.transition 1995, 9, :o5, 812469600 + tz.transition 1996, 3, :o4, 826984800 + tz.transition 1996, 10, :o5, 844524000 + tz.transition 1997, 3, :o4, 858434400 + tz.transition 1997, 10, :o5, 875973600 + tz.transition 1998, 3, :o4, 889884000 + tz.transition 1998, 10, :o5, 907423200 + tz.transition 1999, 3, :o4, 921938400 + tz.transition 1999, 10, :o5, 938872800 + tz.transition 2000, 3, :o4, 953388000 + tz.transition 2000, 9, :o5, 970322400 + tz.transition 2001, 3, :o4, 984837600 + tz.transition 2001, 10, :o5, 1002376800 + tz.transition 2002, 3, :o4, 1016287200 + tz.transition 2002, 10, :o5, 1033826400 + tz.transition 2003, 3, :o4, 1047736800 + tz.transition 2003, 10, :o5, 1065276000 + tz.transition 2004, 3, :o4, 1079791200 + tz.transition 2004, 10, :o5, 1096725600 + tz.transition 2005, 3, :o4, 1111240800 + tz.transition 2005, 10, :o5, 1128175200 + tz.transition 2006, 3, :o4, 1142690400 + tz.transition 2006, 9, :o5, 1159624800 + tz.transition 2007, 3, :o4, 1174140000 + tz.transition 2007, 9, :o5, 1191074400 + tz.transition 2008, 4, :o4, 1207404000 + tz.transition 2008, 9, :o5, 1222524000 + tz.transition 2009, 4, :o4, 1238853600 + tz.transition 2009, 9, :o5, 1253973600 + tz.transition 2010, 4, :o4, 1270303200 + tz.transition 2010, 9, :o5, 1285423200 + tz.transition 2011, 4, :o4, 1301752800 + tz.transition 2011, 9, :o5, 1316872800 + tz.transition 2012, 3, :o4, 1333202400 + tz.transition 2012, 9, :o5, 1348927200 + tz.transition 2013, 4, :o4, 1365256800 + tz.transition 2013, 9, :o5, 1380376800 + tz.transition 2014, 4, :o4, 1396706400 + tz.transition 2014, 9, :o5, 1411826400 + tz.transition 2015, 4, :o4, 1428156000 + tz.transition 2015, 9, :o5, 1443276000 + tz.transition 2016, 4, :o4, 1459605600 + tz.transition 2016, 9, :o5, 1474725600 + tz.transition 2017, 4, :o4, 1491055200 + tz.transition 2017, 9, :o5, 1506175200 + tz.transition 2018, 3, :o4, 1522504800 + tz.transition 2018, 9, :o5, 1538229600 + tz.transition 2019, 4, :o4, 1554559200 + tz.transition 2019, 9, :o5, 1569679200 + tz.transition 2020, 4, :o4, 1586008800 + tz.transition 2020, 9, :o5, 1601128800 + tz.transition 2021, 4, :o4, 1617458400 + tz.transition 2021, 9, :o5, 1632578400 + tz.transition 2022, 4, :o4, 1648908000 + tz.transition 2022, 9, :o5, 1664028000 + tz.transition 2023, 4, :o4, 1680357600 + tz.transition 2023, 9, :o5, 1695477600 + tz.transition 2024, 4, :o4, 1712412000 + tz.transition 2024, 9, :o5, 1727532000 + tz.transition 2025, 4, :o4, 1743861600 + tz.transition 2025, 9, :o5, 1758981600 + tz.transition 2026, 4, :o4, 1775311200 + tz.transition 2026, 9, :o5, 1790431200 + tz.transition 2027, 4, :o4, 1806760800 + tz.transition 2027, 9, :o5, 1821880800 + tz.transition 2028, 4, :o4, 1838210400 + tz.transition 2028, 9, :o5, 1853330400 + tz.transition 2029, 3, :o4, 1869660000 + tz.transition 2029, 9, :o5, 1885384800 + tz.transition 2030, 4, :o4, 1901714400 + tz.transition 2030, 9, :o5, 1916834400 + tz.transition 2031, 4, :o4, 1933164000 + tz.transition 2031, 9, :o5, 1948284000 + tz.transition 2032, 4, :o4, 1964613600 + tz.transition 2032, 9, :o5, 1979733600 + tz.transition 2033, 4, :o4, 1996063200 + tz.transition 2033, 9, :o5, 2011183200 + tz.transition 2034, 4, :o4, 2027512800 + tz.transition 2034, 9, :o5, 2042632800 + tz.transition 2035, 3, :o4, 2058962400 + tz.transition 2035, 9, :o5, 2074687200 + tz.transition 2036, 4, :o4, 2091016800 + tz.transition 2036, 9, :o5, 2106136800 + tz.transition 2037, 4, :o4, 2122466400 + tz.transition 2037, 9, :o5, 2137586400 + tz.transition 2038, 4, :o4, 29586205, 12 + tz.transition 2038, 9, :o5, 29588305, 12 + tz.transition 2039, 4, :o4, 29590573, 12 + tz.transition 2039, 9, :o5, 29592673, 12 + tz.transition 2040, 3, :o4, 29594941, 12 + tz.transition 2040, 9, :o5, 29597125, 12 + tz.transition 2041, 4, :o4, 29599393, 12 + tz.transition 2041, 9, :o5, 29601493, 12 + tz.transition 2042, 4, :o4, 29603761, 12 + tz.transition 2042, 9, :o5, 29605861, 12 + tz.transition 2043, 4, :o4, 29608129, 12 + tz.transition 2043, 9, :o5, 29610229, 12 + tz.transition 2044, 4, :o4, 29612497, 12 + tz.transition 2044, 9, :o5, 29614597, 12 + tz.transition 2045, 4, :o4, 29616865, 12 + tz.transition 2045, 9, :o5, 29618965, 12 + tz.transition 2046, 3, :o4, 29621233, 12 + tz.transition 2046, 9, :o5, 29623417, 12 + tz.transition 2047, 4, :o4, 29625685, 12 + tz.transition 2047, 9, :o5, 29627785, 12 + tz.transition 2048, 4, :o4, 29630053, 12 + tz.transition 2048, 9, :o5, 29632153, 12 + tz.transition 2049, 4, :o4, 29634421, 12 + tz.transition 2049, 9, :o5, 29636521, 12 + tz.transition 2050, 4, :o4, 29638789, 12 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Fiji.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Fiji.rb new file mode 100644 index 0000000000..f0255658f8 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Fiji.rb @@ -0,0 +1,25 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Pacific + module Fiji + include TimezoneDefinition + + timezone 'Pacific/Fiji' do |tz| + tz.offset :o0, 42820, 0, :LMT + tz.offset :o1, 43200, 0, :FJT + tz.offset :o2, 43200, 3600, :FJST + + tz.transition 1915, 10, :o1, 10457838739, 4320 + tz.transition 1998, 10, :o2, 909842400 + tz.transition 1999, 2, :o1, 920124000 + tz.transition 1999, 11, :o2, 941896800 + tz.transition 2000, 2, :o1, 951573600 + tz.transition 2009, 11, :o2, 1259416800 + tz.transition 2010, 4, :o1, 1272117600 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Guam.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Guam.rb new file mode 100644 index 0000000000..d4c1a0a682 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Guam.rb @@ -0,0 +1,22 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Pacific + module Guam + include TimezoneDefinition + + timezone 'Pacific/Guam' do |tz| + tz.offset :o0, -51660, 0, :LMT + tz.offset :o1, 34740, 0, :LMT + tz.offset :o2, 36000, 0, :GST + tz.offset :o3, 36000, 0, :ChST + + tz.transition 1844, 12, :o1, 1149567407, 480 + tz.transition 1900, 12, :o2, 1159384847, 480 + tz.transition 2000, 12, :o3, 977493600 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Honolulu.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Honolulu.rb new file mode 100644 index 0000000000..204b226537 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Honolulu.rb @@ -0,0 +1,28 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Pacific + module Honolulu + include TimezoneDefinition + + timezone 'Pacific/Honolulu' do |tz| + tz.offset :o0, -37886, 0, :LMT + tz.offset :o1, -37800, 0, :HST + tz.offset :o2, -37800, 3600, :HDT + tz.offset :o3, -37800, 3600, :HWT + tz.offset :o4, -37800, 3600, :HPT + tz.offset :o5, -36000, 0, :HST + + tz.transition 1900, 1, :o1, 104328926143, 43200 + tz.transition 1933, 4, :o2, 116505265, 48 + tz.transition 1933, 5, :o1, 116506271, 48 + tz.transition 1942, 2, :o3, 116659201, 48 + tz.transition 1945, 8, :o4, 58360379, 24 + tz.transition 1945, 9, :o1, 116722991, 48 + tz.transition 1947, 6, :o5, 116752561, 48 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Majuro.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Majuro.rb new file mode 100644 index 0000000000..32adad92c1 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Majuro.rb @@ -0,0 +1,20 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Pacific + module Majuro + include TimezoneDefinition + + timezone 'Pacific/Majuro' do |tz| + tz.offset :o0, 41088, 0, :LMT + tz.offset :o1, 39600, 0, :MHT + tz.offset :o2, 43200, 0, :MHT + + tz.transition 1900, 12, :o1, 1086923261, 450 + tz.transition 1969, 9, :o2, 58571881, 24 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Midway.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Midway.rb new file mode 100644 index 0000000000..97784fcc10 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Midway.rb @@ -0,0 +1,25 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Pacific + module Midway + include TimezoneDefinition + + timezone 'Pacific/Midway' do |tz| + tz.offset :o0, -42568, 0, :LMT + tz.offset :o1, -39600, 0, :NST + tz.offset :o2, -39600, 3600, :NDT + tz.offset :o3, -39600, 0, :BST + tz.offset :o4, -39600, 0, :SST + + tz.transition 1901, 1, :o1, 26086168721, 10800 + tz.transition 1956, 6, :o2, 58455071, 24 + tz.transition 1956, 9, :o1, 29228627, 12 + tz.transition 1967, 4, :o3, 58549967, 24 + tz.transition 1983, 11, :o4, 439038000 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Noumea.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Noumea.rb new file mode 100644 index 0000000000..70173db8ab --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Noumea.rb @@ -0,0 +1,25 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Pacific + module Noumea + include TimezoneDefinition + + timezone 'Pacific/Noumea' do |tz| + tz.offset :o0, 39948, 0, :LMT + tz.offset :o1, 39600, 0, :NCT + tz.offset :o2, 39600, 3600, :NCST + + tz.transition 1912, 1, :o1, 17419781071, 7200 + tz.transition 1977, 12, :o2, 250002000 + tz.transition 1978, 2, :o1, 257342400 + tz.transition 1978, 12, :o2, 281451600 + tz.transition 1979, 2, :o1, 288878400 + tz.transition 1996, 11, :o2, 849366000 + tz.transition 1997, 3, :o1, 857228400 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Pago_Pago.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Pago_Pago.rb new file mode 100644 index 0000000000..c8fcd7d527 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Pago_Pago.rb @@ -0,0 +1,26 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Pacific + module Pago_Pago + include TimezoneDefinition + + timezone 'Pacific/Pago_Pago' do |tz| + tz.offset :o0, 45432, 0, :LMT + tz.offset :o1, -40968, 0, :LMT + tz.offset :o2, -41400, 0, :SAMT + tz.offset :o3, -39600, 0, :NST + tz.offset :o4, -39600, 0, :BST + tz.offset :o5, -39600, 0, :SST + + tz.transition 1879, 7, :o1, 2889041969, 1200 + tz.transition 1911, 1, :o2, 2902845569, 1200 + tz.transition 1950, 1, :o3, 116797583, 48 + tz.transition 1967, 4, :o4, 58549967, 24 + tz.transition 1983, 11, :o5, 439038000 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Port_Moresby.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Port_Moresby.rb new file mode 100644 index 0000000000..f06cf6d54f --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Port_Moresby.rb @@ -0,0 +1,20 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Pacific + module Port_Moresby + include TimezoneDefinition + + timezone 'Pacific/Port_Moresby' do |tz| + tz.offset :o0, 35320, 0, :LMT + tz.offset :o1, 35312, 0, :PMMT + tz.offset :o2, 36000, 0, :PGT + + tz.transition 1879, 12, :o1, 5200664597, 2160 + tz.transition 1894, 12, :o2, 13031248093, 5400 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Tongatapu.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Tongatapu.rb new file mode 100644 index 0000000000..7578d92f38 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Tongatapu.rb @@ -0,0 +1,27 @@ +require 'tzinfo/timezone_definition' + +module TZInfo + module Definitions + module Pacific + module Tongatapu + include TimezoneDefinition + + timezone 'Pacific/Tongatapu' do |tz| + tz.offset :o0, 44360, 0, :LMT + tz.offset :o1, 44400, 0, :TOT + tz.offset :o2, 46800, 0, :TOT + tz.offset :o3, 46800, 3600, :TOST + + tz.transition 1900, 12, :o1, 5217231571, 2160 + tz.transition 1940, 12, :o2, 174959639, 72 + tz.transition 1999, 10, :o3, 939214800 + tz.transition 2000, 3, :o2, 953384400 + tz.transition 2000, 11, :o3, 973342800 + tz.transition 2001, 1, :o2, 980596800 + tz.transition 2001, 11, :o3, 1004792400 + tz.transition 2002, 1, :o2, 1012046400 + end + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/info_timezone.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/info_timezone.rb new file mode 100644 index 0000000000..001303c594 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/info_timezone.rb @@ -0,0 +1,52 @@ +#-- +# Copyright (c) 2006 Philip Ross +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#++ + +require 'tzinfo/timezone' + +module TZInfo + + # A Timezone based on a TimezoneInfo. + class InfoTimezone < Timezone #:nodoc: + + # Constructs a new InfoTimezone with a TimezoneInfo instance. + def self.new(info) + tz = super() + tz.send(:setup, info) + tz + end + + # The identifier of the timezone, e.g. "Europe/Paris". + def identifier + @info.identifier + end + + protected + # The TimezoneInfo for this Timezone. + def info + @info + end + + def setup(info) + @info = info + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone.rb new file mode 100644 index 0000000000..f8ec4fca87 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone.rb @@ -0,0 +1,51 @@ +#-- +# Copyright (c) 2006 Philip Ross +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#++ + +require 'tzinfo/info_timezone' + +module TZInfo + + class LinkedTimezone < InfoTimezone #:nodoc: + # Returns the TimezonePeriod for the given UTC time. utc can either be + # a DateTime, Time or integer timestamp (Time.to_i). Any timezone + # information in utc is ignored (it is treated as a UTC time). + # + # If no TimezonePeriod could be found, PeriodNotFound is raised. + def period_for_utc(utc) + @linked_timezone.period_for_utc(utc) + end + + # Returns the set of TimezonePeriod instances that are valid for the given + # local time as an array. If you just want a single period, use + # period_for_local instead and specify how abiguities should be resolved. + # Raises PeriodNotFound if no periods are found for the given time. + def periods_for_local(local) + @linked_timezone.periods_for_local(local) + end + + protected + def setup(info) + super(info) + @linked_timezone = Timezone.get(info.link_to_identifier) + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone_info.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone_info.rb new file mode 100644 index 0000000000..8197ff3e81 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone_info.rb @@ -0,0 +1,44 @@ +#-- +# Copyright (c) 2006 Philip Ross +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#++ + +require 'tzinfo/timezone_info' + +module TZInfo + # Represents a linked timezone defined in a data module. + class LinkedTimezoneInfo < TimezoneInfo #:nodoc: + + # The zone that provides the data (that this zone is an alias for). + attr_reader :link_to_identifier + + # Constructs a new TimezoneInfo with an identifier and the identifier + # of the zone linked to. + def initialize(identifier, link_to_identifier) + super(identifier) + @link_to_identifier = link_to_identifier + end + + # Returns internal object state as a programmer-readable string. + def inspect + "#<#{self.class}: #@identifier,#@link_to_identifier>" + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/offset_rationals.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/offset_rationals.rb new file mode 100644 index 0000000000..b1f10b2b63 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/offset_rationals.rb @@ -0,0 +1,98 @@ +#-- +# Copyright (c) 2006 Philip Ross +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#++ + +require 'rational' +require 'tzinfo/ruby_core_support' + +module TZInfo + + # Provides a method for getting Rationals for a timezone offset in seconds. + # Pre-reduced rationals are returned for all the half-hour intervals between + # -14 and +14 hours to avoid having to call gcd at runtime. + module OffsetRationals #:nodoc: + @@rational_cache = { + -50400 => RubyCoreSupport.rational_new!(-7,12), + -48600 => RubyCoreSupport.rational_new!(-9,16), + -46800 => RubyCoreSupport.rational_new!(-13,24), + -45000 => RubyCoreSupport.rational_new!(-25,48), + -43200 => RubyCoreSupport.rational_new!(-1,2), + -41400 => RubyCoreSupport.rational_new!(-23,48), + -39600 => RubyCoreSupport.rational_new!(-11,24), + -37800 => RubyCoreSupport.rational_new!(-7,16), + -36000 => RubyCoreSupport.rational_new!(-5,12), + -34200 => RubyCoreSupport.rational_new!(-19,48), + -32400 => RubyCoreSupport.rational_new!(-3,8), + -30600 => RubyCoreSupport.rational_new!(-17,48), + -28800 => RubyCoreSupport.rational_new!(-1,3), + -27000 => RubyCoreSupport.rational_new!(-5,16), + -25200 => RubyCoreSupport.rational_new!(-7,24), + -23400 => RubyCoreSupport.rational_new!(-13,48), + -21600 => RubyCoreSupport.rational_new!(-1,4), + -19800 => RubyCoreSupport.rational_new!(-11,48), + -18000 => RubyCoreSupport.rational_new!(-5,24), + -16200 => RubyCoreSupport.rational_new!(-3,16), + -14400 => RubyCoreSupport.rational_new!(-1,6), + -12600 => RubyCoreSupport.rational_new!(-7,48), + -10800 => RubyCoreSupport.rational_new!(-1,8), + -9000 => RubyCoreSupport.rational_new!(-5,48), + -7200 => RubyCoreSupport.rational_new!(-1,12), + -5400 => RubyCoreSupport.rational_new!(-1,16), + -3600 => RubyCoreSupport.rational_new!(-1,24), + -1800 => RubyCoreSupport.rational_new!(-1,48), + 0 => RubyCoreSupport.rational_new!(0,1), + 1800 => RubyCoreSupport.rational_new!(1,48), + 3600 => RubyCoreSupport.rational_new!(1,24), + 5400 => RubyCoreSupport.rational_new!(1,16), + 7200 => RubyCoreSupport.rational_new!(1,12), + 9000 => RubyCoreSupport.rational_new!(5,48), + 10800 => RubyCoreSupport.rational_new!(1,8), + 12600 => RubyCoreSupport.rational_new!(7,48), + 14400 => RubyCoreSupport.rational_new!(1,6), + 16200 => RubyCoreSupport.rational_new!(3,16), + 18000 => RubyCoreSupport.rational_new!(5,24), + 19800 => RubyCoreSupport.rational_new!(11,48), + 21600 => RubyCoreSupport.rational_new!(1,4), + 23400 => RubyCoreSupport.rational_new!(13,48), + 25200 => RubyCoreSupport.rational_new!(7,24), + 27000 => RubyCoreSupport.rational_new!(5,16), + 28800 => RubyCoreSupport.rational_new!(1,3), + 30600 => RubyCoreSupport.rational_new!(17,48), + 32400 => RubyCoreSupport.rational_new!(3,8), + 34200 => RubyCoreSupport.rational_new!(19,48), + 36000 => RubyCoreSupport.rational_new!(5,12), + 37800 => RubyCoreSupport.rational_new!(7,16), + 39600 => RubyCoreSupport.rational_new!(11,24), + 41400 => RubyCoreSupport.rational_new!(23,48), + 43200 => RubyCoreSupport.rational_new!(1,2), + 45000 => RubyCoreSupport.rational_new!(25,48), + 46800 => RubyCoreSupport.rational_new!(13,24), + 48600 => RubyCoreSupport.rational_new!(9,16), + 50400 => RubyCoreSupport.rational_new!(7,12)} + + # Returns a Rational expressing the fraction of a day that offset in + # seconds represents (i.e. equivalent to Rational(offset, 86400)). + def rational_for_offset(offset) + @@rational_cache[offset] || Rational(offset, 86400) + end + module_function :rational_for_offset + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/ruby_core_support.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/ruby_core_support.rb new file mode 100644 index 0000000000..9a0441206b --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/ruby_core_support.rb @@ -0,0 +1,56 @@ +#-- +# Copyright (c) 2008 Philip Ross +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#++ + +require 'date' +require 'rational' + +module TZInfo + + # Methods to support different versions of Ruby. + module RubyCoreSupport #:nodoc: + + # Use Rational.new! for performance reasons in Ruby 1.8. + # This has been removed from 1.9, but Rational performs better. + if Rational.respond_to? :new! + def self.rational_new!(numerator, denominator = 1) + Rational.new!(numerator, denominator) + end + else + def self.rational_new!(numerator, denominator = 1) + Rational(numerator, denominator) + end + end + + # Ruby 1.8.6 introduced new! and deprecated new0. + # Ruby 1.9.0 removed new0. + # We still need to support new0 for older versions of Ruby. + if DateTime.respond_to? :new! + def self.datetime_new!(ajd = 0, of = 0, sg = Date::ITALY) + DateTime.new!(ajd, of, sg) + end + else + def self.datetime_new!(ajd = 0, of = 0, sg = Date::ITALY) + DateTime.new0(ajd, of, sg) + end + end + end +end \ No newline at end of file diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/time_or_datetime.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/time_or_datetime.rb new file mode 100644 index 0000000000..264517f3ee --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/time_or_datetime.rb @@ -0,0 +1,292 @@ +#-- +# Copyright (c) 2006 Philip Ross +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#++ + +require 'date' +require 'time' +require 'tzinfo/offset_rationals' + +module TZInfo + # Used by TZInfo internally to represent either a Time, DateTime or integer + # timestamp (seconds since 1970-01-01 00:00:00). + class TimeOrDateTime #:nodoc: + include Comparable + + # Constructs a new TimeOrDateTime. timeOrDateTime can be a Time, DateTime + # or an integer. If using a Time or DateTime, any time zone information is + # ignored. + def initialize(timeOrDateTime) + @time = nil + @datetime = nil + @timestamp = nil + + if timeOrDateTime.is_a?(Time) + @time = timeOrDateTime + @time = Time.utc(@time.year, @time.mon, @time.mday, @time.hour, @time.min, @time.sec) unless @time.zone == 'UTC' + @orig = @time + elsif timeOrDateTime.is_a?(DateTime) + @datetime = timeOrDateTime + @datetime = @datetime.new_offset(0) unless @datetime.offset == 0 + @orig = @datetime + else + @timestamp = timeOrDateTime.to_i + @orig = @timestamp + end + end + + # Returns the time as a Time. + def to_time + unless @time + if @timestamp + @time = Time.at(@timestamp).utc + else + @time = Time.utc(year, mon, mday, hour, min, sec) + end + end + + @time + end + + # Returns the time as a DateTime. + def to_datetime + unless @datetime + @datetime = DateTime.new(year, mon, mday, hour, min, sec) + end + + @datetime + end + + # Returns the time as an integer timestamp. + def to_i + unless @timestamp + @timestamp = to_time.to_i + end + + @timestamp + end + + # Returns the time as the original time passed to new. + def to_orig + @orig + end + + # Returns a string representation of the TimeOrDateTime. + def to_s + if @orig.is_a?(Time) + "Time: #{@orig.to_s}" + elsif @orig.is_a?(DateTime) + "DateTime: #{@orig.to_s}" + else + "Timestamp: #{@orig.to_s}" + end + end + + # Returns internal object state as a programmer-readable string. + def inspect + "#<#{self.class}: #{@orig.inspect}>" + end + + # Returns the year. + def year + if @time + @time.year + elsif @datetime + @datetime.year + else + to_time.year + end + end + + # Returns the month of the year (1..12). + def mon + if @time + @time.mon + elsif @datetime + @datetime.mon + else + to_time.mon + end + end + alias :month :mon + + # Returns the day of the month (1..n). + def mday + if @time + @time.mday + elsif @datetime + @datetime.mday + else + to_time.mday + end + end + alias :day :mday + + # Returns the hour of the day (0..23). + def hour + if @time + @time.hour + elsif @datetime + @datetime.hour + else + to_time.hour + end + end + + # Returns the minute of the hour (0..59). + def min + if @time + @time.min + elsif @datetime + @datetime.min + else + to_time.min + end + end + + # Returns the second of the minute (0..60). (60 for a leap second). + def sec + if @time + @time.sec + elsif @datetime + @datetime.sec + else + to_time.sec + end + end + + # Compares this TimeOrDateTime with another Time, DateTime, integer + # timestamp or TimeOrDateTime. Returns -1, 0 or +1 depending whether the + # receiver is less than, equal to, or greater than timeOrDateTime. + # + # Milliseconds and smaller units are ignored in the comparison. + def <=>(timeOrDateTime) + if timeOrDateTime.is_a?(TimeOrDateTime) + orig = timeOrDateTime.to_orig + + if @orig.is_a?(DateTime) || orig.is_a?(DateTime) + # If either is a DateTime, assume it is there for a reason + # (i.e. for range). + to_datetime <=> timeOrDateTime.to_datetime + elsif orig.is_a?(Time) + to_time <=> timeOrDateTime.to_time + else + to_i <=> timeOrDateTime.to_i + end + elsif @orig.is_a?(DateTime) || timeOrDateTime.is_a?(DateTime) + # If either is a DateTime, assume it is there for a reason + # (i.e. for range). + to_datetime <=> TimeOrDateTime.wrap(timeOrDateTime).to_datetime + elsif timeOrDateTime.is_a?(Time) + to_time <=> timeOrDateTime + else + to_i <=> timeOrDateTime.to_i + end + end + + # Adds a number of seconds to the TimeOrDateTime. Returns a new + # TimeOrDateTime, preserving what the original constructed type was. + # If the original type is a Time and the resulting calculation goes out of + # range for Times, then an exception will be raised by the Time class. + def +(seconds) + if seconds == 0 + self + else + if @orig.is_a?(DateTime) + TimeOrDateTime.new(@orig + OffsetRationals.rational_for_offset(seconds)) + else + # + defined for Time and integer timestamps + TimeOrDateTime.new(@orig + seconds) + end + end + end + + # Subtracts a number of seconds from the TimeOrDateTime. Returns a new + # TimeOrDateTime, preserving what the original constructed type was. + # If the original type is a Time and the resulting calculation goes out of + # range for Times, then an exception will be raised by the Time class. + def -(seconds) + self + (-seconds) + end + + # Similar to the + operator, but for cases where adding would cause a + # timestamp or time to go out of the allowed range, converts to a DateTime + # based TimeOrDateTime. + def add_with_convert(seconds) + if seconds == 0 + self + else + if @orig.is_a?(DateTime) + TimeOrDateTime.new(@orig + OffsetRationals.rational_for_offset(seconds)) + else + # A Time or timestamp. + result = to_i + seconds + + if result < 0 || result > 2147483647 + result = TimeOrDateTime.new(to_datetime + OffsetRationals.rational_for_offset(seconds)) + else + result = TimeOrDateTime.new(@orig + seconds) + end + end + end + end + + # Returns true if todt represents the same time and was originally + # constructed with the same type (DateTime, Time or timestamp) as this + # TimeOrDateTime. + def eql?(todt) + todt.respond_to?(:to_orig) && to_orig.eql?(todt.to_orig) + end + + # Returns a hash of this TimeOrDateTime. + def hash + @orig.hash + end + + # If no block is given, returns a TimeOrDateTime wrapping the given + # timeOrDateTime. If a block is specified, a TimeOrDateTime is constructed + # and passed to the block. The result of the block must be a TimeOrDateTime. + # to_orig will be called on the result and the result of to_orig will be + # returned. + # + # timeOrDateTime can be a Time, DateTime, integer timestamp or TimeOrDateTime. + # If a TimeOrDateTime is passed in, no new TimeOrDateTime will be constructed, + # the passed in value will be used. + def self.wrap(timeOrDateTime) + t = timeOrDateTime.is_a?(TimeOrDateTime) ? timeOrDateTime : TimeOrDateTime.new(timeOrDateTime) + + if block_given? + t = yield t + + if timeOrDateTime.is_a?(TimeOrDateTime) + t + elsif timeOrDateTime.is_a?(Time) + t.to_time + elsif timeOrDateTime.is_a?(DateTime) + t.to_datetime + else + t.to_i + end + else + t + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone.rb new file mode 100644 index 0000000000..ef4ecd8ae1 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone.rb @@ -0,0 +1,508 @@ +#-- +# Copyright (c) 2005-2006 Philip Ross +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#++ + +require 'date' +# require 'tzinfo/country' +require 'tzinfo/time_or_datetime' +require 'tzinfo/timezone_period' + +module TZInfo + # Indicate a specified time in a local timezone has more than one + # possible time in UTC. This happens when switching from daylight savings time + # to normal time where the clocks are rolled back. Thrown by period_for_local + # and local_to_utc when using an ambiguous time and not specifying any + # means to resolve the ambiguity. + class AmbiguousTime < StandardError + end + + # Thrown to indicate that no TimezonePeriod matching a given time could be found. + class PeriodNotFound < StandardError + end + + # Thrown by Timezone#get if the identifier given is not valid. + class InvalidTimezoneIdentifier < StandardError + end + + # Thrown if an attempt is made to use a timezone created with Timezone.new(nil). + class UnknownTimezone < StandardError + end + + # Timezone is the base class of all timezones. It provides a factory method + # get to access timezones by identifier. Once a specific Timezone has been + # retrieved, DateTimes, Times and timestamps can be converted between the UTC + # and the local time for the zone. For example: + # + # tz = TZInfo::Timezone.get('America/New_York') + # puts tz.utc_to_local(DateTime.new(2005,8,29,15,35,0)).to_s + # puts tz.local_to_utc(Time.utc(2005,8,29,11,35,0)).to_s + # puts tz.utc_to_local(1125315300).to_s + # + # Each time conversion method returns an object of the same type it was + # passed. + # + # The timezone information all comes from the tz database + # (see http://www.twinsun.com/tz/tz-link.htm) + class Timezone + include Comparable + + # Cache of loaded zones by identifier to avoid using require if a zone + # has already been loaded. + @@loaded_zones = {} + + # Whether the timezones index has been loaded yet. + @@index_loaded = false + + # Returns a timezone by its identifier (e.g. "Europe/London", + # "America/Chicago" or "UTC"). + # + # Raises InvalidTimezoneIdentifier if the timezone couldn't be found. + def self.get(identifier) + instance = @@loaded_zones[identifier] + unless instance + raise InvalidTimezoneIdentifier, 'Invalid identifier' if identifier !~ /^[A-z0-9\+\-_]+(\/[A-z0-9\+\-_]+)*$/ + identifier = identifier.gsub(/-/, '__m__').gsub(/\+/, '__p__') + begin + # Use a temporary variable to avoid an rdoc warning + file = "tzinfo/definitions/#{identifier}".untaint + require file + + m = Definitions + identifier.split(/\//).each {|part| + m = m.const_get(part) + } + + info = m.get + + # Could make Timezone subclasses register an interest in an info + # type. Since there are currently only two however, there isn't + # much point. + if info.kind_of?(DataTimezoneInfo) + instance = DataTimezone.new(info) + elsif info.kind_of?(LinkedTimezoneInfo) + instance = LinkedTimezone.new(info) + else + raise InvalidTimezoneIdentifier, "No handler for info type #{info.class}" + end + + @@loaded_zones[instance.identifier] = instance + rescue LoadError, NameError => e + raise InvalidTimezoneIdentifier, e.message + end + end + + instance + end + + # Returns a proxy for the Timezone with the given identifier. The proxy + # will cause the real timezone to be loaded when an attempt is made to + # find a period or convert a time. get_proxy will not validate the + # identifier. If an invalid identifier is specified, no exception will be + # raised until the proxy is used. + def self.get_proxy(identifier) + TimezoneProxy.new(identifier) + end + + # If identifier is nil calls super(), otherwise calls get. An identfier + # should always be passed in when called externally. + def self.new(identifier = nil) + if identifier + get(identifier) + else + super() + end + end + + # Returns an array containing all the available Timezones. + # + # Returns TimezoneProxy objects to avoid the overhead of loading Timezone + # definitions until a conversion is actually required. + def self.all + get_proxies(all_identifiers) + end + + # Returns an array containing the identifiers of all the available + # Timezones. + def self.all_identifiers + load_index + Indexes::Timezones.timezones + end + + # Returns an array containing all the available Timezones that are based + # on data (are not links to other Timezones). + # + # Returns TimezoneProxy objects to avoid the overhead of loading Timezone + # definitions until a conversion is actually required. + def self.all_data_zones + get_proxies(all_data_zone_identifiers) + end + + # Returns an array containing the identifiers of all the available + # Timezones that are based on data (are not links to other Timezones).. + def self.all_data_zone_identifiers + load_index + Indexes::Timezones.data_timezones + end + + # Returns an array containing all the available Timezones that are links + # to other Timezones. + # + # Returns TimezoneProxy objects to avoid the overhead of loading Timezone + # definitions until a conversion is actually required. + def self.all_linked_zones + get_proxies(all_linked_zone_identifiers) + end + + # Returns an array containing the identifiers of all the available + # Timezones that are links to other Timezones. + def self.all_linked_zone_identifiers + load_index + Indexes::Timezones.linked_timezones + end + + # Returns all the Timezones defined for all Countries. This is not the + # complete set of Timezones as some are not country specific (e.g. + # 'Etc/GMT'). + # + # Returns TimezoneProxy objects to avoid the overhead of loading Timezone + # definitions until a conversion is actually required. + def self.all_country_zones + Country.all_codes.inject([]) {|zones,country| + zones += Country.get(country).zones + } + end + + # Returns all the zone identifiers defined for all Countries. This is not the + # complete set of zone identifiers as some are not country specific (e.g. + # 'Etc/GMT'). You can obtain a Timezone instance for a given identifier + # with the get method. + def self.all_country_zone_identifiers + Country.all_codes.inject([]) {|zones,country| + zones += Country.get(country).zone_identifiers + } + end + + # Returns all US Timezone instances. A shortcut for + # TZInfo::Country.get('US').zones. + # + # Returns TimezoneProxy objects to avoid the overhead of loading Timezone + # definitions until a conversion is actually required. + def self.us_zones + Country.get('US').zones + end + + # Returns all US zone identifiers. A shortcut for + # TZInfo::Country.get('US').zone_identifiers. + def self.us_zone_identifiers + Country.get('US').zone_identifiers + end + + # The identifier of the timezone, e.g. "Europe/Paris". + def identifier + raise UnknownTimezone, 'TZInfo::Timezone constructed directly' + end + + # An alias for identifier. + def name + # Don't use alias, as identifier gets overridden. + identifier + end + + # Returns a friendlier version of the identifier. + def to_s + friendly_identifier + end + + # Returns internal object state as a programmer-readable string. + def inspect + "#<#{self.class}: #{identifier}>" + end + + # Returns a friendlier version of the identifier. Set skip_first_part to + # omit the first part of the identifier (typically a region name) where + # there is more than one part. + # + # For example: + # + # Timezone.get('Europe/Paris').friendly_identifier(false) #=> "Europe - Paris" + # Timezone.get('Europe/Paris').friendly_identifier(true) #=> "Paris" + # Timezone.get('America/Indiana/Knox').friendly_identifier(false) #=> "America - Knox, Indiana" + # Timezone.get('America/Indiana/Knox').friendly_identifier(true) #=> "Knox, Indiana" + def friendly_identifier(skip_first_part = false) + parts = identifier.split('/') + if parts.empty? + # shouldn't happen + identifier + elsif parts.length == 1 + parts[0] + else + if skip_first_part + result = '' + else + result = parts[0] + ' - ' + end + + parts[1, parts.length - 1].reverse_each {|part| + part.gsub!(/_/, ' ') + + if part.index(/[a-z]/) + # Missing a space if a lower case followed by an upper case and the + # name isn't McXxxx. + part.gsub!(/([^M][a-z])([A-Z])/, '\1 \2') + part.gsub!(/([M][a-bd-z])([A-Z])/, '\1 \2') + + # Missing an apostrophe if two consecutive upper case characters. + part.gsub!(/([A-Z])([A-Z])/, '\1\'\2') + end + + result << part + result << ', ' + } + + result.slice!(result.length - 2, 2) + result + end + end + + # Returns the TimezonePeriod for the given UTC time. utc can either be + # a DateTime, Time or integer timestamp (Time.to_i). Any timezone + # information in utc is ignored (it is treated as a UTC time). + def period_for_utc(utc) + raise UnknownTimezone, 'TZInfo::Timezone constructed directly' + end + + # Returns the set of TimezonePeriod instances that are valid for the given + # local time as an array. If you just want a single period, use + # period_for_local instead and specify how ambiguities should be resolved. + # Returns an empty array if no periods are found for the given time. + def periods_for_local(local) + raise UnknownTimezone, 'TZInfo::Timezone constructed directly' + end + + # Returns the TimezonePeriod for the given local time. local can either be + # a DateTime, Time or integer timestamp (Time.to_i). Any timezone + # information in local is ignored (it is treated as a time in the current + # timezone). + # + # Warning: There are local times that have no equivalent UTC times (e.g. + # in the transition from standard time to daylight savings time). There are + # also local times that have more than one UTC equivalent (e.g. in the + # transition from daylight savings time to standard time). + # + # In the first case (no equivalent UTC time), a PeriodNotFound exception + # will be raised. + # + # In the second case (more than one equivalent UTC time), an AmbiguousTime + # exception will be raised unless the optional dst parameter or block + # handles the ambiguity. + # + # If the ambiguity is due to a transition from daylight savings time to + # standard time, the dst parameter can be used to select whether the + # daylight savings time or local time is used. For example, + # + # Timezone.get('America/New_York').period_for_local(DateTime.new(2004,10,31,1,30,0)) + # + # would raise an AmbiguousTime exception. + # + # Specifying dst=true would the daylight savings period from April to + # October 2004. Specifying dst=false would return the standard period + # from October 2004 to April 2005. + # + # If the dst parameter does not resolve the ambiguity, and a block is + # specified, it is called. The block must take a single parameter - an + # array of the periods that need to be resolved. The block can select and + # return a single period or return nil or an empty array + # to cause an AmbiguousTime exception to be raised. + def period_for_local(local, dst = nil) + results = periods_for_local(local) + + if results.empty? + raise PeriodNotFound + elsif results.size < 2 + results.first + else + # ambiguous result try to resolve + + if !dst.nil? + matches = results.find_all {|period| period.dst? == dst} + results = matches if !matches.empty? + end + + if results.size < 2 + results.first + else + # still ambiguous, try the block + + if block_given? + results = yield results + end + + if results.is_a?(TimezonePeriod) + results + elsif results && results.size == 1 + results.first + else + raise AmbiguousTime, "#{local} is an ambiguous local time." + end + end + end + end + + # Converts a time in UTC to the local timezone. utc can either be + # a DateTime, Time or timestamp (Time.to_i). The returned time has the same + # type as utc. Any timezone information in utc is ignored (it is treated as + # a UTC time). + def utc_to_local(utc) + TimeOrDateTime.wrap(utc) {|wrapped| + period_for_utc(wrapped).to_local(wrapped) + } + end + + # Converts a time in the local timezone to UTC. local can either be + # a DateTime, Time or timestamp (Time.to_i). The returned time has the same + # type as local. Any timezone information in local is ignored (it is treated + # as a local time). + # + # Warning: There are local times that have no equivalent UTC times (e.g. + # in the transition from standard time to daylight savings time). There are + # also local times that have more than one UTC equivalent (e.g. in the + # transition from daylight savings time to standard time). + # + # In the first case (no equivalent UTC time), a PeriodNotFound exception + # will be raised. + # + # In the second case (more than one equivalent UTC time), an AmbiguousTime + # exception will be raised unless the optional dst parameter or block + # handles the ambiguity. + # + # If the ambiguity is due to a transition from daylight savings time to + # standard time, the dst parameter can be used to select whether the + # daylight savings time or local time is used. For example, + # + # Timezone.get('America/New_York').local_to_utc(DateTime.new(2004,10,31,1,30,0)) + # + # would raise an AmbiguousTime exception. + # + # Specifying dst=true would return 2004-10-31 5:30:00. Specifying dst=false + # would return 2004-10-31 6:30:00. + # + # If the dst parameter does not resolve the ambiguity, and a block is + # specified, it is called. The block must take a single parameter - an + # array of the periods that need to be resolved. The block can return a + # single period to use to convert the time or return nil or an empty array + # to cause an AmbiguousTime exception to be raised. + def local_to_utc(local, dst = nil) + TimeOrDateTime.wrap(local) {|wrapped| + if block_given? + period = period_for_local(wrapped, dst) {|periods| yield periods } + else + period = period_for_local(wrapped, dst) + end + + period.to_utc(wrapped) + } + end + + # Returns the current time in the timezone as a Time. + def now + utc_to_local(Time.now.utc) + end + + # Returns the TimezonePeriod for the current time. + def current_period + period_for_utc(Time.now.utc) + end + + # Returns the current Time and TimezonePeriod as an array. The first element + # is the time, the second element is the period. + def current_period_and_time + utc = Time.now.utc + period = period_for_utc(utc) + [period.to_local(utc), period] + end + + alias :current_time_and_period :current_period_and_time + + # Converts a time in UTC to local time and returns it as a string + # according to the given format. The formatting is identical to + # Time.strftime and DateTime.strftime, except %Z is replaced with the + # timezone abbreviation for the specified time (for example, EST or EDT). + def strftime(format, utc = Time.now.utc) + period = period_for_utc(utc) + local = period.to_local(utc) + local = Time.at(local).utc unless local.kind_of?(Time) || local.kind_of?(DateTime) + abbreviation = period.abbreviation.to_s.gsub(/%/, '%%') + + format = format.gsub(/(.?)%Z/) do + if $1 == '%' + # return %%Z so the real strftime treats it as a literal %Z too + '%%Z' + else + "#$1#{abbreviation}" + end + end + + local.strftime(format) + end + + # Compares two Timezones based on their identifier. Returns -1 if tz is less + # than self, 0 if tz is equal to self and +1 if tz is greater than self. + def <=>(tz) + identifier <=> tz.identifier + end + + # Returns true if and only if the identifier of tz is equal to the + # identifier of this Timezone. + def eql?(tz) + self == tz + end + + # Returns a hash of this Timezone. + def hash + identifier.hash + end + + # Dumps this Timezone for marshalling. + def _dump(limit) + identifier + end + + # Loads a marshalled Timezone. + def self._load(data) + Timezone.get(data) + end + + private + # Loads in the index of timezones if it hasn't already been loaded. + def self.load_index + unless @@index_loaded + require 'tzinfo/indexes/timezones' + @@index_loaded = true + end + end + + # Returns an array of proxies corresponding to the given array of + # identifiers. + def self.get_proxies(identifiers) + identifiers.collect {|identifier| get_proxy(identifier)} + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_definition.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_definition.rb new file mode 100644 index 0000000000..39ca8bfa53 --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_definition.rb @@ -0,0 +1,56 @@ +#-- +# Copyright (c) 2006 Philip Ross +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#++ + +require 'tzinfo/data_timezone_info' +require 'tzinfo/linked_timezone_info' + +module TZInfo + + # TimezoneDefinition is included into Timezone definition modules. + # TimezoneDefinition provides the methods for defining timezones. + module TimezoneDefinition #:nodoc: + # Add class methods to the includee. + def self.append_features(base) + super + base.extend(ClassMethods) + end + + # Class methods for inclusion. + module ClassMethods #:nodoc: + # Returns and yields a DataTimezoneInfo object to define a timezone. + def timezone(identifier) + yield @timezone = DataTimezoneInfo.new(identifier) + end + + # Defines a linked timezone. + def linked_timezone(identifier, link_to_identifier) + @timezone = LinkedTimezoneInfo.new(identifier, link_to_identifier) + end + + # Returns the last TimezoneInfo to be defined with timezone or + # linked_timezone. + def get + @timezone + end + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_info.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_info.rb new file mode 100644 index 0000000000..68e38c35fb --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_info.rb @@ -0,0 +1,40 @@ +#-- +# Copyright (c) 2006 Philip Ross +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#++ + +module TZInfo + # Represents a timezone defined in a data module. + class TimezoneInfo #:nodoc: + + # The timezone identifier. + attr_reader :identifier + + # Constructs a new TimezoneInfo with an identifier. + def initialize(identifier) + @identifier = identifier + end + + # Returns internal object state as a programmer-readable string. + def inspect + "#<#{self.class}: #@identifier>" + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_offset_info.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_offset_info.rb new file mode 100644 index 0000000000..6a0bbca46f --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_offset_info.rb @@ -0,0 +1,94 @@ +#-- +# Copyright (c) 2006 Philip Ross +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#++ + +module TZInfo + # Represents an offset defined in a Timezone data file. + class TimezoneOffsetInfo #:nodoc: + # The base offset of the timezone from UTC in seconds. + attr_reader :utc_offset + + # The offset from standard time for the zone in seconds (i.e. non-zero if + # daylight savings is being observed). + attr_reader :std_offset + + # The total offset of this observance from UTC in seconds + # (utc_offset + std_offset). + attr_reader :utc_total_offset + + # The abbreviation that identifies this observance, e.g. "GMT" + # (Greenwich Mean Time) or "BST" (British Summer Time) for "Europe/London". The returned identifier is a + # symbol. + attr_reader :abbreviation + + # Constructs a new TimezoneOffsetInfo. utc_offset and std_offset are + # specified in seconds. + def initialize(utc_offset, std_offset, abbreviation) + @utc_offset = utc_offset + @std_offset = std_offset + @abbreviation = abbreviation + + @utc_total_offset = @utc_offset + @std_offset + end + + # True if std_offset is non-zero. + def dst? + @std_offset != 0 + end + + # Converts a UTC DateTime to local time based on the offset of this period. + def to_local(utc) + TimeOrDateTime.wrap(utc) {|wrapped| + wrapped + @utc_total_offset + } + end + + # Converts a local DateTime to UTC based on the offset of this period. + def to_utc(local) + TimeOrDateTime.wrap(local) {|wrapped| + wrapped - @utc_total_offset + } + end + + # Returns true if and only if toi has the same utc_offset, std_offset + # and abbreviation as this TimezoneOffsetInfo. + def ==(toi) + toi.respond_to?(:utc_offset) && toi.respond_to?(:std_offset) && toi.respond_to?(:abbreviation) && + utc_offset == toi.utc_offset && std_offset == toi.std_offset && abbreviation == toi.abbreviation + end + + # Returns true if and only if toi has the same utc_offset, std_offset + # and abbreviation as this TimezoneOffsetInfo. + def eql?(toi) + self == toi + end + + # Returns a hash of this TimezoneOffsetInfo. + def hash + utc_offset.hash ^ std_offset.hash ^ abbreviation.hash + end + + # Returns internal object state as a programmer-readable string. + def inspect + "#<#{self.class}: #@utc_offset,#@std_offset,#@abbreviation>" + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_period.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_period.rb new file mode 100644 index 0000000000..00888fcfdc --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_period.rb @@ -0,0 +1,198 @@ +#-- +# Copyright (c) 2005-2006 Philip Ross +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#++ + +require 'tzinfo/offset_rationals' +require 'tzinfo/time_or_datetime' + +module TZInfo + # A period of time in a timezone where the same offset from UTC applies. + # + # All the methods that take times accept instances of Time, DateTime or + # integer timestamps. + class TimezonePeriod + # The TimezoneTransitionInfo that defines the start of this TimezonePeriod + # (may be nil if unbounded). + attr_reader :start_transition + + # The TimezoneTransitionInfo that defines the end of this TimezonePeriod + # (may be nil if unbounded). + attr_reader :end_transition + + # The TimezoneOffsetInfo for this period. + attr_reader :offset + + # Initializes a new TimezonePeriod. + def initialize(start_transition, end_transition, offset = nil) + @start_transition = start_transition + @end_transition = end_transition + + if offset + raise ArgumentError, 'Offset specified with transitions' if @start_transition || @end_transition + @offset = offset + else + if @start_transition + @offset = @start_transition.offset + elsif @end_transition + @offset = @end_transition.previous_offset + else + raise ArgumentError, 'No offset specified and no transitions to determine it from' + end + end + + @utc_total_offset_rational = nil + end + + # Base offset of the timezone from UTC (seconds). + def utc_offset + @offset.utc_offset + end + + # Offset from the local time where daylight savings is in effect (seconds). + # E.g.: utc_offset could be -5 hours. Normally, std_offset would be 0. + # During daylight savings, std_offset would typically become +1 hours. + def std_offset + @offset.std_offset + end + + # The identifier of this period, e.g. "GMT" (Greenwich Mean Time) or "BST" + # (British Summer Time) for "Europe/London". The returned identifier is a + # symbol. + def abbreviation + @offset.abbreviation + end + alias :zone_identifier :abbreviation + + # Total offset from UTC (seconds). Equal to utc_offset + std_offset. + def utc_total_offset + @offset.utc_total_offset + end + + # Total offset from UTC (days). Result is a Rational. + def utc_total_offset_rational + unless @utc_total_offset_rational + @utc_total_offset_rational = OffsetRationals.rational_for_offset(utc_total_offset) + end + @utc_total_offset_rational + end + + # The start time of the period in UTC as a DateTime. May be nil if unbounded. + def utc_start + @start_transition ? @start_transition.at.to_datetime : nil + end + + # The end time of the period in UTC as a DateTime. May be nil if unbounded. + def utc_end + @end_transition ? @end_transition.at.to_datetime : nil + end + + # The start time of the period in local time as a DateTime. May be nil if + # unbounded. + def local_start + @start_transition ? @start_transition.local_start.to_datetime : nil + end + + # The end time of the period in local time as a DateTime. May be nil if + # unbounded. + def local_end + @end_transition ? @end_transition.local_end.to_datetime : nil + end + + # true if daylight savings is in effect for this period; otherwise false. + def dst? + @offset.dst? + end + + # true if this period is valid for the given UTC DateTime; otherwise false. + def valid_for_utc?(utc) + utc_after_start?(utc) && utc_before_end?(utc) + end + + # true if the given UTC DateTime is after the start of the period + # (inclusive); otherwise false. + def utc_after_start?(utc) + !@start_transition || @start_transition.at <= utc + end + + # true if the given UTC DateTime is before the end of the period + # (exclusive); otherwise false. + def utc_before_end?(utc) + !@end_transition || @end_transition.at > utc + end + + # true if this period is valid for the given local DateTime; otherwise false. + def valid_for_local?(local) + local_after_start?(local) && local_before_end?(local) + end + + # true if the given local DateTime is after the start of the period + # (inclusive); otherwise false. + def local_after_start?(local) + !@start_transition || @start_transition.local_start <= local + end + + # true if the given local DateTime is before the end of the period + # (exclusive); otherwise false. + def local_before_end?(local) + !@end_transition || @end_transition.local_end > local + end + + # Converts a UTC DateTime to local time based on the offset of this period. + def to_local(utc) + @offset.to_local(utc) + end + + # Converts a local DateTime to UTC based on the offset of this period. + def to_utc(local) + @offset.to_utc(local) + end + + # Returns true if this TimezonePeriod is equal to p. This compares the + # start_transition, end_transition and offset using ==. + def ==(p) + p.respond_to?(:start_transition) && p.respond_to?(:end_transition) && + p.respond_to?(:offset) && start_transition == p.start_transition && + end_transition == p.end_transition && offset == p.offset + end + + # Returns true if this TimezonePeriods is equal to p. This compares the + # start_transition, end_transition and offset using eql? + def eql?(p) + p.respond_to?(:start_transition) && p.respond_to?(:end_transition) && + p.respond_to?(:offset) && start_transition.eql?(p.start_transition) && + end_transition.eql?(p.end_transition) && offset.eql?(p.offset) + end + + # Returns a hash of this TimezonePeriod. + def hash + result = @start_transition.hash ^ @end_transition.hash + result ^= @offset.hash unless @start_transition || @end_transition + result + end + + # Returns internal object state as a programmer-readable string. + def inspect + result = "#<#{self.class}: #{@start_transition.inspect},#{@end_transition.inspect}" + result << ",#{@offset.inspect}>" unless @start_transition || @end_transition + result + '>' + end + end +end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_transition_info.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_transition_info.rb new file mode 100644 index 0000000000..6b0669cc4a --- /dev/null +++ b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_transition_info.rb @@ -0,0 +1,129 @@ +#-- +# Copyright (c) 2006 Philip Ross +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +#++ + +require 'date' +require 'tzinfo/time_or_datetime' + +module TZInfo + # Represents an offset defined in a Timezone data file. + class TimezoneTransitionInfo #:nodoc: + # The offset this transition changes to (a TimezoneOffsetInfo instance). + attr_reader :offset + + # The offset this transition changes from (a TimezoneOffsetInfo instance). + attr_reader :previous_offset + + # The numerator of the DateTime if the transition time is defined as a + # DateTime, otherwise the transition time as a timestamp. + attr_reader :numerator_or_time + protected :numerator_or_time + + # Either the denominotor of the DateTime if the transition time is defined + # as a DateTime, otherwise nil. + attr_reader :denominator + protected :denominator + + # Creates a new TimezoneTransitionInfo with the given offset, + # previous_offset (both TimezoneOffsetInfo instances) and UTC time. + # if denominator is nil, numerator_or_time is treated as a number of + # seconds since the epoch. If denominator is specified numerator_or_time + # and denominator are used to create a DateTime as follows: + # + # DateTime.new!(Rational.send(:new!, numerator_or_time, denominator), 0, Date::ITALY) + # + # For performance reasons, the numerator and denominator must be specified + # in their lowest form. + def initialize(offset, previous_offset, numerator_or_time, denominator = nil) + @offset = offset + @previous_offset = previous_offset + @numerator_or_time = numerator_or_time + @denominator = denominator + + @at = nil + @local_end = nil + @local_start = nil + end + + # A TimeOrDateTime instance representing the UTC time when this transition + # occurs. + def at + unless @at + unless @denominator + @at = TimeOrDateTime.new(@numerator_or_time) + else + r = RubyCoreSupport.rational_new!(@numerator_or_time, @denominator) + dt = RubyCoreSupport.datetime_new!(r, 0, Date::ITALY) + @at = TimeOrDateTime.new(dt) + end + end + + @at + end + + # A TimeOrDateTime instance representing the local time when this transition + # causes the previous observance to end (calculated from at using + # previous_offset). + def local_end + @local_end = at.add_with_convert(@previous_offset.utc_total_offset) unless @local_end + @local_end + end + + # A TimeOrDateTime instance representing the local time when this transition + # causes the next observance to start (calculated from at using offset). + def local_start + @local_start = at.add_with_convert(@offset.utc_total_offset) unless @local_start + @local_start + end + + # Returns true if this TimezoneTransitionInfo is equal to the given + # TimezoneTransitionInfo. Two TimezoneTransitionInfo instances are + # considered to be equal by == if offset, previous_offset and at are all + # equal. + def ==(tti) + tti.respond_to?(:offset) && tti.respond_to?(:previous_offset) && tti.respond_to?(:at) && + offset == tti.offset && previous_offset == tti.previous_offset && at == tti.at + end + + # Returns true if this TimezoneTransitionInfo is equal to the given + # TimezoneTransitionInfo. Two TimezoneTransitionInfo instances are + # considered to be equal by eql? if offset, previous_offset, + # numerator_or_time and denominator are all equal. This is stronger than ==, + # which just requires the at times to be equal regardless of how they were + # originally specified. + def eql?(tti) + tti.respond_to?(:offset) && tti.respond_to?(:previous_offset) && + tti.respond_to?(:numerator_or_time) && tti.respond_to?(:denominator) && + offset == tti.offset && previous_offset == tti.previous_offset && + numerator_or_time == tti.numerator_or_time && denominator == tti.denominator + end + + # Returns a hash of this TimezoneTransitionInfo instance. + def hash + @offset.hash ^ @previous_offset.hash ^ @numerator_or_time.hash ^ @denominator.hash + end + + # Returns internal object state as a programmer-readable string. + def inspect + "#<#{self.class}: #{at.inspect},#{@offset.inspect}>" + end + end +end -- cgit v1.2.3 From b6b3db6734af8d5b42c7bdcea7c73923a5b88463 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Thu, 28 Jan 2010 00:24:30 +1100 Subject: Fixed bug on HTML only emails getting set to text/plain --- actionmailer/lib/action_mailer/base.rb | 2 +- actionmailer/test/base_test.rb | 18 ++++++++++++++++++ .../test/fixtures/base_mailer/html_only.html.erb | 1 + .../test/fixtures/base_mailer/plain_text_only.text.erb | 1 + 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 actionmailer/test/fixtures/base_mailer/html_only.html.erb create mode 100644 actionmailer/test/fixtures/base_mailer/plain_text_only.text.erb diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 2288a30691..3fbf004a0d 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -531,7 +531,7 @@ module ActionMailer #:nodoc: when m.multipart? ["multipart", "alternative", params] else - class_default + m.content_type || class_default end end diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 4a65363e3e..b7af86b622 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -17,6 +17,14 @@ class BaseTest < ActiveSupport::TestCase def simple(hash = {}) mail(hash) end + + def html_only(hash = {}) + mail(hash) + end + + def plain_text_only(hash = {}) + mail(hash) + end def simple_with_headers(hash = {}) headers hash @@ -434,6 +442,16 @@ class BaseTest < ActiveSupport::TestCase mail = BaseMailer.explicit_multipart assert_not_nil(mail.content_type_parameters[:boundary]) end + + test "should set a content type if only has an html part" do + mail = BaseMailer.html_only + assert_equal('text/html', mail.mime_type) + end + + test "should set a content type if only has an plain text part" do + mail = BaseMailer.plain_text_only + assert_equal('text/plain', mail.mime_type) + end protected diff --git a/actionmailer/test/fixtures/base_mailer/html_only.html.erb b/actionmailer/test/fixtures/base_mailer/html_only.html.erb new file mode 100644 index 0000000000..9c99a008e7 --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/html_only.html.erb @@ -0,0 +1 @@ +

Testing

\ No newline at end of file diff --git a/actionmailer/test/fixtures/base_mailer/plain_text_only.text.erb b/actionmailer/test/fixtures/base_mailer/plain_text_only.text.erb new file mode 100644 index 0000000000..0a90125685 --- /dev/null +++ b/actionmailer/test/fixtures/base_mailer/plain_text_only.text.erb @@ -0,0 +1 @@ +Testing \ No newline at end of file -- cgit v1.2.3 From a792ee5665fff4bd3751e97e1d949b60e73e333d Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 23 Sep 2009 00:18:10 -0700 Subject: Added the beginnings of the observe_field helper --- actionpack/lib/action_view/helpers/ajax_helper.rb | 14 +++++- actionpack/test/template/ajax_test.rb | 55 +++++++++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 9cc2acc239..1246ec7107 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -33,7 +33,19 @@ module ActionView tag(:input, html_options) end - + + def observe_field(name, options = {}, html_options = {}) + url = options.delete(:url) + url = url_for(url) if url.is_a?(Hash) + + if frequency = options.delete(:frequency) + html_options[:"data-frequency"] = frequency + end + + html_options.merge!(:"data-observe" => true, :"data-url" => url) + tag(:input, html_options) + end + module Rails2Compatibility def set_callbacks(options, html) [:complete, :failure, :success, :interactive, :loaded, :loading].each do |type| diff --git a/actionpack/test/template/ajax_test.rb b/actionpack/test/template/ajax_test.rb index aeb7c09b09..d212134d1d 100644 --- a/actionpack/test/template/ajax_test.rb +++ b/actionpack/test/template/ajax_test.rb @@ -112,3 +112,58 @@ class ButtonToRemoteTest < AjaxTestCase end end end + +class ObserveFieldTest < AjaxTestCase + def url_for(hash) + "/blog/update" + end + + def protect_against_forgery? + false + end + + def field(options = {}) + observe_field("title", options) + end + + test "basic" do + assert_html field, + %w(data-observe="true") + end + + test "with a :frequency option" do + assert_html field(:frequency => 5.minutes), + %w(data-observe="true" data-frequency="300") + end + + test "using a url string" do + assert_html field(:url => "/some/other/url"), + %w(data-observe="true" data-url="/some/other/url") + end + + test "using a url hash" do + assert_html field(:url => {:controller => :blog, :action => :update}), + %w(data-observe="true" data-url="/blog/update") + end + +# def test_observe_field +# assert_dom_equal %(), +# observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }) +# end +# +# def test_observe_field_using_with_option +# expected = %() +# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => 'id') +# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "'id=' + encodeURIComponent(value)") +# end +# +# def test_observe_field_using_json_in_with_option +# expected = %() +# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "{'id':value}") +# end +# +# def test_observe_field_using_function_for_callback +# assert_dom_equal %(), +# observe_field("glass", :frequency => 5.minutes, :function => "alert('Element changed')") +# end +end -- cgit v1.2.3 From c44682f6ab7f9b6dd3773752723aa8c46d019bde Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 23 Sep 2009 01:05:45 -0700 Subject: Implemented a fuller stub in AjaxTestCase for url_for because link_to calls url_for on all urls passed to it. Tests that were testing different input types for the url were failing because of this. --- actionpack/lib/action_view/helpers/ajax_helper.rb | 2 +- actionpack/test/template/ajax_test.rb | 37 +++++++++++++++++------ 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 1246ec7107..3be8878f97 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -19,7 +19,7 @@ module ActionView html["data-remote"] = "true" html.merge!(options) - + url = url_for(url) if url.is_a?(Hash) link_to(name, url, html) end diff --git a/actionpack/test/template/ajax_test.rb b/actionpack/test/template/ajax_test.rb index d212134d1d..afaa16874d 100644 --- a/actionpack/test/template/ajax_test.rb +++ b/actionpack/test/template/ajax_test.rb @@ -4,6 +4,17 @@ class AjaxTestCase < ActiveSupport::TestCase include ActionView::Helpers::AjaxHelper include ActionView::Helpers::TagHelper + def url_for(url) + case url + when Hash + "/url/hash" + when String + url + else + raise TypeError.new("Unsupported url type (#{url.class}) for this test helper") + end + end + def assert_html(html, matches) matches.each do |match| assert_match(Regexp.new(Regexp.escape(match)), html) @@ -23,26 +34,27 @@ class AjaxTestCase < ActiveSupport::TestCase end class LinkToRemoteTest < AjaxTestCase - def url_for(hash) - "/blog/destroy/4" - end - def link(options = {}) link_to_remote("Delete this post", "/blog/destroy/3", options) end - test "with no update" do - assert_html link, %w(href="/blog/destroy/4" Delete\ this\ post data-remote="true") - end - test "basic" do assert_html link(:update => "#posts"), %w(data-update-success="#posts") end + test "using a url string" do + assert_html link_to_remote("Test", "/blog/update/1"), + %w(href="/blog/update/1") + end + test "using a url hash" do link = link_to_remote("Delete this post", {:controller => :blog}, :update => "#posts") - assert_html link, %w(href="/blog/destroy/4" data-update-success="#posts") + assert_html link, %w(href="/url/hash" data-update-success="#posts") + end + + test "with no update" do + assert_html link, %w(href="/blog/destroy/4" Delete\ this\ post data-remote="true") end test "with :html options" do @@ -90,6 +102,7 @@ class ButtonToRemoteTest < AjaxTestCase button_to_remote("Remote outpost", options, html) end +<<<<<<< HEAD:actionpack/test/template/ajax_test.rb def url_for(*) "/whatnot" end @@ -101,6 +114,12 @@ class ButtonToRemoteTest < AjaxTestCase /data-url="\/whatnot"/].each do |match| assert_match(match, button) end +======= + class StandardTest < ButtonToRemoteTest + test "basic" do + assert_html button({:url => {:action => "whatnot"}}, {:class => "fine"}), + %w(input class="fine" type="button" value="Remote outpost" data-url="/url/hash") +>>>>>>> ea876bd... Implemented a fuller stub in AjaxTestCase for url_for because link_to calls url_for on all urls passed to it. Tests that were testing different input types for the url were failing because of this.:actionpack/test/javascript/ajax_test.rb end end -- cgit v1.2.3 From 77fc50a08be40abe7eea715755b5497f0e9b91f5 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Thu, 21 Jan 2010 17:21:43 -0600 Subject: fixed failing tests --- actionpack/test/javascript/ajax_test.rb | 114 ++++++++++++++++++++++++++++++++ actionpack/test/template/ajax_test.rb | 22 ++---- 2 files changed, 118 insertions(+), 18 deletions(-) create mode 100644 actionpack/test/javascript/ajax_test.rb diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb new file mode 100644 index 0000000000..b616bba703 --- /dev/null +++ b/actionpack/test/javascript/ajax_test.rb @@ -0,0 +1,114 @@ +require "abstract_unit" + +class AjaxTestCase < ActiveSupport::TestCase + include ActionView::Helpers::AjaxHelper + include ActionView::Helpers::TagHelper + + def assert_html(html, matches) + matches.each do |match| + assert_match Regexp.new(Regexp.escape(match)), html + end + end + + def self.assert_callbacks_work(&blk) + define_method(:assert_callbacks_work, &blk) + + [:complete, :failure, :success, :interactive, :loaded, :loading, 404].each do |callback| + test "#{callback} callback" do + markup = assert_callbacks_work(callback) + assert_html markup, %W(data-#{callback}-code="undoRequestCompleted\(request\)") + end + end + end +end + +class LinkToRemoteTest < AjaxTestCase + def url_for(hash) + "/blog/destroy/4" + end + + def link(options = {}) + link_to_remote("Delete this post", "/blog/destroy/4", options) + end + + test "with no update" do + assert_html link, %w(href="/blog/destroy/4" Delete\ this\ post data-remote="true") + end + + test "basic" do + assert_html link(:update => "#posts"), + %w(data-update-success="#posts") + end + + test "using a url hash" do + link = link_to_remote("Delete this post", {:controller => :blog}, :update => "#posts") + assert_html link, %w(href="/blog/destroy/4" data-update-success="#posts") + end + + test "with :html options" do + expected = %{Delete this post} + assert_equal expected, link(:update => "#posts", :html => {"data-custom" => "me"}) + end + + test "with a hash for :update" do + link = link(:update => {:success => "#posts", :failure => "#error"}) + assert_html link, %w(data-remote="true" data-update-success="#posts" data-update-failure="#error") + end + + test "with positional parameters" do + link = link(:position => :top, :update => "#posts") + assert_match /data\-update\-position="top"/, link + end + + test "with an optional method" do + link = link(:method => "delete") + assert_match /data-method="delete"/, link + end + + class LegacyLinkToRemoteTest < AjaxTestCase + include ActionView::Helpers::AjaxHelper::Rails2Compatibility + + def link(options) + link_to_remote("Delete this post", "/blog/destroy/4", options) + end + + test "basic link_to_remote with :url =>" do + expected = %{Delete this post} + assert_equal expected, + link_to_remote("Delete this post", :url => "/blog/destroy/4", :update => "#posts") + end + + assert_callbacks_work do |callback| + link(callback => "undoRequestCompleted(request)") + end + end +end + +class ButtonToRemoteTest < AjaxTestCase + def button(options, html = {}) + button_to_remote("Remote outpost", options, html) + end + + def url_for(*) + "/whatnot" + end + + class StandardTest < ButtonToRemoteTest + test "basic" do + button = button({:url => {:action => "whatnot"}}, {:class => "fine"}) + [/input/, /class="fine"/, /type="button"/, /value="Remote outpost"/, + /data-url="\/whatnot"/].each do |match| + assert_match match, button + end + end + end + + class LegacyButtonToRemoteTest < ButtonToRemoteTest + include ActionView::Helpers::AjaxHelper::Rails2Compatibility + + assert_callbacks_work do |callback| + button(callback => "undoRequestCompleted(request)") + end + end + +end \ No newline at end of file diff --git a/actionpack/test/template/ajax_test.rb b/actionpack/test/template/ajax_test.rb index afaa16874d..86932d754f 100644 --- a/actionpack/test/template/ajax_test.rb +++ b/actionpack/test/template/ajax_test.rb @@ -54,11 +54,11 @@ class LinkToRemoteTest < AjaxTestCase end test "with no update" do - assert_html link, %w(href="/blog/destroy/4" Delete\ this\ post data-remote="true") + assert_html link, %w(href="/blog/destroy/3" Delete\ this\ post data-remote="true") end test "with :html options" do - expected = %{Delete this post} + expected = %{Delete this post} assert_equal expected, link(:update => "#posts", :html => {"data-custom" => "me"}) end @@ -86,9 +86,9 @@ class LinkToRemoteTest < AjaxTestCase end test "basic link_to_remote with :url =>" do - expected = %{Delete this post} + expected = %{Delete this post} assert_equal expected, - link_to_remote("Delete this post", :url => "/blog/destroy/3", :update => "#posts") + link_to_remote("Delete this post", :url => "/blog/destroy/4", :update => "#posts") end assert_callbacks_work do |callback| @@ -102,24 +102,10 @@ class ButtonToRemoteTest < AjaxTestCase button_to_remote("Remote outpost", options, html) end -<<<<<<< HEAD:actionpack/test/template/ajax_test.rb - def url_for(*) - "/whatnot" - end - - class StandardTest < ButtonToRemoteTest - test "basic" do - button = button({:url => {:action => "whatnot"}}, {:class => "fine"}) - [/input/, /class="fine"/, /type="button"/, /value="Remote outpost"/, - /data-url="\/whatnot"/].each do |match| - assert_match(match, button) - end -======= class StandardTest < ButtonToRemoteTest test "basic" do assert_html button({:url => {:action => "whatnot"}}, {:class => "fine"}), %w(input class="fine" type="button" value="Remote outpost" data-url="/url/hash") ->>>>>>> ea876bd... Implemented a fuller stub in AjaxTestCase for url_for because link_to calls url_for on all urls passed to it. Tests that were testing different input types for the url were failing because of this.:actionpack/test/javascript/ajax_test.rb end end -- cgit v1.2.3 From fab8b25c15064a020e62e2baca11ed1f551f4d6f Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 23 Sep 2009 01:15:31 -0700 Subject: ObserveFieldTest uses url_for from AjaxTestCase --- actionpack/test/javascript/ajax_test.rb | 52 ++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index b616bba703..6539583398 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -110,5 +110,55 @@ class ButtonToRemoteTest < AjaxTestCase button(callback => "undoRequestCompleted(request)") end end +end + +class ObserveFieldTest < AjaxTestCase + def protect_against_forgery? + false + end + + def field(options = {}) + observe_field("title", options) + end + + test "basic" do + assert_html field, + %w(data-observe="true") + end + + test "with a :frequency option" do + assert_html field(:frequency => 5.minutes), + %w(data-observe="true" data-frequency="300") + end -end \ No newline at end of file + test "using a url string" do + assert_html field(:url => "/some/other/url"), + %w(data-observe="true" data-url="/some/other/url") + end + + test "using a url hash" do + assert_html field(:url => {:controller => :blog, :action => :update}), + %w(data-observe="true" data-url="/url/hash") + end + +# def test_observe_field +# assert_dom_equal %(), +# observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }) +# end +# +# def test_observe_field_using_with_option +# expected = %() +# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => 'id') +# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "'id=' + encodeURIComponent(value)") +# end +# +# def test_observe_field_using_json_in_with_option +# expected = %() +# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "{'id':value}") +# end +# +# def test_observe_field_using_function_for_callback +# assert_dom_equal %(), +# observe_field("glass", :frequency => 5.minutes, :function => "alert('Element changed')") +# end +end -- cgit v1.2.3 From 88e793e5e77efbd43a5a2bb4eaba283255f6a262 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 23 Sep 2009 15:06:56 -0700 Subject: Changed the observe field node into a div with display:none --- actionpack/lib/action_view/helpers/ajax_helper.rb | 11 ++++++++--- actionpack/test/javascript/ajax_test.rb | 20 ++++++++++++-------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 3be8878f97..6a13bcb432 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -38,12 +38,17 @@ module ActionView url = options.delete(:url) url = url_for(url) if url.is_a?(Hash) - if frequency = options.delete(:frequency) + frequency = options.delete(:frequency) + if frequency && frequency > 0 html_options[:"data-frequency"] = frequency end - html_options.merge!(:"data-observe" => true, :"data-url" => url) - tag(:input, html_options) + html_options.merge!(:style => "display:none", + :"data-observe-field" => name, + :"data-observe" => true, + :"data-url" => url) + + tag(:div, html_options) end module Rails2Compatibility diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 6539583398..e46e346d79 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -123,22 +123,26 @@ class ObserveFieldTest < AjaxTestCase test "basic" do assert_html field, - %w(data-observe="true") - end - - test "with a :frequency option" do - assert_html field(:frequency => 5.minutes), - %w(data-observe="true" data-frequency="300") + %w(div style="display:none" data-observe="true" data-observe-field="title") end test "using a url string" do assert_html field(:url => "/some/other/url"), - %w(data-observe="true" data-url="/some/other/url") + %w(data-url="/some/other/url") end test "using a url hash" do assert_html field(:url => {:controller => :blog, :action => :update}), - %w(data-observe="true" data-url="/url/hash") + %w(data-url="/url/hash") + end + + test "with a :frequency option" do + assert_html field(:frequency => 5.minutes), + %w(data-frequency="300") + end + + test "with a :frequency option of 0" do + assert_no_match /data-frequency/, field(:frequency => 0) end # def test_observe_field -- cgit v1.2.3 From 6fa8f81d7d730527f92d8e373dfc32199799681b Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Thu, 24 Sep 2009 00:18:52 -0700 Subject: Took another stab at observe_field. Now implementing data only helpers as script elements. --- actionpack/lib/action_view/helpers/ajax_helper.rb | 52 ++++++++++++++++++----- actionpack/test/javascript/ajax_test.rb | 51 ++++++++++++---------- 2 files changed, 69 insertions(+), 34 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 6a13bcb432..43856acbc8 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -34,21 +34,51 @@ module ActionView tag(:input, html_options) end - def observe_field(name, options = {}, html_options = {}) - url = options.delete(:url) - url = url_for(url) if url.is_a?(Hash) + def observe_field(name, options = {}) + if options[:url] + options[:url] = options[:url].is_a?(Hash) ? url_for(options[:url]) : options[:url] + end + + if options[:frequency] + case options[:frequency] + when 0 + options.delete(:frequency) + else + options[:frequency] = options[:frequency].to_i + end + end + + if options[:with] && (options[:with] !~ /[\{=(.]/) + options[:with] = "'#{options[:with]}=' + encodeURIComponent(value)" + else + options[:with] ||= 'value' unless options[:function] + end - frequency = options.delete(:frequency) - if frequency && frequency > 0 - html_options[:"data-frequency"] = frequency + if options[:function] + statements = options[:function] # || remote_function(options) # TODO: Need to implement remote function - BR + options[:function] = JSFunction.new(statements, "element", "value") end - html_options.merge!(:style => "display:none", - :"data-observe-field" => name, - :"data-observe" => true, - :"data-url" => url) + options[:name] = name + + <<-SCRIPT + + SCRIPT + end - tag(:div, html_options) + # TODO: Move to javascript helpers - BR + class JSFunction + def initialize(statements, *arguments) + @statements, @arguments = statements, arguments + end + + def as_json(options = nil) + "function(#{@arguments.join(", ")}) {#{@statements}}" + end end module Rails2Compatibility diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index e46e346d79..97a69ba732 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -112,6 +112,8 @@ class ButtonToRemoteTest < AjaxTestCase end end +# TODO: We need a better way to test JSON being returned from data only helpers - BR +# TODO: We might also need a lower level data only helper method??? - BR class ObserveFieldTest < AjaxTestCase def protect_against_forgery? false @@ -123,46 +125,49 @@ class ObserveFieldTest < AjaxTestCase test "basic" do assert_html field, - %w(div style="display:none" data-observe="true" data-observe-field="title") + %w(script type="application/json" data-rails-type="observe_field") end test "using a url string" do assert_html field(:url => "/some/other/url"), - %w(data-url="/some/other/url") + %w("url":"/some/other/url") end test "using a url hash" do assert_html field(:url => {:controller => :blog, :action => :update}), - %w(data-url="/url/hash") + %w("url":"/url/hash") end - test "with a :frequency option" do + test "using a :frequency option" do assert_html field(:frequency => 5.minutes), - %w(data-frequency="300") + %w("frequency":300) end - test "with a :frequency option of 0" do - assert_no_match /data-frequency/, field(:frequency => 0) + test "using a :frequency option of 0" do + assert_no_match /frequency/, field(:frequency => 0) end + # TODO: Finish when remote_function or some equivilent is finished -BR # def test_observe_field # assert_dom_equal %(), # observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }) # end -# -# def test_observe_field_using_with_option -# expected = %() -# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => 'id') -# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "'id=' + encodeURIComponent(value)") -# end -# -# def test_observe_field_using_json_in_with_option -# expected = %() -# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "{'id':value}") -# end -# -# def test_observe_field_using_function_for_callback -# assert_dom_equal %(), -# observe_field("glass", :frequency => 5.minutes, :function => "alert('Element changed')") -# end + + # TODO: Consider using JSON instead of strings. Is using 'value' as a magical reference to the value of the observed field weird? (Rails2 does this) - BR + test "using a :with option" do + assert_html field(:with => "foo"), + %w("with":"'foo=' + encodeURIComponent(value)") + assert_html field(:with => "'foo=' + encodeURIComponent(value)"), + %w("with":"'foo=' + encodeURIComponent(value)") + end + + test "using json in a :with option" do + assert_html field(:with => "{'id':value}"), + %w("with":"{'id':value}") + end + + test "using :function for callback" do + assert_html field(:function => "alert('Element changed')"), + %w("function":"function(element, value) {alert('Element changed')}") + end end -- cgit v1.2.3 From 0955f5791555127d2ea3ab1c8a2450bca5a4236a Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Thu, 24 Sep 2009 21:12:11 -0700 Subject: Added assert_data_element_json test helper for data element helpers --- actionpack/lib/action_view/helpers/ajax_helper.rb | 10 +++--- actionpack/test/javascript/ajax_test.rb | 44 ++++++++++++++--------- 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 43856acbc8..688a5262c7 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -48,10 +48,12 @@ module ActionView end end - if options[:with] && (options[:with] !~ /[\{=(.]/) - options[:with] = "'#{options[:with]}=' + encodeURIComponent(value)" - else - options[:with] ||= 'value' unless options[:function] + if options[:with] + if options[:with] !~ /[\{=(.]/ + options[:with] = "'#{options[:with]}=' + encodeURIComponent(value)" + else + options[:with] ||= 'value' unless options[:function] + end end if options[:function] diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 97a69ba732..dc1f7c14fd 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -10,6 +10,20 @@ class AjaxTestCase < ActiveSupport::TestCase end end + def extract_json_from_data_element(data_element) + root = HTML::Document.new(data_element).root + script = root.find(:tag => "script") + cdata = script.children.detect {|child| child.to_s =~ / "/some/other/url"), - %w("url":"/some/other/url") + assert_data_element_json field(:url => "/some/other/url"), + "url" => "/some/other/url", "name" => "title" end test "using a url hash" do - assert_html field(:url => {:controller => :blog, :action => :update}), - %w("url":"/url/hash") + assert_data_element_json field(:url => {:controller => :blog, :action => :update}), + "url" => "/url/hash", "name" => "title" end test "using a :frequency option" do - assert_html field(:frequency => 5.minutes), - %w("frequency":300) + assert_data_element_json field(:url => { :controller => :blog }, :frequency => 5.minutes), + "url" => "/url/hash", "name" => "title", "frequency" => 300 end test "using a :frequency option of 0" do @@ -155,19 +167,19 @@ class ObserveFieldTest < AjaxTestCase # TODO: Consider using JSON instead of strings. Is using 'value' as a magical reference to the value of the observed field weird? (Rails2 does this) - BR test "using a :with option" do - assert_html field(:with => "foo"), - %w("with":"'foo=' + encodeURIComponent(value)") - assert_html field(:with => "'foo=' + encodeURIComponent(value)"), - %w("with":"'foo=' + encodeURIComponent(value)") + assert_data_element_json field(:with => "foo"), + "name" => "title", "with" => "'foo=' + encodeURIComponent(value)" + assert_data_element_json field(:with => "'foo=' + encodeURIComponent(value)"), + "name" => "title", "with" => "'foo=' + encodeURIComponent(value)" end test "using json in a :with option" do - assert_html field(:with => "{'id':value}"), - %w("with":"{'id':value}") + assert_data_element_json field(:with => "{'id':value}"), + "name" => "title", "with" => "{'id':value}" end test "using :function for callback" do - assert_html field(:function => "alert('Element changed')"), - %w("function":"function(element, value) {alert('Element changed')}") + assert_data_element_json field(:function => "alert('Element changed')"), + "name" => "title", "function" => "function(element, value) {alert('Element changed')}" end end -- cgit v1.2.3 From 118a720a018fdf7358e619fc9cd949d5f336bf07 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Fri, 25 Sep 2009 01:27:20 -0700 Subject: Took first stab at reimplementing form_remote_tag helpers --- actionpack/lib/action_view/helpers/ajax_helper.rb | 65 +++++++----- actionpack/test/javascript/ajax_test.rb | 123 ++++++++++++++++++++++ 2 files changed, 164 insertions(+), 24 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 688a5262c7..e127641f4f 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -2,26 +2,41 @@ module ActionView module Helpers module AjaxHelper include UrlHelper - - def link_to_remote(name, url, options = {}) - html = options.delete(:html) || {} + + def form_remote_tag(options = {}, &block) + attributes = {} + attributes.merge!(extract_remote_attributes!(options)) + attributes.merge!(options) + + url = attributes.delete(:url) + form_tag(attributes.delete(:action) || url_for(url), attributes, &block) + end + + def extract_remote_attributes!(options) + attributes = options.delete(:html) || {} update = options.delete(:update) if update.is_a?(Hash) - html["data-update-success"] = update[:success] - html["data-update-failure"] = update[:failure] + attributes["data-update-success"] = update[:success] + attributes["data-update-failure"] = update[:failure] else - html["data-update-success"] = update + attributes["data-update-success"] = update end - html["data-update-position"] = options.delete(:position) - html["data-method"] = options.delete(:method) - html["data-remote"] = "true" - - html.merge!(options) + attributes["data-update-position"] = options.delete(:position) + attributes["data-method"] = options.delete(:method) + attributes["data-remote"] = true + + attributes + end + + def link_to_remote(name, url, options = {}) + attributes = {} + attributes.merge!(extract_remote_attributes!(options)) + attributes.merge!(options) url = url_for(url) if url.is_a?(Hash) - link_to(name, url, html) + link_to(name, url, attributes) end def button_to_remote(name, options = {}, html_options = {}) @@ -72,17 +87,6 @@ module ActionView SCRIPT end - # TODO: Move to javascript helpers - BR - class JSFunction - def initialize(statements, *arguments) - @statements, @arguments = statements, arguments - end - - def as_json(options = nil) - "function(#{@arguments.join(", ")}) {#{@statements}}" - end - end - module Rails2Compatibility def set_callbacks(options, html) [:complete, :failure, :success, :interactive, :loaded, :loading].each do |type| @@ -111,7 +115,20 @@ module ActionView super end end - + + private + + # TODO: Move to javascript helpers - BR + class JSFunction + def initialize(statements, *arguments) + @statements, @arguments = statements, arguments + end + + def as_json(options = nil) + "function(#{@arguments.join(", ")}) {#{@statements}}" + end + end + end end end \ No newline at end of file diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index dc1f7c14fd..49942f6681 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -2,7 +2,22 @@ require "abstract_unit" class AjaxTestCase < ActiveSupport::TestCase include ActionView::Helpers::AjaxHelper + + # TODO: Ask Katz: Should these be included by the AjaxHelper? - BR include ActionView::Helpers::TagHelper + include ActionView::Helpers::FormTagHelper + + # TODO: Replace with the real url_for method - BR + def url_for(url) + case url + when Hash + "/url/hash" + when String + url + else + raise TypeError.new("Unsupported url type (#{url.class}) for this test helper") + end + end def assert_html(html, matches) matches.each do |match| @@ -10,6 +25,12 @@ class AjaxTestCase < ActiveSupport::TestCase end end + def assert_html_not_present(html, matches) + matches.each do |match| + assert_no_match Regexp.new(Regexp.escape(match)), html + end + end + def extract_json_from_data_element(data_element) root = HTML::Document.new(data_element).root script = root.find(:tag => "script") @@ -98,6 +119,108 @@ class LinkToRemoteTest < AjaxTestCase end end +class FormRemoteTagTest < AjaxTestCase + + def protect_against_forgery? + false + end + + def request_forgery_protection_token + "token_name" + end + + def form_authenticity_token + "t0k3n" + end + + def authenticity_input_attributes + %w(input type="hidden" name="token_name" value="t0k3n") + end + + # TODO: Play with using assert_dom_equal + test "basic" do + assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }), + %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") + end + + test "when protect_against_forgery? is true" do + def protect_against_forgery? + true + end + + expected_form_attributes = %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") + expected_patterns = expected_form_attributes + authenticity_input_attributes + + assert_equal true, protect_against_forgery? + assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }), expected_patterns + end + + test ":action is used when it is present" do + html = form_remote_tag(:update => "#glass_of_beer", :action => "foo") + + assert_html html, %w(form action="foo" method="post" data-remote="true" data-update-success="#glass_of_beer") + assert_no_match /url="foo"/, html + end + + test ":url is used when :action is not present" do + html = form_remote_tag(:update => "#glass_of_beer", :url => "bar") + + assert_html html, %w(form action="bar" method="post" data-remote="true" data-update-success="#glass_of_beer") + assert_no_match /url="bar"/, html + end + + test "when protect_against_forgery? is false" do + assert_equal false, protect_against_forgery? + assert_html_not_present form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }), + authenticity_input_attributes + end + + test "update callbacks" do + assert_html form_remote_tag(:update => { :success => "#glass_of_beer" }, :url => { :action => :fast }), + %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") + + assert_html form_remote_tag(:update => { :failure => "#glass_of_water" }, :url => { :action => :fast }), + %w(form action="/url/hash" method="post" data-remote="true" data-update-failure="#glass_of_water") + + assert_html form_remote_tag(:update => { :success => "#glass_of_beer", :failure => "#glass_of_water" }, :url => { :action => :fast }), + %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer" data-update-failure="#glass_of_water") + end + + test "using a :method option" do + expected_form_attributes = %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") + # TODO: Ask Katz: Why does rails do this? Some web servers don't allow PUT or DELETE from what I remember... - BR + expected_input_attributes = %w(input name="_method" type="hidden" value="put") + + assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }, :html => { :method => :put }), + expected_form_attributes + expected_input_attributes + end + + + # FIXME: This test is janky as hell. We are essentially rewriting capture and concat and they don't really work right + # because output is out of order. This test passes because it's only doing a regex match on the buffer, but this really + # needs to be fixed by using the real helper methods that rails provides. capture, concat, url_for etc. should be + # implemented by their *real* methods or we need to find a better workaround so that our tests aren't written so + # poorly. - BR + test "form_remote_tag with block in erb" do + def capture(*args, &block) + @buffer = [] + block.call(*args) if block_given? + end + def concat(str) + @buffer << str + end + + expected_form_attributes = %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer" /form) + expected_inner_html = %w(w00t!) + + form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }) { concat expected_inner_html } + assert_html @buffer.to_s, + expected_form_attributes + expected_inner_html + end + + +end + class ButtonToRemoteTest < AjaxTestCase def button(options, html = {}) button_to_remote("Remote outpost", options, html) -- cgit v1.2.3 From 29811533b457c2926c23fa07de64fdc0b8d0e7af Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 30 Sep 2009 13:36:52 -0700 Subject: remote_form_for tests pass --- actionpack/test/javascript/ajax_test.rb | 103 ++++++++++++++++++++++++++++---- 1 file changed, 93 insertions(+), 10 deletions(-) diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 49942f6681..3004cac97f 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -1,21 +1,18 @@ require "abstract_unit" -class AjaxTestCase < ActiveSupport::TestCase - include ActionView::Helpers::AjaxHelper +#TODO: Switch to assert_dom_equal where appropriate. assert_html is not robust enough for all tests - BR - # TODO: Ask Katz: Should these be included by the AjaxHelper? - BR - include ActionView::Helpers::TagHelper - include ActionView::Helpers::FormTagHelper +class AjaxTestCase < ActionView::TestCase + include ActionView::Helpers::AjaxHelper - # TODO: Replace with the real url_for method - BR - def url_for(url) - case url + def url_for(options) + case options when Hash "/url/hash" when String - url + options else - raise TypeError.new("Unsupported url type (#{url.class}) for this test helper") + raise TypeError.new("Unsupported url type (#{options.class}) for this test helper") end end @@ -218,7 +215,93 @@ class FormRemoteTagTest < AjaxTestCase expected_form_attributes + expected_inner_html end +class Author + extend ActiveModel::Naming + include ActiveModel::Conversion + + attr_reader :id + + def save; @id = 1 end + def new_record?; @id.nil? end + def name + @id.nil? ? 'new author' : "author ##{@id}" + end +end + +class Article + extend ActiveModel::Naming + include ActiveModel::Conversion + attr_reader :id + attr_reader :author_id + def save; @id = 1; @author_id = 1 end + def new_record?; @id.nil? end + def name + @id.nil? ? 'new article' : "article ##{@id}" + end +end + +class RemoteFormForTest < AjaxTestCase + + def setup + super + @record = @author = Author.new + @article = Article.new + end + + test "remote_form_for with record identification with new record" do + remote_form_for(@record, {:html => { :id => 'create-author' }}) {} + + expected = %(
) + assert_dom_equal expected, output_buffer + end + + test "remote_form_for with record identification without html options" do + remote_form_for(@record) {} + + expected = %(
) + assert_dom_equal expected, output_buffer + end + + test "remote_form_for with record identification with existing record" do + @record.save + remote_form_for(@record) {} + + expected = %(
) + assert_dom_equal expected, output_buffer + end + + test "remote_form_for with new object in list" do + remote_form_for([@author, @article]) {} + expected = %(
) + assert_dom_equal expected, output_buffer + end + + test "remote_form_for with existing object in list" do + @author.save + @article.save + remote_form_for([@author, @article]) {} + + expected = %(
) + assert_dom_equal expected, output_buffer + end + + protected + def author_path(record) + "/authors/#{record.id}" + end + + def authors_path + "/authors" + end + + def author_articles_path(author) + "/authors/#{author.id}/articles" + end + + def author_article_path(author, article) + "/authors/#{author.id}/articles/#{article.id}" + end end class ButtonToRemoteTest < AjaxTestCase -- cgit v1.2.3 From efb70f0f9fa1a33363f8eabb58caf707cba8382d Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 7 Oct 2009 19:51:40 -0700 Subject: Changed data-remote='true' to data-js-type='remote' --- actionpack/lib/action_view/helpers/ajax_helper.rb | 2 +- actionpack/test/javascript/ajax_test.rb | 45 ++++++++++++++--------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index e127641f4f..510980da08 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -25,7 +25,7 @@ module ActionView attributes["data-update-position"] = options.delete(:position) attributes["data-method"] = options.delete(:method) - attributes["data-remote"] = true + attributes["data-js-type"] = "remote" attributes end diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 3004cac97f..fc6928b8c1 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -74,17 +74,21 @@ class LinkToRemoteTest < AjaxTestCase test "using a url hash" do link = link_to_remote("Delete this post", {:controller => :blog}, :update => "#posts") - assert_html link, %w(href="/blog/destroy/4" data-update-success="#posts") + assert_html link, %w(href="/url/hash" data-update-success="#posts") + end + + test "with no update" do + assert_html link, %w(href="/blog/destroy/4" Delete\ this\ post data-js-type="remote") end test "with :html options" do - expected = %{Delete this post} + expected = %{Delete this post} assert_equal expected, link(:update => "#posts", :html => {"data-custom" => "me"}) end test "with a hash for :update" do link = link(:update => {:success => "#posts", :failure => "#error"}) - assert_html link, %w(data-remote="true" data-update-success="#posts" data-update-failure="#error") + assert_html link, %w(data-js-type="remote" data-update-success="#posts" data-update-failure="#error") end test "with positional parameters" do @@ -105,7 +109,7 @@ class LinkToRemoteTest < AjaxTestCase end test "basic link_to_remote with :url =>" do - expected = %{Delete this post} + expected = %{Delete this post} assert_equal expected, link_to_remote("Delete this post", :url => "/blog/destroy/4", :update => "#posts") end @@ -137,7 +141,7 @@ class FormRemoteTagTest < AjaxTestCase # TODO: Play with using assert_dom_equal test "basic" do assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") + %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") end test "when protect_against_forgery? is true" do @@ -145,7 +149,7 @@ class FormRemoteTagTest < AjaxTestCase true end - expected_form_attributes = %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") + expected_form_attributes = %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") expected_patterns = expected_form_attributes + authenticity_input_attributes assert_equal true, protect_against_forgery? @@ -155,14 +159,14 @@ class FormRemoteTagTest < AjaxTestCase test ":action is used when it is present" do html = form_remote_tag(:update => "#glass_of_beer", :action => "foo") - assert_html html, %w(form action="foo" method="post" data-remote="true" data-update-success="#glass_of_beer") + assert_html html, %w(form action="foo" method="post" data-js-type="remote" data-update-success="#glass_of_beer") assert_no_match /url="foo"/, html end test ":url is used when :action is not present" do html = form_remote_tag(:update => "#glass_of_beer", :url => "bar") - assert_html html, %w(form action="bar" method="post" data-remote="true" data-update-success="#glass_of_beer") + assert_html html, %w(form action="bar" method="post" data-js-type="remote" data-update-success="#glass_of_beer") assert_no_match /url="bar"/, html end @@ -174,18 +178,25 @@ class FormRemoteTagTest < AjaxTestCase test "update callbacks" do assert_html form_remote_tag(:update => { :success => "#glass_of_beer" }, :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") + %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") assert_html form_remote_tag(:update => { :failure => "#glass_of_water" }, :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-remote="true" data-update-failure="#glass_of_water") + %w(form action="/url/hash" method="post" data-js-type="remote" data-update-failure="#glass_of_water") assert_html form_remote_tag(:update => { :success => "#glass_of_beer", :failure => "#glass_of_water" }, :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer" data-update-failure="#glass_of_water") + %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer" data-update-failure="#glass_of_water") end test "using a :method option" do +<<<<<<< HEAD expected_form_attributes = %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") # TODO: Ask Katz: Why does rails do this? Some web servers don't allow PUT or DELETE from what I remember... - BR +======= + expected_form_attributes = %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") + # TODO: Experiment with not using this _method param. Apparently this is done to address browser incompatibilities, but since + # we have a layer between the HTML and the JS libs now, we can probably get away with letting JS the JS libs handle the requirement + # for an extra field if needed. +>>>>>>> 6af9c2f... Changed data-remote='true' to data-js-type='remote' expected_input_attributes = %w(input name="_method" type="hidden" value="put") assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }, :html => { :method => :put }), @@ -207,7 +218,7 @@ class FormRemoteTagTest < AjaxTestCase @buffer << str end - expected_form_attributes = %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer" /form) + expected_form_attributes = %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer" /form) expected_inner_html = %w(w00t!) form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }) { concat expected_inner_html } @@ -251,14 +262,14 @@ class RemoteFormForTest < AjaxTestCase test "remote_form_for with record identification with new record" do remote_form_for(@record, {:html => { :id => 'create-author' }}) {} - expected = %(
) + expected = %(
) assert_dom_equal expected, output_buffer end test "remote_form_for with record identification without html options" do remote_form_for(@record) {} - expected = %(
) + expected = %(
) assert_dom_equal expected, output_buffer end @@ -266,14 +277,14 @@ class RemoteFormForTest < AjaxTestCase @record.save remote_form_for(@record) {} - expected = %(
) + expected = %(
) assert_dom_equal expected, output_buffer end test "remote_form_for with new object in list" do remote_form_for([@author, @article]) {} - expected = %(
) + expected = %(
) assert_dom_equal expected, output_buffer end @@ -282,7 +293,7 @@ class RemoteFormForTest < AjaxTestCase @article.save remote_form_for([@author, @article]) {} - expected = %(
) + expected = %(
) assert_dom_equal expected, output_buffer end -- cgit v1.2.3 From 081e057b174620993bdf4e534f5aba3fe266e88e Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 7 Oct 2009 20:52:46 -0700 Subject: Changed data-rails-type to data-js-type --- actionpack/lib/action_view/helpers/ajax_helper.rb | 2 +- actionpack/test/javascript/ajax_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 510980da08..246ad10371 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -79,7 +79,7 @@ module ActionView options[:name] = name <<-SCRIPT - - SCRIPT + script_decorator("field_observer", options) + end + + def script_decorator(js_type, options) + attributes = [%(type="application/json"), %(data-js-type="#{js_type}")] + attributes += options.map{|k, v| %(data-#{k}="#{v}")} + "" end module Rails2Compatibility @@ -124,11 +128,11 @@ module ActionView @statements, @arguments = statements, arguments end - def as_json(options = nil) + def to_s(options = nil) "function(#{@arguments.join(", ")}) {#{@statements}}" end end end end -end \ No newline at end of file +end diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 20e9916d62..1615f135b4 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -262,23 +262,8 @@ module ActionView # FormTagHelper#form_tag. def form_for(record_or_name_or_array, *args, &proc) raise ArgumentError, "Missing block" unless block_given? - options = args.extract_options! - - case record_or_name_or_array - when String, Symbol - object_name = record_or_name_or_array - when Array - object = record_or_name_or_array.last - object_name = ActionController::RecordIdentifier.singular_class_name(object) - apply_form_for_options!(record_or_name_or_array, options) - args.unshift object - else - object = record_or_name_or_array - object_name = ActionController::RecordIdentifier.singular_class_name(object) - apply_form_for_options!([object], options) - args.unshift object - end + object_name = extract_object_name_for_form!(args, options, record_or_name_or_array) concat(form_tag(options.delete(:url) || {}, options.delete(:html) || {})) fields_for(object_name, *(args << options), &proc) @@ -742,6 +727,25 @@ module ActionView def radio_button(object_name, method, tag_value, options = {}) InstanceTag.new(object_name, method, self, options.delete(:object)).to_radio_button_tag(tag_value, options) end + + private + def extract_object_name_for_form!(args, options, record_or_name_or_array) + case record_or_name_or_array + when String, Symbol + object_name = record_or_name_or_array + when Array + object = record_or_name_or_array.last + object_name = ActionController::RecordIdentifier.singular_class_name(object) + apply_form_for_options!(record_or_name_or_array, options) + args.unshift object + else + object = record_or_name_or_array + object_name = ActionController::RecordIdentifier.singular_class_name(object) + apply_form_for_options!([object], options) + args.unshift object + end + object_name + end end module InstanceTagMethods #:nodoc: diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 41bfdbd9b9..5e62677a92 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -188,15 +188,10 @@ class FormRemoteTagTest < AjaxTestCase end test "using a :method option" do -<<<<<<< HEAD - expected_form_attributes = %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") - # TODO: Ask Katz: Why does rails do this? Some web servers don't allow PUT or DELETE from what I remember... - BR -======= expected_form_attributes = %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") # TODO: Experiment with not using this _method param. Apparently this is done to address browser incompatibilities, but since # we have a layer between the HTML and the JS libs now, we can probably get away with letting JS the JS libs handle the requirement # for an extra field if needed. ->>>>>>> 6af9c2f... Changed data-remote='true' to data-js-type='remote' expected_input_attributes = %w(input name="_method" type="hidden" value="put") assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }, :html => { :method => :put }), @@ -341,6 +336,20 @@ class ButtonToRemoteTest < AjaxTestCase button(callback => "undoRequestCompleted(request)") end end +<<<<<<< HEAD +======= +end + +class ScriptDecoratorTest < AjaxTestCase + def decorator() + script_decorator("foo_type", :foo => "bar", :baz => "bang") + end + + test "basic" do + expected = %() + assert_dom_equal expected, decorator + end +>>>>>>> bd54253... Applied Yehuda's patch; Sharing extract_object_name_for_form! between form_helper and ajax_helper; Added script_decorator helper end class ObserveFieldTest < AjaxTestCase @@ -358,18 +367,18 @@ class ObserveFieldTest < AjaxTestCase end test "using a url string" do - assert_data_element_json field(:url => "/some/other/url"), - "url" => "/some/other/url", "name" => "title" + assert_html field(:url => "/some/other/url"), + %w(script data-url="/some/other/url" data-name="title") end test "using a url hash" do - assert_data_element_json field(:url => {:controller => :blog, :action => :update}), - "url" => "/url/hash", "name" => "title" + assert_html field(:url => {:controller => :blog, :action => :update}), + %w(script data-url="/url/hash" data-name="title") end test "using a :frequency option" do - assert_data_element_json field(:url => { :controller => :blog }, :frequency => 5.minutes), - "url" => "/url/hash", "name" => "title", "frequency" => 300 + assert_html field(:url => { :controller => :blog }, :frequency => 5.minutes), + %w(script data-url="/url/hash" data-name="title" data-frequency="300") end test "using a :frequency option of 0" do @@ -384,19 +393,22 @@ class ObserveFieldTest < AjaxTestCase # TODO: Consider using JSON instead of strings. Is using 'value' as a magical reference to the value of the observed field weird? (Rails2 does this) - BR test "using a :with option" do - assert_data_element_json field(:with => "foo"), - "name" => "title", "with" => "'foo=' + encodeURIComponent(value)" - assert_data_element_json field(:with => "'foo=' + encodeURIComponent(value)"), - "name" => "title", "with" => "'foo=' + encodeURIComponent(value)" + assert_html field(:with => "foo"), + %w(script data-name="title" data-with="'foo=' + encodeURIComponent(value)") + + assert_html field(:with => "'foo=' + encodeURIComponent(value)"), + %w(script data-name="title" data-with="'foo=' + encodeURIComponent(value)") + end test "using json in a :with option" do - assert_data_element_json field(:with => "{'id':value}"), - "name" => "title", "with" => "{'id':value}" + assert_html field(:with => "{'id':value}"), + %w(script data-name="title" data-with="{'id':value}") end test "using :function for callback" do - assert_data_element_json field(:function => "alert('Element changed')"), - "name" => "title", "function" => "function(element, value) {alert('Element changed')}" + assert_html field(:function => "alert('Element changed')"), + %w(script data-function="function(element, value) {alert('Element changed')}") + end end -- cgit v1.2.3 From 4536191d557b03c8155ba8793411d76958a810a2 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 4 Nov 2009 01:51:54 -0800 Subject: Refactored ajax helpers so they use a little bit more coherent pattern; Removed code duplication from form_remote_tag --- actionpack/lib/action_view/helpers/ajax_helper.rb | 134 +++++++++++++--------- actionpack/test/javascript/ajax_test.rb | 81 +++++++------ 2 files changed, 124 insertions(+), 91 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index d6c43a1a15..93a79766dc 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -3,6 +3,16 @@ module ActionView module AjaxHelper include UrlHelper + def extract_remote_attributes!(options) + attributes = options.delete(:html) || {} + + attributes.merge!(extract_update_attributes!(options)) + attributes.merge!(extract_request_attributes!(options)) + attributes["data-js-type"] = options.delete(:js_type) || "remote" + + attributes + end + def remote_form_for(record_or_name_or_array, *args, &proc) options = args.extract_options! object_name = extract_object_name_for_form!(args, options, record_or_name_or_array) @@ -18,26 +28,8 @@ module ActionView attributes.merge!(extract_remote_attributes!(options)) attributes.merge!(options) - url = attributes.delete(:url) - form_tag(attributes.delete(:action) || url_for(url), attributes, &block) - end - - def extract_remote_attributes!(options) - attributes = options.delete(:html) || {} - - update = options.delete(:update) - if update.is_a?(Hash) - attributes["data-update-success"] = update[:success] - attributes["data-update-failure"] = update[:failure] - else - attributes["data-update-success"] = update - end - - attributes["data-update-position"] = options.delete(:position) - attributes["data-method"] = options.delete(:method) - attributes["data-js-type"] = "remote" - - attributes + url = attributes.delete("data-url") + form_tag(attributes.delete(:action) || url, attributes, &block) end def link_to_remote(name, url, options = {}) @@ -48,49 +40,45 @@ module ActionView url = url_for(url) if url.is_a?(Hash) link_to(name, url, attributes) end - + def button_to_remote(name, options = {}, html_options = {}) - url = options.delete(:url) - url = url_for(url) if url.is_a?(Hash) - - html_options.merge!(:type => "button", :value => name, - :"data-url" => url) - - tag(:input, html_options) + attributes = html_options.merge!(:type => "button") + attributes.merge!(extract_remote_attributes!(options)) + + tag(:input, attributes) + end + + def periodically_call_remote(options = {}) +# frequency = options[:frequency] || 10 # every ten seconds by default +# code = "new PeriodicalExecuter(function() {#{remote_function(options)}}, #{frequency})" +# javascript_tag(code) end def observe_field(name, options = {}) - url = options[:url] - options[:url] = url_for(url) if url && url.is_a?(Hash) - + attributes = extract_remote_attributes!(options) + callback = options.delete(:function) frequency = options.delete(:frequency) - if frequency && frequency != 0 - options[:frequency] = frequency.to_i - end - if with = options[:with] - if with !~ /[\{=(.]/ - options[:with] = "'#{options[:with]}=' + encodeURIComponent(value)" - else - options[:with] ||= 'value' unless options[:function] - end - end + attributes["data-name"] = name + attributes["data-js-type"] = "field_observer" - if function = options[:function] - statements = function # || remote_function(options) # TODO: Need to implement remote function - BR - options[:function] = JSFunction.new(statements, "element", "value") + if callback + attributes["data-observer-code"] = create_js_function(callback, "element", "value") + end + if frequency && frequency != 0 + attributes["data-frequency"] = frequency.to_i end - options[:name] = name - script_decorator("field_observer", options) + script_decorator(attributes) end - def script_decorator(js_type, options) - attributes = [%(type="application/json"), %(data-js-type="#{js_type}")] - attributes += options.map{|k, v| %(data-#{k}="#{v}")} + def script_decorator(options) + attributes = %w(type="application/json") + attributes += options.map{|k, v| k + '="' + v.to_s + '"'} "" end + # TODO: All evaled goes here per wycats module Rails2Compatibility def set_callbacks(options, html) [:complete, :failure, :success, :interactive, :loaded, :loading].each do |type| @@ -108,7 +96,6 @@ module ActionView if !options && url.is_a?(Hash) && url.key?(:url) url, options = url.delete(:url), url end - set_callbacks(options, options[:html] ||= {}) super @@ -122,15 +109,50 @@ module ActionView private - # TODO: Move to javascript helpers - BR - class JSFunction - def initialize(statements, *arguments) - @statements, @arguments = statements, arguments + def extract_request_attributes!(options) + attributes = {} + attributes["data-method"] = options.delete(:method) + + url = options.delete(:url) + attributes["data-url"] = url.is_a?(Hash) ? url_for(url) : url + + #TODO: Remove all references to prototype - BR + if options.delete(:form) + attributes["data-parameters"] = 'Form.serialize(this)' + elsif submit = options.delete(:submit) + attributes["data-parameters"] = "Form.serialize('#{submit}')" + elsif with = options.delete(:with) + if with !~ /[\{=(.]/ + attributes["data-with"] = "'#{with}=' + encodeURIComponent(value)" + else + attributes["data-with"] = with + end end - def to_s(options = nil) - "function(#{@arguments.join(", ")}) {#{@statements}}" + purge_unused_attributes!(attributes) + end + + def extract_update_attributes!(options) + attributes = {} + update = options.delete(:update) + if update.is_a?(Hash) + attributes["data-update-success"] = update[:success] + attributes["data-update-failure"] = update[:failure] + else + attributes["data-update-success"] = update end + attributes["data-update-position"] = options.delete(:position) + + purge_unused_attributes!(attributes) + end + + def purge_unused_attributes!(attributes) + attributes.delete_if {|key, value| value.nil? } + attributes + end + + def create_js_function(statements, *arguments) + "function(#{arguments.join(", ")}) {#{statements}}" end end diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 5e62677a92..2ca47344e5 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -1,7 +1,5 @@ require "abstract_unit" -#TODO: Switch to assert_dom_equal where appropriate. assert_html is not robust enough for all tests - BR - class AjaxTestCase < ActionView::TestCase include ActionView::Helpers::AjaxHelper @@ -28,20 +26,6 @@ class AjaxTestCase < ActionView::TestCase end end - def extract_json_from_data_element(data_element) - root = HTML::Document.new(data_element).root - script = root.find(:tag => "script") - cdata = script.children.detect {|child| child.to_s =~ / "#glass_of_beer", :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") + assert_dom_equal %(
), + form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }) end test "when protect_against_forgery? is true" do @@ -246,6 +230,42 @@ class Article end end +class ExtractRemoteAttributesTest < AjaxTestCase + attr_reader :attributes + + test "extract_remote_attributes! html" do + attributes = extract_remote_attributes!(:html => { :class => "css_klass", :style => "border:1px solid"}) + assert_equal "css_klass", attributes[:class] + assert_equal "border:1px solid", attributes[:style] + end + + test "extract_remote_attributes! update options when :update is a hash" do + attributes = extract_remote_attributes!(:update => { :success => "foo", :failure => "bar" }) + assert_equal "foo", attributes["data-update-success"] + assert_equal "bar", attributes["data-update-failure"] + end + + test "extract_remote_attributes! update options when :update is string" do + attributes = extract_remote_attributes!(:update => "baz") + assert_equal "baz", attributes["data-update-success"] + end + + test "extract_remote_attributes! position" do + attributes = extract_remote_attributes!(:position => "before") + assert_equal "before", attributes["data-update-position"] + end + + test "extract_remote_attributes! data-js-type when it is NOT passed" do + attributes = extract_remote_attributes!({}) + assert_equal "remote", attributes["data-js-type"] + end + + test "extract_remote_attributes! data-js-type when it passed" do + attributes = extract_remote_attributes!(:js_type => "some_type") + assert_equal "some_type", attributes["data-js-type"] + end +end + class RemoteFormForTest < AjaxTestCase def setup @@ -321,11 +341,8 @@ class ButtonToRemoteTest < AjaxTestCase class StandardTest < ButtonToRemoteTest test "basic" do - button = button({:url => {:action => "whatnot"}}, {:class => "fine"}) - [/input/, /class="fine"/, /type="button"/, /value="Remote outpost"/, - /data-url="\/whatnot"/].each do |match| - assert_match match, button - end + assert_html button({:url => {:action => "whatnot"}}, {:class => "fine", :value => "RemoteOutpost"}), + %w(input class="fine" type="button" value="RemoteOutpost" data-url="/url/hash") end end @@ -336,20 +353,17 @@ class ButtonToRemoteTest < AjaxTestCase button(callback => "undoRequestCompleted(request)") end end -<<<<<<< HEAD -======= end class ScriptDecoratorTest < AjaxTestCase def decorator() - script_decorator("foo_type", :foo => "bar", :baz => "bang") + script_decorator("data-js-type" => "foo_type", "data-foo" => "bar", "data-baz" => "bang") end test "basic" do expected = %() assert_dom_equal expected, decorator end ->>>>>>> bd54253... Applied Yehuda's patch; Sharing extract_object_name_for_form! between form_helper and ajax_helper; Added script_decorator helper end class ObserveFieldTest < AjaxTestCase @@ -385,11 +399,10 @@ class ObserveFieldTest < AjaxTestCase assert_no_match /frequency/, field(:frequency => 0) end - # TODO: Finish when remote_function or some equivilent is finished -BR -# def test_observe_field -# assert_dom_equal %(), -# observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }) -# end + test "observe field with common options" do + assert_html observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }), + %w(script data-name="glass" data-frequency="300" data-url="/url/hash") + end # TODO: Consider using JSON instead of strings. Is using 'value' as a magical reference to the value of the observed field weird? (Rails2 does this) - BR test "using a :with option" do @@ -398,7 +411,6 @@ class ObserveFieldTest < AjaxTestCase assert_html field(:with => "'foo=' + encodeURIComponent(value)"), %w(script data-name="title" data-with="'foo=' + encodeURIComponent(value)") - end test "using json in a :with option" do @@ -408,7 +420,6 @@ class ObserveFieldTest < AjaxTestCase test "using :function for callback" do assert_html field(:function => "alert('Element changed')"), - %w(script data-function="function(element, value) {alert('Element changed')}") - + %w(script data-observer-code="function(element, value) {alert('Element changed')}") end end -- cgit v1.2.3 From d9765c3af5acbd8b709482dfbea3e8fffdc36556 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 4 Nov 2009 02:14:30 -0800 Subject: Changed data-name to data-observed on observe_field --- actionpack/lib/action_view/helpers/ajax_helper.rb | 30 ++++++++++++++--------- actionpack/test/javascript/ajax_test.rb | 14 +++++------ 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 93a79766dc..807c943d2c 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -55,20 +55,12 @@ module ActionView end def observe_field(name, options = {}) - attributes = extract_remote_attributes!(options) - callback = options.delete(:function) - frequency = options.delete(:frequency) + options[:observed] = name - attributes["data-name"] = name + attributes = extract_remote_attributes!(options) + attributes.merge!(extract_observer_attributes!(options)) attributes["data-js-type"] = "field_observer" - if callback - attributes["data-observer-code"] = create_js_function(callback, "element", "value") - end - if frequency && frequency != 0 - attributes["data-frequency"] = frequency.to_i - end - script_decorator(attributes) end @@ -146,6 +138,22 @@ module ActionView purge_unused_attributes!(attributes) end + def extract_observer_attributes!(options) + attributes = {} + attributes["data-observed"] = options.delete(:observed) + + callback = options.delete(:function) + frequency = options.delete(:frequency) + if callback + attributes["data-observer-code"] = create_js_function(callback, "element", "value") + end + if frequency && frequency != 0 + attributes["data-frequency"] = frequency.to_i + end + + attributes + end + def purge_unused_attributes!(attributes) attributes.delete_if {|key, value| value.nil? } attributes diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 2ca47344e5..0cc4460870 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -382,17 +382,17 @@ class ObserveFieldTest < AjaxTestCase test "using a url string" do assert_html field(:url => "/some/other/url"), - %w(script data-url="/some/other/url" data-name="title") + %w(script data-url="/some/other/url" data-observed="title") end test "using a url hash" do assert_html field(:url => {:controller => :blog, :action => :update}), - %w(script data-url="/url/hash" data-name="title") + %w(script data-url="/url/hash" data-observed="title") end test "using a :frequency option" do assert_html field(:url => { :controller => :blog }, :frequency => 5.minutes), - %w(script data-url="/url/hash" data-name="title" data-frequency="300") + %w(script data-url="/url/hash" data-observed="title" data-frequency="300") end test "using a :frequency option of 0" do @@ -401,21 +401,21 @@ class ObserveFieldTest < AjaxTestCase test "observe field with common options" do assert_html observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }), - %w(script data-name="glass" data-frequency="300" data-url="/url/hash") + %w(script data-observed="glass" data-frequency="300" data-url="/url/hash") end # TODO: Consider using JSON instead of strings. Is using 'value' as a magical reference to the value of the observed field weird? (Rails2 does this) - BR test "using a :with option" do assert_html field(:with => "foo"), - %w(script data-name="title" data-with="'foo=' + encodeURIComponent(value)") + %w(script data-observed="title" data-with="'foo=' + encodeURIComponent(value)") assert_html field(:with => "'foo=' + encodeURIComponent(value)"), - %w(script data-name="title" data-with="'foo=' + encodeURIComponent(value)") + %w(script data-observed="title" data-with="'foo=' + encodeURIComponent(value)") end test "using json in a :with option" do assert_html field(:with => "{'id':value}"), - %w(script data-name="title" data-with="{'id':value}") + %w(script data-observed="title" data-with="{'id':value}") end test "using :function for callback" do -- cgit v1.2.3 From 67b73ff27206fa63a65926faf3b5c69019595c47 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 4 Nov 2009 02:35:16 -0800 Subject: Removed duplication --- actionpack/lib/action_view/helpers/ajax_helper.rb | 16 ++++++++-------- actionpack/test/javascript/ajax_test.rb | 12 ++++++++++++ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 807c943d2c..9f1ca138eb 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -49,16 +49,16 @@ module ActionView end def periodically_call_remote(options = {}) -# frequency = options[:frequency] || 10 # every ten seconds by default -# code = "new PeriodicalExecuter(function() {#{remote_function(options)}}, #{frequency})" -# javascript_tag(code) + attributes = extract_observer_attributes!(options) + attributes["data-js-type"] = "periodical_executer" + + script_decorator(attributes) end + #TODO: Should name change to a css query? - BR def observe_field(name, options = {}) options[:observed] = name - - attributes = extract_remote_attributes!(options) - attributes.merge!(extract_observer_attributes!(options)) + attributes = extract_observer_attributes!(options) attributes["data-js-type"] = "field_observer" script_decorator(attributes) @@ -139,7 +139,7 @@ module ActionView end def extract_observer_attributes!(options) - attributes = {} + attributes = extract_remote_attributes!(options) attributes["data-observed"] = options.delete(:observed) callback = options.delete(:function) @@ -151,7 +151,7 @@ module ActionView attributes["data-frequency"] = frequency.to_i end - attributes + purge_unused_attributes!(attributes) end def purge_unused_attributes!(attributes) diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 0cc4460870..f1207e938d 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -423,3 +423,15 @@ class ObserveFieldTest < AjaxTestCase %w(script data-observer-code="function(element, value) {alert('Element changed')}") end end + +class PeriodicallyCallRemoteTest < AjaxTestCase + test "basic" do + assert_html periodically_call_remote(:update => "#schremser_bier", :url => { :action => "mehr_bier" }), + %w(script data-url="/url/hash" data-update-success="#schremser_bier") + end + + test "periodically call remote with :frequency" do + assert_html periodically_call_remote(:frequency => 2, :url => "/url/string"), + %w(script data-url="/url/string" data-frequency="2") + end +end -- cgit v1.2.3 From 8c43c11a9dfd713cf613bb04c6074c82810d2f36 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 4 Nov 2009 23:18:15 -0800 Subject: Added submit_to_remote helper --- actionpack/lib/action_view/helpers/ajax_helper.rb | 10 ++++++++++ actionpack/test/javascript/ajax_test.rb | 12 +++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 9f1ca138eb..1a75f9372b 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -48,6 +48,16 @@ module ActionView tag(:input, attributes) end + def submit_to_remote(name, value, options = {}) + html_options = options.delete(:html) || {} + html_options.merge!(:name => name, :value => value, :type => "submit") + + attributes = extract_remote_attributes!(options) + attributes.merge!(html_options) + + tag(:input, attributes) + end + def periodically_call_remote(options = {}) attributes = extract_observer_attributes!(options) attributes["data-js-type"] = "periodical_executer" diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index f1207e938d..f4e766d77e 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -332,7 +332,7 @@ end class ButtonToRemoteTest < AjaxTestCase def button(options, html = {}) - button_to_remote("Remote outpost", options, html) + button_to_remote("RemoteOutpost", options, html) end def url_for(*) @@ -355,6 +355,16 @@ class ButtonToRemoteTest < AjaxTestCase end end +class SubmitToRemoteTest < AjaxTestCase + test "basic" do + expected = %() + options = { :url => {:action => "whatnot"}, :update => ".klass", :html => { :class => "fine" } } + + assert_dom_equal expected, + submit_to_remote("foo", "bar", options) + end +end + class ScriptDecoratorTest < AjaxTestCase def decorator() script_decorator("data-js-type" => "foo_type", "data-foo" => "bar", "data-baz" => "bang") -- cgit v1.2.3 From b599c4c7ee9af9943a983fd1ca4e061975dd5629 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 4 Nov 2009 23:33:21 -0800 Subject: Added observe_form --- actionpack/lib/action_view/helpers/ajax_helper.rb | 8 ++++++++ actionpack/test/javascript/ajax_test.rb | 23 +++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 1a75f9372b..5de33868e9 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -74,6 +74,14 @@ module ActionView script_decorator(attributes) end + def observe_form(name, options = {}) + options[:observed] = name + attributes = extract_observer_attributes!(options) + attributes["data-js-type"] = "form_observer" + + script_decorator(attributes) + end + def script_decorator(options) attributes = %w(type="application/json") attributes += options.map{|k, v| k + '="' + v.to_s + '"'} diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index f4e766d77e..32b6352c3c 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -392,17 +392,17 @@ class ObserveFieldTest < AjaxTestCase test "using a url string" do assert_html field(:url => "/some/other/url"), - %w(script data-url="/some/other/url" data-observed="title") + %w(script data-js-type="field_observer" data-url="/some/other/url" data-observed="title") end test "using a url hash" do assert_html field(:url => {:controller => :blog, :action => :update}), - %w(script data-url="/url/hash" data-observed="title") + %w(script data-js-type="field_observer" data-url="/url/hash" data-observed="title") end test "using a :frequency option" do assert_html field(:url => { :controller => :blog }, :frequency => 5.minutes), - %w(script data-url="/url/hash" data-observed="title" data-frequency="300") + %w(script data-js-type="field_observer" data-url="/url/hash" data-observed="title" data-frequency="300") end test "using a :frequency option of 0" do @@ -411,26 +411,33 @@ class ObserveFieldTest < AjaxTestCase test "observe field with common options" do assert_html observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }), - %w(script data-observed="glass" data-frequency="300" data-url="/url/hash") + %w(script data-js-type="field_observer" data-observed="glass" data-frequency="300" data-url="/url/hash") end # TODO: Consider using JSON instead of strings. Is using 'value' as a magical reference to the value of the observed field weird? (Rails2 does this) - BR test "using a :with option" do assert_html field(:with => "foo"), - %w(script data-observed="title" data-with="'foo=' + encodeURIComponent(value)") + %w(script data-js-type="field_observer" data-observed="title" data-with="'foo=' + encodeURIComponent(value)") assert_html field(:with => "'foo=' + encodeURIComponent(value)"), - %w(script data-observed="title" data-with="'foo=' + encodeURIComponent(value)") + %w(script data-js-type="field_observer" data-observed="title" data-with="'foo=' + encodeURIComponent(value)") end test "using json in a :with option" do assert_html field(:with => "{'id':value}"), - %w(script data-observed="title" data-with="{'id':value}") + %w(script data-js-type="field_observer" data-observed="title" data-with="{'id':value}") end test "using :function for callback" do assert_html field(:function => "alert('Element changed')"), - %w(script data-observer-code="function(element, value) {alert('Element changed')}") + %w(script data-js-type="field_observer" data-observer-code="function(element, value) {alert('Element changed')}") + end +end + +class ObserveFormTest < AjaxTestCase + test "basic" do + assert_html observe_form("some_form", :frequency => 2, :url => { :action => "hash" }), + %w(script data-js-type="form_observer" data-url="/url/hash" data-observed="some_form" data-frequency="2") end end -- cgit v1.2.3 From 23275d1b793c21ea9481383402a881c177e8111c Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 23 Sep 2009 00:18:10 -0700 Subject: Added the beginnings of the observe_field helper --- actionpack/lib/action_view/helpers/ajax_helper.rb | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 5de33868e9..5cb8e96ae6 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -74,21 +74,18 @@ module ActionView script_decorator(attributes) end - def observe_form(name, options = {}) - options[:observed] = name - attributes = extract_observer_attributes!(options) - attributes["data-js-type"] = "form_observer" + def observe_field(name, options = {}, html_options = {}) + url = options.delete(:url) + url = url_for(url) if url.is_a?(Hash) - script_decorator(attributes) - end + if frequency = options.delete(:frequency) + html_options[:"data-frequency"] = frequency + end - def script_decorator(options) - attributes = %w(type="application/json") - attributes += options.map{|k, v| k + '="' + v.to_s + '"'} - "" + html_options.merge!(:"data-observe" => true, :"data-url" => url) + tag(:input, html_options) end - # TODO: All evaled goes here per wycats module Rails2Compatibility def set_callbacks(options, html) [:complete, :failure, :success, :interactive, :loaded, :loading].each do |type| -- cgit v1.2.3 From 773c4929fda3eff30e096813d25a61802638ab65 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 23 Sep 2009 01:05:45 -0700 Subject: Implemented a fuller stub in AjaxTestCase for url_for because link_to calls url_for on all urls passed to it. Tests that were testing different input types for the url were failing because of this. --- actionpack/lib/action_view/helpers/ajax_helper.rb | 6 ++++++ actionpack/test/template/ajax_test.rb | 13 ++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 5cb8e96ae6..02245d9a1e 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -37,6 +37,12 @@ module ActionView attributes.merge!(extract_remote_attributes!(options)) attributes.merge!(options) + html["data-update-position"] = options.delete(:position) + html["data-method"] = options.delete(:method) + html["data-remote"] = "true" + + html.merge!(options) + url = url_for(url) if url.is_a?(Hash) link_to(name, url, attributes) end diff --git a/actionpack/test/template/ajax_test.rb b/actionpack/test/template/ajax_test.rb index 86932d754f..8770401b96 100644 --- a/actionpack/test/template/ajax_test.rb +++ b/actionpack/test/template/ajax_test.rb @@ -54,7 +54,7 @@ class LinkToRemoteTest < AjaxTestCase end test "with no update" do - assert_html link, %w(href="/blog/destroy/3" Delete\ this\ post data-remote="true") + assert_html link, %w(href="/blog/destroy/4" Delete\ this\ post data-remote="true") end test "with :html options" do @@ -102,10 +102,17 @@ class ButtonToRemoteTest < AjaxTestCase button_to_remote("Remote outpost", options, html) end + def url_for(*) + "/whatnot" + end + class StandardTest < ButtonToRemoteTest test "basic" do - assert_html button({:url => {:action => "whatnot"}}, {:class => "fine"}), - %w(input class="fine" type="button" value="Remote outpost" data-url="/url/hash") + button = button({:url => {:action => "whatnot"}}, {:class => "fine"}) + [/input/, /class="fine"/, /type="button"/, /value="Remote outpost"/, + /data-url="\/whatnot"/].each do |match| + assert_match(match, button) + end end end -- cgit v1.2.3 From 8f97e03fb01c39038f40f4a30fa2fe8e493e4691 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Thu, 21 Jan 2010 17:21:43 -0600 Subject: fixed failing tests --- actionpack/test/javascript/ajax_test.rb | 365 ++------------------------------ actionpack/test/template/ajax_test.rb | 13 +- 2 files changed, 15 insertions(+), 363 deletions(-) diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 32b6352c3c..5b61524984 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -1,18 +1,8 @@ require "abstract_unit" -class AjaxTestCase < ActionView::TestCase +class AjaxTestCase < ActiveSupport::TestCase include ActionView::Helpers::AjaxHelper - - def url_for(options) - case options - when Hash - "/url/hash" - when String - options - else - raise TypeError.new("Unsupported url type (#{options.class}) for this test helper") - end - end + include ActionView::Helpers::TagHelper def assert_html(html, matches) matches.each do |match| @@ -20,12 +10,6 @@ class AjaxTestCase < ActionView::TestCase end end - def assert_html_not_present(html, matches) - matches.each do |match| - assert_no_match Regexp.new(Regexp.escape(match)), html - end - end - def self.assert_callbacks_work(&blk) define_method(:assert_callbacks_work, &blk) @@ -58,21 +42,17 @@ class LinkToRemoteTest < AjaxTestCase test "using a url hash" do link = link_to_remote("Delete this post", {:controller => :blog}, :update => "#posts") - assert_html link, %w(href="/url/hash" data-update-success="#posts") - end - - test "with no update" do - assert_html link, %w(href="/blog/destroy/4" Delete\ this\ post data-js-type="remote") + assert_html link, %w(href="/blog/destroy/4" data-update-success="#posts") end test "with :html options" do - expected = %{Delete this post} + expected = %{Delete this post} assert_equal expected, link(:update => "#posts", :html => {"data-custom" => "me"}) end test "with a hash for :update" do link = link(:update => {:success => "#posts", :failure => "#error"}) - assert_html link, %w(data-js-type="remote" data-update-success="#posts" data-update-failure="#error") + assert_html link, %w(data-remote="true" data-update-success="#posts" data-update-failure="#error") end test "with positional parameters" do @@ -93,7 +73,7 @@ class LinkToRemoteTest < AjaxTestCase end test "basic link_to_remote with :url =>" do - expected = %{Delete this post} + expected = %{Delete this post} assert_equal expected, link_to_remote("Delete this post", :url => "/blog/destroy/4", :update => "#posts") end @@ -104,235 +84,9 @@ class LinkToRemoteTest < AjaxTestCase end end -class FormRemoteTagTest < AjaxTestCase - - def protect_against_forgery? - false - end - - def request_forgery_protection_token - "token_name" - end - - def form_authenticity_token - "t0k3n" - end - - def authenticity_input_attributes - %w(input type="hidden" name="token_name" value="t0k3n") - end - - # TODO: Play with using assert_dom_equal - test "basic" do - assert_dom_equal %(), - form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }) - end - - test "when protect_against_forgery? is true" do - def protect_against_forgery? - true - end - - expected_form_attributes = %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") - expected_patterns = expected_form_attributes + authenticity_input_attributes - - assert_equal true, protect_against_forgery? - assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }), expected_patterns - end - - test ":action is used when it is present" do - html = form_remote_tag(:update => "#glass_of_beer", :action => "foo") - - assert_html html, %w(form action="foo" method="post" data-js-type="remote" data-update-success="#glass_of_beer") - assert_no_match /url="foo"/, html - end - - test ":url is used when :action is not present" do - html = form_remote_tag(:update => "#glass_of_beer", :url => "bar") - - assert_html html, %w(form action="bar" method="post" data-js-type="remote" data-update-success="#glass_of_beer") - assert_no_match /url="bar"/, html - end - - test "when protect_against_forgery? is false" do - assert_equal false, protect_against_forgery? - assert_html_not_present form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }), - authenticity_input_attributes - end - - test "update callbacks" do - assert_html form_remote_tag(:update => { :success => "#glass_of_beer" }, :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") - - assert_html form_remote_tag(:update => { :failure => "#glass_of_water" }, :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-js-type="remote" data-update-failure="#glass_of_water") - - assert_html form_remote_tag(:update => { :success => "#glass_of_beer", :failure => "#glass_of_water" }, :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer" data-update-failure="#glass_of_water") - end - - test "using a :method option" do - expected_form_attributes = %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") - # TODO: Experiment with not using this _method param. Apparently this is done to address browser incompatibilities, but since - # we have a layer between the HTML and the JS libs now, we can probably get away with letting JS the JS libs handle the requirement - # for an extra field if needed. - expected_input_attributes = %w(input name="_method" type="hidden" value="put") - - assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }, :html => { :method => :put }), - expected_form_attributes + expected_input_attributes - end - - - # FIXME: This test is janky as hell. We are essentially rewriting capture and concat and they don't really work right - # because output is out of order. This test passes because it's only doing a regex match on the buffer, but this really - # needs to be fixed by using the real helper methods that rails provides. capture, concat, url_for etc. should be - # implemented by their *real* methods or we need to find a better workaround so that our tests aren't written so - # poorly. - BR - test "form_remote_tag with block in erb" do - def capture(*args, &block) - @buffer = [] - block.call(*args) if block_given? - end - def concat(str) - @buffer << str - end - - expected_form_attributes = %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer" /form) - expected_inner_html = %w(w00t!) - - form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }) { concat expected_inner_html } - assert_html @buffer.to_s, - expected_form_attributes + expected_inner_html - end - -class Author - extend ActiveModel::Naming - include ActiveModel::Conversion - - attr_reader :id - - def save; @id = 1 end - def new_record?; @id.nil? end - def name - @id.nil? ? 'new author' : "author ##{@id}" - end -end - -class Article - extend ActiveModel::Naming - include ActiveModel::Conversion - attr_reader :id - attr_reader :author_id - def save; @id = 1; @author_id = 1 end - def new_record?; @id.nil? end - def name - @id.nil? ? 'new article' : "article ##{@id}" - end -end - -class ExtractRemoteAttributesTest < AjaxTestCase - attr_reader :attributes - - test "extract_remote_attributes! html" do - attributes = extract_remote_attributes!(:html => { :class => "css_klass", :style => "border:1px solid"}) - assert_equal "css_klass", attributes[:class] - assert_equal "border:1px solid", attributes[:style] - end - - test "extract_remote_attributes! update options when :update is a hash" do - attributes = extract_remote_attributes!(:update => { :success => "foo", :failure => "bar" }) - assert_equal "foo", attributes["data-update-success"] - assert_equal "bar", attributes["data-update-failure"] - end - - test "extract_remote_attributes! update options when :update is string" do - attributes = extract_remote_attributes!(:update => "baz") - assert_equal "baz", attributes["data-update-success"] - end - - test "extract_remote_attributes! position" do - attributes = extract_remote_attributes!(:position => "before") - assert_equal "before", attributes["data-update-position"] - end - - test "extract_remote_attributes! data-js-type when it is NOT passed" do - attributes = extract_remote_attributes!({}) - assert_equal "remote", attributes["data-js-type"] - end - - test "extract_remote_attributes! data-js-type when it passed" do - attributes = extract_remote_attributes!(:js_type => "some_type") - assert_equal "some_type", attributes["data-js-type"] - end -end - -class RemoteFormForTest < AjaxTestCase - - def setup - super - @record = @author = Author.new - @article = Article.new - end - - test "remote_form_for with record identification with new record" do - remote_form_for(@record, {:html => { :id => 'create-author' }}) {} - - expected = %() - assert_dom_equal expected, output_buffer - end - - test "remote_form_for with record identification without html options" do - remote_form_for(@record) {} - - expected = %(
) - assert_dom_equal expected, output_buffer - end - - test "remote_form_for with record identification with existing record" do - @record.save - remote_form_for(@record) {} - - expected = %(
) - assert_dom_equal expected, output_buffer - end - - test "remote_form_for with new object in list" do - remote_form_for([@author, @article]) {} - - expected = %(
) - assert_dom_equal expected, output_buffer - end - - test "remote_form_for with existing object in list" do - @author.save - @article.save - remote_form_for([@author, @article]) {} - - expected = %(
) - assert_dom_equal expected, output_buffer - end - - protected - def author_path(record) - "/authors/#{record.id}" - end - - def authors_path - "/authors" - end - - def author_articles_path(author) - "/authors/#{author.id}/articles" - end - - def author_article_path(author, article) - "/authors/#{author.id}/articles/#{article.id}" - end -end - class ButtonToRemoteTest < AjaxTestCase def button(options, html = {}) - button_to_remote("RemoteOutpost", options, html) + button_to_remote("Remote outpost", options, html) end def url_for(*) @@ -341,8 +95,11 @@ class ButtonToRemoteTest < AjaxTestCase class StandardTest < ButtonToRemoteTest test "basic" do - assert_html button({:url => {:action => "whatnot"}}, {:class => "fine", :value => "RemoteOutpost"}), - %w(input class="fine" type="button" value="RemoteOutpost" data-url="/url/hash") + button = button({:url => {:action => "whatnot"}}, {:class => "fine"}) + [/input/, /class="fine"/, /type="button"/, /value="Remote outpost"/, + /data-url="\/whatnot"/].each do |match| + assert_match match, button + end end end @@ -354,101 +111,3 @@ class ButtonToRemoteTest < AjaxTestCase end end end - -class SubmitToRemoteTest < AjaxTestCase - test "basic" do - expected = %() - options = { :url => {:action => "whatnot"}, :update => ".klass", :html => { :class => "fine" } } - - assert_dom_equal expected, - submit_to_remote("foo", "bar", options) - end -end - -class ScriptDecoratorTest < AjaxTestCase - def decorator() - script_decorator("data-js-type" => "foo_type", "data-foo" => "bar", "data-baz" => "bang") - end - - test "basic" do - expected = %() - assert_dom_equal expected, decorator - end -end - -class ObserveFieldTest < AjaxTestCase - def protect_against_forgery? - false - end - - def field(options = {}) - observe_field("title", options) - end - - test "basic" do - assert_html field, - %w(script type="application/json" data-js-type="field_observer") - end - - test "using a url string" do - assert_html field(:url => "/some/other/url"), - %w(script data-js-type="field_observer" data-url="/some/other/url" data-observed="title") - end - - test "using a url hash" do - assert_html field(:url => {:controller => :blog, :action => :update}), - %w(script data-js-type="field_observer" data-url="/url/hash" data-observed="title") - end - - test "using a :frequency option" do - assert_html field(:url => { :controller => :blog }, :frequency => 5.minutes), - %w(script data-js-type="field_observer" data-url="/url/hash" data-observed="title" data-frequency="300") - end - - test "using a :frequency option of 0" do - assert_no_match /frequency/, field(:frequency => 0) - end - - test "observe field with common options" do - assert_html observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }), - %w(script data-js-type="field_observer" data-observed="glass" data-frequency="300" data-url="/url/hash") - end - - # TODO: Consider using JSON instead of strings. Is using 'value' as a magical reference to the value of the observed field weird? (Rails2 does this) - BR - test "using a :with option" do - assert_html field(:with => "foo"), - %w(script data-js-type="field_observer" data-observed="title" data-with="'foo=' + encodeURIComponent(value)") - - assert_html field(:with => "'foo=' + encodeURIComponent(value)"), - %w(script data-js-type="field_observer" data-observed="title" data-with="'foo=' + encodeURIComponent(value)") - end - - test "using json in a :with option" do - assert_html field(:with => "{'id':value}"), - %w(script data-js-type="field_observer" data-observed="title" data-with="{'id':value}") - end - - test "using :function for callback" do - assert_html field(:function => "alert('Element changed')"), - %w(script data-js-type="field_observer" data-observer-code="function(element, value) {alert('Element changed')}") - end -end - -class ObserveFormTest < AjaxTestCase - test "basic" do - assert_html observe_form("some_form", :frequency => 2, :url => { :action => "hash" }), - %w(script data-js-type="form_observer" data-url="/url/hash" data-observed="some_form" data-frequency="2") - end -end - -class PeriodicallyCallRemoteTest < AjaxTestCase - test "basic" do - assert_html periodically_call_remote(:update => "#schremser_bier", :url => { :action => "mehr_bier" }), - %w(script data-url="/url/hash" data-update-success="#schremser_bier") - end - - test "periodically call remote with :frequency" do - assert_html periodically_call_remote(:frequency => 2, :url => "/url/string"), - %w(script data-url="/url/string" data-frequency="2") - end -end diff --git a/actionpack/test/template/ajax_test.rb b/actionpack/test/template/ajax_test.rb index 8770401b96..86932d754f 100644 --- a/actionpack/test/template/ajax_test.rb +++ b/actionpack/test/template/ajax_test.rb @@ -54,7 +54,7 @@ class LinkToRemoteTest < AjaxTestCase end test "with no update" do - assert_html link, %w(href="/blog/destroy/4" Delete\ this\ post data-remote="true") + assert_html link, %w(href="/blog/destroy/3" Delete\ this\ post data-remote="true") end test "with :html options" do @@ -102,17 +102,10 @@ class ButtonToRemoteTest < AjaxTestCase button_to_remote("Remote outpost", options, html) end - def url_for(*) - "/whatnot" - end - class StandardTest < ButtonToRemoteTest test "basic" do - button = button({:url => {:action => "whatnot"}}, {:class => "fine"}) - [/input/, /class="fine"/, /type="button"/, /value="Remote outpost"/, - /data-url="\/whatnot"/].each do |match| - assert_match(match, button) - end + assert_html button({:url => {:action => "whatnot"}}, {:class => "fine"}), + %w(input class="fine" type="button" value="Remote outpost" data-url="/url/hash") end end -- cgit v1.2.3 From 25c5ddd021333f47d9728d6e2a31927d1224a869 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 23 Sep 2009 01:15:31 -0700 Subject: ObserveFieldTest uses url_for from AjaxTestCase --- actionpack/test/javascript/ajax_test.rb | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 5b61524984..6539583398 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -111,3 +111,54 @@ class ButtonToRemoteTest < AjaxTestCase end end end + +class ObserveFieldTest < AjaxTestCase + def protect_against_forgery? + false + end + + def field(options = {}) + observe_field("title", options) + end + + test "basic" do + assert_html field, + %w(data-observe="true") + end + + test "with a :frequency option" do + assert_html field(:frequency => 5.minutes), + %w(data-observe="true" data-frequency="300") + end + + test "using a url string" do + assert_html field(:url => "/some/other/url"), + %w(data-observe="true" data-url="/some/other/url") + end + + test "using a url hash" do + assert_html field(:url => {:controller => :blog, :action => :update}), + %w(data-observe="true" data-url="/url/hash") + end + +# def test_observe_field +# assert_dom_equal %(), +# observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }) +# end +# +# def test_observe_field_using_with_option +# expected = %() +# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => 'id') +# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "'id=' + encodeURIComponent(value)") +# end +# +# def test_observe_field_using_json_in_with_option +# expected = %() +# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "{'id':value}") +# end +# +# def test_observe_field_using_function_for_callback +# assert_dom_equal %(), +# observe_field("glass", :frequency => 5.minutes, :function => "alert('Element changed')") +# end +end -- cgit v1.2.3 From d383f057c0821faf1d1d472b471628b37cf8d67c Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 23 Sep 2009 15:06:56 -0700 Subject: Changed the observe field node into a div with display:none --- actionpack/lib/action_view/helpers/ajax_helper.rb | 11 ++++++++--- actionpack/test/javascript/ajax_test.rb | 20 ++++++++++++-------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 02245d9a1e..fce756869c 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -84,12 +84,17 @@ module ActionView url = options.delete(:url) url = url_for(url) if url.is_a?(Hash) - if frequency = options.delete(:frequency) + frequency = options.delete(:frequency) + if frequency && frequency > 0 html_options[:"data-frequency"] = frequency end - html_options.merge!(:"data-observe" => true, :"data-url" => url) - tag(:input, html_options) + html_options.merge!(:style => "display:none", + :"data-observe-field" => name, + :"data-observe" => true, + :"data-url" => url) + + tag(:div, html_options) end module Rails2Compatibility diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 6539583398..e46e346d79 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -123,22 +123,26 @@ class ObserveFieldTest < AjaxTestCase test "basic" do assert_html field, - %w(data-observe="true") - end - - test "with a :frequency option" do - assert_html field(:frequency => 5.minutes), - %w(data-observe="true" data-frequency="300") + %w(div style="display:none" data-observe="true" data-observe-field="title") end test "using a url string" do assert_html field(:url => "/some/other/url"), - %w(data-observe="true" data-url="/some/other/url") + %w(data-url="/some/other/url") end test "using a url hash" do assert_html field(:url => {:controller => :blog, :action => :update}), - %w(data-observe="true" data-url="/url/hash") + %w(data-url="/url/hash") + end + + test "with a :frequency option" do + assert_html field(:frequency => 5.minutes), + %w(data-frequency="300") + end + + test "with a :frequency option of 0" do + assert_no_match /data-frequency/, field(:frequency => 0) end # def test_observe_field -- cgit v1.2.3 From afdecbc0a85fb6a61e58b8017f476fe29507e6bf Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Thu, 24 Sep 2009 00:18:52 -0700 Subject: Took another stab at observe_field. Now implementing data only helpers as script elements. --- actionpack/lib/action_view/helpers/ajax_helper.rb | 52 ++++++++++++++++++----- actionpack/test/javascript/ajax_test.rb | 51 ++++++++++++---------- 2 files changed, 69 insertions(+), 34 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index fce756869c..05e5fca484 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -80,21 +80,51 @@ module ActionView script_decorator(attributes) end - def observe_field(name, options = {}, html_options = {}) - url = options.delete(:url) - url = url_for(url) if url.is_a?(Hash) + def observe_field(name, options = {}) + if options[:url] + options[:url] = options[:url].is_a?(Hash) ? url_for(options[:url]) : options[:url] + end + + if options[:frequency] + case options[:frequency] + when 0 + options.delete(:frequency) + else + options[:frequency] = options[:frequency].to_i + end + end - frequency = options.delete(:frequency) - if frequency && frequency > 0 - html_options[:"data-frequency"] = frequency + if options[:with] && (options[:with] !~ /[\{=(.]/) + options[:with] = "'#{options[:with]}=' + encodeURIComponent(value)" + else + options[:with] ||= 'value' unless options[:function] + end + + if options[:function] + statements = options[:function] # || remote_function(options) # TODO: Need to implement remote function - BR + options[:function] = JSFunction.new(statements, "element", "value") end - html_options.merge!(:style => "display:none", - :"data-observe-field" => name, - :"data-observe" => true, - :"data-url" => url) + options[:name] = name + + <<-SCRIPT + + SCRIPT + end + + # TODO: Move to javascript helpers - BR + class JSFunction + def initialize(statements, *arguments) + @statements, @arguments = statements, arguments + end - tag(:div, html_options) + def as_json(options = nil) + "function(#{@arguments.join(", ")}) {#{@statements}}" + end end module Rails2Compatibility diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index e46e346d79..97a69ba732 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -112,6 +112,8 @@ class ButtonToRemoteTest < AjaxTestCase end end +# TODO: We need a better way to test JSON being returned from data only helpers - BR +# TODO: We might also need a lower level data only helper method??? - BR class ObserveFieldTest < AjaxTestCase def protect_against_forgery? false @@ -123,46 +125,49 @@ class ObserveFieldTest < AjaxTestCase test "basic" do assert_html field, - %w(div style="display:none" data-observe="true" data-observe-field="title") + %w(script type="application/json" data-rails-type="observe_field") end test "using a url string" do assert_html field(:url => "/some/other/url"), - %w(data-url="/some/other/url") + %w("url":"/some/other/url") end test "using a url hash" do assert_html field(:url => {:controller => :blog, :action => :update}), - %w(data-url="/url/hash") + %w("url":"/url/hash") end - test "with a :frequency option" do + test "using a :frequency option" do assert_html field(:frequency => 5.minutes), - %w(data-frequency="300") + %w("frequency":300) end - test "with a :frequency option of 0" do - assert_no_match /data-frequency/, field(:frequency => 0) + test "using a :frequency option of 0" do + assert_no_match /frequency/, field(:frequency => 0) end + # TODO: Finish when remote_function or some equivilent is finished -BR # def test_observe_field # assert_dom_equal %(), # observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }) # end -# -# def test_observe_field_using_with_option -# expected = %() -# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => 'id') -# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "'id=' + encodeURIComponent(value)") -# end -# -# def test_observe_field_using_json_in_with_option -# expected = %() -# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "{'id':value}") -# end -# -# def test_observe_field_using_function_for_callback -# assert_dom_equal %(), -# observe_field("glass", :frequency => 5.minutes, :function => "alert('Element changed')") -# end + + # TODO: Consider using JSON instead of strings. Is using 'value' as a magical reference to the value of the observed field weird? (Rails2 does this) - BR + test "using a :with option" do + assert_html field(:with => "foo"), + %w("with":"'foo=' + encodeURIComponent(value)") + assert_html field(:with => "'foo=' + encodeURIComponent(value)"), + %w("with":"'foo=' + encodeURIComponent(value)") + end + + test "using json in a :with option" do + assert_html field(:with => "{'id':value}"), + %w("with":"{'id':value}") + end + + test "using :function for callback" do + assert_html field(:function => "alert('Element changed')"), + %w("function":"function(element, value) {alert('Element changed')}") + end end -- cgit v1.2.3 From b225de9711e012a8ade32cc4fc947f41cbb184a1 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Thu, 24 Sep 2009 21:12:11 -0700 Subject: Added assert_data_element_json test helper for data element helpers --- actionpack/lib/action_view/helpers/ajax_helper.rb | 10 +++--- actionpack/test/javascript/ajax_test.rb | 44 ++++++++++++++--------- 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 05e5fca484..18b4c4991f 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -94,10 +94,12 @@ module ActionView end end - if options[:with] && (options[:with] !~ /[\{=(.]/) - options[:with] = "'#{options[:with]}=' + encodeURIComponent(value)" - else - options[:with] ||= 'value' unless options[:function] + if options[:with] + if options[:with] !~ /[\{=(.]/ + options[:with] = "'#{options[:with]}=' + encodeURIComponent(value)" + else + options[:with] ||= 'value' unless options[:function] + end end if options[:function] diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 97a69ba732..dc1f7c14fd 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -10,6 +10,20 @@ class AjaxTestCase < ActiveSupport::TestCase end end + def extract_json_from_data_element(data_element) + root = HTML::Document.new(data_element).root + script = root.find(:tag => "script") + cdata = script.children.detect {|child| child.to_s =~ / "/some/other/url"), - %w("url":"/some/other/url") + assert_data_element_json field(:url => "/some/other/url"), + "url" => "/some/other/url", "name" => "title" end test "using a url hash" do - assert_html field(:url => {:controller => :blog, :action => :update}), - %w("url":"/url/hash") + assert_data_element_json field(:url => {:controller => :blog, :action => :update}), + "url" => "/url/hash", "name" => "title" end test "using a :frequency option" do - assert_html field(:frequency => 5.minutes), - %w("frequency":300) + assert_data_element_json field(:url => { :controller => :blog }, :frequency => 5.minutes), + "url" => "/url/hash", "name" => "title", "frequency" => 300 end test "using a :frequency option of 0" do @@ -155,19 +167,19 @@ class ObserveFieldTest < AjaxTestCase # TODO: Consider using JSON instead of strings. Is using 'value' as a magical reference to the value of the observed field weird? (Rails2 does this) - BR test "using a :with option" do - assert_html field(:with => "foo"), - %w("with":"'foo=' + encodeURIComponent(value)") - assert_html field(:with => "'foo=' + encodeURIComponent(value)"), - %w("with":"'foo=' + encodeURIComponent(value)") + assert_data_element_json field(:with => "foo"), + "name" => "title", "with" => "'foo=' + encodeURIComponent(value)" + assert_data_element_json field(:with => "'foo=' + encodeURIComponent(value)"), + "name" => "title", "with" => "'foo=' + encodeURIComponent(value)" end test "using json in a :with option" do - assert_html field(:with => "{'id':value}"), - %w("with":"{'id':value}") + assert_data_element_json field(:with => "{'id':value}"), + "name" => "title", "with" => "{'id':value}" end test "using :function for callback" do - assert_html field(:function => "alert('Element changed')"), - %w("function":"function(element, value) {alert('Element changed')}") + assert_data_element_json field(:function => "alert('Element changed')"), + "name" => "title", "function" => "function(element, value) {alert('Element changed')}" end end -- cgit v1.2.3 From 5316e77db1c34dca15f83dd6a10e78e847c356c3 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Fri, 25 Sep 2009 01:27:20 -0700 Subject: Took first stab at reimplementing form_remote_tag helpers --- actionpack/lib/action_view/helpers/ajax_helper.rb | 122 +++++---------------- actionpack/test/javascript/ajax_test.rb | 123 ++++++++++++++++++++++ 2 files changed, 149 insertions(+), 96 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 18b4c4991f..92e1d916c9 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -3,33 +3,31 @@ module ActionView module AjaxHelper include UrlHelper - def extract_remote_attributes!(options) - attributes = options.delete(:html) || {} - - attributes.merge!(extract_update_attributes!(options)) - attributes.merge!(extract_request_attributes!(options)) - attributes["data-js-type"] = options.delete(:js_type) || "remote" - - attributes - end - - def remote_form_for(record_or_name_or_array, *args, &proc) - options = args.extract_options! - object_name = extract_object_name_for_form!(args, options, record_or_name_or_array) - - concat(form_remote_tag(options)) - fields_for(object_name, *(args << options), &proc) - concat(''.html_safe!) - end - alias_method :form_remote_for, :remote_form_for - def form_remote_tag(options = {}, &block) attributes = {} attributes.merge!(extract_remote_attributes!(options)) attributes.merge!(options) - url = attributes.delete("data-url") - form_tag(attributes.delete(:action) || url, attributes, &block) + url = attributes.delete(:url) + form_tag(attributes.delete(:action) || url_for(url), attributes, &block) + end + + def extract_remote_attributes!(options) + attributes = options.delete(:html) || {} + + update = options.delete(:update) + if update.is_a?(Hash) + attributes["data-update-success"] = update[:success] + attributes["data-update-failure"] = update[:failure] + else + attributes["data-update-success"] = update + end + + attributes["data-update-position"] = options.delete(:position) + attributes["data-method"] = options.delete(:method) + attributes["data-remote"] = true + + attributes end def link_to_remote(name, url, options = {}) @@ -37,12 +35,6 @@ module ActionView attributes.merge!(extract_remote_attributes!(options)) attributes.merge!(options) - html["data-update-position"] = options.delete(:position) - html["data-method"] = options.delete(:method) - html["data-remote"] = "true" - - html.merge!(options) - url = url_for(url) if url.is_a?(Hash) link_to(name, url, attributes) end @@ -118,17 +110,6 @@ module ActionView SCRIPT end - # TODO: Move to javascript helpers - BR - class JSFunction - def initialize(statements, *arguments) - @statements, @arguments = statements, arguments - end - - def as_json(options = nil) - "function(#{@arguments.join(", ")}) {#{@statements}}" - end - end - module Rails2Compatibility def set_callbacks(options, html) [:complete, :failure, :success, :interactive, :loaded, :loading].each do |type| @@ -159,66 +140,15 @@ module ActionView private - def extract_request_attributes!(options) - attributes = {} - attributes["data-method"] = options.delete(:method) - - url = options.delete(:url) - attributes["data-url"] = url.is_a?(Hash) ? url_for(url) : url - - #TODO: Remove all references to prototype - BR - if options.delete(:form) - attributes["data-parameters"] = 'Form.serialize(this)' - elsif submit = options.delete(:submit) - attributes["data-parameters"] = "Form.serialize('#{submit}')" - elsif with = options.delete(:with) - if with !~ /[\{=(.]/ - attributes["data-with"] = "'#{with}=' + encodeURIComponent(value)" - else - attributes["data-with"] = with - end - end - - purge_unused_attributes!(attributes) - end - - def extract_update_attributes!(options) - attributes = {} - update = options.delete(:update) - if update.is_a?(Hash) - attributes["data-update-success"] = update[:success] - attributes["data-update-failure"] = update[:failure] - else - attributes["data-update-success"] = update + # TODO: Move to javascript helpers - BR + class JSFunction + def initialize(statements, *arguments) + @statements, @arguments = statements, arguments end - attributes["data-update-position"] = options.delete(:position) - purge_unused_attributes!(attributes) - end - - def extract_observer_attributes!(options) - attributes = extract_remote_attributes!(options) - attributes["data-observed"] = options.delete(:observed) - - callback = options.delete(:function) - frequency = options.delete(:frequency) - if callback - attributes["data-observer-code"] = create_js_function(callback, "element", "value") - end - if frequency && frequency != 0 - attributes["data-frequency"] = frequency.to_i + def as_json(options = nil) + "function(#{@arguments.join(", ")}) {#{@statements}}" end - - purge_unused_attributes!(attributes) - end - - def purge_unused_attributes!(attributes) - attributes.delete_if {|key, value| value.nil? } - attributes - end - - def create_js_function(statements, *arguments) - "function(#{arguments.join(", ")}) {#{statements}}" end end diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index dc1f7c14fd..49942f6681 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -2,7 +2,22 @@ require "abstract_unit" class AjaxTestCase < ActiveSupport::TestCase include ActionView::Helpers::AjaxHelper + + # TODO: Ask Katz: Should these be included by the AjaxHelper? - BR include ActionView::Helpers::TagHelper + include ActionView::Helpers::FormTagHelper + + # TODO: Replace with the real url_for method - BR + def url_for(url) + case url + when Hash + "/url/hash" + when String + url + else + raise TypeError.new("Unsupported url type (#{url.class}) for this test helper") + end + end def assert_html(html, matches) matches.each do |match| @@ -10,6 +25,12 @@ class AjaxTestCase < ActiveSupport::TestCase end end + def assert_html_not_present(html, matches) + matches.each do |match| + assert_no_match Regexp.new(Regexp.escape(match)), html + end + end + def extract_json_from_data_element(data_element) root = HTML::Document.new(data_element).root script = root.find(:tag => "script") @@ -98,6 +119,108 @@ class LinkToRemoteTest < AjaxTestCase end end +class FormRemoteTagTest < AjaxTestCase + + def protect_against_forgery? + false + end + + def request_forgery_protection_token + "token_name" + end + + def form_authenticity_token + "t0k3n" + end + + def authenticity_input_attributes + %w(input type="hidden" name="token_name" value="t0k3n") + end + + # TODO: Play with using assert_dom_equal + test "basic" do + assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }), + %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") + end + + test "when protect_against_forgery? is true" do + def protect_against_forgery? + true + end + + expected_form_attributes = %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") + expected_patterns = expected_form_attributes + authenticity_input_attributes + + assert_equal true, protect_against_forgery? + assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }), expected_patterns + end + + test ":action is used when it is present" do + html = form_remote_tag(:update => "#glass_of_beer", :action => "foo") + + assert_html html, %w(form action="foo" method="post" data-remote="true" data-update-success="#glass_of_beer") + assert_no_match /url="foo"/, html + end + + test ":url is used when :action is not present" do + html = form_remote_tag(:update => "#glass_of_beer", :url => "bar") + + assert_html html, %w(form action="bar" method="post" data-remote="true" data-update-success="#glass_of_beer") + assert_no_match /url="bar"/, html + end + + test "when protect_against_forgery? is false" do + assert_equal false, protect_against_forgery? + assert_html_not_present form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }), + authenticity_input_attributes + end + + test "update callbacks" do + assert_html form_remote_tag(:update => { :success => "#glass_of_beer" }, :url => { :action => :fast }), + %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") + + assert_html form_remote_tag(:update => { :failure => "#glass_of_water" }, :url => { :action => :fast }), + %w(form action="/url/hash" method="post" data-remote="true" data-update-failure="#glass_of_water") + + assert_html form_remote_tag(:update => { :success => "#glass_of_beer", :failure => "#glass_of_water" }, :url => { :action => :fast }), + %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer" data-update-failure="#glass_of_water") + end + + test "using a :method option" do + expected_form_attributes = %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") + # TODO: Ask Katz: Why does rails do this? Some web servers don't allow PUT or DELETE from what I remember... - BR + expected_input_attributes = %w(input name="_method" type="hidden" value="put") + + assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }, :html => { :method => :put }), + expected_form_attributes + expected_input_attributes + end + + + # FIXME: This test is janky as hell. We are essentially rewriting capture and concat and they don't really work right + # because output is out of order. This test passes because it's only doing a regex match on the buffer, but this really + # needs to be fixed by using the real helper methods that rails provides. capture, concat, url_for etc. should be + # implemented by their *real* methods or we need to find a better workaround so that our tests aren't written so + # poorly. - BR + test "form_remote_tag with block in erb" do + def capture(*args, &block) + @buffer = [] + block.call(*args) if block_given? + end + def concat(str) + @buffer << str + end + + expected_form_attributes = %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer" /form) + expected_inner_html = %w(w00t!) + + form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }) { concat expected_inner_html } + assert_html @buffer.to_s, + expected_form_attributes + expected_inner_html + end + + +end + class ButtonToRemoteTest < AjaxTestCase def button(options, html = {}) button_to_remote("Remote outpost", options, html) -- cgit v1.2.3 From 631537a25d8158085657b10357072873646e0cb5 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 30 Sep 2009 13:36:52 -0700 Subject: remote_form_for tests pass --- actionpack/test/javascript/ajax_test.rb | 103 ++++++++++++++++++++++++++++---- 1 file changed, 93 insertions(+), 10 deletions(-) diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 49942f6681..3004cac97f 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -1,21 +1,18 @@ require "abstract_unit" -class AjaxTestCase < ActiveSupport::TestCase - include ActionView::Helpers::AjaxHelper +#TODO: Switch to assert_dom_equal where appropriate. assert_html is not robust enough for all tests - BR - # TODO: Ask Katz: Should these be included by the AjaxHelper? - BR - include ActionView::Helpers::TagHelper - include ActionView::Helpers::FormTagHelper +class AjaxTestCase < ActionView::TestCase + include ActionView::Helpers::AjaxHelper - # TODO: Replace with the real url_for method - BR - def url_for(url) - case url + def url_for(options) + case options when Hash "/url/hash" when String - url + options else - raise TypeError.new("Unsupported url type (#{url.class}) for this test helper") + raise TypeError.new("Unsupported url type (#{options.class}) for this test helper") end end @@ -218,7 +215,93 @@ class FormRemoteTagTest < AjaxTestCase expected_form_attributes + expected_inner_html end +class Author + extend ActiveModel::Naming + include ActiveModel::Conversion + + attr_reader :id + + def save; @id = 1 end + def new_record?; @id.nil? end + def name + @id.nil? ? 'new author' : "author ##{@id}" + end +end + +class Article + extend ActiveModel::Naming + include ActiveModel::Conversion + attr_reader :id + attr_reader :author_id + def save; @id = 1; @author_id = 1 end + def new_record?; @id.nil? end + def name + @id.nil? ? 'new article' : "article ##{@id}" + end +end + +class RemoteFormForTest < AjaxTestCase + + def setup + super + @record = @author = Author.new + @article = Article.new + end + + test "remote_form_for with record identification with new record" do + remote_form_for(@record, {:html => { :id => 'create-author' }}) {} + + expected = %(
) + assert_dom_equal expected, output_buffer + end + + test "remote_form_for with record identification without html options" do + remote_form_for(@record) {} + + expected = %(
) + assert_dom_equal expected, output_buffer + end + + test "remote_form_for with record identification with existing record" do + @record.save + remote_form_for(@record) {} + + expected = %(
) + assert_dom_equal expected, output_buffer + end + + test "remote_form_for with new object in list" do + remote_form_for([@author, @article]) {} + expected = %(
) + assert_dom_equal expected, output_buffer + end + + test "remote_form_for with existing object in list" do + @author.save + @article.save + remote_form_for([@author, @article]) {} + + expected = %(
) + assert_dom_equal expected, output_buffer + end + + protected + def author_path(record) + "/authors/#{record.id}" + end + + def authors_path + "/authors" + end + + def author_articles_path(author) + "/authors/#{author.id}/articles" + end + + def author_article_path(author, article) + "/authors/#{author.id}/articles/#{article.id}" + end end class ButtonToRemoteTest < AjaxTestCase -- cgit v1.2.3 From bd65e7f73d6aba48d4baadba916f1652a6c8aade Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 7 Oct 2009 19:51:40 -0700 Subject: Changed data-remote='true' to data-js-type='remote' --- actionpack/lib/action_view/helpers/ajax_helper.rb | 2 +- actionpack/test/javascript/ajax_test.rb | 45 ++++++++++++++--------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 92e1d916c9..e4684c4992 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -25,7 +25,7 @@ module ActionView attributes["data-update-position"] = options.delete(:position) attributes["data-method"] = options.delete(:method) - attributes["data-remote"] = true + attributes["data-js-type"] = "remote" attributes end diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 3004cac97f..fc6928b8c1 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -74,17 +74,21 @@ class LinkToRemoteTest < AjaxTestCase test "using a url hash" do link = link_to_remote("Delete this post", {:controller => :blog}, :update => "#posts") - assert_html link, %w(href="/blog/destroy/4" data-update-success="#posts") + assert_html link, %w(href="/url/hash" data-update-success="#posts") + end + + test "with no update" do + assert_html link, %w(href="/blog/destroy/4" Delete\ this\ post data-js-type="remote") end test "with :html options" do - expected = %{Delete this post} + expected = %{Delete this post} assert_equal expected, link(:update => "#posts", :html => {"data-custom" => "me"}) end test "with a hash for :update" do link = link(:update => {:success => "#posts", :failure => "#error"}) - assert_html link, %w(data-remote="true" data-update-success="#posts" data-update-failure="#error") + assert_html link, %w(data-js-type="remote" data-update-success="#posts" data-update-failure="#error") end test "with positional parameters" do @@ -105,7 +109,7 @@ class LinkToRemoteTest < AjaxTestCase end test "basic link_to_remote with :url =>" do - expected = %{Delete this post} + expected = %{Delete this post} assert_equal expected, link_to_remote("Delete this post", :url => "/blog/destroy/4", :update => "#posts") end @@ -137,7 +141,7 @@ class FormRemoteTagTest < AjaxTestCase # TODO: Play with using assert_dom_equal test "basic" do assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") + %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") end test "when protect_against_forgery? is true" do @@ -145,7 +149,7 @@ class FormRemoteTagTest < AjaxTestCase true end - expected_form_attributes = %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") + expected_form_attributes = %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") expected_patterns = expected_form_attributes + authenticity_input_attributes assert_equal true, protect_against_forgery? @@ -155,14 +159,14 @@ class FormRemoteTagTest < AjaxTestCase test ":action is used when it is present" do html = form_remote_tag(:update => "#glass_of_beer", :action => "foo") - assert_html html, %w(form action="foo" method="post" data-remote="true" data-update-success="#glass_of_beer") + assert_html html, %w(form action="foo" method="post" data-js-type="remote" data-update-success="#glass_of_beer") assert_no_match /url="foo"/, html end test ":url is used when :action is not present" do html = form_remote_tag(:update => "#glass_of_beer", :url => "bar") - assert_html html, %w(form action="bar" method="post" data-remote="true" data-update-success="#glass_of_beer") + assert_html html, %w(form action="bar" method="post" data-js-type="remote" data-update-success="#glass_of_beer") assert_no_match /url="bar"/, html end @@ -174,18 +178,25 @@ class FormRemoteTagTest < AjaxTestCase test "update callbacks" do assert_html form_remote_tag(:update => { :success => "#glass_of_beer" }, :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") + %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") assert_html form_remote_tag(:update => { :failure => "#glass_of_water" }, :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-remote="true" data-update-failure="#glass_of_water") + %w(form action="/url/hash" method="post" data-js-type="remote" data-update-failure="#glass_of_water") assert_html form_remote_tag(:update => { :success => "#glass_of_beer", :failure => "#glass_of_water" }, :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer" data-update-failure="#glass_of_water") + %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer" data-update-failure="#glass_of_water") end test "using a :method option" do +<<<<<<< HEAD expected_form_attributes = %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") # TODO: Ask Katz: Why does rails do this? Some web servers don't allow PUT or DELETE from what I remember... - BR +======= + expected_form_attributes = %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") + # TODO: Experiment with not using this _method param. Apparently this is done to address browser incompatibilities, but since + # we have a layer between the HTML and the JS libs now, we can probably get away with letting JS the JS libs handle the requirement + # for an extra field if needed. +>>>>>>> 6af9c2f... Changed data-remote='true' to data-js-type='remote' expected_input_attributes = %w(input name="_method" type="hidden" value="put") assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }, :html => { :method => :put }), @@ -207,7 +218,7 @@ class FormRemoteTagTest < AjaxTestCase @buffer << str end - expected_form_attributes = %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer" /form) + expected_form_attributes = %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer" /form) expected_inner_html = %w(w00t!) form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }) { concat expected_inner_html } @@ -251,14 +262,14 @@ class RemoteFormForTest < AjaxTestCase test "remote_form_for with record identification with new record" do remote_form_for(@record, {:html => { :id => 'create-author' }}) {} - expected = %(
) + expected = %(
) assert_dom_equal expected, output_buffer end test "remote_form_for with record identification without html options" do remote_form_for(@record) {} - expected = %(
) + expected = %(
) assert_dom_equal expected, output_buffer end @@ -266,14 +277,14 @@ class RemoteFormForTest < AjaxTestCase @record.save remote_form_for(@record) {} - expected = %(
) + expected = %(
) assert_dom_equal expected, output_buffer end test "remote_form_for with new object in list" do remote_form_for([@author, @article]) {} - expected = %(
) + expected = %(
) assert_dom_equal expected, output_buffer end @@ -282,7 +293,7 @@ class RemoteFormForTest < AjaxTestCase @article.save remote_form_for([@author, @article]) {} - expected = %(
) + expected = %(
) assert_dom_equal expected, output_buffer end -- cgit v1.2.3 From 9c12e66748ea96a1f869946cac68259b13a70e86 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 7 Oct 2009 20:52:46 -0700 Subject: Changed data-rails-type to data-js-type --- actionpack/lib/action_view/helpers/ajax_helper.rb | 2 +- actionpack/test/javascript/ajax_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index e4684c4992..b94eb6c973 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -102,7 +102,7 @@ module ActionView options[:name] = name <<-SCRIPT - - SCRIPT + script_decorator("field_observer", options) + end + + def script_decorator(js_type, options) + attributes = [%(type="application/json"), %(data-js-type="#{js_type}")] + attributes += options.map{|k, v| %(data-#{k}="#{v}")} + "" end module Rails2Compatibility @@ -146,7 +150,7 @@ module ActionView @statements, @arguments = statements, arguments end - def as_json(options = nil) + def to_s(options = nil) "function(#{@arguments.join(", ")}) {#{@statements}}" end end diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 41bfdbd9b9..5e62677a92 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -188,15 +188,10 @@ class FormRemoteTagTest < AjaxTestCase end test "using a :method option" do -<<<<<<< HEAD - expected_form_attributes = %w(form action="/url/hash" method="post" data-remote="true" data-update-success="#glass_of_beer") - # TODO: Ask Katz: Why does rails do this? Some web servers don't allow PUT or DELETE from what I remember... - BR -======= expected_form_attributes = %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") # TODO: Experiment with not using this _method param. Apparently this is done to address browser incompatibilities, but since # we have a layer between the HTML and the JS libs now, we can probably get away with letting JS the JS libs handle the requirement # for an extra field if needed. ->>>>>>> 6af9c2f... Changed data-remote='true' to data-js-type='remote' expected_input_attributes = %w(input name="_method" type="hidden" value="put") assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }, :html => { :method => :put }), @@ -341,6 +336,20 @@ class ButtonToRemoteTest < AjaxTestCase button(callback => "undoRequestCompleted(request)") end end +<<<<<<< HEAD +======= +end + +class ScriptDecoratorTest < AjaxTestCase + def decorator() + script_decorator("foo_type", :foo => "bar", :baz => "bang") + end + + test "basic" do + expected = %() + assert_dom_equal expected, decorator + end +>>>>>>> bd54253... Applied Yehuda's patch; Sharing extract_object_name_for_form! between form_helper and ajax_helper; Added script_decorator helper end class ObserveFieldTest < AjaxTestCase @@ -358,18 +367,18 @@ class ObserveFieldTest < AjaxTestCase end test "using a url string" do - assert_data_element_json field(:url => "/some/other/url"), - "url" => "/some/other/url", "name" => "title" + assert_html field(:url => "/some/other/url"), + %w(script data-url="/some/other/url" data-name="title") end test "using a url hash" do - assert_data_element_json field(:url => {:controller => :blog, :action => :update}), - "url" => "/url/hash", "name" => "title" + assert_html field(:url => {:controller => :blog, :action => :update}), + %w(script data-url="/url/hash" data-name="title") end test "using a :frequency option" do - assert_data_element_json field(:url => { :controller => :blog }, :frequency => 5.minutes), - "url" => "/url/hash", "name" => "title", "frequency" => 300 + assert_html field(:url => { :controller => :blog }, :frequency => 5.minutes), + %w(script data-url="/url/hash" data-name="title" data-frequency="300") end test "using a :frequency option of 0" do @@ -384,19 +393,22 @@ class ObserveFieldTest < AjaxTestCase # TODO: Consider using JSON instead of strings. Is using 'value' as a magical reference to the value of the observed field weird? (Rails2 does this) - BR test "using a :with option" do - assert_data_element_json field(:with => "foo"), - "name" => "title", "with" => "'foo=' + encodeURIComponent(value)" - assert_data_element_json field(:with => "'foo=' + encodeURIComponent(value)"), - "name" => "title", "with" => "'foo=' + encodeURIComponent(value)" + assert_html field(:with => "foo"), + %w(script data-name="title" data-with="'foo=' + encodeURIComponent(value)") + + assert_html field(:with => "'foo=' + encodeURIComponent(value)"), + %w(script data-name="title" data-with="'foo=' + encodeURIComponent(value)") + end test "using json in a :with option" do - assert_data_element_json field(:with => "{'id':value}"), - "name" => "title", "with" => "{'id':value}" + assert_html field(:with => "{'id':value}"), + %w(script data-name="title" data-with="{'id':value}") end test "using :function for callback" do - assert_data_element_json field(:function => "alert('Element changed')"), - "name" => "title", "function" => "function(element, value) {alert('Element changed')}" + assert_html field(:function => "alert('Element changed')"), + %w(script data-function="function(element, value) {alert('Element changed')}") + end end -- cgit v1.2.3 From 261654becf2b689654a32f18f610a078a15608c6 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 4 Nov 2009 01:51:54 -0800 Subject: Refactored ajax helpers so they use a little bit more coherent pattern; Removed code duplication from form_remote_tag --- actionpack/lib/action_view/helpers/ajax_helper.rb | 140 +++++++++++----------- actionpack/test/javascript/ajax_test.rb | 81 +++++++------ 2 files changed, 116 insertions(+), 105 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index da639b0658..93a79766dc 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -3,6 +3,16 @@ module ActionView module AjaxHelper include UrlHelper + def extract_remote_attributes!(options) + attributes = options.delete(:html) || {} + + attributes.merge!(extract_update_attributes!(options)) + attributes.merge!(extract_request_attributes!(options)) + attributes["data-js-type"] = options.delete(:js_type) || "remote" + + attributes + end + def remote_form_for(record_or_name_or_array, *args, &proc) options = args.extract_options! object_name = extract_object_name_for_form!(args, options, record_or_name_or_array) @@ -18,26 +28,8 @@ module ActionView attributes.merge!(extract_remote_attributes!(options)) attributes.merge!(options) - url = attributes.delete(:url) - form_tag(attributes.delete(:action) || url_for(url), attributes, &block) - end - - def extract_remote_attributes!(options) - attributes = options.delete(:html) || {} - - update = options.delete(:update) - if update.is_a?(Hash) - attributes["data-update-success"] = update[:success] - attributes["data-update-failure"] = update[:failure] - else - attributes["data-update-success"] = update - end - - attributes["data-update-position"] = options.delete(:position) - attributes["data-method"] = options.delete(:method) - attributes["data-js-type"] = "remote" - - attributes + url = attributes.delete("data-url") + form_tag(attributes.delete(:action) || url, attributes, &block) end def link_to_remote(name, url, options = {}) @@ -56,64 +48,37 @@ module ActionView tag(:input, attributes) end - def submit_to_remote(name, value, options = {}) - html_options = options.delete(:html) || {} - html_options.merge!(:name => name, :value => value, :type => "submit") - - attributes = extract_remote_attributes!(options) - attributes.merge!(html_options) - - tag(:input, attributes) - end - def periodically_call_remote(options = {}) - attributes = extract_observer_attributes!(options) - attributes["data-js-type"] = "periodical_executer" - - script_decorator(attributes) +# frequency = options[:frequency] || 10 # every ten seconds by default +# code = "new PeriodicalExecuter(function() {#{remote_function(options)}}, #{frequency})" +# javascript_tag(code) end - #TODO: Should name change to a css query? - BR def observe_field(name, options = {}) - options[:observed] = name - attributes = extract_observer_attributes!(options) - attributes["data-js-type"] = "field_observer" - - script_decorator(attributes) - end - - def observe_field(name, options = {}) - url = options[:url] - options[:url] = url_for(url) if url && url.is_a?(Hash) - + attributes = extract_remote_attributes!(options) + callback = options.delete(:function) frequency = options.delete(:frequency) - if frequency && frequency != 0 - options[:frequency] = frequency.to_i - end - if with = options[:with] - if with !~ /[\{=(.]/ - options[:with] = "'#{options[:with]}=' + encodeURIComponent(value)" - else - options[:with] ||= 'value' unless options[:function] - end - end + attributes["data-name"] = name + attributes["data-js-type"] = "field_observer" - if function = options[:function] - statements = function # || remote_function(options) # TODO: Need to implement remote function - BR - options[:function] = JSFunction.new(statements, "element", "value") + if callback + attributes["data-observer-code"] = create_js_function(callback, "element", "value") + end + if frequency && frequency != 0 + attributes["data-frequency"] = frequency.to_i end - options[:name] = name - script_decorator("field_observer", options) + script_decorator(attributes) end - def script_decorator(js_type, options) - attributes = [%(type="application/json"), %(data-js-type="#{js_type}")] - attributes += options.map{|k, v| %(data-#{k}="#{v}")} + def script_decorator(options) + attributes = %w(type="application/json") + attributes += options.map{|k, v| k + '="' + v.to_s + '"'} "" end + # TODO: All evaled goes here per wycats module Rails2Compatibility def set_callbacks(options, html) [:complete, :failure, :success, :interactive, :loaded, :loading].each do |type| @@ -144,15 +109,50 @@ module ActionView private - # TODO: Move to javascript helpers - BR - class JSFunction - def initialize(statements, *arguments) - @statements, @arguments = statements, arguments + def extract_request_attributes!(options) + attributes = {} + attributes["data-method"] = options.delete(:method) + + url = options.delete(:url) + attributes["data-url"] = url.is_a?(Hash) ? url_for(url) : url + + #TODO: Remove all references to prototype - BR + if options.delete(:form) + attributes["data-parameters"] = 'Form.serialize(this)' + elsif submit = options.delete(:submit) + attributes["data-parameters"] = "Form.serialize('#{submit}')" + elsif with = options.delete(:with) + if with !~ /[\{=(.]/ + attributes["data-with"] = "'#{with}=' + encodeURIComponent(value)" + else + attributes["data-with"] = with + end end - def to_s(options = nil) - "function(#{@arguments.join(", ")}) {#{@statements}}" + purge_unused_attributes!(attributes) + end + + def extract_update_attributes!(options) + attributes = {} + update = options.delete(:update) + if update.is_a?(Hash) + attributes["data-update-success"] = update[:success] + attributes["data-update-failure"] = update[:failure] + else + attributes["data-update-success"] = update end + attributes["data-update-position"] = options.delete(:position) + + purge_unused_attributes!(attributes) + end + + def purge_unused_attributes!(attributes) + attributes.delete_if {|key, value| value.nil? } + attributes + end + + def create_js_function(statements, *arguments) + "function(#{arguments.join(", ")}) {#{statements}}" end end diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 5e62677a92..2ca47344e5 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -1,7 +1,5 @@ require "abstract_unit" -#TODO: Switch to assert_dom_equal where appropriate. assert_html is not robust enough for all tests - BR - class AjaxTestCase < ActionView::TestCase include ActionView::Helpers::AjaxHelper @@ -28,20 +26,6 @@ class AjaxTestCase < ActionView::TestCase end end - def extract_json_from_data_element(data_element) - root = HTML::Document.new(data_element).root - script = root.find(:tag => "script") - cdata = script.children.detect {|child| child.to_s =~ / "#glass_of_beer", :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") + assert_dom_equal %(
), + form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }) end test "when protect_against_forgery? is true" do @@ -246,6 +230,42 @@ class Article end end +class ExtractRemoteAttributesTest < AjaxTestCase + attr_reader :attributes + + test "extract_remote_attributes! html" do + attributes = extract_remote_attributes!(:html => { :class => "css_klass", :style => "border:1px solid"}) + assert_equal "css_klass", attributes[:class] + assert_equal "border:1px solid", attributes[:style] + end + + test "extract_remote_attributes! update options when :update is a hash" do + attributes = extract_remote_attributes!(:update => { :success => "foo", :failure => "bar" }) + assert_equal "foo", attributes["data-update-success"] + assert_equal "bar", attributes["data-update-failure"] + end + + test "extract_remote_attributes! update options when :update is string" do + attributes = extract_remote_attributes!(:update => "baz") + assert_equal "baz", attributes["data-update-success"] + end + + test "extract_remote_attributes! position" do + attributes = extract_remote_attributes!(:position => "before") + assert_equal "before", attributes["data-update-position"] + end + + test "extract_remote_attributes! data-js-type when it is NOT passed" do + attributes = extract_remote_attributes!({}) + assert_equal "remote", attributes["data-js-type"] + end + + test "extract_remote_attributes! data-js-type when it passed" do + attributes = extract_remote_attributes!(:js_type => "some_type") + assert_equal "some_type", attributes["data-js-type"] + end +end + class RemoteFormForTest < AjaxTestCase def setup @@ -321,11 +341,8 @@ class ButtonToRemoteTest < AjaxTestCase class StandardTest < ButtonToRemoteTest test "basic" do - button = button({:url => {:action => "whatnot"}}, {:class => "fine"}) - [/input/, /class="fine"/, /type="button"/, /value="Remote outpost"/, - /data-url="\/whatnot"/].each do |match| - assert_match match, button - end + assert_html button({:url => {:action => "whatnot"}}, {:class => "fine", :value => "RemoteOutpost"}), + %w(input class="fine" type="button" value="RemoteOutpost" data-url="/url/hash") end end @@ -336,20 +353,17 @@ class ButtonToRemoteTest < AjaxTestCase button(callback => "undoRequestCompleted(request)") end end -<<<<<<< HEAD -======= end class ScriptDecoratorTest < AjaxTestCase def decorator() - script_decorator("foo_type", :foo => "bar", :baz => "bang") + script_decorator("data-js-type" => "foo_type", "data-foo" => "bar", "data-baz" => "bang") end test "basic" do expected = %() assert_dom_equal expected, decorator end ->>>>>>> bd54253... Applied Yehuda's patch; Sharing extract_object_name_for_form! between form_helper and ajax_helper; Added script_decorator helper end class ObserveFieldTest < AjaxTestCase @@ -385,11 +399,10 @@ class ObserveFieldTest < AjaxTestCase assert_no_match /frequency/, field(:frequency => 0) end - # TODO: Finish when remote_function or some equivilent is finished -BR -# def test_observe_field -# assert_dom_equal %(), -# observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }) -# end + test "observe field with common options" do + assert_html observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }), + %w(script data-name="glass" data-frequency="300" data-url="/url/hash") + end # TODO: Consider using JSON instead of strings. Is using 'value' as a magical reference to the value of the observed field weird? (Rails2 does this) - BR test "using a :with option" do @@ -398,7 +411,6 @@ class ObserveFieldTest < AjaxTestCase assert_html field(:with => "'foo=' + encodeURIComponent(value)"), %w(script data-name="title" data-with="'foo=' + encodeURIComponent(value)") - end test "using json in a :with option" do @@ -408,7 +420,6 @@ class ObserveFieldTest < AjaxTestCase test "using :function for callback" do assert_html field(:function => "alert('Element changed')"), - %w(script data-function="function(element, value) {alert('Element changed')}") - + %w(script data-observer-code="function(element, value) {alert('Element changed')}") end end -- cgit v1.2.3 From 8e172f13d7f43b999b7028153ac6327ff592c72a Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 4 Nov 2009 02:14:30 -0800 Subject: Changed data-name to data-observed on observe_field --- actionpack/lib/action_view/helpers/ajax_helper.rb | 30 ++++++++++++++--------- actionpack/test/javascript/ajax_test.rb | 14 +++++------ 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 93a79766dc..807c943d2c 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -55,20 +55,12 @@ module ActionView end def observe_field(name, options = {}) - attributes = extract_remote_attributes!(options) - callback = options.delete(:function) - frequency = options.delete(:frequency) + options[:observed] = name - attributes["data-name"] = name + attributes = extract_remote_attributes!(options) + attributes.merge!(extract_observer_attributes!(options)) attributes["data-js-type"] = "field_observer" - if callback - attributes["data-observer-code"] = create_js_function(callback, "element", "value") - end - if frequency && frequency != 0 - attributes["data-frequency"] = frequency.to_i - end - script_decorator(attributes) end @@ -146,6 +138,22 @@ module ActionView purge_unused_attributes!(attributes) end + def extract_observer_attributes!(options) + attributes = {} + attributes["data-observed"] = options.delete(:observed) + + callback = options.delete(:function) + frequency = options.delete(:frequency) + if callback + attributes["data-observer-code"] = create_js_function(callback, "element", "value") + end + if frequency && frequency != 0 + attributes["data-frequency"] = frequency.to_i + end + + attributes + end + def purge_unused_attributes!(attributes) attributes.delete_if {|key, value| value.nil? } attributes diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 2ca47344e5..0cc4460870 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -382,17 +382,17 @@ class ObserveFieldTest < AjaxTestCase test "using a url string" do assert_html field(:url => "/some/other/url"), - %w(script data-url="/some/other/url" data-name="title") + %w(script data-url="/some/other/url" data-observed="title") end test "using a url hash" do assert_html field(:url => {:controller => :blog, :action => :update}), - %w(script data-url="/url/hash" data-name="title") + %w(script data-url="/url/hash" data-observed="title") end test "using a :frequency option" do assert_html field(:url => { :controller => :blog }, :frequency => 5.minutes), - %w(script data-url="/url/hash" data-name="title" data-frequency="300") + %w(script data-url="/url/hash" data-observed="title" data-frequency="300") end test "using a :frequency option of 0" do @@ -401,21 +401,21 @@ class ObserveFieldTest < AjaxTestCase test "observe field with common options" do assert_html observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }), - %w(script data-name="glass" data-frequency="300" data-url="/url/hash") + %w(script data-observed="glass" data-frequency="300" data-url="/url/hash") end # TODO: Consider using JSON instead of strings. Is using 'value' as a magical reference to the value of the observed field weird? (Rails2 does this) - BR test "using a :with option" do assert_html field(:with => "foo"), - %w(script data-name="title" data-with="'foo=' + encodeURIComponent(value)") + %w(script data-observed="title" data-with="'foo=' + encodeURIComponent(value)") assert_html field(:with => "'foo=' + encodeURIComponent(value)"), - %w(script data-name="title" data-with="'foo=' + encodeURIComponent(value)") + %w(script data-observed="title" data-with="'foo=' + encodeURIComponent(value)") end test "using json in a :with option" do assert_html field(:with => "{'id':value}"), - %w(script data-name="title" data-with="{'id':value}") + %w(script data-observed="title" data-with="{'id':value}") end test "using :function for callback" do -- cgit v1.2.3 From 39ec7ce6a93945bc97f599d8cb503711a66f3952 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 4 Nov 2009 02:35:16 -0800 Subject: Removed duplication --- actionpack/lib/action_view/helpers/ajax_helper.rb | 16 ++++++++-------- actionpack/test/javascript/ajax_test.rb | 12 ++++++++++++ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 807c943d2c..9f1ca138eb 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -49,16 +49,16 @@ module ActionView end def periodically_call_remote(options = {}) -# frequency = options[:frequency] || 10 # every ten seconds by default -# code = "new PeriodicalExecuter(function() {#{remote_function(options)}}, #{frequency})" -# javascript_tag(code) + attributes = extract_observer_attributes!(options) + attributes["data-js-type"] = "periodical_executer" + + script_decorator(attributes) end + #TODO: Should name change to a css query? - BR def observe_field(name, options = {}) options[:observed] = name - - attributes = extract_remote_attributes!(options) - attributes.merge!(extract_observer_attributes!(options)) + attributes = extract_observer_attributes!(options) attributes["data-js-type"] = "field_observer" script_decorator(attributes) @@ -139,7 +139,7 @@ module ActionView end def extract_observer_attributes!(options) - attributes = {} + attributes = extract_remote_attributes!(options) attributes["data-observed"] = options.delete(:observed) callback = options.delete(:function) @@ -151,7 +151,7 @@ module ActionView attributes["data-frequency"] = frequency.to_i end - attributes + purge_unused_attributes!(attributes) end def purge_unused_attributes!(attributes) diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 0cc4460870..f1207e938d 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -423,3 +423,15 @@ class ObserveFieldTest < AjaxTestCase %w(script data-observer-code="function(element, value) {alert('Element changed')}") end end + +class PeriodicallyCallRemoteTest < AjaxTestCase + test "basic" do + assert_html periodically_call_remote(:update => "#schremser_bier", :url => { :action => "mehr_bier" }), + %w(script data-url="/url/hash" data-update-success="#schremser_bier") + end + + test "periodically call remote with :frequency" do + assert_html periodically_call_remote(:frequency => 2, :url => "/url/string"), + %w(script data-url="/url/string" data-frequency="2") + end +end -- cgit v1.2.3 From 7d34975214e80d54786f92cf1daee7ec7847a07c Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 4 Nov 2009 23:18:15 -0800 Subject: Added submit_to_remote helper --- actionpack/lib/action_view/helpers/ajax_helper.rb | 10 ++++++++++ actionpack/test/javascript/ajax_test.rb | 12 +++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 9f1ca138eb..1a75f9372b 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -48,6 +48,16 @@ module ActionView tag(:input, attributes) end + def submit_to_remote(name, value, options = {}) + html_options = options.delete(:html) || {} + html_options.merge!(:name => name, :value => value, :type => "submit") + + attributes = extract_remote_attributes!(options) + attributes.merge!(html_options) + + tag(:input, attributes) + end + def periodically_call_remote(options = {}) attributes = extract_observer_attributes!(options) attributes["data-js-type"] = "periodical_executer" diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index f1207e938d..f4e766d77e 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -332,7 +332,7 @@ end class ButtonToRemoteTest < AjaxTestCase def button(options, html = {}) - button_to_remote("Remote outpost", options, html) + button_to_remote("RemoteOutpost", options, html) end def url_for(*) @@ -355,6 +355,16 @@ class ButtonToRemoteTest < AjaxTestCase end end +class SubmitToRemoteTest < AjaxTestCase + test "basic" do + expected = %() + options = { :url => {:action => "whatnot"}, :update => ".klass", :html => { :class => "fine" } } + + assert_dom_equal expected, + submit_to_remote("foo", "bar", options) + end +end + class ScriptDecoratorTest < AjaxTestCase def decorator() script_decorator("data-js-type" => "foo_type", "data-foo" => "bar", "data-baz" => "bang") -- cgit v1.2.3 From 95b77e925f22376bd12698a8700259894b94dc57 Mon Sep 17 00:00:00 2001 From: Bob Remeika Date: Wed, 4 Nov 2009 23:33:21 -0800 Subject: Added observe_form --- actionpack/lib/action_view/helpers/ajax_helper.rb | 8 ++++++++ actionpack/test/javascript/ajax_test.rb | 23 +++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 1a75f9372b..5de33868e9 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -74,6 +74,14 @@ module ActionView script_decorator(attributes) end + def observe_form(name, options = {}) + options[:observed] = name + attributes = extract_observer_attributes!(options) + attributes["data-js-type"] = "form_observer" + + script_decorator(attributes) + end + def script_decorator(options) attributes = %w(type="application/json") attributes += options.map{|k, v| k + '="' + v.to_s + '"'} diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index f4e766d77e..32b6352c3c 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -392,17 +392,17 @@ class ObserveFieldTest < AjaxTestCase test "using a url string" do assert_html field(:url => "/some/other/url"), - %w(script data-url="/some/other/url" data-observed="title") + %w(script data-js-type="field_observer" data-url="/some/other/url" data-observed="title") end test "using a url hash" do assert_html field(:url => {:controller => :blog, :action => :update}), - %w(script data-url="/url/hash" data-observed="title") + %w(script data-js-type="field_observer" data-url="/url/hash" data-observed="title") end test "using a :frequency option" do assert_html field(:url => { :controller => :blog }, :frequency => 5.minutes), - %w(script data-url="/url/hash" data-observed="title" data-frequency="300") + %w(script data-js-type="field_observer" data-url="/url/hash" data-observed="title" data-frequency="300") end test "using a :frequency option of 0" do @@ -411,26 +411,33 @@ class ObserveFieldTest < AjaxTestCase test "observe field with common options" do assert_html observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }), - %w(script data-observed="glass" data-frequency="300" data-url="/url/hash") + %w(script data-js-type="field_observer" data-observed="glass" data-frequency="300" data-url="/url/hash") end # TODO: Consider using JSON instead of strings. Is using 'value' as a magical reference to the value of the observed field weird? (Rails2 does this) - BR test "using a :with option" do assert_html field(:with => "foo"), - %w(script data-observed="title" data-with="'foo=' + encodeURIComponent(value)") + %w(script data-js-type="field_observer" data-observed="title" data-with="'foo=' + encodeURIComponent(value)") assert_html field(:with => "'foo=' + encodeURIComponent(value)"), - %w(script data-observed="title" data-with="'foo=' + encodeURIComponent(value)") + %w(script data-js-type="field_observer" data-observed="title" data-with="'foo=' + encodeURIComponent(value)") end test "using json in a :with option" do assert_html field(:with => "{'id':value}"), - %w(script data-observed="title" data-with="{'id':value}") + %w(script data-js-type="field_observer" data-observed="title" data-with="{'id':value}") end test "using :function for callback" do assert_html field(:function => "alert('Element changed')"), - %w(script data-observer-code="function(element, value) {alert('Element changed')}") + %w(script data-js-type="field_observer" data-observer-code="function(element, value) {alert('Element changed')}") + end +end + +class ObserveFormTest < AjaxTestCase + test "basic" do + assert_html observe_form("some_form", :frequency => 2, :url => { :action => "hash" }), + %w(script data-js-type="form_observer" data-url="/url/hash" data-observed="some_form" data-frequency="2") end end -- cgit v1.2.3 From 27d52e00d90604af845bcfdcc23cf54cd652e3e0 Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Sat, 23 Jan 2010 11:43:22 -0500 Subject: extract_remote_attributes should be a private method --- actionpack/lib/action_view/helpers/ajax_helper.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 5de33868e9..68ce755604 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -3,16 +3,6 @@ module ActionView module AjaxHelper include UrlHelper - def extract_remote_attributes!(options) - attributes = options.delete(:html) || {} - - attributes.merge!(extract_update_attributes!(options)) - attributes.merge!(extract_request_attributes!(options)) - attributes["data-js-type"] = options.delete(:js_type) || "remote" - - attributes - end - def remote_form_for(record_or_name_or_array, *args, &proc) options = args.extract_options! object_name = extract_object_name_for_form!(args, options, record_or_name_or_array) @@ -119,6 +109,16 @@ module ActionView private + def extract_remote_attributes!(options) + attributes = options.delete(:html) || {} + + attributes.merge!(extract_update_attributes!(options)) + attributes.merge!(extract_request_attributes!(options)) + attributes["data-js-type"] = options.delete(:js_type) || "remote" + + attributes + end + def extract_request_attributes!(options) attributes = {} attributes["data-method"] = options.delete(:method) -- cgit v1.2.3 From 62a2d5178c75d4d5f1721f3c11af71ca54db296e Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Sat, 23 Jan 2010 11:52:16 -0500 Subject: cleanup some spacing --- actionpack/lib/action_view/helpers/ajax_helper.rb | 151 +++++++++++----------- 1 file changed, 75 insertions(+), 76 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 68ce755604..7d97fb9698 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -78,7 +78,81 @@ module ActionView "" end - # TODO: All evaled goes here per wycats + private + + def extract_remote_attributes!(options) + attributes = options.delete(:html) || {} + + attributes.merge!(extract_update_attributes!(options)) + attributes.merge!(extract_request_attributes!(options)) + attributes["data-js-type"] = options.delete(:js_type) || "remote" + + attributes + end + + def extract_request_attributes!(options) + attributes = {} + attributes["data-method"] = options.delete(:method) + + url = options.delete(:url) + attributes["data-url"] = url.is_a?(Hash) ? url_for(url) : url + + #TODO: Remove all references to prototype - BR + if options.delete(:form) + attributes["data-parameters"] = 'Form.serialize(this)' + elsif submit = options.delete(:submit) + attributes["data-parameters"] = "Form.serialize('#{submit}')" + elsif with = options.delete(:with) + if with !~ /[\{=(.]/ + attributes["data-with"] = "'#{with}=' + encodeURIComponent(value)" + else + attributes["data-with"] = with + end + end + + purge_unused_attributes!(attributes) + end + + def extract_update_attributes!(options) + attributes = {} + update = options.delete(:update) + if update.is_a?(Hash) + attributes["data-update-success"] = update[:success] + attributes["data-update-failure"] = update[:failure] + else + attributes["data-update-success"] = update + end + attributes["data-update-position"] = options.delete(:position) + + purge_unused_attributes!(attributes) + end + + def extract_observer_attributes!(options) + attributes = extract_remote_attributes!(options) + attributes["data-observed"] = options.delete(:observed) + + callback = options.delete(:function) + frequency = options.delete(:frequency) + if callback + attributes["data-observer-code"] = create_js_function(callback, "element", "value") + end + if frequency && frequency != 0 + attributes["data-frequency"] = frequency.to_i + end + + purge_unused_attributes!(attributes) + end + + def purge_unused_attributes!(attributes) + attributes.delete_if {|key, value| value.nil? } + attributes + end + + def create_js_function(statements, *arguments) + "function(#{arguments.join(", ")}) {#{statements}}" + end + + # TODO: All evaled goes here per wycat module Rails2Compatibility def set_callbacks(options, html) [:complete, :failure, :success, :interactive, :loaded, :loading].each do |type| @@ -106,81 +180,6 @@ module ActionView super end end - - private - - def extract_remote_attributes!(options) - attributes = options.delete(:html) || {} - - attributes.merge!(extract_update_attributes!(options)) - attributes.merge!(extract_request_attributes!(options)) - attributes["data-js-type"] = options.delete(:js_type) || "remote" - - attributes - end - - def extract_request_attributes!(options) - attributes = {} - attributes["data-method"] = options.delete(:method) - - url = options.delete(:url) - attributes["data-url"] = url.is_a?(Hash) ? url_for(url) : url - - #TODO: Remove all references to prototype - BR - if options.delete(:form) - attributes["data-parameters"] = 'Form.serialize(this)' - elsif submit = options.delete(:submit) - attributes["data-parameters"] = "Form.serialize('#{submit}')" - elsif with = options.delete(:with) - if with !~ /[\{=(.]/ - attributes["data-with"] = "'#{with}=' + encodeURIComponent(value)" - else - attributes["data-with"] = with - end - end - - purge_unused_attributes!(attributes) - end - - def extract_update_attributes!(options) - attributes = {} - update = options.delete(:update) - if update.is_a?(Hash) - attributes["data-update-success"] = update[:success] - attributes["data-update-failure"] = update[:failure] - else - attributes["data-update-success"] = update - end - attributes["data-update-position"] = options.delete(:position) - - purge_unused_attributes!(attributes) - end - - def extract_observer_attributes!(options) - attributes = extract_remote_attributes!(options) - attributes["data-observed"] = options.delete(:observed) - - callback = options.delete(:function) - frequency = options.delete(:frequency) - if callback - attributes["data-observer-code"] = create_js_function(callback, "element", "value") - end - if frequency && frequency != 0 - attributes["data-frequency"] = frequency.to_i - end - - purge_unused_attributes!(attributes) - end - - def purge_unused_attributes!(attributes) - attributes.delete_if {|key, value| value.nil? } - attributes - end - - def create_js_function(statements, *arguments) - "function(#{arguments.join(", ")}) {#{statements}}" - end - end end end -- cgit v1.2.3 From 143d0764d057bfa890534a61ef065b7a1055b998 Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Sat, 23 Jan 2010 12:14:02 -0500 Subject: nuke what appears to be a duplicate and unused test file --- actionpack/test/javascript/ajax_test.rb | 454 -------------------------------- 1 file changed, 454 deletions(-) delete mode 100644 actionpack/test/javascript/ajax_test.rb diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb deleted file mode 100644 index 32b6352c3c..0000000000 --- a/actionpack/test/javascript/ajax_test.rb +++ /dev/null @@ -1,454 +0,0 @@ -require "abstract_unit" - -class AjaxTestCase < ActionView::TestCase - include ActionView::Helpers::AjaxHelper - - def url_for(options) - case options - when Hash - "/url/hash" - when String - options - else - raise TypeError.new("Unsupported url type (#{options.class}) for this test helper") - end - end - - def assert_html(html, matches) - matches.each do |match| - assert_match Regexp.new(Regexp.escape(match)), html - end - end - - def assert_html_not_present(html, matches) - matches.each do |match| - assert_no_match Regexp.new(Regexp.escape(match)), html - end - end - - def self.assert_callbacks_work(&blk) - define_method(:assert_callbacks_work, &blk) - - [:complete, :failure, :success, :interactive, :loaded, :loading, 404].each do |callback| - test "#{callback} callback" do - markup = assert_callbacks_work(callback) - assert_html markup, %W(data-#{callback}-code="undoRequestCompleted\(request\)") - end - end - end -end - -class LinkToRemoteTest < AjaxTestCase - def url_for(hash) - "/blog/destroy/4" - end - - def link(options = {}) - link_to_remote("Delete this post", "/blog/destroy/4", options) - end - - test "with no update" do - assert_html link, %w(href="/blog/destroy/4" Delete\ this\ post data-remote="true") - end - - test "basic" do - assert_html link(:update => "#posts"), - %w(data-update-success="#posts") - end - - test "using a url hash" do - link = link_to_remote("Delete this post", {:controller => :blog}, :update => "#posts") - assert_html link, %w(href="/url/hash" data-update-success="#posts") - end - - test "with no update" do - assert_html link, %w(href="/blog/destroy/4" Delete\ this\ post data-js-type="remote") - end - - test "with :html options" do - expected = %{Delete this post} - assert_equal expected, link(:update => "#posts", :html => {"data-custom" => "me"}) - end - - test "with a hash for :update" do - link = link(:update => {:success => "#posts", :failure => "#error"}) - assert_html link, %w(data-js-type="remote" data-update-success="#posts" data-update-failure="#error") - end - - test "with positional parameters" do - link = link(:position => :top, :update => "#posts") - assert_match /data\-update\-position="top"/, link - end - - test "with an optional method" do - link = link(:method => "delete") - assert_match /data-method="delete"/, link - end - - class LegacyLinkToRemoteTest < AjaxTestCase - include ActionView::Helpers::AjaxHelper::Rails2Compatibility - - def link(options) - link_to_remote("Delete this post", "/blog/destroy/4", options) - end - - test "basic link_to_remote with :url =>" do - expected = %{Delete this post} - assert_equal expected, - link_to_remote("Delete this post", :url => "/blog/destroy/4", :update => "#posts") - end - - assert_callbacks_work do |callback| - link(callback => "undoRequestCompleted(request)") - end - end -end - -class FormRemoteTagTest < AjaxTestCase - - def protect_against_forgery? - false - end - - def request_forgery_protection_token - "token_name" - end - - def form_authenticity_token - "t0k3n" - end - - def authenticity_input_attributes - %w(input type="hidden" name="token_name" value="t0k3n") - end - - # TODO: Play with using assert_dom_equal - test "basic" do - assert_dom_equal %(), - form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }) - end - - test "when protect_against_forgery? is true" do - def protect_against_forgery? - true - end - - expected_form_attributes = %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") - expected_patterns = expected_form_attributes + authenticity_input_attributes - - assert_equal true, protect_against_forgery? - assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }), expected_patterns - end - - test ":action is used when it is present" do - html = form_remote_tag(:update => "#glass_of_beer", :action => "foo") - - assert_html html, %w(form action="foo" method="post" data-js-type="remote" data-update-success="#glass_of_beer") - assert_no_match /url="foo"/, html - end - - test ":url is used when :action is not present" do - html = form_remote_tag(:update => "#glass_of_beer", :url => "bar") - - assert_html html, %w(form action="bar" method="post" data-js-type="remote" data-update-success="#glass_of_beer") - assert_no_match /url="bar"/, html - end - - test "when protect_against_forgery? is false" do - assert_equal false, protect_against_forgery? - assert_html_not_present form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }), - authenticity_input_attributes - end - - test "update callbacks" do - assert_html form_remote_tag(:update => { :success => "#glass_of_beer" }, :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") - - assert_html form_remote_tag(:update => { :failure => "#glass_of_water" }, :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-js-type="remote" data-update-failure="#glass_of_water") - - assert_html form_remote_tag(:update => { :success => "#glass_of_beer", :failure => "#glass_of_water" }, :url => { :action => :fast }), - %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer" data-update-failure="#glass_of_water") - end - - test "using a :method option" do - expected_form_attributes = %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer") - # TODO: Experiment with not using this _method param. Apparently this is done to address browser incompatibilities, but since - # we have a layer between the HTML and the JS libs now, we can probably get away with letting JS the JS libs handle the requirement - # for an extra field if needed. - expected_input_attributes = %w(input name="_method" type="hidden" value="put") - - assert_html form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }, :html => { :method => :put }), - expected_form_attributes + expected_input_attributes - end - - - # FIXME: This test is janky as hell. We are essentially rewriting capture and concat and they don't really work right - # because output is out of order. This test passes because it's only doing a regex match on the buffer, but this really - # needs to be fixed by using the real helper methods that rails provides. capture, concat, url_for etc. should be - # implemented by their *real* methods or we need to find a better workaround so that our tests aren't written so - # poorly. - BR - test "form_remote_tag with block in erb" do - def capture(*args, &block) - @buffer = [] - block.call(*args) if block_given? - end - def concat(str) - @buffer << str - end - - expected_form_attributes = %w(form action="/url/hash" method="post" data-js-type="remote" data-update-success="#glass_of_beer" /form) - expected_inner_html = %w(w00t!) - - form_remote_tag(:update => "#glass_of_beer", :url => { :action => :fast }) { concat expected_inner_html } - assert_html @buffer.to_s, - expected_form_attributes + expected_inner_html - end - -class Author - extend ActiveModel::Naming - include ActiveModel::Conversion - - attr_reader :id - - def save; @id = 1 end - def new_record?; @id.nil? end - def name - @id.nil? ? 'new author' : "author ##{@id}" - end -end - -class Article - extend ActiveModel::Naming - include ActiveModel::Conversion - attr_reader :id - attr_reader :author_id - def save; @id = 1; @author_id = 1 end - def new_record?; @id.nil? end - def name - @id.nil? ? 'new article' : "article ##{@id}" - end -end - -class ExtractRemoteAttributesTest < AjaxTestCase - attr_reader :attributes - - test "extract_remote_attributes! html" do - attributes = extract_remote_attributes!(:html => { :class => "css_klass", :style => "border:1px solid"}) - assert_equal "css_klass", attributes[:class] - assert_equal "border:1px solid", attributes[:style] - end - - test "extract_remote_attributes! update options when :update is a hash" do - attributes = extract_remote_attributes!(:update => { :success => "foo", :failure => "bar" }) - assert_equal "foo", attributes["data-update-success"] - assert_equal "bar", attributes["data-update-failure"] - end - - test "extract_remote_attributes! update options when :update is string" do - attributes = extract_remote_attributes!(:update => "baz") - assert_equal "baz", attributes["data-update-success"] - end - - test "extract_remote_attributes! position" do - attributes = extract_remote_attributes!(:position => "before") - assert_equal "before", attributes["data-update-position"] - end - - test "extract_remote_attributes! data-js-type when it is NOT passed" do - attributes = extract_remote_attributes!({}) - assert_equal "remote", attributes["data-js-type"] - end - - test "extract_remote_attributes! data-js-type when it passed" do - attributes = extract_remote_attributes!(:js_type => "some_type") - assert_equal "some_type", attributes["data-js-type"] - end -end - -class RemoteFormForTest < AjaxTestCase - - def setup - super - @record = @author = Author.new - @article = Article.new - end - - test "remote_form_for with record identification with new record" do - remote_form_for(@record, {:html => { :id => 'create-author' }}) {} - - expected = %() - assert_dom_equal expected, output_buffer - end - - test "remote_form_for with record identification without html options" do - remote_form_for(@record) {} - - expected = %(
) - assert_dom_equal expected, output_buffer - end - - test "remote_form_for with record identification with existing record" do - @record.save - remote_form_for(@record) {} - - expected = %(
) - assert_dom_equal expected, output_buffer - end - - test "remote_form_for with new object in list" do - remote_form_for([@author, @article]) {} - - expected = %(
) - assert_dom_equal expected, output_buffer - end - - test "remote_form_for with existing object in list" do - @author.save - @article.save - remote_form_for([@author, @article]) {} - - expected = %(
) - assert_dom_equal expected, output_buffer - end - - protected - def author_path(record) - "/authors/#{record.id}" - end - - def authors_path - "/authors" - end - - def author_articles_path(author) - "/authors/#{author.id}/articles" - end - - def author_article_path(author, article) - "/authors/#{author.id}/articles/#{article.id}" - end -end - -class ButtonToRemoteTest < AjaxTestCase - def button(options, html = {}) - button_to_remote("RemoteOutpost", options, html) - end - - def url_for(*) - "/whatnot" - end - - class StandardTest < ButtonToRemoteTest - test "basic" do - assert_html button({:url => {:action => "whatnot"}}, {:class => "fine", :value => "RemoteOutpost"}), - %w(input class="fine" type="button" value="RemoteOutpost" data-url="/url/hash") - end - end - - class LegacyButtonToRemoteTest < ButtonToRemoteTest - include ActionView::Helpers::AjaxHelper::Rails2Compatibility - - assert_callbacks_work do |callback| - button(callback => "undoRequestCompleted(request)") - end - end -end - -class SubmitToRemoteTest < AjaxTestCase - test "basic" do - expected = %() - options = { :url => {:action => "whatnot"}, :update => ".klass", :html => { :class => "fine" } } - - assert_dom_equal expected, - submit_to_remote("foo", "bar", options) - end -end - -class ScriptDecoratorTest < AjaxTestCase - def decorator() - script_decorator("data-js-type" => "foo_type", "data-foo" => "bar", "data-baz" => "bang") - end - - test "basic" do - expected = %() - assert_dom_equal expected, decorator - end -end - -class ObserveFieldTest < AjaxTestCase - def protect_against_forgery? - false - end - - def field(options = {}) - observe_field("title", options) - end - - test "basic" do - assert_html field, - %w(script type="application/json" data-js-type="field_observer") - end - - test "using a url string" do - assert_html field(:url => "/some/other/url"), - %w(script data-js-type="field_observer" data-url="/some/other/url" data-observed="title") - end - - test "using a url hash" do - assert_html field(:url => {:controller => :blog, :action => :update}), - %w(script data-js-type="field_observer" data-url="/url/hash" data-observed="title") - end - - test "using a :frequency option" do - assert_html field(:url => { :controller => :blog }, :frequency => 5.minutes), - %w(script data-js-type="field_observer" data-url="/url/hash" data-observed="title" data-frequency="300") - end - - test "using a :frequency option of 0" do - assert_no_match /frequency/, field(:frequency => 0) - end - - test "observe field with common options" do - assert_html observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }), - %w(script data-js-type="field_observer" data-observed="glass" data-frequency="300" data-url="/url/hash") - end - - # TODO: Consider using JSON instead of strings. Is using 'value' as a magical reference to the value of the observed field weird? (Rails2 does this) - BR - test "using a :with option" do - assert_html field(:with => "foo"), - %w(script data-js-type="field_observer" data-observed="title" data-with="'foo=' + encodeURIComponent(value)") - - assert_html field(:with => "'foo=' + encodeURIComponent(value)"), - %w(script data-js-type="field_observer" data-observed="title" data-with="'foo=' + encodeURIComponent(value)") - end - - test "using json in a :with option" do - assert_html field(:with => "{'id':value}"), - %w(script data-js-type="field_observer" data-observed="title" data-with="{'id':value}") - end - - test "using :function for callback" do - assert_html field(:function => "alert('Element changed')"), - %w(script data-js-type="field_observer" data-observer-code="function(element, value) {alert('Element changed')}") - end -end - -class ObserveFormTest < AjaxTestCase - test "basic" do - assert_html observe_form("some_form", :frequency => 2, :url => { :action => "hash" }), - %w(script data-js-type="form_observer" data-url="/url/hash" data-observed="some_form" data-frequency="2") - end -end - -class PeriodicallyCallRemoteTest < AjaxTestCase - test "basic" do - assert_html periodically_call_remote(:update => "#schremser_bier", :url => { :action => "mehr_bier" }), - %w(script data-url="/url/hash" data-update-success="#schremser_bier") - end - - test "periodically call remote with :frequency" do - assert_html periodically_call_remote(:frequency => 2, :url => "/url/string"), - %w(script data-url="/url/string" data-frequency="2") - end -end -- cgit v1.2.3 From 07299eb60d4ae625b3be2e919be4dbd737fb01be Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Sat, 23 Jan 2010 12:19:29 -0500 Subject: rename ajax_test.rb to ajax_helper_test.rb for consistency --- actionpack/test/template/ajax_helper_test.rb | 174 +++++++++++++++++++++++++++ actionpack/test/template/ajax_test.rb | 174 --------------------------- 2 files changed, 174 insertions(+), 174 deletions(-) create mode 100644 actionpack/test/template/ajax_helper_test.rb delete mode 100644 actionpack/test/template/ajax_test.rb diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb new file mode 100644 index 0000000000..86932d754f --- /dev/null +++ b/actionpack/test/template/ajax_helper_test.rb @@ -0,0 +1,174 @@ +require "abstract_unit" + +class AjaxTestCase < ActiveSupport::TestCase + include ActionView::Helpers::AjaxHelper + include ActionView::Helpers::TagHelper + + def url_for(url) + case url + when Hash + "/url/hash" + when String + url + else + raise TypeError.new("Unsupported url type (#{url.class}) for this test helper") + end + end + + def assert_html(html, matches) + matches.each do |match| + assert_match(Regexp.new(Regexp.escape(match)), html) + end + end + + def self.assert_callbacks_work(&blk) + define_method(:assert_callbacks_work, &blk) + + [:complete, :failure, :success, :interactive, :loaded, :loading, 404].each do |callback| + test "#{callback} callback" do + markup = assert_callbacks_work(callback) + assert_html markup, %W(data-#{callback}-code="undoRequestCompleted\(request\)") + end + end + end +end + +class LinkToRemoteTest < AjaxTestCase + def link(options = {}) + link_to_remote("Delete this post", "/blog/destroy/3", options) + end + + test "basic" do + assert_html link(:update => "#posts"), + %w(data-update-success="#posts") + end + + test "using a url string" do + assert_html link_to_remote("Test", "/blog/update/1"), + %w(href="/blog/update/1") + end + + test "using a url hash" do + link = link_to_remote("Delete this post", {:controller => :blog}, :update => "#posts") + assert_html link, %w(href="/url/hash" data-update-success="#posts") + end + + test "with no update" do + assert_html link, %w(href="/blog/destroy/3" Delete\ this\ post data-remote="true") + end + + test "with :html options" do + expected = %{Delete this post} + assert_equal expected, link(:update => "#posts", :html => {"data-custom" => "me"}) + end + + test "with a hash for :update" do + link = link(:update => {:success => "#posts", :failure => "#error"}) + assert_match(/data-update-success="#posts"/, link) + assert_match(/data-update-failure="#error"/, link) + end + + test "with positional parameters" do + link = link(:position => :top, :update => "#posts") + assert_match(/data\-update\-position="top"/, link) + end + + test "with an optional method" do + link = link(:method => "delete") + assert_match(/data-method="delete"/, link) + end + + class LegacyLinkToRemoteTest < AjaxTestCase + include ActionView::Helpers::AjaxHelper::Rails2Compatibility + + def link(options) + link_to_remote("Delete this post", "/blog/destroy/3", options) + end + + test "basic link_to_remote with :url =>" do + expected = %{Delete this post} + assert_equal expected, + link_to_remote("Delete this post", :url => "/blog/destroy/4", :update => "#posts") + end + + assert_callbacks_work do |callback| + link(callback => "undoRequestCompleted(request)") + end + end +end + +class ButtonToRemoteTest < AjaxTestCase + def button(options, html = {}) + button_to_remote("Remote outpost", options, html) + end + + class StandardTest < ButtonToRemoteTest + test "basic" do + assert_html button({:url => {:action => "whatnot"}}, {:class => "fine"}), + %w(input class="fine" type="button" value="Remote outpost" data-url="/url/hash") + end + end + + class LegacyButtonToRemoteTest < ButtonToRemoteTest + include ActionView::Helpers::AjaxHelper::Rails2Compatibility + + assert_callbacks_work do |callback| + button(callback => "undoRequestCompleted(request)") + end + end +end + +class ObserveFieldTest < AjaxTestCase + def url_for(hash) + "/blog/update" + end + + def protect_against_forgery? + false + end + + def field(options = {}) + observe_field("title", options) + end + + test "basic" do + assert_html field, + %w(data-observe="true") + end + + test "with a :frequency option" do + assert_html field(:frequency => 5.minutes), + %w(data-observe="true" data-frequency="300") + end + + test "using a url string" do + assert_html field(:url => "/some/other/url"), + %w(data-observe="true" data-url="/some/other/url") + end + + test "using a url hash" do + assert_html field(:url => {:controller => :blog, :action => :update}), + %w(data-observe="true" data-url="/blog/update") + end + +# def test_observe_field +# assert_dom_equal %(), +# observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }) +# end +# +# def test_observe_field_using_with_option +# expected = %() +# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => 'id') +# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "'id=' + encodeURIComponent(value)") +# end +# +# def test_observe_field_using_json_in_with_option +# expected = %() +# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "{'id':value}") +# end +# +# def test_observe_field_using_function_for_callback +# assert_dom_equal %(), +# observe_field("glass", :frequency => 5.minutes, :function => "alert('Element changed')") +# end +end diff --git a/actionpack/test/template/ajax_test.rb b/actionpack/test/template/ajax_test.rb deleted file mode 100644 index 86932d754f..0000000000 --- a/actionpack/test/template/ajax_test.rb +++ /dev/null @@ -1,174 +0,0 @@ -require "abstract_unit" - -class AjaxTestCase < ActiveSupport::TestCase - include ActionView::Helpers::AjaxHelper - include ActionView::Helpers::TagHelper - - def url_for(url) - case url - when Hash - "/url/hash" - when String - url - else - raise TypeError.new("Unsupported url type (#{url.class}) for this test helper") - end - end - - def assert_html(html, matches) - matches.each do |match| - assert_match(Regexp.new(Regexp.escape(match)), html) - end - end - - def self.assert_callbacks_work(&blk) - define_method(:assert_callbacks_work, &blk) - - [:complete, :failure, :success, :interactive, :loaded, :loading, 404].each do |callback| - test "#{callback} callback" do - markup = assert_callbacks_work(callback) - assert_html markup, %W(data-#{callback}-code="undoRequestCompleted\(request\)") - end - end - end -end - -class LinkToRemoteTest < AjaxTestCase - def link(options = {}) - link_to_remote("Delete this post", "/blog/destroy/3", options) - end - - test "basic" do - assert_html link(:update => "#posts"), - %w(data-update-success="#posts") - end - - test "using a url string" do - assert_html link_to_remote("Test", "/blog/update/1"), - %w(href="/blog/update/1") - end - - test "using a url hash" do - link = link_to_remote("Delete this post", {:controller => :blog}, :update => "#posts") - assert_html link, %w(href="/url/hash" data-update-success="#posts") - end - - test "with no update" do - assert_html link, %w(href="/blog/destroy/3" Delete\ this\ post data-remote="true") - end - - test "with :html options" do - expected = %{Delete this post} - assert_equal expected, link(:update => "#posts", :html => {"data-custom" => "me"}) - end - - test "with a hash for :update" do - link = link(:update => {:success => "#posts", :failure => "#error"}) - assert_match(/data-update-success="#posts"/, link) - assert_match(/data-update-failure="#error"/, link) - end - - test "with positional parameters" do - link = link(:position => :top, :update => "#posts") - assert_match(/data\-update\-position="top"/, link) - end - - test "with an optional method" do - link = link(:method => "delete") - assert_match(/data-method="delete"/, link) - end - - class LegacyLinkToRemoteTest < AjaxTestCase - include ActionView::Helpers::AjaxHelper::Rails2Compatibility - - def link(options) - link_to_remote("Delete this post", "/blog/destroy/3", options) - end - - test "basic link_to_remote with :url =>" do - expected = %{Delete this post} - assert_equal expected, - link_to_remote("Delete this post", :url => "/blog/destroy/4", :update => "#posts") - end - - assert_callbacks_work do |callback| - link(callback => "undoRequestCompleted(request)") - end - end -end - -class ButtonToRemoteTest < AjaxTestCase - def button(options, html = {}) - button_to_remote("Remote outpost", options, html) - end - - class StandardTest < ButtonToRemoteTest - test "basic" do - assert_html button({:url => {:action => "whatnot"}}, {:class => "fine"}), - %w(input class="fine" type="button" value="Remote outpost" data-url="/url/hash") - end - end - - class LegacyButtonToRemoteTest < ButtonToRemoteTest - include ActionView::Helpers::AjaxHelper::Rails2Compatibility - - assert_callbacks_work do |callback| - button(callback => "undoRequestCompleted(request)") - end - end -end - -class ObserveFieldTest < AjaxTestCase - def url_for(hash) - "/blog/update" - end - - def protect_against_forgery? - false - end - - def field(options = {}) - observe_field("title", options) - end - - test "basic" do - assert_html field, - %w(data-observe="true") - end - - test "with a :frequency option" do - assert_html field(:frequency => 5.minutes), - %w(data-observe="true" data-frequency="300") - end - - test "using a url string" do - assert_html field(:url => "/some/other/url"), - %w(data-observe="true" data-url="/some/other/url") - end - - test "using a url hash" do - assert_html field(:url => {:controller => :blog, :action => :update}), - %w(data-observe="true" data-url="/blog/update") - end - -# def test_observe_field -# assert_dom_equal %(), -# observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }) -# end -# -# def test_observe_field_using_with_option -# expected = %() -# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => 'id') -# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "'id=' + encodeURIComponent(value)") -# end -# -# def test_observe_field_using_json_in_with_option -# expected = %() -# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "{'id':value}") -# end -# -# def test_observe_field_using_function_for_callback -# assert_dom_equal %(), -# observe_field("glass", :frequency => 5.minutes, :function => "alert('Element changed')") -# end -end -- cgit v1.2.3 From 49e84a59439074fb7742b662db21e9638d41cfd0 Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Sat, 23 Jan 2010 12:48:11 -0500 Subject: fix failing tests from fork/merge --- actionpack/lib/action_view/helpers/ajax_helper.rb | 7 ++++--- actionpack/test/template/ajax_helper_test.rb | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 7d97fb9698..f2ff424576 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -32,8 +32,9 @@ module ActionView end def button_to_remote(name, options = {}, html_options = {}) - attributes = html_options.merge!(:type => "button") + attributes = html_options.merge!(:type => "button", :value => name) attributes.merge!(extract_remote_attributes!(options)) + attributes.merge!(extract_request_attributes!(options)) tag(:input, attributes) end @@ -59,7 +60,7 @@ module ActionView def observe_field(name, options = {}) options[:observed] = name attributes = extract_observer_attributes!(options) - attributes["data-js-type"] = "field_observer" + attributes["data-observe"] = true script_decorator(attributes) end @@ -85,7 +86,7 @@ module ActionView attributes.merge!(extract_update_attributes!(options)) attributes.merge!(extract_request_attributes!(options)) - attributes["data-js-type"] = options.delete(:js_type) || "remote" + attributes["data-remote"] = true attributes end diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index 86932d754f..95c839b96e 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -104,8 +104,8 @@ class ButtonToRemoteTest < AjaxTestCase class StandardTest < ButtonToRemoteTest test "basic" do - assert_html button({:url => {:action => "whatnot"}}, {:class => "fine"}), - %w(input class="fine" type="button" value="Remote outpost" data-url="/url/hash") + expected = %{} + assert_equal expected, button({:url => "/url/hash"}, {:class => "fine"}) end end -- cgit v1.2.3 From f115fb011169cadfd1977c7e6d6ddef2eecc96de Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Sat, 23 Jan 2010 13:06:24 -0500 Subject: make observers a little more dry --- actionpack/lib/action_view/helpers/ajax_helper.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index f2ff424576..4081117ad1 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -60,7 +60,6 @@ module ActionView def observe_field(name, options = {}) options[:observed] = name attributes = extract_observer_attributes!(options) - attributes["data-observe"] = true script_decorator(attributes) end @@ -68,7 +67,6 @@ module ActionView def observe_form(name, options = {}) options[:observed] = name attributes = extract_observer_attributes!(options) - attributes["data-js-type"] = "form_observer" script_decorator(attributes) end @@ -130,6 +128,7 @@ module ActionView def extract_observer_attributes!(options) attributes = extract_remote_attributes!(options) + attributes["data-observe"] = true attributes["data-observed"] = options.delete(:observed) callback = options.delete(:function) -- cgit v1.2.3 From 1cd8b98d0193a298b6fb68443f3d24ccb4aa9447 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sat, 23 Jan 2010 12:37:54 -0500 Subject: javascript_helper now correctly pulls in ajax_helper instead of prototype_helper. prototype_helper is pulled in by ajax_helper for reverse compatibility --- actionpack/lib/action_view/helpers/ajax_helper.rb | 4 ++-- actionpack/lib/action_view/helpers/javascript_helper.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 4081117ad1..9c1d6a722d 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -1,7 +1,7 @@ module ActionView module Helpers module AjaxHelper - include UrlHelper + include PrototypeHelper def remote_form_for(record_or_name_or_array, *args, &proc) options = args.extract_options! @@ -28,7 +28,7 @@ module ActionView attributes.merge!(options) url = url_for(url) if url.is_a?(Hash) - link_to(name, url, attributes) + content_tag(:a, name, attributes.merge(:href => url)) end def button_to_remote(name, options = {}, html_options = {}) diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index 8f64acf102..9f6ec28a9e 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -39,7 +39,7 @@ module ActionView JAVASCRIPT_PATH = File.join(File.dirname(__FILE__), 'javascripts') end - include PrototypeHelper + include AjaxHelper::Rails2Compatibility # Returns a link of the given +name+ that will trigger a JavaScript +function+ using the # onclick handler and return false after the fact. -- cgit v1.2.3 From 5462caf434d7313b0a5bff75fd2bca35bbaf42a6 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sat, 23 Jan 2010 13:12:08 -0500 Subject: fixing failing tests from last commit, order of attributes matters should probably change this later --- actionpack/test/template/ajax_helper_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index 95c839b96e..80d1f42327 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -58,7 +58,7 @@ class LinkToRemoteTest < AjaxTestCase end test "with :html options" do - expected = %{Delete this post} + expected = %{Delete this post} assert_equal expected, link(:update => "#posts", :html => {"data-custom" => "me"}) end @@ -86,7 +86,7 @@ class LinkToRemoteTest < AjaxTestCase end test "basic link_to_remote with :url =>" do - expected = %{Delete this post} + expected = %{Delete this post} assert_equal expected, link_to_remote("Delete this post", :url => "/blog/destroy/4", :update => "#posts") end -- cgit v1.2.3 From 565a696e71606a6e4dfe5b1c7f9fadbce50e04b1 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sat, 23 Jan 2010 14:10:24 -0500 Subject: Removed all helpers from PrototypeHelper that are implemented in AjaxHelper. Modified tests that extended with PrototypeHelper to now extend using AjaxHelper. AjaxHelper is now included by default in view helper --- actionpack/lib/action_view/helpers.rb | 4 +- actionpack/lib/action_view/helpers/ajax_helper.rb | 5 +- .../lib/action_view/helpers/prototype_helper.rb | 446 --------------------- actionpack/test/template/form_helper_test.rb | 8 +- actionpack/test/template/prototype_helper_test.rb | 193 --------- 5 files changed, 10 insertions(+), 646 deletions(-) diff --git a/actionpack/lib/action_view/helpers.rb b/actionpack/lib/action_view/helpers.rb index 3d088678fc..268ea984e3 100644 --- a/actionpack/lib/action_view/helpers.rb +++ b/actionpack/lib/action_view/helpers.rb @@ -15,7 +15,7 @@ module ActionView #:nodoc: autoload :FormTagHelper, 'action_view/helpers/form_tag_helper' autoload :JavaScriptHelper, 'action_view/helpers/javascript_helper' autoload :NumberHelper, 'action_view/helpers/number_helper' - autoload :PrototypeHelper, 'action_view/helpers/prototype_helper' + autoload :AjaxHelper, 'action_view/helpers/ajax_helper' autoload :RawOutputHelper, 'action_view/helpers/raw_output_helper' autoload :RecordIdentificationHelper, 'action_view/helpers/record_identification_helper' autoload :RecordTagHelper, 'action_view/helpers/record_tag_helper' @@ -48,7 +48,7 @@ module ActionView #:nodoc: include FormTagHelper include JavaScriptHelper include NumberHelper - include PrototypeHelper + include AjaxHelper include RawOutputHelper include RecordIdentificationHelper include RecordTagHelper diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 9c1d6a722d..550f7fbbe2 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -1,7 +1,9 @@ module ActionView module Helpers module AjaxHelper - include PrototypeHelper + # Included for backwards compatibility / RJS functionality + # Rails classes should not be aware of individual JS frameworks + include PrototypeHelper def remote_form_for(record_or_name_or_array, *args, &proc) options = args.extract_options! @@ -19,6 +21,7 @@ module ActionView attributes.merge!(options) url = attributes.delete("data-url") + attributes.delete(:builder) form_tag(attributes.delete(:action) || url, attributes, &block) end diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index bef93dd0f8..2bd6afba56 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -27,40 +27,6 @@ module ActionView # ActionView::Helpers::JavaScriptHelper for more information on including # this and other JavaScript files in your Rails templates.) # - # Now you're ready to call a remote action either through a link... - # - # link_to_remote "Add to cart", - # :url => { :action => "add", :id => product.id }, - # :update => { :success => "cart", :failure => "error" } - # - # ...through a form... - # - # <% form_remote_tag :url => '/shipping' do -%> - #
<%= submit_tag 'Recalculate Shipping' %>
- # <% end -%> - # - # ...periodically... - # - # periodically_call_remote(:url => 'update', :frequency => '5', :update => 'ticker') - # - # ...or through an observer (i.e., a form or field that is observed and calls a remote - # action when changed). - # - # <%= observe_field(:searchbox, - # :url => { :action => :live_search }), - # :frequency => 0.5, - # :update => :hits, - # :with => 'query' - # %> - # - # As you can see, there are numerous ways to use Prototype's Ajax functions (and actually more than - # are listed here); check out the documentation for each method to find out more about its usage and options. - # - # === Common Options - # See link_to_remote for documentation of options common to all Ajax - # helpers; any of the options specified by link_to_remote can be used - # by the other helpers. - # # == Designing your Rails actions for Ajax # When building your action handlers (that is, the Rails actions that receive your background requests), it's # important to remember a few things. First, whatever your action would normally return to the browser, it will @@ -116,325 +82,6 @@ module ActionView :form, :with, :update, :script, :type ]).merge(CALLBACKS) end - # Returns a link to a remote action defined by options[:url] - # (using the url_for format) that's called in the background using - # XMLHttpRequest. The result of that request can then be inserted into a - # DOM object whose id can be specified with options[:update]. - # Usually, the result would be a partial prepared by the controller with - # render :partial. - # - # Examples: - # # Generates: Delete this post - # link_to_remote "Delete this post", :update => "posts", - # :url => { :action => "destroy", :id => post.id } - # - # # Generates: Refresh - # link_to_remote(image_tag("refresh"), :update => "emails", - # :url => { :action => "list_emails" }) - # - # You can override the generated HTML options by specifying a hash in - # options[:html]. - # - # link_to_remote "Delete this post", :update => "posts", - # :url => post_url(@post), :method => :delete, - # :html => { :class => "destructive" } - # - # You can also specify a hash for options[:update] to allow for - # easy redirection of output to an other DOM element if a server-side - # error occurs: - # - # Example: - # # Generates: Delete this post - # link_to_remote "Delete this post", - # :url => { :action => "destroy", :id => post.id }, - # :update => { :success => "posts", :failure => "error" } - # - # Optionally, you can use the options[:position] parameter to - # influence how the target DOM element is updated. It must be one of - # :before, :top, :bottom, or :after. - # - # The method used is by default POST. You can also specify GET or you - # can simulate PUT or DELETE over POST. All specified with options[:method] - # - # Example: - # # Generates: Destroy - # link_to_remote "Destroy", :url => person_url(:id => person), :method => :delete - # - # By default, these remote requests are processed asynchronous during - # which various JavaScript callbacks can be triggered (for progress - # indicators and the likes). All callbacks get access to the - # request object, which holds the underlying XMLHttpRequest. - # - # To access the server response, use request.responseText, to - # find out the HTTP status, use request.status. - # - # Example: - # # Generates: hello - # word = 'hello' - # link_to_remote word, - # :url => { :action => "undo", :n => word_counter }, - # :complete => "undoRequestCompleted(request)" - # - # The callbacks that may be specified are (in order): - # - # :loading:: Called when the remote document is being - # loaded with data by the browser. - # :loaded:: Called when the browser has finished loading - # the remote document. - # :interactive:: Called when the user can interact with the - # remote document, even though it has not - # finished loading. - # :success:: Called when the XMLHttpRequest is completed, - # and the HTTP status code is in the 2XX range. - # :failure:: Called when the XMLHttpRequest is completed, - # and the HTTP status code is not in the 2XX - # range. - # :complete:: Called when the XMLHttpRequest is complete - # (fires after success/failure if they are - # present). - # - # You can further refine :success and :failure by - # adding additional callbacks for specific status codes. - # - # Example: - # # Generates: hello - # link_to_remote word, - # :url => { :action => "action" }, - # 404 => "alert('Not found...? Wrong URL...?')", - # :failure => "alert('HTTP Error ' + request.status + '!')" - # - # A status code callback overrides the success/failure handlers if - # present. - # - # If you for some reason or another need synchronous processing (that'll - # block the browser while the request is happening), you can specify - # options[:type] = :synchronous. - # - # You can customize further browser side call logic by passing in - # JavaScript code snippets via some optional parameters. In their order - # of use these are: - # - # :confirm:: Adds confirmation dialog. - # :condition:: Perform remote request conditionally - # by this expression. Use this to - # describe browser-side conditions when - # request should not be initiated. - # :before:: Called before request is initiated. - # :after:: Called immediately after request was - # initiated and before :loading. - # :submit:: Specifies the DOM element ID that's used - # as the parent of the form elements. By - # default this is the current form, but - # it could just as well be the ID of a - # table row or any other DOM element. - # :with:: A JavaScript expression specifying - # the parameters for the XMLHttpRequest. - # Any expressions should return a valid - # URL query string. - # - # Example: - # - # :with => "'name=' + $('name').value" - # - # You can generate a link that uses AJAX in the general case, while - # degrading gracefully to plain link behavior in the absence of - # JavaScript by setting html_options[:href] to an alternate URL. - # Note the extra curly braces around the options hash separate - # it as the second parameter from html_options, the third. - # - # Example: - # link_to_remote "Delete this post", - # { :update => "posts", :url => { :action => "destroy", :id => post.id } }, - # :href => url_for(:action => "destroy", :id => post.id) - def link_to_remote(name, options = {}, html_options = nil) - link_to_function(name, remote_function(options), html_options || options.delete(:html)) - end - - # Creates a button with an onclick event which calls a remote action - # via XMLHttpRequest - # The options for specifying the target with :url - # and defining callbacks is the same as link_to_remote. - def button_to_remote(name, options = {}, html_options = {}) - button_to_function(name, remote_function(options), html_options) - end - - # Periodically calls the specified url (options[:url]) every - # options[:frequency] seconds (default is 10). Usually used to - # update a specified div (options[:update]) with the results - # of the remote call. The options for specifying the target with :url - # and defining callbacks is the same as link_to_remote. - # Examples: - # # Call get_averages and put its results in 'avg' every 10 seconds - # # Generates: - # # new PeriodicalExecuter(function() {new Ajax.Updater('avg', '/grades/get_averages', - # # {asynchronous:true, evalScripts:true})}, 10) - # periodically_call_remote(:url => { :action => 'get_averages' }, :update => 'avg') - # - # # Call invoice every 10 seconds with the id of the customer - # # If it succeeds, update the invoice DIV; if it fails, update the error DIV - # # Generates: - # # new PeriodicalExecuter(function() {new Ajax.Updater({success:'invoice',failure:'error'}, - # # '/testing/invoice/16', {asynchronous:true, evalScripts:true})}, 10) - # periodically_call_remote(:url => { :action => 'invoice', :id => customer.id }, - # :update => { :success => "invoice", :failure => "error" } - # - # # Call update every 20 seconds and update the new_block DIV - # # Generates: - # # new PeriodicalExecuter(function() {new Ajax.Updater('news_block', 'update', {asynchronous:true, evalScripts:true})}, 20) - # periodically_call_remote(:url => 'update', :frequency => '20', :update => 'news_block') - # - def periodically_call_remote(options = {}) - frequency = options[:frequency] || 10 # every ten seconds by default - code = "new PeriodicalExecuter(function() {#{remote_function(options)}}, #{frequency})" - javascript_tag(code) - end - - # Returns a form tag that will submit using XMLHttpRequest in the - # background instead of the regular reloading POST arrangement. Even - # though it's using JavaScript to serialize the form elements, the form - # submission will work just like a regular submission as viewed by the - # receiving side (all elements available in params). The options for - # specifying the target with :url and defining callbacks is the same as - # +link_to_remote+. - # - # A "fall-through" target for browsers that doesn't do JavaScript can be - # specified with the :action/:method options on :html. - # - # Example: - # # Generates: - # #
- # form_remote_tag :html => { :action => - # url_for(:controller => "some", :action => "place") } - # - # The Hash passed to the :html key is equivalent to the options (2nd) - # argument in the FormTagHelper.form_tag method. - # - # By default the fall-through action is the same as the one specified in - # the :url (and the default method is :post). - # - # form_remote_tag also takes a block, like form_tag: - # # Generates: - # #
- # #
- # <% form_remote_tag :url => '/posts' do -%> - #
<%= submit_tag 'Save' %>
- # <% end -%> - def form_remote_tag(options = {}, &block) - options[:form] = true - - options[:html] ||= {} - options[:html][:onsubmit] = - (options[:html][:onsubmit] ? options[:html][:onsubmit] + "; " : "") + - "#{remote_function(options)}; return false;" - - form_tag(options[:html].delete(:action) || url_for(options[:url]), options[:html], &block) - end - - # Creates a form that will submit using XMLHttpRequest in the background - # instead of the regular reloading POST arrangement and a scope around a - # specific resource that is used as a base for questioning about - # values for the fields. - # - # === Resource - # - # Example: - # <% remote_form_for(@post) do |f| %> - # ... - # <% end %> - # - # This will expand to be the same as: - # - # <% remote_form_for :post, @post, :url => post_path(@post), :html => { :method => :put, :class => "edit_post", :id => "edit_post_45" } do |f| %> - # ... - # <% end %> - # - # === Nested Resource - # - # Example: - # <% remote_form_for([@post, @comment]) do |f| %> - # ... - # <% end %> - # - # This will expand to be the same as: - # - # <% remote_form_for :comment, @comment, :url => post_comment_path(@post, @comment), :html => { :method => :put, :class => "edit_comment", :id => "edit_comment_45" } do |f| %> - # ... - # <% end %> - # - # If you don't need to attach a form to a resource, then check out form_remote_tag. - # - # See FormHelper#form_for for additional semantics. - def remote_form_for(record_or_name_or_array, *args, &proc) - options = args.extract_options! - - case record_or_name_or_array - when String, Symbol - object_name = record_or_name_or_array - when Array - object = record_or_name_or_array.last - object_name = ActionController::RecordIdentifier.singular_class_name(object) - apply_form_for_options!(record_or_name_or_array, options) - args.unshift object - else - object = record_or_name_or_array - object_name = ActionController::RecordIdentifier.singular_class_name(record_or_name_or_array) - apply_form_for_options!(object, options) - args.unshift object - end - - concat(form_remote_tag(options)) - fields_for(object_name, *(args << options), &proc) - concat(''.html_safe!) - end - alias_method :form_remote_for, :remote_form_for - - # Returns a button input tag with the element name of +name+ and a value (i.e., display text) of +value+ - # that will submit form using XMLHttpRequest in the background instead of a regular POST request that - # reloads the page. - # - # # Create a button that submits to the create action - # # - # # Generates: - # <%= submit_to_remote 'create_btn', 'Create', :url => { :action => 'create' } %> - # - # # Submit to the remote action update and update the DIV succeed or fail based - # # on the success or failure of the request - # # - # # Generates: - # <%= submit_to_remote 'update_btn', 'Update', :url => { :action => 'update' }, - # :update => { :success => "succeed", :failure => "fail" } - # - # options argument is the same as in form_remote_tag. - def submit_to_remote(name, value, options = {}) - options[:with] ||= 'Form.serialize(this.form)' - - html_options = options.delete(:html) || {} - html_options[:name] = name - - button_to_remote(value, options, html_options) - end - - # Returns 'eval(request.responseText)' which is the JavaScript function - # that +form_remote_tag+ can call in :complete to evaluate a multiple - # update return document using +update_element_function+ calls. - def evaluate_remote_response - "eval(request.responseText)" - end - # Returns the JavaScript needed for a remote function. # Takes the same arguments as link_to_remote. # @@ -476,99 +123,6 @@ module ActionView return function end - # Observes the field with the DOM ID specified by +field_id+ and calls a - # callback when its contents have changed. The default callback is an - # Ajax call. By default the value of the observed field is sent as a - # parameter with the Ajax call. - # - # Example: - # # Generates: new Form.Element.Observer('suggest', 0.25, function(element, value) {new Ajax.Updater('suggest', - # # '/testing/find_suggestion', {asynchronous:true, evalScripts:true, parameters:'q=' + value})}) - # <%= observe_field :suggest, :url => { :action => :find_suggestion }, - # :frequency => 0.25, - # :update => :suggest, - # :with => 'q' - # %> - # - # Required +options+ are either of: - # :url:: +url_for+-style options for the action to call - # when the field has changed. - # :function:: Instead of making a remote call to a URL, you - # can specify javascript code to be called instead. - # Note that the value of this option is used as the - # *body* of the javascript function, a function definition - # with parameters named element and value will be generated for you - # for example: - # observe_field("glass", :frequency => 1, :function => "alert('Element changed')") - # will generate: - # new Form.Element.Observer('glass', 1, function(element, value) {alert('Element changed')}) - # The element parameter is the DOM element being observed, and the value is its value at the - # time the observer is triggered. - # - # Additional options are: - # :frequency:: The frequency (in seconds) at which changes to - # this field will be detected. Not setting this - # option at all or to a value equal to or less than - # zero will use event based observation instead of - # time based observation. - # :update:: Specifies the DOM ID of the element whose - # innerHTML should be updated with the - # XMLHttpRequest response text. - # :with:: A JavaScript expression specifying the parameters - # for the XMLHttpRequest. The default is to send the - # key and value of the observed field. Any custom - # expressions should return a valid URL query string. - # The value of the field is stored in the JavaScript - # variable +value+. - # - # Examples - # - # :with => "'my_custom_key=' + value" - # :with => "'person[name]=' + prompt('New name')" - # :with => "Form.Element.serialize('other-field')" - # - # Finally - # :with => 'name' - # is shorthand for - # :with => "'name=' + value" - # This essentially just changes the key of the parameter. - # - # Additionally, you may specify any of the options documented in the - # Common options section at the top of this document. - # - # Example: - # - # # Sends params: {:title => 'Title of the book'} when the book_title input - # # field is changed. - # observe_field 'book_title', - # :url => 'http://example.com/books/edit/1', - # :with => 'title' - # - # - def observe_field(field_id, options = {}) - if options[:frequency] && options[:frequency] > 0 - build_observer('Form.Element.Observer', field_id, options) - else - build_observer('Form.Element.EventObserver', field_id, options) - end - end - - # Observes the form with the DOM ID specified by +form_id+ and calls a - # callback when its contents have changed. The default callback is an - # Ajax call. By default all fields of the observed field are sent as - # parameters with the Ajax call. - # - # The +options+ for +observe_form+ are the same as the options for - # +observe_field+. The JavaScript variable +value+ available to the - # :with option is set to the serialized form by default. - def observe_form(form_id, options = {}) - if options[:frequency] - build_observer('Form.Observer', form_id, options) - else - build_observer('Form.EventObserver', form_id, options) - end - end - # All the methods were moved to GeneratorMethods so that # #include_helpers_from_context has nothing to overwrite. class JavaScriptGenerator #:nodoc: diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 0c5c5d17ee..147d3dc05d 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -1232,7 +1232,7 @@ class FormHelperTest < ActionView::TestCase # Perhaps this test should be moved to prototype helper tests. def test_remote_form_for_with_labelled_builder - self.extend ActionView::Helpers::PrototypeHelper + self.extend ActionView::Helpers::AjaxHelper remote_form_for(:post, @post, :builder => LabelledFormBuilder) do |f| concat f.text_field(:title) @@ -1241,7 +1241,7 @@ class FormHelperTest < ActionView::TestCase end expected = - %(
) + + %() + "
" + "
" + "
" + @@ -1397,10 +1397,10 @@ class FormHelperTest < ActionView::TestCase end def test_remote_form_for_with_html_options_adds_options_to_form_tag - self.extend ActionView::Helpers::PrototypeHelper + self.extend ActionView::Helpers::AjaxHelper remote_form_for(:post, @post, :html => {:id => 'some_form', :class => 'some_class'}) do |f| end - expected = "
" + expected = "
" assert_dom_equal expected, output_buffer end diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb index 9225153798..86f9c231c0 100644 --- a/actionpack/test/template/prototype_helper_test.rb +++ b/actionpack/test/template/prototype_helper_test.rb @@ -82,199 +82,6 @@ class PrototypeHelperTest < PrototypeHelperBaseTest super end - def test_link_to_remote - assert_dom_equal %(Remote outauthor), - link_to_remote("Remote outauthor", { :url => { :action => "whatnot" }}, { :class => "fine" }) - assert_dom_equal %(Remote outauthor), - link_to_remote("Remote outauthor", :complete => "alert(request.responseText)", :url => { :action => "whatnot" }) - assert_dom_equal %(Remote outauthor), - link_to_remote("Remote outauthor", :success => "alert(request.responseText)", :url => { :action => "whatnot" }) - assert_dom_equal %(Remote outauthor), - link_to_remote("Remote outauthor", :failure => "alert(request.responseText)", :url => { :action => "whatnot" }) - assert_dom_equal %(Remote outauthor), - link_to_remote("Remote outauthor", :failure => "alert(request.responseText)", :url => { :action => "whatnot", :a => '10', :b => '20' }) - assert_dom_equal %(Remote outauthor), - link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :type => :synchronous) - assert_dom_equal %(Remote outauthor), - link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :position => :bottom) - end - - def test_link_to_remote_html_options - assert_dom_equal %(Remote outauthor), - link_to_remote("Remote outauthor", { :url => { :action => "whatnot" }, :html => { :class => "fine" } }) - end - - def test_link_to_remote_url_quote_escaping - assert_dom_equal %(Remote), - link_to_remote("Remote", { :url => { :action => "whatnot's" } }) - end - - def test_button_to_remote - assert_dom_equal %(), - button_to_remote("Remote outpost", { :url => { :action => "whatnot" }}, { :class => "fine" }) - assert_dom_equal %(), - button_to_remote("Remote outpost", :complete => "alert(request.reponseText)", :url => { :action => "whatnot" }) - assert_dom_equal %(), - button_to_remote("Remote outpost", :success => "alert(request.reponseText)", :url => { :action => "whatnot" }) - assert_dom_equal %(), - button_to_remote("Remote outpost", :failure => "alert(request.reponseText)", :url => { :action => "whatnot" }) - assert_dom_equal %(), - button_to_remote("Remote outpost", :failure => "alert(request.reponseText)", :url => { :action => "whatnot", :a => '10', :b => '20' }) - end - - def test_periodically_call_remote - assert_dom_equal %(), - periodically_call_remote(:update => "schremser_bier", :url => { :action => "mehr_bier" }) - end - - def test_periodically_call_remote_with_frequency - assert_dom_equal( - "", - periodically_call_remote(:frequency => 2) - ) - end - - def test_form_remote_tag - assert_dom_equal %(
), - form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }) - assert_dom_equal %(), - form_remote_tag(:update => { :success => "glass_of_beer" }, :url => { :action => :fast }) - assert_dom_equal %(), - form_remote_tag(:update => { :failure => "glass_of_water" }, :url => { :action => :fast }) - assert_dom_equal %(), - form_remote_tag(:update => { :success => 'glass_of_beer', :failure => "glass_of_water" }, :url => { :action => :fast }) - end - - def test_form_remote_tag_with_method - assert_dom_equal %(
), - form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, :html => { :method => :put }) - end - - def test_form_remote_tag_with_block_in_erb - __in_erb_template = '' - form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }) { concat "Hello world!" } - assert_dom_equal %(Hello world!
), output_buffer - end - - def test_remote_form_for_with_record_identification_with_new_record - remote_form_for(@record, {:html => { :id => 'create-author' }}) {} - - expected = %(
) - assert_dom_equal expected, output_buffer - end - - def test_remote_form_for_with_record_identification_without_html_options - remote_form_for(@record) {} - - expected = %(
) - assert_dom_equal expected, output_buffer - end - - def test_remote_form_for_with_record_identification_with_existing_record - @record.save - remote_form_for(@record) {} - - expected = %(
) - assert_dom_equal expected, output_buffer - end - - def test_remote_form_for_with_new_object_in_list - remote_form_for([@author, @article]) {} - - expected = %(
) - assert_dom_equal expected, output_buffer - end - - def test_remote_form_for_with_existing_object_in_list - @author.save - @article.save - remote_form_for([@author, @article]) {} - - expected = %(
) - assert_dom_equal expected, output_buffer - end - - def test_on_callbacks - callbacks = [:uninitialized, :loading, :loaded, :interactive, :complete, :success, :failure] - callbacks.each do |callback| - assert_dom_equal %(
), - form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, callback=>"monkeys();") - assert_dom_equal %(), - form_remote_tag(:update => { :success => "glass_of_beer" }, :url => { :action => :fast }, callback=>"monkeys();") - assert_dom_equal %(), - form_remote_tag(:update => { :failure => "glass_of_beer" }, :url => { :action => :fast }, callback=>"monkeys();") - assert_dom_equal %(), - form_remote_tag(:update => { :success => "glass_of_beer", :failure => "glass_of_water" }, :url => { :action => :fast }, callback=>"monkeys();") - end - - #HTTP status codes 200 up to 599 have callbacks - #these should work - 100.upto(599) do |callback| - assert_dom_equal %(), - form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, callback=>"monkeys();") - end - - #test 200 and 404 - assert_dom_equal %(), - form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, 200=>"monkeys();", 404=>"bananas();") - - #these shouldn't - 1.upto(99) do |callback| - assert_dom_equal %(), - form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, callback=>"monkeys();") - end - 600.upto(999) do |callback| - assert_dom_equal %(), - form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, callback=>"monkeys();") - end - - #test ultimate combo - assert_dom_equal %(), - form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, :loading => "c1()", :success => "s()", :failure => "f();", :complete => "c();", 200=>"monkeys();", 404=>"bananas();") - - end - - def test_submit_to_remote - assert_dom_equal %(), - submit_to_remote("More beer!", 1_000_000, :update => "empty_bottle") - end - - def test_observe_field - assert_dom_equal %(), - observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }) - end - - def test_observe_field_using_with_option - expected = %() - assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => 'id') - assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "'id=' + encodeURIComponent(value)") - end - - def test_observe_field_using_json_in_with_option - expected = %() - assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "{'id':value}") - end - - def test_observe_field_using_function_for_callback - assert_dom_equal %(), - observe_field("glass", :frequency => 5.minutes, :function => "alert('Element changed')") - end - - def test_observe_form - assert_dom_equal %(), - observe_form("cart", :frequency => 2, :url => { :action => "cart_changed" }) - end - - def test_observe_form_using_function_for_callback - assert_dom_equal %(), - observe_form("cart", :frequency => 2, :function => "alert('Form changed')") - end - - def test_observe_field_without_frequency - assert_dom_equal %(), - observe_field("glass") - end - def test_update_page old_output_buffer = output_buffer -- cgit v1.2.3 From d8343a6ad7d6bffb88a075cb9e575d85e098e4b1 Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Sat, 23 Jan 2010 15:33:05 -0500 Subject: restructure compatibility module so it is no longer a child --- actionpack/lib/action_view/helpers.rb | 4 +- actionpack/lib/action_view/helpers/ajax_helper.rb | 47 ++++++++++++---------- .../lib/action_view/helpers/javascript_helper.rb | 2 +- 3 files changed, 28 insertions(+), 25 deletions(-) diff --git a/actionpack/lib/action_view/helpers.rb b/actionpack/lib/action_view/helpers.rb index 268ea984e3..215a697cce 100644 --- a/actionpack/lib/action_view/helpers.rb +++ b/actionpack/lib/action_view/helpers.rb @@ -3,7 +3,7 @@ require 'active_support/benchmarkable' module ActionView #:nodoc: module Helpers #:nodoc: autoload :ActiveModelHelper, 'action_view/helpers/active_model_helper' - autoload :AjaxHelper, 'action_view/helpers/ajax_helper' + autoload :AjaxHelperCompat, 'action_view/helpers/ajax_helper' autoload :AssetTagHelper, 'action_view/helpers/asset_tag_helper' autoload :AtomFeedHelper, 'action_view/helpers/atom_feed_helper' autoload :CacheHelper, 'action_view/helpers/cache_helper' @@ -48,7 +48,7 @@ module ActionView #:nodoc: include FormTagHelper include JavaScriptHelper include NumberHelper - include AjaxHelper + include AjaxHelperCompat include RawOutputHelper include RecordIdentificationHelper include RecordTagHelper diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 550f7fbbe2..ab4f5d53e9 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -154,34 +154,37 @@ module ActionView def create_js_function(statements, *arguments) "function(#{arguments.join(", ")}) {#{statements}}" end + end - # TODO: All evaled goes here per wycat - module Rails2Compatibility - def set_callbacks(options, html) - [:complete, :failure, :success, :interactive, :loaded, :loading].each do |type| - html["data-#{type}-code"] = options.delete(type.to_sym) - end + # TODO: All evaled goes here per wycat + module AjaxHelperCompat + include AjaxHelper - options.each do |option, value| - if option.is_a?(Integer) - html["data-#{option}-code"] = options.delete(option) - end - end + def set_callbacks(options, html) + [:complete, :failure, :success, :interactive, :loaded, :loading].each do |type| + html["data-#{type}-code"] = options.delete(type.to_sym) end - - def link_to_remote(name, url, options = nil) - if !options && url.is_a?(Hash) && url.key?(:url) - url, options = url.delete(:url), url + + options.each do |option, value| + if option.is_a?(Integer) + html["data-#{option}-code"] = options.delete(option) end - set_callbacks(options, options[:html] ||= {}) - - super end - - def button_to_remote(name, options = {}, html_options = {}) - set_callbacks(options, html_options) - super + end + + def link_to_remote(name, url, options = nil) + if !options && url.is_a?(Hash) && url.key?(:url) + url, options = url.delete(:url), url end + set_callbacks(options, options[:html] ||= {}) + + super + end + + def button_to_remote(name, options = {}, html_options = {}) + html_options.merge!(:testing => true) + set_callbacks(options, html_options) + super end end end diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index 9f6ec28a9e..adb35ccfa2 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -39,7 +39,7 @@ module ActionView JAVASCRIPT_PATH = File.join(File.dirname(__FILE__), 'javascripts') end - include AjaxHelper::Rails2Compatibility + include AjaxHelperCompat # Returns a link of the given +name+ that will trigger a JavaScript +function+ using the # onclick handler and return false after the fact. -- cgit v1.2.3 From 20c6c71e6a998a3157e2545e834e3d678d231ec5 Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Sat, 23 Jan 2010 15:34:17 -0500 Subject: oops, remove test code --- actionpack/lib/action_view/helpers/ajax_helper.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index ab4f5d53e9..02b2588c42 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -182,7 +182,6 @@ module ActionView end def button_to_remote(name, options = {}, html_options = {}) - html_options.merge!(:testing => true) set_callbacks(options, html_options) super end -- cgit v1.2.3 From 255066b6c7a5877de20e9aef9b58f886c7e66e13 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Sat, 23 Jan 2010 14:41:08 -0600 Subject: first round of documenation for ujs --- actionpack/lib/action_view/helpers/ajax_helper.rb | 404 +++++++++++++++++++++- 1 file changed, 401 insertions(+), 3 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 02b2588c42..54915e3c89 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -5,6 +5,55 @@ module ActionView # Rails classes should not be aware of individual JS frameworks include PrototypeHelper + # Creates a form that will submit using XMLHttpRequest in the background + # instead of the regular reloading POST arrangement and a scope around a + # specific resource that is used as a base for questioning about + # values for the fields. + # + # === Resource + # + # Example: + # + # # Generates: + # # ... + # # + # <% remote_form_for(@post) do |f| %> + # ... + # <% end %> + # + # This will expand to be the same as: + # + # <% remote_form_for :post, @post, :url => post_path(@post), :html => { :method => :put, :class => "edit_post", :id => "edit_post_45" } do |f| %> + # ... + # <% end %> + # + # === Nested Resource + # + # Example: + # # Generates: + # # ... + # # + # <% remote_form_for([@post, @comment]) do |f| %> + # ... + # <% end %> + # + # This will expand to be the same as: + # + # <% remote_form_for :comment, @comment, :url => post_comment_path(@post, @comment), :html => { :method => :put, :class => "edit_comment", :id => "edit_comment_45" } do |f| %> + # ... + # <% end %> + # + # If you don't need to attach a form to a resource, then check out form_remote_tag. + # + # See FormHelper#form_for for additional semantics. def remote_form_for(record_or_name_or_array, *args, &proc) options = args.extract_options! object_name = extract_object_name_for_form!(args, options, record_or_name_or_array) @@ -15,6 +64,46 @@ module ActionView end alias_method :form_remote_for, :remote_form_for + # Returns a form tag that will submit using XMLHttpRequest in the + # background instead of the regular reloading POST arrangement. Even + # though it's using JavaScript to serialize the form elements, the form + # submission will work just like a regular submission as viewed by the + # receiving side (all elements available in params). The options for + # specifying the target with :url and defining callbacks is the same as + # +link_to_remote+. + # + # A "fall-through" target for browsers that doesn't do JavaScript can be + # specified with the :action/:method options on :html. + # + # Example: + # + # # Generates: + # # ... + # # + # form_remote_tag :html => { :action => + # url_for(:controller => "some", :action => "place") } + # < form data-remote action="/some/place" method="post" > + # + # The Hash passed to the :html key is equivalent to the options (2nd) + # argument in the FormTagHelper.form_tag method. + # + # By default the fall-through action is the same as the one specified in + # the :url (and the default method is :post). + # + # form_remote_tag also takes a block, like form_tag: + # # Generates: + # # + # #
+ # # + # # + # <% form_remote_tag :url => '/posts' do -%> + #
<%= submit_tag 'Save' %>
+ # <% end -%> + def form_remote_tag(options = {}, &block) attributes = {} attributes.merge!(extract_remote_attributes!(options)) @@ -25,6 +114,179 @@ module ActionView form_tag(attributes.delete(:action) || url, attributes, &block) end + # Returns a link to a remote action defined by options[:url] + # (using the url_for format) that's called in the background using + # XMLHttpRequest. The result of that request can then be inserted into a + # DOM object whose id can be specified with options[:update]. + # Usually, the result would be a partial prepared by the controller with + # render :partial. + # + # Examples: + # + # # Generates: + # # Delete this post + # # + # link_to_remote "Delete this post", :update => "posts", + # :url => { :action => "destroy", :id => post.id } + # + # # Generates: + # # + # # + # # + # link_to_remote(image_tag("refresh"), :update => "emails", + # :url => { :action => "list_emails" }) + # + # You can override the generated HTML options by specifying a hash in + # options[:html]. + # + # # Generates: + # # Delete this post + # # + # link_to_remote "Delete this post", :update => "posts", + # :url => post_url(@post), :method => :delete, + # :html => { :class => "destructive" } + # + # You can also specify a hash for options[:update] to allow for + # easy redirection of output to an other DOM element if a server-side + # error occurs: + # + # Example: + # # Generates: + # # Delete this post + # # + # link_to_remote "Delete this post", + # :url => { :action => "destroy", :id => post.id }, + # :update => { :success => "posts", :failure => "error" } + # + # Optionally, you can use the options[:position] parameter to + # influence how the target DOM element is updated. It must be one of + # :before, :top, :bottom, or :after. + # + # The method used is by default POST. You can also specify GET or you + # can simulate PUT or DELETE over POST. All specified with options[:method] + # + # Example: + # # Generates: + # # Destroy + # # + # link_to_remote "Destroy", :url => person_url(:id => person), :method => :delete + # + # By default, these remote requests are processed asynchronous during + # which various JavaScript callbacks can be triggered (for progress + # indicators and the likes). All callbacks get access to the + # request object, which holds the underlying XMLHttpRequest. + # + # To access the server response, use request.responseText, to + # find out the HTTP status, use request.status. + # + # Example: + # # Generates: + # # hello + # # + # word = 'hello' + # link_to_remote word, + # :url => { :action => "undo", :n => word_counter }, + # :complete => "undoRequestCompleted(request)" + # + # The callbacks that may be specified are (in order): (deprecated) + # + # :loading:: Called when the remote document is being + # loaded with data by the browser. + # :loaded:: Called when the browser has finished loading + # the remote document. + # :interactive:: Called when the user can interact with the + # remote document, even though it has not + # finished loading. + # :success:: Called when the XMLHttpRequest is completed, + # and the HTTP status code is in the 2XX range. + # :failure:: Called when the XMLHttpRequest is completed, + # and the HTTP status code is not in the 2XX + # range. + # :complete:: Called when the XMLHttpRequest is complete + # (fires after success/failure if they are + # present). + # + # You can further refine :success and :failure by + # adding additional callbacks for specific status codes. + # + # Example: + # + # # Generates: + # # Hello + # # + # link_to_remote word, + # :url => { :action => "action" }, + # 404 => "alert('Not found...? Wrong URL...?')", + # :failure => "alert('HTTP Error ' + request.status + '!')" + # + # A status code callback overrides the success/failure handlers if + # present. + # + # If you for some reason or another need synchronous processing (that'll + # block the browser while the request is happening), you can specify + # options[:type] = :synchronous. + # + # You can customize further browser side call logic by passing in + # JavaScript code snippets via some optional parameters. In their order + # of use these are: + # + # :confirm:: Adds confirmation dialog. + # :condition:: Perform remote request conditionally + # by this expression. Use this to + # describe browser-side conditions when + # request should not be initiated. + # :before:: Called before request is initiated. + # :after:: Called immediately after request was + # initiated and before :loading. + # :submit:: Specifies the DOM element ID that's used + # as the parent of the form elements. By + # default this is the current form, but + # it could just as well be the ID of a + # table row or any other DOM element. + # :with:: A JavaScript expression specifying + # the parameters for the XMLHttpRequest. + # Any expressions should return a valid + # URL query string. + # + # Example: + # + # :with => "'name=' + $('name').value" + # + # You can generate a link that uses AJAX in the general case, while + # degrading gracefully to plain link behavior in the absence of + # JavaScript by setting html_options[:href] to an alternate URL. + # Note the extra curly braces around the options hash separate + # it as the second parameter from html_options, the third. + # + # Example: + # + # # Generates: + # # Delete this post + # # + # link_to_remote "Delete this post", + # { :update => "posts", :url => { :action => "destroy", :id => post.id } }, + # :href => url_for(:action => "destroy", :id => post.id) def link_to_remote(name, url, options = {}) attributes = {} attributes.merge!(extract_remote_attributes!(options)) @@ -33,7 +295,11 @@ module ActionView url = url_for(url) if url.is_a?(Hash) content_tag(:a, name, attributes.merge(:href => url)) end - + + # Creates a button with an onclick event which calls a remote action + # via XMLHttpRequest + # The options for specifying the target with :url + # and defining callbacks is the same as link_to_remote. def button_to_remote(name, options = {}, html_options = {}) attributes = html_options.merge!(:type => "button", :value => name) attributes.merge!(extract_remote_attributes!(options)) @@ -42,6 +308,37 @@ module ActionView tag(:input, attributes) end + # Returns a button input tag with the element name of +name+ and a value (i.e., display text) of +value+ + # that will submit form using XMLHttpRequest in the background instead of a regular POST request that + # reloads the page. + # + # # Create a button that submits to the create action + # # + # # Generates: + # # + # # + # <%= submit_to_remote 'create_btn', 'Create', :url => { :action => 'create' } %> + # + # # Submit to the remote action update and update the DIV succeed or fail based + # # on the success or failure of the request + # # + # # Generates: + # # + # # + # <%= submit_to_remote 'update_btn', 'Update', :url => { :action => 'update' }, + # :update => { :success => "succeed", :failure => "fail" } + # + # options argument is the same as in form_remote_tag. def submit_to_remote(name, value, options = {}) html_options = options.delete(:html) || {} html_options.merge!(:name => name, :value => value, :type => "submit") @@ -52,6 +349,31 @@ module ActionView tag(:input, attributes) end + # Periodically calls the specified url (options[:url]) every + # options[:frequency] seconds (default is 10). Usually used to + # update a specified div (options[:update]) with the results + # of the remote call. The options for specifying the target with :url + # and defining callbacks is the same as link_to_remote. + # Examples: + # # Call get_averages and put its results in 'avg' every 10 seconds + # # Generates: + # # new PeriodicalExecuter(function() {new Ajax.Updater('avg', '/grades/get_averages', + # # {asynchronous:true, evalScripts:true})}, 10) + # periodically_call_remote(:url => { :action => 'get_averages' }, :update => 'avg') + # + # # Call invoice every 10 seconds with the id of the customer + # # If it succeeds, update the invoice DIV; if it fails, update the error DIV + # # Generates: + # # new PeriodicalExecuter(function() {new Ajax.Updater({success:'invoice',failure:'error'}, + # # '/testing/invoice/16', {asynchronous:true, evalScripts:true})}, 10) + # periodically_call_remote(:url => { :action => 'invoice', :id => customer.id }, + # :update => { :success => "invoice", :failure => "error" } + # + # # Call update every 20 seconds and update the new_block DIV + # # Generates: + # # new PeriodicalExecuter(function() {new Ajax.Updater('news_block', 'update', {asynchronous:true, evalScripts:true})}, 20) + # periodically_call_remote(:url => 'update', :frequency => '20', :update => 'news_block') + # def periodically_call_remote(options = {}) attributes = extract_observer_attributes!(options) attributes["data-js-type"] = "periodical_executer" @@ -59,14 +381,90 @@ module ActionView script_decorator(attributes) end - #TODO: Should name change to a css query? - BR + # Observes the field with the DOM ID specified by +field_id+ and calls a + # callback when its contents have changed. The default callback is an + # Ajax call. By default the value of the observed field is sent as a + # parameter with the Ajax call. + # + # Example: + # # Generates: new Form.Element.Observer('suggest', 0.25, function(element, value) {new Ajax.Updater('suggest', + # # '/testing/find_suggestion', {asynchronous:true, evalScripts:true, parameters:'q=' + value})}) + # <%= observe_field :suggest, :url => { :action => :find_suggestion }, + # :frequency => 0.25, + # :update => :suggest, + # :with => 'q' + # %> + # + # Required +options+ are either of: + # :url:: +url_for+-style options for the action to call + # when the field has changed. + # :function:: Instead of making a remote call to a URL, you + # can specify javascript code to be called instead. + # Note that the value of this option is used as the + # *body* of the javascript function, a function definition + # with parameters named element and value will be generated for you + # for example: + # observe_field("glass", :frequency => 1, :function => "alert('Element changed')") + # will generate: + # new Form.Element.Observer('glass', 1, function(element, value) {alert('Element changed')}) + # The element parameter is the DOM element being observed, and the value is its value at the + # time the observer is triggered. + # + # Additional options are: + # :frequency:: The frequency (in seconds) at which changes to + # this field will be detected. Not setting this + # option at all or to a value equal to or less than + # zero will use event based observation instead of + # time based observation. + # :update:: Specifies the DOM ID of the element whose + # innerHTML should be updated with the + # XMLHttpRequest response text. + # :with:: A JavaScript expression specifying the parameters + # for the XMLHttpRequest. The default is to send the + # key and value of the observed field. Any custom + # expressions should return a valid URL query string. + # The value of the field is stored in the JavaScript + # variable +value+. + # + # Examples + # + # :with => "'my_custom_key=' + value" + # :with => "'person[name]=' + prompt('New name')" + # :with => "Form.Element.serialize('other-field')" + # + # Finally + # :with => 'name' + # is shorthand for + # :with => "'name=' + value" + # This essentially just changes the key of the parameter. + # + # Additionally, you may specify any of the options documented in the + # Common options section at the top of this document. + # + # Example: + # + # # Sends params: {:title => 'Title of the book'} when the book_title input + # # field is changed. + # observe_field 'book_title', + # :url => 'http://example.com/books/edit/1', + # :with => 'title' + # + # def observe_field(name, options = {}) options[:observed] = name attributes = extract_observer_attributes!(options) script_decorator(attributes) end - + + # Observes the form with the DOM ID specified by +form_id+ and calls a + # callback when its contents have changed. The default callback is an + # Ajax call. By default all fields of the observed field are sent as + # parameters with the Ajax call. + # + # The +options+ for +observe_form+ are the same as the options for + # +observe_field+. The JavaScript variable +value+ available to the + # :with option is set to the serialized form by default. def observe_form(name, options = {}) options[:observed] = name attributes = extract_observer_attributes!(options) -- cgit v1.2.3 From 7bf5aef907a90a9896c05ae3c6ed371a70aa6b8f Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sat, 23 Jan 2010 16:10:44 -0500 Subject: fixed current tests that were failing do to module location change, this is temporary to fix state of repo till all the new tests are complete --- actionpack/lib/action_view/helpers/ajax_helper.rb | 2 ++ actionpack/test/template/ajax_helper_test.rb | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 54915e3c89..6f7f3750bc 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -574,6 +574,8 @@ module ActionView if !options && url.is_a?(Hash) && url.key?(:url) url, options = url.delete(:url), url end + options = {} if options.nil? + set_callbacks(options, options[:html] ||= {}) super diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index 80d1f42327..4ca130d010 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -1,7 +1,6 @@ require "abstract_unit" class AjaxTestCase < ActiveSupport::TestCase - include ActionView::Helpers::AjaxHelper include ActionView::Helpers::TagHelper def url_for(url) @@ -34,6 +33,8 @@ class AjaxTestCase < ActiveSupport::TestCase end class LinkToRemoteTest < AjaxTestCase + include ActionView::Helpers::AjaxHelperCompat + def link(options = {}) link_to_remote("Delete this post", "/blog/destroy/3", options) end @@ -79,7 +80,7 @@ class LinkToRemoteTest < AjaxTestCase end class LegacyLinkToRemoteTest < AjaxTestCase - include ActionView::Helpers::AjaxHelper::Rails2Compatibility + include ActionView::Helpers::AjaxHelperCompat def link(options) link_to_remote("Delete this post", "/blog/destroy/3", options) @@ -98,6 +99,8 @@ class LinkToRemoteTest < AjaxTestCase end class ButtonToRemoteTest < AjaxTestCase + include ActionView::Helpers::AjaxHelperCompat + def button(options, html = {}) button_to_remote("Remote outpost", options, html) end @@ -110,7 +113,7 @@ class ButtonToRemoteTest < AjaxTestCase end class LegacyButtonToRemoteTest < ButtonToRemoteTest - include ActionView::Helpers::AjaxHelper::Rails2Compatibility + include ActionView::Helpers::AjaxHelperCompat assert_callbacks_work do |callback| button(callback => "undoRequestCompleted(request)") @@ -119,6 +122,8 @@ class ButtonToRemoteTest < AjaxTestCase end class ObserveFieldTest < AjaxTestCase + include ActionView::Helpers::AjaxHelperCompat + def url_for(hash) "/blog/update" end -- cgit v1.2.3 From 37ad57596b7afdf38be443f06130b736539dd2af Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Sat, 23 Jan 2010 19:45:01 -0500 Subject: port existing test suite to check for new output, and fix all breaking tests --- actionpack/lib/action_view/helpers/ajax_helper.rb | 86 +++--- actionpack/test/template/ajax_helper_test.rb | 344 ++++++++++++++-------- 2 files changed, 268 insertions(+), 162 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 6f7f3750bc..7d164929f0 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -105,13 +105,15 @@ module ActionView # <% end -%> def form_remote_tag(options = {}, &block) + html_options = options.delete(:callbacks) + attributes = {} attributes.merge!(extract_remote_attributes!(options)) + attributes.merge!(html_options) if html_options attributes.merge!(options) - - url = attributes.delete("data-url") attributes.delete(:builder) - form_tag(attributes.delete(:action) || url, attributes, &block) + + form_tag(attributes.delete(:action) || attributes.delete("data-url"), attributes, &block) end # Returns a link to a remote action defined by options[:url] @@ -287,13 +289,12 @@ module ActionView # link_to_remote "Delete this post", # { :update => "posts", :url => { :action => "destroy", :id => post.id } }, # :href => url_for(:action => "destroy", :id => post.id) - def link_to_remote(name, url, options = {}) + def link_to_remote(name, options, html_options = {}) attributes = {} attributes.merge!(extract_remote_attributes!(options)) - attributes.merge!(options) + attributes.merge!(html_options) - url = url_for(url) if url.is_a?(Hash) - content_tag(:a, name, attributes.merge(:href => url)) + content_tag(:a, name, attributes.merge(:href => "#")) end # Creates a button with an onclick event which calls a remote action @@ -303,7 +304,6 @@ module ActionView def button_to_remote(name, options = {}, html_options = {}) attributes = html_options.merge!(:type => "button", :value => name) attributes.merge!(extract_remote_attributes!(options)) - attributes.merge!(extract_request_attributes!(options)) tag(:input, attributes) end @@ -341,10 +341,12 @@ module ActionView # options argument is the same as in form_remote_tag. def submit_to_remote(name, value, options = {}) html_options = options.delete(:html) || {} - html_options.merge!(:name => name, :value => value, :type => "submit") + html_options.merge!(:name => name, :value => value, :type => "button") attributes = extract_remote_attributes!(options) attributes.merge!(html_options) + attributes["data-submit"] = true + attributes.delete("data-remote") tag(:input, attributes) end @@ -376,7 +378,7 @@ module ActionView # def periodically_call_remote(options = {}) attributes = extract_observer_attributes!(options) - attributes["data-js-type"] = "periodical_executer" + attributes["data-periodical"] = true script_decorator(attributes) end @@ -493,9 +495,11 @@ module ActionView def extract_request_attributes!(options) attributes = {} attributes["data-method"] = options.delete(:method) + attributes["data-remote-type"] = options.delete(:type) - url = options.delete(:url) - attributes["data-url"] = url.is_a?(Hash) ? url_for(url) : url + url_options = options.delete(:url) + url_options = url_options.merge(:escape => false) if url_options.is_a?(Hash) + attributes["data-url"] = escape_javascript(url_for(url_options)) #TODO: Remove all references to prototype - BR if options.delete(:form) @@ -528,18 +532,16 @@ module ActionView end def extract_observer_attributes!(options) + callback = options.delete(:function) + frequency = options.delete(:frequency) + + attributes = extract_remote_attributes!(options) attributes["data-observe"] = true attributes["data-observed"] = options.delete(:observed) - - callback = options.delete(:function) - frequency = options.delete(:frequency) - if callback - attributes["data-observer-code"] = create_js_function(callback, "element", "value") - end - if frequency && frequency != 0 - attributes["data-frequency"] = frequency.to_i - end + attributes["data-onobserve"] = create_js_function(callback, "element", "value") if callback + attributes["data-frequency"] = frequency.to_i if frequency && frequency != 0 + attributes.delete("data-remote") purge_unused_attributes!(attributes) end @@ -558,26 +560,8 @@ module ActionView module AjaxHelperCompat include AjaxHelper - def set_callbacks(options, html) - [:complete, :failure, :success, :interactive, :loaded, :loading].each do |type| - html["data-#{type}-code"] = options.delete(type.to_sym) - end - - options.each do |option, value| - if option.is_a?(Integer) - html["data-#{option}-code"] = options.delete(option) - end - end - end - - def link_to_remote(name, url, options = nil) - if !options && url.is_a?(Hash) && url.key?(:url) - url, options = url.delete(:url), url - end - options = {} if options.nil? - - set_callbacks(options, options[:html] ||= {}) - + def link_to_remote(name, options, html_options = {}) + set_callbacks(options, html_options) super end @@ -585,6 +569,26 @@ module ActionView set_callbacks(options, html_options) super end + + def form_remote_tag(options, &block) + html = {} + set_callbacks(options, html) + options.merge!(:callbacks => html) + super + end + + private + def set_callbacks(options, html) + [:uninitialized, :complete, :failure, :success, :interactive, :loaded, :loading].each do |type| + html["data-on#{type}"] = options.delete(type.to_sym) + end + + options.each do |option, value| + if option.is_a?(Integer) + html["data-on#{option}"] = options.delete(option) + end + end + end end end end diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index 4ca130d010..cb28448913 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -1,179 +1,281 @@ -require "abstract_unit" - -class AjaxTestCase < ActiveSupport::TestCase - include ActionView::Helpers::TagHelper - - def url_for(url) - case url - when Hash - "/url/hash" - when String - url - else - raise TypeError.new("Unsupported url type (#{url.class}) for this test helper") - end +require 'abstract_unit' +require 'active_model' + +class Author + extend ActiveModel::Naming + include ActiveModel::Conversion + + attr_reader :id + def save; @id = 1 end + def new_record?; @id.nil? end + def name + @id.nil? ? 'new author' : "author ##{@id}" end +end - def assert_html(html, matches) - matches.each do |match| - assert_match(Regexp.new(Regexp.escape(match)), html) - end +class Article + extend ActiveModel::Naming + include ActiveModel::Conversion + attr_reader :id + attr_reader :author_id + def save; @id = 1; @author_id = 1 end + def new_record?; @id.nil? end + def name + @id.nil? ? 'new article' : "article ##{@id}" end +end + +class AjaxHelperBaseTest < ActionView::TestCase + attr_accessor :formats, :output_buffer - def self.assert_callbacks_work(&blk) - define_method(:assert_callbacks_work, &blk) + def reset_formats(format) + @format = format + end - [:complete, :failure, :success, :interactive, :loaded, :loading, 404].each do |callback| - test "#{callback} callback" do - markup = assert_callbacks_work(callback) - assert_html markup, %W(data-#{callback}-code="undoRequestCompleted\(request\)") + def setup + super + @template = self + @controller = Class.new do + def url_for(options) + if options.is_a?(String) + options + else + url = "http://www.example.com/" + url << options[:action].to_s if options and options[:action] + url << "?a=#{options[:a]}" if options && options[:a] + url << "&b=#{options[:b]}" if options && options[:a] && options[:b] + url + end end - end + end.new end + + protected + def request_forgery_protection_token + nil + end + + def protect_against_forgery? + false + end end -class LinkToRemoteTest < AjaxTestCase - include ActionView::Helpers::AjaxHelperCompat +class AjaxHelperTest < AjaxHelperBaseTest + def _evaluate_assigns_and_ivars() end - def link(options = {}) - link_to_remote("Delete this post", "/blog/destroy/3", options) + def setup + @record = @author = Author.new + @article = Article.new + super end - test "basic" do - assert_html link(:update => "#posts"), - %w(data-update-success="#posts") + test "link_to_remote" do + assert_dom_equal %(Remote outauthor), + link_to_remote("Remote outauthor", { :url => { :action => "whatnot" }}, { :class => "fine" }) + assert_dom_equal %(Remote outauthor), + link_to_remote("Remote outauthor", :complete => "alert(request.responseText)", :url => { :action => "whatnot" }) + assert_dom_equal %(Remote outauthor), + link_to_remote("Remote outauthor", :success => "alert(request.responseText)", :url => { :action => "whatnot" }) + assert_dom_equal %(Remote outauthor), + link_to_remote("Remote outauthor", :failure => "alert(request.responseText)", :url => { :action => "whatnot" }) + assert_dom_equal %(Remote outauthor), + link_to_remote("Remote outauthor", :failure => "alert(request.responseText)", :url => { :action => "whatnot", :a => '10', :b => '20' }) + assert_dom_equal %(Remote outauthor), + link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :type => :synchronous) + assert_dom_equal %(Remote outauthor), + link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :position => :bottom) end - test "using a url string" do - assert_html link_to_remote("Test", "/blog/update/1"), - %w(href="/blog/update/1") + test "link_to_remote html options" do + assert_dom_equal %(Remote outauthor), + link_to_remote("Remote outauthor", { :url => { :action => "whatnot" }, :html => { :class => "fine" } }) end - test "using a url hash" do - link = link_to_remote("Delete this post", {:controller => :blog}, :update => "#posts") - assert_html link, %w(href="/url/hash" data-update-success="#posts") + test "link_to_remote url quote escaping" do + assert_dom_equal %(Remote), + link_to_remote("Remote", { :url => { :action => "whatnot's" } }) end - test "with no update" do - assert_html link, %w(href="/blog/destroy/3" Delete\ this\ post data-remote="true") + test "button_to_remote" do + assert_dom_equal %(), + button_to_remote("Remote outpost", { :url => { :action => "whatnot" }}, { :class => "fine" }) + assert_dom_equal %(), + button_to_remote("Remote outpost", :complete => "alert(request.reponseText)", :url => { :action => "whatnot" }) + assert_dom_equal %(), + button_to_remote("Remote outpost", :success => "alert(request.reponseText)", :url => { :action => "whatnot" }) + assert_dom_equal %(), + button_to_remote("Remote outpost", :failure => "alert(request.reponseText)", :url => { :action => "whatnot" }) + assert_dom_equal %(), + button_to_remote("Remote outpost", :failure => "alert(request.reponseText)", :url => { :action => "whatnot", :a => '10', :b => '20' }) end - test "with :html options" do - expected = %{Delete this post} - assert_equal expected, link(:update => "#posts", :html => {"data-custom" => "me"}) + test "periodically_call_remote" do + assert_dom_equal %(), + periodically_call_remote(:update => "schremser_bier", :url => { :action => "mehr_bier" }) end - test "with a hash for :update" do - link = link(:update => {:success => "#posts", :failure => "#error"}) - assert_match(/data-update-success="#posts"/, link) - assert_match(/data-update-failure="#error"/, link) + test "periodically_call_remote_with_frequency" do + assert_dom_equal( + "", + periodically_call_remote(:frequency => 2) + ) end - test "with positional parameters" do - link = link(:position => :top, :update => "#posts") - assert_match(/data\-update\-position="top"/, link) + test "form_remote_tag" do + assert_dom_equal %(
), + form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }) + assert_dom_equal %(), + form_remote_tag(:update => { :success => "glass_of_beer" }, :url => { :action => :fast }) + assert_dom_equal %(), + form_remote_tag(:update => { :failure => "glass_of_water" }, :url => { :action => :fast }) + assert_dom_equal %(), + form_remote_tag(:update => { :success => 'glass_of_beer', :failure => "glass_of_water" }, :url => { :action => :fast }) end - test "with an optional method" do - link = link(:method => "delete") - assert_match(/data-method="delete"/, link) + test "form_remote_tag with method" do + assert_dom_equal %(
), + form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, :html => { :method => :put }) end - class LegacyLinkToRemoteTest < AjaxTestCase - include ActionView::Helpers::AjaxHelperCompat + test "form_remote_tag with block in erb" do + __in_erb_template = '' + form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }) { concat "Hello world!" } + assert_dom_equal %(Hello world!
), output_buffer + end - def link(options) - link_to_remote("Delete this post", "/blog/destroy/3", options) - end + test "remote_form_for with record identification with new record" do + remote_form_for(@record, {:html => { :id => 'create-author' }}) {} - test "basic link_to_remote with :url =>" do - expected = %{Delete this post} - assert_equal expected, - link_to_remote("Delete this post", :url => "/blog/destroy/4", :update => "#posts") - end + expected = %(
) + assert_dom_equal expected, output_buffer + end - assert_callbacks_work do |callback| - link(callback => "undoRequestCompleted(request)") - end + test "remote_form_for with record identification without html options" do + remote_form_for(@record) {} + + expected = %(
) + assert_dom_equal expected, output_buffer end -end -class ButtonToRemoteTest < AjaxTestCase - include ActionView::Helpers::AjaxHelperCompat + test "remote_form_for with record identification with existing record" do + @record.save + remote_form_for(@record) {} - def button(options, html = {}) - button_to_remote("Remote outpost", options, html) + expected = %(
) + assert_dom_equal expected, output_buffer end - class StandardTest < ButtonToRemoteTest - test "basic" do - expected = %{} - assert_equal expected, button({:url => "/url/hash"}, {:class => "fine"}) - end + test "remote_form_for with new object in list" do + remote_form_for([@author, @article]) {} + + expected = %(
) + assert_dom_equal expected, output_buffer end - class LegacyButtonToRemoteTest < ButtonToRemoteTest - include ActionView::Helpers::AjaxHelperCompat + test "remote_form_for with existing object in list" do + @author.save + @article.save + remote_form_for([@author, @article]) {} - assert_callbacks_work do |callback| - button(callback => "undoRequestCompleted(request)") + expected = %(
) + assert_dom_equal expected, output_buffer + end + + test "on callbacks" do + callbacks = [:uninitialized, :loading, :loaded, :interactive, :complete, :success, :failure] + callbacks.each do |callback| + assert_dom_equal %(
), + form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, callback=>"monkeys();") + assert_dom_equal %(), + form_remote_tag(:update => { :success => "glass_of_beer" }, :url => { :action => :fast }, callback=>"monkeys();") + assert_dom_equal %(), + form_remote_tag(:update => { :failure => "glass_of_beer" }, :url => { :action => :fast }, callback=>"monkeys();") + assert_dom_equal %(), + form_remote_tag(:update => { :success => "glass_of_beer", :failure => "glass_of_water" }, :url => { :action => :fast }, callback=>"monkeys();") + end + + #HTTP status codes 200 up to 599 have callbacks + #these should work + 100.upto(599) do |callback| + assert_dom_equal %(), + form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, callback=>"monkeys();") + end + + #test 200 and 404 + assert_dom_equal %(), + form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, 200=>"monkeys();", 404=>"bananas();") + + #these shouldn't + 1.upto(99) do |callback| + assert_dom_equal %(), + form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, callback=>"monkeys();") + end + 600.upto(999) do |callback| + assert_dom_equal %(), + form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, callback=>"monkeys();") end + + #test ultimate combo + assert_dom_equal %(), + form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, :loading => "c1()", :success => "s()", :failure => "f();", :complete => "c();", 200=>"monkeys();", 404=>"bananas();") + end -end -class ObserveFieldTest < AjaxTestCase - include ActionView::Helpers::AjaxHelperCompat + test "submit_to_remote" do + assert_dom_equal %(), + submit_to_remote("More beer!", 1_000_000, :update => "empty_bottle") + end - def url_for(hash) - "/blog/update" + test "observe_field" do + assert_dom_equal %(), + observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }) end - def protect_against_forgery? - false + test "observe_field using with option" do + expected = %() + assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => 'id') + assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "'id=' + encodeURIComponent(value)") end - def field(options = {}) - observe_field("title", options) + test "observe_field using json in with option" do + expected = %() + assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "{'id':value}") end - test "basic" do - assert_html field, - %w(data-observe="true") + test "observe_field using function for callback" do + assert_dom_equal %(), + observe_field("glass", :frequency => 5.minutes, :function => "alert('Element changed')") end - test "with a :frequency option" do - assert_html field(:frequency => 5.minutes), - %w(data-observe="true" data-frequency="300") + test "observe_form" do + assert_dom_equal %(), + observe_form("cart", :frequency => 2, :url => { :action => "cart_changed" }) end - test "using a url string" do - assert_html field(:url => "/some/other/url"), - %w(data-observe="true" data-url="/some/other/url") + test "observe_form using function for callback" do + assert_dom_equal %(), + observe_form("cart", :frequency => 2, :function => "alert('Form changed')") end - test "using a url hash" do - assert_html field(:url => {:controller => :blog, :action => :update}), - %w(data-observe="true" data-url="/blog/update") + test "observe_field without frequency" do + assert_dom_equal %(), + observe_field("glass") end -# def test_observe_field -# assert_dom_equal %(), -# observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }) -# end -# -# def test_observe_field_using_with_option -# expected = %() -# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => 'id') -# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "'id=' + encodeURIComponent(value)") -# end -# -# def test_observe_field_using_json_in_with_option -# expected = %() -# assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "{'id':value}") -# end -# -# def test_observe_field_using_function_for_callback -# assert_dom_equal %(), -# observe_field("glass", :frequency => 5.minutes, :function => "alert('Element changed')") -# end + protected + def author_path(record) + "/authors/#{record.id}" + end + + def authors_path + "/authors" + end + + def author_articles_path(author) + "/authors/#{author.id}/articles" + end + + def author_article_path(author, article) + "/authors/#{author.id}/articles/#{article.id}" + end end -- cgit v1.2.3 From 9f5cb3d3b48d0e7d702144d87208ac18778e3d38 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sun, 24 Jan 2010 08:33:27 -0500 Subject: moving include of ScriptaculousHelper into PrototypeHelper, ActionView should know as little as possible about individual frameworks --- actionpack/lib/action_view/helpers.rb | 2 -- actionpack/lib/action_view/helpers/prototype_helper.rb | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/action_view/helpers.rb b/actionpack/lib/action_view/helpers.rb index 215a697cce..080eb87445 100644 --- a/actionpack/lib/action_view/helpers.rb +++ b/actionpack/lib/action_view/helpers.rb @@ -20,7 +20,6 @@ module ActionView #:nodoc: autoload :RecordIdentificationHelper, 'action_view/helpers/record_identification_helper' autoload :RecordTagHelper, 'action_view/helpers/record_tag_helper' autoload :SanitizeHelper, 'action_view/helpers/sanitize_helper' - autoload :ScriptaculousHelper, 'action_view/helpers/scriptaculous_helper' autoload :TagHelper, 'action_view/helpers/tag_helper' autoload :TextHelper, 'action_view/helpers/text_helper' autoload :TranslationHelper, 'action_view/helpers/translation_helper' @@ -53,7 +52,6 @@ module ActionView #:nodoc: include RecordIdentificationHelper include RecordTagHelper include SanitizeHelper - include ScriptaculousHelper include TagHelper include TextHelper include TranslationHelper diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index 2bd6afba56..d861810f19 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -1,6 +1,7 @@ require 'set' require 'active_support/json' require 'active_support/core_ext/object/returning' +require 'action_view/helpers/scriptaculous_helper' module ActionView module Helpers @@ -73,6 +74,8 @@ module ActionView # See JavaScriptGenerator for information on updating multiple elements # on the page in an Ajax response. module PrototypeHelper + include ScriptaculousHelper + unless const_defined? :CALLBACKS CALLBACKS = Set.new([ :create, :uninitialized, :loading, :loaded, :interactive, :complete, :failure, :success ] + -- cgit v1.2.3 From 9ad8d348b52e5603bb2432ee7fe326142ce5084b Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Sun, 24 Jan 2010 09:09:10 -0500 Subject: test :method option of link_to_remote, and ensure rel='nofollow' is added when :method => 'delete' --- actionpack/lib/action_view/helpers/ajax_helper.rb | 1 + actionpack/test/template/ajax_helper_test.rb | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 7d164929f0..06a57efd95 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -291,6 +291,7 @@ module ActionView # :href => url_for(:action => "destroy", :id => post.id) def link_to_remote(name, options, html_options = {}) attributes = {} + attributes.merge!(:rel => "nofollow") if options[:method] && options[:method].downcase == "delete" attributes.merge!(extract_remote_attributes!(options)) attributes.merge!(html_options) diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index cb28448913..77d1510bab 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -86,6 +86,11 @@ class AjaxHelperTest < AjaxHelperBaseTest link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :position => :bottom) end + test "link_to_remote with method delete" do + assert_dom_equal %(Remote outauthor), + link_to_remote("Remote outauthor", { :url => { :action => "whatnot" }, :method => "delete"}, { :class => "fine" }) + end + test "link_to_remote html options" do assert_dom_equal %(Remote outauthor), link_to_remote("Remote outauthor", { :url => { :action => "whatnot" }, :html => { :class => "fine" } }) -- cgit v1.2.3 From c3baf8b767bdfb27b90b2120f9512d9697e5e932 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sun, 24 Jan 2010 09:57:09 -0500 Subject: link_to_remote and button_to_remote now support :confirm --- actionpack/lib/action_view/helpers/ajax_helper.rb | 12 ++++++++++++ actionpack/test/template/ajax_helper_test.rb | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 06a57efd95..79e4167292 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -293,6 +293,7 @@ module ActionView attributes = {} attributes.merge!(:rel => "nofollow") if options[:method] && options[:method].downcase == "delete" attributes.merge!(extract_remote_attributes!(options)) + attributes.merge!(extract_confirm_attributes!(options)) attributes.merge!(html_options) content_tag(:a, name, attributes.merge(:href => "#")) @@ -304,6 +305,7 @@ module ActionView # and defining callbacks is the same as link_to_remote. def button_to_remote(name, options = {}, html_options = {}) attributes = html_options.merge!(:type => "button", :value => name) + attributes.merge!(extract_confirm_attributes!(options)) attributes.merge!(extract_remote_attributes!(options)) tag(:input, attributes) @@ -483,6 +485,16 @@ module ActionView private + def extract_confirm_attributes!(options) + attributes = {} + + if options && options[:confirm] + attributes["data-confirm"] = options.delete(:confirm) + end + + attributes + end + def extract_remote_attributes!(options) attributes = options.delete(:html) || {} diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index 77d1510bab..095454977e 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -101,6 +101,11 @@ class AjaxHelperTest < AjaxHelperBaseTest link_to_remote("Remote", { :url => { :action => "whatnot's" } }) end + test "link_to_remote with confirm" do + assert_dom_equal %(Remote confirm), + link_to_remote("Remote confirm", { :url => { :action => "whatnot" }, :method => "delete", :confirm => "Are you sure?"}, { :class => "fine" }) + end + test "button_to_remote" do assert_dom_equal %(), button_to_remote("Remote outpost", { :url => { :action => "whatnot" }}, { :class => "fine" }) @@ -114,6 +119,11 @@ class AjaxHelperTest < AjaxHelperBaseTest button_to_remote("Remote outpost", :failure => "alert(request.reponseText)", :url => { :action => "whatnot", :a => '10', :b => '20' }) end + test "button_to_remote with confirm" do + assert_dom_equal %(), + button_to_remote("Remote outpost", { :url => { :action => "whatnot" }, :confirm => "Are you sure?"}, { :class => "fine" }) + end + test "periodically_call_remote" do assert_dom_equal %(), periodically_call_remote(:update => "schremser_bier", :url => { :action => "mehr_bier" }) -- cgit v1.2.3 From 463fc7110755485ee2644690cb87023357f92f9a Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sun, 24 Jan 2010 11:57:38 -0500 Subject: making non remote versions of link_to, button_to, submit_tag and image_submit_tag output data attributes for things like :confirm, :method, :popup, and :disable_with --- .../lib/action_view/helpers/form_tag_helper.rb | 20 ++------ .../lib/action_view/helpers/javascript_helper.rb | 41 ++++++++++++++++ actionpack/lib/action_view/helpers/url_helper.rb | 54 +--------------------- actionpack/test/template/form_tag_helper_test.rb | 12 ++--- actionpack/test/template/url_helper_test.rb | 28 +++++------ 5 files changed, 68 insertions(+), 87 deletions(-) diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index 048bedc7ba..ebce5c1513 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -352,33 +352,24 @@ module ActionView # # => # # submit_tag "Complete sale", :disable_with => "Please wait..." - # # => # # submit_tag nil, :class => "form_submit" # # => # # submit_tag "Edit", :disable_with => "Editing...", :class => "edit-button" - # # => def submit_tag(value = "Save changes", options = {}) options.stringify_keys! if disable_with = options.delete("disable_with") - disable_with = "this.value='#{disable_with}'" - disable_with << ";#{options.delete('onclick')}" if options['onclick'] - - options["onclick"] = "if (window.hiddenCommit) { window.hiddenCommit.setAttribute('value', this.value); }" - options["onclick"] << "else { hiddenCommit = document.createElement('input');hiddenCommit.type = 'hidden';" - options["onclick"] << "hiddenCommit.value = this.value;hiddenCommit.name = this.name;this.form.appendChild(hiddenCommit); }" - options["onclick"] << "this.setAttribute('originalValue', this.value);this.disabled = true;#{disable_with};" - options["onclick"] << "result = (this.form.onsubmit ? (this.form.onsubmit() ? this.form.submit() : false) : this.form.submit());" - options["onclick"] << "if (result == false) { this.value = this.getAttribute('originalValue');this.disabled = false; }return result;" + add_disable_with_to_attributes!(options, disable_with) end if confirm = options.delete("confirm") - options["onclick"] ||= 'return true;' - options["onclick"] = "if (!#{confirm_javascript_function(confirm)}) return false; #{options['onclick']}" + add_confirm_to_attributes!(options, confirm) end tag :input, { "type" => "submit", "name" => "commit", "value" => value }.update(options.stringify_keys) @@ -411,8 +402,7 @@ module ActionView options.stringify_keys! if confirm = options.delete("confirm") - options["onclick"] ||= '' - options["onclick"] += "return #{confirm_javascript_function(confirm)};" + add_confirm_to_attributes!(options, confirm) end tag :input, { "type" => "image", "src" => path_to_image(source) }.update(options.stringify_keys) diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index adb35ccfa2..ba6aefca26 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -188,6 +188,47 @@ module ActionView end protected + def convert_options_to_javascript!(html_options, url = '') + confirm, popup = html_options.delete("confirm"), html_options.delete("popup") + + method, href = html_options.delete("method"), html_options['href'] + + if popup && method + raise ActionView::ActionViewError, "You can't use :popup and :method in the same link" + elsif confirm && popup + add_confirm_to_attributes!(html_options, confirm) + html_options["data-popup"] = popup_attributes(popup) + elsif confirm && method + add_confirm_to_attributes!(html_options, confirm) + add_method_to_attributes!(html_options, method, url) + elsif confirm + add_confirm_to_attributes!(html_options, confirm) + elsif method + add_method_to_attributes!(html_options, method, url) + elsif popup + html_options["data-popup"] = popup_attributes(popup) + end + end + + def add_confirm_to_attributes!(html_options, confirm) + html_options["data-confirm"] = confirm if confirm + end + + def add_method_to_attributes!(html_options, method, url = nil) + html_options["data-method"] = method + if url.size > 0 + html_options["data-url"] = url + end + end + + def add_disable_with_to_attributes!(html_options, disable_with) + html_options["data-disable-with"] = disable_with if disable_with + end + + def popup_attributes(popup) + popup.is_a?(Array) ? "{title: '#{popup.first}', options: '#{popup.last}'}" : "true" + end + def options_for_javascript(options) if options.empty? '{}' diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 511386fede..4424dbba42 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -305,12 +305,11 @@ module ActionView request_token_tag = tag(:input, :type => "hidden", :name => request_forgery_protection_token.to_s, :value => form_authenticity_token) end - if confirm = html_options.delete("confirm") - html_options["onclick"] = "return #{confirm_javascript_function(confirm)};" - end url = options.is_a?(String) ? options : self.url_for(options) name ||= url + + convert_options_to_javascript!(html_options, url) html_options.merge!("type" => "submit", "value" => name) @@ -563,55 +562,6 @@ module ActionView end private - def convert_options_to_javascript!(html_options, url = '') - confirm, popup = html_options.delete("confirm"), html_options.delete("popup") - - method, href = html_options.delete("method"), html_options['href'] - - html_options["onclick"] = case - when popup && method - raise ActionView::ActionViewError, "You can't use :popup and :method in the same link" - when confirm && popup - "if (#{confirm_javascript_function(confirm)}) { #{popup_javascript_function(popup)} };return false;" - when confirm && method - "if (#{confirm_javascript_function(confirm)}) { #{method_javascript_function(method, url, href)} };return false;" - when confirm - "return #{confirm_javascript_function(confirm)};" - when method - "#{method_javascript_function(method, url, href)}return false;" - when popup - "#{popup_javascript_function(popup)}return false;" - else - html_options["onclick"] - end - end - - def confirm_javascript_function(confirm) - "confirm('#{escape_javascript(confirm)}')" - end - - def popup_javascript_function(popup) - popup.is_a?(Array) ? "window.open(this.href,'#{popup.first}','#{popup.last}');" : "window.open(this.href);" - end - - def method_javascript_function(method, url = '', href = nil) - action = (href && url.size > 0) ? "'#{url}'" : 'this.href' - submit_function = - "var f = document.createElement('form'); f.style.display = 'none'; " + - "this.parentNode.appendChild(f); f.method = 'POST'; f.action = #{action};" - - unless method == :post - submit_function << "var m = document.createElement('input'); m.setAttribute('type', 'hidden'); " - submit_function << "m.setAttribute('name', '_method'); m.setAttribute('value', '#{method}'); f.appendChild(m);" - end - - if protect_against_forgery? - submit_function << "var s = document.createElement('input'); s.setAttribute('type', 'hidden'); " - submit_function << "s.setAttribute('name', '#{request_forgery_protection_token}'); s.setAttribute('value', '#{escape_javascript form_authenticity_token}'); f.appendChild(s);" - end - submit_function << "f.submit();" - end - # Processes the +html_options+ hash, converting the boolean # attributes from true/false form into the form required by # HTML/XHTML. (An attribute is considered to be boolean if diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb index 47462b1237..c8d929cee8 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionpack/test/template/form_tag_helper_test.rb @@ -285,35 +285,35 @@ class FormTagHelperTest < ActionView::TestCase def test_submit_tag assert_dom_equal( - %(), - submit_tag("Save", :disable_with => "Saving...", :onclick => "alert('hello!')") + %(), + submit_tag("Save", :disable_with => "Saving...", :onclick => "alert('hello!');") ) end def test_submit_tag_with_no_onclick_options assert_dom_equal( - %(), + %(), submit_tag("Save", :disable_with => "Saving...") ) end def test_submit_tag_with_confirmation assert_dom_equal( - %(), + %(), submit_tag("Save", :confirm => "Are you sure?") ) end def test_submit_tag_with_confirmation_and_with_disable_with assert_dom_equal( - %(), + %(), submit_tag("Save", :disable_with => "Saving...", :confirm => "Are you sure?") ) end def test_image_submit_tag_with_confirmation assert_dom_equal( - %(), + %(), image_submit_tag("save.gif", :confirm => "Are you sure?") ) end diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index d4b58efe1e..4298be7a1e 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -76,7 +76,7 @@ class UrlHelperTest < ActionView::TestCase def test_button_to_with_javascript_confirm assert_dom_equal( - "
", + "
", button_to("Hello", "http://www.example.com", :confirm => "Are you sure?") ) end @@ -170,76 +170,76 @@ class UrlHelperTest < ActionView::TestCase def test_link_tag_with_javascript_confirm assert_dom_equal( - "Hello", + "Hello", link_to("Hello", "http://www.example.com", :confirm => "Are you sure?") ) assert_dom_equal( - "Hello", + "Hello", link_to("Hello", "http://www.example.com", :confirm => "You can't possibly be sure, can you?") ) assert_dom_equal( - "Hello", + "Hello", link_to("Hello", "http://www.example.com", :confirm => "You can't possibly be sure,\n can you?") ) end def test_link_tag_with_popup assert_dom_equal( - "Hello", + "Hello", link_to("Hello", "http://www.example.com", :popup => true) ) assert_dom_equal( - "Hello", + "Hello", link_to("Hello", "http://www.example.com", :popup => 'true') ) assert_dom_equal( - "Hello", + "Hello", link_to("Hello", "http://www.example.com", :popup => ['window_name', 'width=300,height=300']) ) end def test_link_tag_with_popup_and_javascript_confirm assert_dom_equal( - "Hello", + "Hello", link_to("Hello", "http://www.example.com", { :popup => true, :confirm => "Fo' sho'?" }) ) assert_dom_equal( - "Hello", + "Hello", link_to("Hello", "http://www.example.com", { :popup => ['window_name', 'width=300,height=300'], :confirm => "Are you serious?" }) ) end def test_link_tag_using_post_javascript assert_dom_equal( - "Hello", + "Hello", link_to("Hello", "http://www.example.com", :method => :post) ) end def test_link_tag_using_delete_javascript assert_dom_equal( - "Destroy", + "Destroy", link_to("Destroy", "http://www.example.com", :method => :delete) ) end def test_link_tag_using_delete_javascript_and_href assert_dom_equal( - "Destroy", + "Destroy", link_to("Destroy", "http://www.example.com", :method => :delete, :href => '#') ) end def test_link_tag_using_post_javascript_and_confirm assert_dom_equal( - "Hello", + "Hello", link_to("Hello", "http://www.example.com", :method => :post, :confirm => "Are you serious?") ) end def test_link_tag_using_delete_javascript_and_href_and_confirm assert_dom_equal( - "Destroy", + "Destroy", link_to("Destroy", "http://www.example.com", :method => :delete, :href => '#', :confirm => "Are you serious?"), "When specifying url, form should be generated with it, but not this.href" ) -- cgit v1.2.3 From fbb56f7ee80078c6ec1ea3166b2e37d8feff496a Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sun, 24 Jan 2010 12:37:26 -0500 Subject: refactoring AjaxHelper a bit so that it calls shared method from JavascriptHelper to add attributes for :confirm --- actionpack/lib/action_view/helpers/ajax_helper.rb | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 79e4167292..7e7d4a0557 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -293,7 +293,11 @@ module ActionView attributes = {} attributes.merge!(:rel => "nofollow") if options[:method] && options[:method].downcase == "delete" attributes.merge!(extract_remote_attributes!(options)) - attributes.merge!(extract_confirm_attributes!(options)) + + if confirm = options.delete(:confirm) + add_confirm_to_attributes!(attributes, confirm) + end + attributes.merge!(html_options) content_tag(:a, name, attributes.merge(:href => "#")) @@ -305,7 +309,11 @@ module ActionView # and defining callbacks is the same as link_to_remote. def button_to_remote(name, options = {}, html_options = {}) attributes = html_options.merge!(:type => "button", :value => name) - attributes.merge!(extract_confirm_attributes!(options)) + + if confirm = options.delete(:confirm) + add_confirm_to_attributes!(attributes, confirm) + end + attributes.merge!(extract_remote_attributes!(options)) tag(:input, attributes) @@ -485,16 +493,6 @@ module ActionView private - def extract_confirm_attributes!(options) - attributes = {} - - if options && options[:confirm] - attributes["data-confirm"] = options.delete(:confirm) - end - - attributes - end - def extract_remote_attributes!(options) attributes = options.delete(:html) || {} -- cgit v1.2.3 From d7698971713bf42efb12bac10fff0303d5a8ac4e Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sun, 24 Jan 2010 12:57:19 -0500 Subject: modified helper that adds attributes for :method to include rel='nofollow' if :method => :delete, same as its remote_ equivalent --- actionpack/lib/action_view/helpers/javascript_helper.rb | 1 + actionpack/test/template/url_helper_test.rb | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index ba6aefca26..ee6481b86d 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -215,6 +215,7 @@ module ActionView end def add_method_to_attributes!(html_options, method, url = nil) + html_options["rel"] = "nofollow" if method.to_s.downcase == "delete" html_options["data-method"] = method if url.size > 0 html_options["data-url"] = url diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index 4298be7a1e..c0e6826ec5 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -218,14 +218,14 @@ class UrlHelperTest < ActionView::TestCase def test_link_tag_using_delete_javascript assert_dom_equal( - "Destroy", + "Destroy", link_to("Destroy", "http://www.example.com", :method => :delete) ) end def test_link_tag_using_delete_javascript_and_href assert_dom_equal( - "Destroy", + "Destroy", link_to("Destroy", "http://www.example.com", :method => :delete, :href => '#') ) end @@ -239,7 +239,7 @@ class UrlHelperTest < ActionView::TestCase def test_link_tag_using_delete_javascript_and_href_and_confirm assert_dom_equal( - "Destroy", + "Destroy", link_to("Destroy", "http://www.example.com", :method => :delete, :href => '#', :confirm => "Are you serious?"), "When specifying url, form should be generated with it, but not this.href" ) -- cgit v1.2.3 From 9821648644e904efcad55961cc7082f574c11414 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sun, 24 Jan 2010 09:57:09 -0500 Subject: link_to_remote and button_to_remote now support :confirm --- actionpack/lib/action_view/helpers/ajax_helper.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 7e7d4a0557..5a9c4e7386 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -493,6 +493,16 @@ module ActionView private + def extract_confirm_attributes!(options) + attributes = {} + + if options && options[:confirm] + attributes["data-confirm"] = options.delete(:confirm) + end + + attributes + end + def extract_remote_attributes!(options) attributes = options.delete(:html) || {} -- cgit v1.2.3 From 426a6b2e00665b04bab4fa5cee664fefd9957960 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sun, 24 Jan 2010 11:57:38 -0500 Subject: making non remote versions of link_to, button_to, submit_tag and image_submit_tag output data attributes for things like :confirm, :method, :popup, and :disable_with --- actionpack/lib/action_view/helpers/javascript_helper.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index ee6481b86d..58a92387b5 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -215,7 +215,10 @@ module ActionView end def add_method_to_attributes!(html_options, method, url = nil) +<<<<<<< HEAD html_options["rel"] = "nofollow" if method.to_s.downcase == "delete" +======= +>>>>>>> making non remote versions of link_to, button_to, submit_tag and image_submit_tag output data attributes for things like :confirm, :method, :popup, and :disable_with html_options["data-method"] = method if url.size > 0 html_options["data-url"] = url -- cgit v1.2.3 From 133f6011d08ee043dcb5ae95bb441a81f6206bd9 Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Sun, 24 Jan 2010 12:59:29 -0500 Subject: add missing :before and :after callbacks for link_to_remote --- actionpack/lib/action_view/helpers/ajax_helper.rb | 2 +- actionpack/test/template/ajax_helper_test.rb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 5a9c4e7386..f6c9952031 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -600,7 +600,7 @@ module ActionView private def set_callbacks(options, html) - [:uninitialized, :complete, :failure, :success, :interactive, :loaded, :loading].each do |type| + [:before, :after, :uninitialized, :complete, :failure, :success, :interactive, :loaded, :loading].each do |type| html["data-on#{type}"] = options.delete(type.to_sym) end diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index 095454977e..4d76007d52 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -86,6 +86,11 @@ class AjaxHelperTest < AjaxHelperBaseTest link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :position => :bottom) end + test "link_to_remote with before/after callbacks" do + assert_dom_equal %(Remote outauthor), + link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :before => "before();", :after => "after();") + end + test "link_to_remote with method delete" do assert_dom_equal %(Remote outauthor), link_to_remote("Remote outauthor", { :url => { :action => "whatnot" }, :method => "delete"}, { :class => "fine" }) -- cgit v1.2.3 From 9e3e1b3f24e2ba47f675ecbfc44c269323637985 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sun, 24 Jan 2010 13:13:40 -0500 Subject: fixing last merge breakage --- actionpack/lib/action_view/helpers/ajax_helper.rb | 10 ---------- actionpack/lib/action_view/helpers/javascript_helper.rb | 3 --- 2 files changed, 13 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index f6c9952031..e8dd960e6b 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -493,16 +493,6 @@ module ActionView private - def extract_confirm_attributes!(options) - attributes = {} - - if options && options[:confirm] - attributes["data-confirm"] = options.delete(:confirm) - end - - attributes - end - def extract_remote_attributes!(options) attributes = options.delete(:html) || {} diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index 58a92387b5..ee6481b86d 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -215,10 +215,7 @@ module ActionView end def add_method_to_attributes!(html_options, method, url = nil) -<<<<<<< HEAD html_options["rel"] = "nofollow" if method.to_s.downcase == "delete" -======= ->>>>>>> making non remote versions of link_to, button_to, submit_tag and image_submit_tag output data attributes for things like :confirm, :method, :popup, and :disable_with html_options["data-method"] = method if url.size > 0 html_options["data-url"] = url -- cgit v1.2.3 From a5e9d033e81152e1b2280042ba6289c8a231e8bf Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Sun, 24 Jan 2010 13:21:35 -0500 Subject: add missing test for :with option to link_to_remote --- actionpack/test/template/ajax_helper_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index 4d76007d52..6fa8a95d42 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -90,6 +90,12 @@ class AjaxHelperTest < AjaxHelperBaseTest assert_dom_equal %(Remote outauthor), link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :before => "before();", :after => "after();") end + + test "link_to_remote using :with expression" do + expected = %(Remote outauthor) + assert_dom_equal expected, link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :with => "id") + assert_dom_equal expected, link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :with => "'id=' + encodeURIComponent(value)") + end test "link_to_remote with method delete" do assert_dom_equal %(Remote outauthor), -- cgit v1.2.3 From d9af0dfac4c4935097671ff0d8b21876ff6c019a Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Sun, 24 Jan 2010 13:33:07 -0500 Subject: refactor params and with into copat module --- actionpack/lib/action_view/helpers/ajax_helper.rb | 39 +++++++++++++++-------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index e8dd960e6b..fac7b8c44b 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -464,8 +464,11 @@ module ActionView # # def observe_field(name, options = {}) + html_options = options.delete(:callbacks) + options[:observed] = name attributes = extract_observer_attributes!(options) + attributes.merge!(html_options) if html_options script_decorator(attributes) end @@ -512,19 +515,6 @@ module ActionView url_options = url_options.merge(:escape => false) if url_options.is_a?(Hash) attributes["data-url"] = escape_javascript(url_for(url_options)) - #TODO: Remove all references to prototype - BR - if options.delete(:form) - attributes["data-parameters"] = 'Form.serialize(this)' - elsif submit = options.delete(:submit) - attributes["data-parameters"] = "Form.serialize('#{submit}')" - elsif with = options.delete(:with) - if with !~ /[\{=(.]/ - attributes["data-with"] = "'#{with}=' + encodeURIComponent(value)" - else - attributes["data-with"] = with - end - end - purge_unused_attributes!(attributes) end @@ -573,6 +563,7 @@ module ActionView def link_to_remote(name, options, html_options = {}) set_callbacks(options, html_options) + set_conditions(options, html_options) super end @@ -588,6 +579,13 @@ module ActionView super end + def observe_field(name, options = {}) + html = {} + set_conditions(options, html) + options.merge!(:callbacks => html) + super + end + private def set_callbacks(options, html) [:before, :after, :uninitialized, :complete, :failure, :success, :interactive, :loaded, :loading].each do |type| @@ -600,6 +598,21 @@ module ActionView end end end + + def set_conditions(options, html) + #TODO: Remove all references to prototype - BR + if options.delete(:form) + html["data-parameters"] = 'Form.serialize(this)' + elsif submit = options.delete(:submit) + html["data-parameters"] = "Form.serialize('#{submit}')" + elsif with = options.delete(:with) + if with !~ /[\{=(.]/ + html["data-with"] = "'#{with}=' + encodeURIComponent(value)" + else + html["data-with"] = with + end + end + end end end end -- cgit v1.2.3 From 06dd23d67133601f2639695a0fadab81213f6200 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sun, 24 Jan 2010 14:32:55 -0500 Subject: removing Prototype inline js for attributes for :with and :condition, it now is free form js that can be placed there, also moved :submit out into AjaxHelper, updated tests to reflect changes --- actionpack/lib/action_view/helpers/ajax_helper.rb | 28 ++++++++++----------- actionpack/test/template/ajax_helper_test.rb | 30 ++++++++++++++++++----- 2 files changed, 38 insertions(+), 20 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index fac7b8c44b..b29dc50c8d 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -503,6 +503,10 @@ module ActionView attributes.merge!(extract_request_attributes!(options)) attributes["data-remote"] = true + if submit = options.delete(:submit) + attributes["data-submit"] = submit + end + attributes end @@ -563,12 +567,13 @@ module ActionView def link_to_remote(name, options, html_options = {}) set_callbacks(options, html_options) - set_conditions(options, html_options) + set_with_and_condition_attributes(options, html_options) super end def button_to_remote(name, options = {}, html_options = {}) set_callbacks(options, html_options) + set_with_and_condition_attributes(options, html_options) super end @@ -581,7 +586,7 @@ module ActionView def observe_field(name, options = {}) html = {} - set_conditions(options, html) + set_with_and_condition_attributes(options, html) options.merge!(:callbacks => html) super end @@ -599,18 +604,13 @@ module ActionView end end - def set_conditions(options, html) - #TODO: Remove all references to prototype - BR - if options.delete(:form) - html["data-parameters"] = 'Form.serialize(this)' - elsif submit = options.delete(:submit) - html["data-parameters"] = "Form.serialize('#{submit}')" - elsif with = options.delete(:with) - if with !~ /[\{=(.]/ - html["data-with"] = "'#{with}=' + encodeURIComponent(value)" - else - html["data-with"] = with - end + def set_with_and_condition_attributes(options, html) + if with = options.delete(:with) + html["data-with"] = with + end + + if condition = options.delete(:condition) + html["data-condition"] = condition end end end diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index 6fa8a95d42..c688b25f70 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -92,9 +92,18 @@ class AjaxHelperTest < AjaxHelperBaseTest end test "link_to_remote using :with expression" do - expected = %(Remote outauthor) - assert_dom_equal expected, link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :with => "id") - assert_dom_equal expected, link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :with => "'id=' + encodeURIComponent(value)") + expected = %(Remote outauthor) + assert_dom_equal expected, link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :with => "id=123") + end + + test "link_to_remote using :condition expression" do + expected = %(Remote outauthor) + assert_dom_equal expected, link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :condition => '$(\'foo\').val() == true') + end + + test "link_to_remote using :submit" do + expected = %(Remote outauthor) + assert_dom_equal expected, link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :submit => 'myForm') end test "link_to_remote with method delete" do @@ -135,6 +144,11 @@ class AjaxHelperTest < AjaxHelperBaseTest button_to_remote("Remote outpost", { :url => { :action => "whatnot" }, :confirm => "Are you sure?"}, { :class => "fine" }) end + test "button_to_remote with :submit" do + assert_dom_equal %(), + button_to_remote("Remote outpost", { :url => { :action => "whatnot" }, :submit => "myForm"}, { :class => "fine" }) + end + test "periodically_call_remote" do assert_dom_equal %(), periodically_call_remote(:update => "schremser_bier", :url => { :action => "mehr_bier" }) @@ -258,9 +272,13 @@ class AjaxHelperTest < AjaxHelperBaseTest end test "observe_field using with option" do - expected = %() - assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => 'id') - assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "'id=' + encodeURIComponent(value)") + expected = %() + assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => 'id=123') + end + + test "observe_field using condition option" do + expected = %() + assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :condition => '$(\'foo\').val() == true') end test "observe_field using json in with option" do -- cgit v1.2.3 From 5a75f1ab900d9637a6e7390abb9ea7faf9a85647 Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Mon, 25 Jan 2010 17:32:24 -0500 Subject: add missing call to set_with_and_condition_attributes for form_remote_tag --- actionpack/lib/action_view/helpers/ajax_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index b29dc50c8d..adb686aad4 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -580,6 +580,7 @@ module ActionView def form_remote_tag(options, &block) html = {} set_callbacks(options, html) + set_with_and_condition_attributes(options, html) options.merge!(:callbacks => html) super end -- cgit v1.2.3 From 04ad12d681b13569628f95b44fb13953305e4ddf Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Mon, 25 Jan 2010 17:39:00 -0500 Subject: initial jquery driver and compat, right now the only supported method is form_remote_tag --- .../templates/public/javascripts/jquery-1.4.min.js | 151 +++++++++++++++++++++ .../templates/public/javascripts/jquery.compat.js | 34 +++++ .../templates/public/javascripts/jquery.driver.js | 48 +++++++ 3 files changed, 233 insertions(+) create mode 100644 railties/lib/generators/rails/app/templates/public/javascripts/jquery-1.4.min.js create mode 100644 railties/lib/generators/rails/app/templates/public/javascripts/jquery.compat.js create mode 100644 railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js diff --git a/railties/lib/generators/rails/app/templates/public/javascripts/jquery-1.4.min.js b/railties/lib/generators/rails/app/templates/public/javascripts/jquery-1.4.min.js new file mode 100644 index 0000000000..5c70e4c5f3 --- /dev/null +++ b/railties/lib/generators/rails/app/templates/public/javascripts/jquery-1.4.min.js @@ -0,0 +1,151 @@ +/*! + * jQuery JavaScript Library v1.4 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://docs.jquery.com/License + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Wed Jan 13 15:23:05 2010 -0500 + */ +(function(A,w){function oa(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(oa,1);return}c.ready()}}function La(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function $(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var o in b)$(a,o,b[o],f,e,d);return a}if(d!==w){f=!i&&f&&c.isFunction(d);for(o=0;o-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete t[p]}i=c(a.target).closest(f,a.currentTarget); +n=0;for(l=i.length;n)[^>]*$|^#([\w-]+)$/,Pa=/^.[^:#\[\.,]*$/,Qa=/\S/, +Ra=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Sa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],M,ca=Object.prototype.toString,da=Object.prototype.hasOwnProperty,ea=Array.prototype.push,R=Array.prototype.slice,V=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Oa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Sa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])]; +c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ua([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return U.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a)}else return!b||b.jquery?(b||U).find(a):c(b).find(a);else if(c.isFunction(a))return U.ready(a);if(a.selector!==w){this.selector=a.selector; +this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,this)},selector:"",jquery:"1.4",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length= +0;ea.apply(this,a);return this},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject|| +c(null)},push:ea,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length, +htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b, +a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function o(){c.support.noCloneEvent=false;d.detachEvent("onclick",o)});d.cloneNode(true).fireEvent("onclick")}c(function(){var o=s.createElement("div");o.style.width=o.style.paddingLeft="1px";s.body.appendChild(o);c.boxModel=c.support.boxModel=o.offsetWidth===2;s.body.removeChild(o).style.display="none"});a=function(o){var p=s.createElement("div");o="on"+o;var n=o in +p;if(!n){p.setAttribute(o,"return;");n=typeof p[o]==="function"}return n};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var H="jQuery"+K(),Ta=0,ya={},Ua={};c.extend({cache:{},expando:H,noData:{embed:true,object:true,applet:true},data:function(a, +b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?ya:a;var f=a[H],e=c.cache;if(!b&&!f)return null;f||(f=++Ta);if(typeof b==="object"){a[H]=f;e=e[f]=c.extend(true,{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Ua:(e[f]={});if(d!==w){a[H]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?ya:a;var d=a[H],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[H]}catch(i){a.removeAttribute&& +a.removeAttribute(H)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this, +a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this, +a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var za=/[\n\t]/g,fa=/\s+/,Va=/\r/g,Wa=/href|src|style/,Xa=/(button|input)/i,Ya=/(button|input|object|select|textarea)/i,Za=/^(a|area)$/i,Aa=/radio|checkbox/;c.fn.extend({attr:function(a, +b){return $(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.addClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(fa),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i=0;else if(c.nodeName(this,"select")){var z=c.makeArray(t);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),z)>=0});if(!z.length)this.selectedIndex= +-1}else this.value=t}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Wa.test(b);if(b in a&&f&&!i){if(e){if(b==="type"&&Xa.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue; +if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Ya.test(a.nodeName)||Za.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var $a=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType=== +3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;if(!d.guid)d.guid=c.guid++;if(f!==w){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):w};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var o,p=0;o=b[p++];){var n=o.split(".");o=n.shift();d.type=n.slice(0).sort().join(".");var t=e[o],z=this.special[o]||{};if(!t){t=e[o]={}; +if(!z.setup||z.setup.call(a,f,n,d)===false)if(a.addEventListener)a.addEventListener(o,i,false);else a.attachEvent&&a.attachEvent("on"+o,i)}if(z.add)if((n=z.add.call(a,d,f,n,t))&&c.isFunction(n)){n.guid=n.guid||d.guid;d=n}t[d.guid]=d;this.global[o]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===w||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/); +for(var o=0;i=b[o++];){var p=i.split(".");i=p.shift();var n=!p.length,t=c.map(p.slice(0).sort(),$a);t=new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.)?")+"(\\.|$)");var z=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var B in f[i])if(n||t.test(f[i][B].type))delete f[i][B];z.remove&&z.remove.call(a,p,j);for(e in f[i])break;if(!e){if(!z.teardown||z.teardown.call(a,p)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+ +i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(B=c.data(a,"handle"))B.elem=null;c.removeData(a,"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[H]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType=== +8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;var i=c.data(d,"handle");i&&i.apply(d,b);var j,o;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){j=d[e];o=d["on"+e]}}catch(p){}i=c.nodeName(d,"a")&&e==="click";if(!f&&j&&!a.isDefaultPrevented()&&!i){this.triggered=true;try{d[e]()}catch(n){}}else if(o&&d["on"+e].apply(d,b)===false)a.result=false;this.triggered=false;if(!a.isPropagationStopped())(d=d.parentNode||d.ownerDocument)&&c.event.trigger(a,b,d,true)}, +handle:function(a){var b,d;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result}, +props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[H])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement|| +s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&& +a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;c.event.add(this,b.live,qa,b)},remove:function(a){if(a.length){var b=0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],qa)}},special:{}},beforeunload:{setup:function(a, +b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=K();this[H]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ba;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped= +ba;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ba;this.stopPropagation()},isDefaultPrevented:aa,isPropagationStopped:aa,isImmediatePropagationStopped:aa};var Ba=function(a){for(var b=a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ca=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover", +mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ca:Ba,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ca:Ba)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return pa("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+ +d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return pa("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this,"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var ga=/textarea|input|select/i;function Da(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex> +-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ha(a,b){var d=a.target,f,e;if(!(!ga.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Da(d);if(e!==f){if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",e);if(d.type!=="select"&&(f!=null||e)){a.type="change";return c.event.trigger(a,b,this)}}}}c.event.special.change={filters:{focusout:ha,click:function(a){var b=a.target,d=b.type;if(d=== +"radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ha.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ha.call(this,a)},beforeactivate:function(a){a=a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Da(a))}},setup:function(a,b,d){for(var f in W)c.event.add(this,f+".specialChange."+d.guid,W[f]);return ga.test(this.nodeName)}, +remove:function(a,b){for(var d in W)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),W[d]);return ga.test(this.nodeName)}};var W=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d, +f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){thisObject=e;e=f;f=w}var j=b==="one"?c.proxy(e,function(o){c(this).unbind(o,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e,thisObject):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a, +b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d0){y=u;break}}u=u[g]}m[r]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, +e=0,i=Object.prototype.toString,j=false,o=true;[0,0].sort(function(){o=false;return 0});var p=function(g,h,k,m){k=k||[];var r=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return k;for(var q=[],v,u,y,S,I=true,N=x(h),J=g;(f.exec(""),v=f.exec(J))!==null;){J=v[3];q.push(v[1]);if(v[2]){S=v[3];break}}if(q.length>1&&t.exec(g))if(q.length===2&&n.relative[q[0]])u=ia(q[0]+q[1],h);else for(u=n.relative[q[0]]?[h]:p(q.shift(),h);q.length;){g=q.shift();if(n.relative[g])g+=q.shift(); +u=ia(g,u)}else{if(!m&&q.length>1&&h.nodeType===9&&!N&&n.match.ID.test(q[0])&&!n.match.ID.test(q[q.length-1])){v=p.find(q.shift(),h,N);h=v.expr?p.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:q.pop(),set:B(m)}:p.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&h.parentNode?h.parentNode:h,N);u=v.expr?p.filter(v.expr,v.set):v.set;if(q.length>0)y=B(u);else I=false;for(;q.length;){var E=q.pop();v=E;if(n.relative[E])v=q.pop();else E="";if(v==null)v=h;n.relative[E](y,v,N)}}else y=[]}y||(y=u);if(!y)throw"Syntax error, unrecognized expression: "+ +(E||g);if(i.call(y)==="[object Array]")if(I)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&F(h,y[g])))k.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&k.push(u[g]);else k.push.apply(k,y);else B(y,k);if(S){p(S,r,k,m);p.uniqueSort(k)}return k};p.uniqueSort=function(g){if(D){j=o;g.sort(D);if(j)for(var h=1;h":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,r=g.length;m=0))k||m.push(v);else if(k)h[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, +CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,m,r,q){h=g[1].replace(/\\/g,"");if(!q&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,m,r){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=p(g[3],null,null,h);else{g=p.filter(g[3],h,k,true^r);k||m.push.apply(m, +g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!p(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, +text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, +setFilters:{first:function(g,h){return h===0},last:function(g,h,k,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return hk[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,m){var r=h[1],q=n.filters[r];if(q)return q(g,k,h,m);else if(r==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(r==="not"){h= +h[3];k=0;for(m=h.length;k=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=n.attrHandle[k]?n.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== +"="?k===h:m==="*="?k.indexOf(h)>=0:m==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:m==="!="?k!==h:m==="^="?k.indexOf(h)===0:m==="$="?k.substr(k.length-h.length)===h:m==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,m){var r=n.setFilters[h[2]];if(r)return r(g,k,h,m)}}},t=n.match.POS;for(var z in n.match){n.match[z]=new RegExp(n.match[z].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[z]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[z].source.replace(/\\(\d+)/g,function(g, +h){return"\\"+(h-0+1)}))}var B=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){B=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,m=g.length;k";var k=s.documentElement;k.insertBefore(g,k.firstChild);if(s.getElementById(h)){n.find.ID=function(m,r,q){if(typeof r.getElementById!=="undefined"&&!q)return(r=r.getElementById(m[1]))?r.id===m[1]||typeof r.getAttributeNode!=="undefined"&& +r.getAttributeNode("id").nodeValue===m[1]?[r]:w:[]};n.filter.ID=function(m,r){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===r}}k.removeChild(g);k=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;k[m];m++)k[m].nodeType===1&&h.push(k[m]);k=h}return k};g.innerHTML=""; +if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=p,h=s.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){p=function(m,r,q,v){r=r||s;if(!v&&r.nodeType===9&&!x(r))try{return B(r.querySelectorAll(m),q)}catch(u){}return g(m,r,q,v)};for(var k in g)p[k]=g[k];h=null}}(); +(function(){var g=s.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,k,m){if(typeof k.getElementsByClassName!=="undefined"&&!m)return k.getElementsByClassName(h[1])};g=null}}})();var F=s.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g, +h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ia=function(g,h){var k=[],m="",r;for(h=h.nodeType?[h]:h;r=n.match.PSEUDO.exec(g);){m+=r[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;r=0;for(var q=h.length;r=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var i=d;i0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i= +{},j;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var p=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,t){for(;t&&t.ownerDocument&&t!==b;){if(p?p.index(t)>-1:c(t).is(a))return t;t=t.parentNode}return null})},index:function(a){if(!a||typeof a=== +"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(sa(a[0])||sa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", +d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? +a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);ab.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||cb.test(f))&&bb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||!c(a).is(d));){a.nodeType=== +1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ga=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,db=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/"},G={option:[1,""], +legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};G.optgroup=G.option;G.tbody=G.tfoot=G.colgroup=G.caption=G.thead;G.th=G.td;if(!c.support.htmlSerialize)G._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this); +return d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.getText(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&& +this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this, +"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ga,"").replace(Y,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ta(this,b);ta(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType=== +1?this[0].innerHTML.replace(Ga,""):null;else if(typeof a==="string"&&!/" + "".html_safe! end private -- cgit v1.2.3 From 0215466832faddd2fc5ebef9500f06fa1b95228e Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Tue, 26 Jan 2010 11:06:58 -0500 Subject: periodically_call_remote does not need data-observe=true --- actionpack/lib/action_view/helpers/ajax_helper.rb | 3 +++ actionpack/test/template/ajax_helper_test.rb | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index b570eb44a7..8d09ca1187 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -402,6 +402,9 @@ module ActionView attributes = extract_observer_attributes!(options) attributes["data-periodical"] = true + # periodically_call_remote does not need data-observe=true + attributes.delete('data-observe') + script_decorator(attributes) end diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index d31e4daf08..47d458e4ef 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -160,13 +160,13 @@ class AjaxHelperTest < AjaxHelperBaseTest end test "periodically_call_remote" do - assert_dom_equal %(), + assert_dom_equal %(), periodically_call_remote(:update => "schremser_bier", :url => { :action => "mehr_bier" }) end test "periodically_call_remote_with_frequency" do assert_dom_equal( - "", + "", periodically_call_remote(:frequency => 2) ) end -- cgit v1.2.3 From 007db3fca8be4f22ede5d4d94e8dc7e3cb34d240 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Tue, 26 Jan 2010 11:33:37 -0500 Subject: start of prototype driver, missing observe_form, observe_field, and periodically_call_remote --- .../public/javascripts/prototype.driver.js | 279 +++++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 railties/lib/generators/rails/app/templates/public/javascripts/prototype.driver.js diff --git a/railties/lib/generators/rails/app/templates/public/javascripts/prototype.driver.js b/railties/lib/generators/rails/app/templates/public/javascripts/prototype.driver.js new file mode 100644 index 0000000000..7d73f4f9ec --- /dev/null +++ b/railties/lib/generators/rails/app/templates/public/javascripts/prototype.driver.js @@ -0,0 +1,279 @@ +Event.observe(document, 'dom:loaded', function() { + function handleRemote(e, el){ + var data = null, + method = el.readAttribute('method') || el.readAttribute('data-method') || 'GET', + url = el.readAttribute('action') || el.readAttribute('data-url') || '#', + async = el.readAttribute('data-remote-type') === 'synchronous' ? false : true, + update = el.readAttribute('data-update-success'), + position = el.readAttribute('data-update-position'); + + if (el.readAttribute('data-submit')) { + var submit_el = $(el.readAttribute('data-submit')); + if(submit_el !== undefined && submit_el.tagName.toUpperCase() == 'FORM'){ + data = submit_el.serialize(); + } + } else if (el.readAttribute('data-with')) { + data = el.readAttribute('data-with'); + } else if(el.tagName.toUpperCase() === 'FORM') { + data = el.serialize(); + } + + document.fire('rails:before'); + + new Ajax.Request(url, { + method: method, + asynchronous: async, + parameters: data, + evalJS: true, + evalJSON: true, + onComplete: function(xhr){ + document.fire('rails:complete', {xhr: xhr, element: el, submitted_button: getEventProperty(e, 'submitted_button')}); + }, + onLoading: function(xhr){ + document.fire('rails:after', {xhr: xhr, element: el}); + document.fire('rails:loading', {xhr: xhr, element: el}); + }, + onLoaded: function(xhr){ + document.fire('rails:loaded', {xhr: xhr, element: el}); + }, + onSuccess: function(xhr){ + document.fire('rails:success', {xhr: xhr, element: el}); + }, + onFailure: function(xhr){ + document.fire('rails:failure', {xhr: xhr, element: el}); + } + }); + + } + + function setEventProperty(e, property, value){ + if(e.memo === undefined){ + e.memo = {}; + } + + e.memo[property] = value; + } + + function getEventProperty(e, property){ + if(e.memo !== undefined && e.memo[property] !== undefined){ + return e.memo[property]; + } + } + + function confirmed(e, el){ + if(getEventProperty(e,'confirm_checked') !== true){ + setEventProperty(e, 'confirm_checked', true); + + el = Event.findElement(e, 'form') || el; + var confirm_msg = el.readAttribute('data-confirm'); + + if(confirm_msg !== null){ + var result = el.fire('rails:confirm', {confirm_msg: confirm_msg}); + if(result.memo.stop_event === true){ + Event.stop(e); + return false; + } + } + } + return true; + } + + function disable_button(el){ + var disable_with = el.readAttribute('data-disable-with'); + if(disable_with !== null){ + el.writeAttribute('data-enable-with', el.readAttribute('value')); + el.writeAttribute('value', disable_with); + el.writeAttribute('disabled', true); + } + } + + function enable_button(el){ + var enable_with = el.readAttribute('data-enable-with'); + if(enable_with !== null){ + el.writeAttribute('value', enable_with); + } + el.writeAttribute('disabled', false); + } + + function updateHTML(el, content, result){ + var element_id = null; + + if(result === 'success'){ + element_id = el.readAttribute('data-update-success'); + } else if(result === 'failure'){ + element_id = el.readAttribute('data-update-failure'); + } + + var element_to_update = $(element_id); + if(element_to_update !== null){ + var position = el.readAttribute('data-update-position'); + if(position !== null){ + var options = {}; + options[position] = content; + element_to_update.insert(options); + } else { + element_to_update.update(content); + } + } + } + + /** + * + * Event Listeners + * + */ + + Event.observe(document, 'submit', function (e) { + var form = Event.findElement(e, 'form'); + // Make sure conditions and confirm have not already run + if(form !== undefined && conditions_met(e, form) && confirmed(e, form)){ + + var button = form.down('input[data-submitted=true]'); + button.writeAttribute('data-submitted', null); + setEventProperty(e, 'submitted_button', button); + disable_button(button); + + if(form.readAttribute('data-remote') === 'true'){ + Event.stop(e); + handleRemote(e, form); + } + } + }); + + Event.observe(document, 'click', function (e) { + var el = Event.findElement(e, 'a') || Event.findElement(e, 'input'); + + if(el !== undefined && el.tagName.toUpperCase() === 'INPUT' && el.readAttribute('type').toUpperCase() === 'SUBMIT'){ + el.writeAttribute('data-submitted', 'true'); + + // Submit is handled by submit event, don't continue on this path + el = undefined; + } else if(el !== undefined && el.tagName.toUpperCase() === 'INPUT' && el.readAttribute('type').toUpperCase() !== 'BUTTON'){ + // Make sure other inputs do not send this event + el = undefined; + } + + if(el !== undefined && conditions_met(e, el) && confirmed(e, el)){ + if(el.tagName.toUpperCase() === 'INPUT' && el.readAttribute('type').toUpperCase() === 'BUTTON'){ + disable_button(el); + } + + if(el.readAttribute('data-remote') === 'true'){ + Event.stop(e); + handleRemote(e, el); + } else if(el.readAttribute('data-popup') !== null){ + Event.stop(e); + console.log('firing rails:popup'); + document.fire('rails:popup', {element: el}); + } + } + }); + + + /** + * + * Default Event Handlers + * + */ + Event.observe(document, 'rails:confirm', function(e){ + setEventProperty(e, 'stop_event', !confirm(getEventProperty(e,'confirm_msg'))); + }); + + Event.observe(document, 'rails:popup', function(e){ + console.log('in rails:popup'); + var el = getEventProperty(e, 'element'); + var url = el.readAttribute('href') || el.readAttribute('data-url'); + + if(el.readAttribute('data-popup') === true){ + window.open(url); + } else { + window.open(url, el.readAttribute('data-popup')); + } + }); + + Event.observe(document, 'rails:complete', function(e){ + var el = getEventProperty(e, 'element'); + + if(el.tagName.toUpperCase() === 'FORM'){ + var button = getEventProperty(e, 'submitted_button') ; + enable_button(button); + } + }); + + Event.observe(document, 'rails:success', function(e){ + var el = getEventProperty(e, 'element'), + xhr = getEventProperty(e, 'xhr'); + + if(xhr.responseText !== null){ + updateHTML(el, xhr.responseText, 'success'); + } + }); + + Event.observe(document, 'rails:failure', function(e){ + var el = getEventProperty(e, 'element'), + xhr = getEventProperty(e, 'xhr'); + + if(xhr.responseText !== null){ + updateHTML(el, xhr.responseText, 'failure'); + } + }); + + /** + * + * Rails 2.x Helpers / Event Handlers + * + */ + function evalAttribute(el, attribute){ + var js = el.readAttribute('data-' + attribute); + + if(js){ + eval(js); + } + } + + function conditions_met(e, el){ + if(getEventProperty(e,'condition_checked') !== true){ + setEventProperty(e, 'condition_checked', true); + + el = Event.findElement(e, 'form') || el; + var conditions = el.readAttribute('data-condition'); + + if(conditions !== null){ + if(eval(conditions) === false){ + Event.stop(e); + return false; + } + } + } + return true; + } + + Event.observe(document, 'rails:success', function(e){ + evalAttribute('onsuccess'); + }); + + Event.observe(document, 'rails:failure', function(e){ + evalAttribute('onfailure'); + }); + + Event.observe(document, 'rails:complete', function(e){ + evalAttribute('oncomplete'); + evalAttribute(this, 'on' + getEventProperty('xhr', xhr.status)); + }); + + Event.observe(document, 'rails:loading', function(e){ + evalAttribute('onloading'); + }); + + Event.observe(document, 'rails:loaded', function(e){ + evalAttribute('onloaded'); + }); + + Event.observe(document, 'rails:before', function(e){ + evalAttribute('onbefore'); + }); + + Event.observe(document, 'rails:after', function(e){ + evalAttribute('onafter'); + }); +}); -- cgit v1.2.3 From a6cd35ba68c6d210f097a37ff737bbc1e5c61972 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Tue, 26 Jan 2010 11:59:19 -0500 Subject: moving html_safe call into helpers directly as they only work from that level --- actionpack/lib/action_view/helpers/ajax_helper.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 8d09ca1187..5b706ba942 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -405,7 +405,7 @@ module ActionView # periodically_call_remote does not need data-observe=true attributes.delete('data-observe') - script_decorator(attributes) + script_decorator(attributes).html_safe! end # Observes the field with the DOM ID specified by +field_id+ and calls a @@ -484,7 +484,7 @@ module ActionView attributes = extract_observer_attributes!(options) attributes.merge!(html_options) if html_options - script_decorator(attributes) + script_decorator(attributes).html_safe! end # Observes the form with the DOM ID specified by +form_id+ and calls a @@ -499,13 +499,13 @@ module ActionView options[:observed] = name attributes = extract_observer_attributes!(options) - script_decorator(attributes) + script_decorator(attributes).html_safe! end def script_decorator(options) attributes = %w(type="application/json") attributes += options.map{|k, v| k + '="' + v.to_s + '"'} - "".html_safe! + "" end private -- cgit v1.2.3 From f661a3bc599ac336aeaf643a8d1d388fe905a07d Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Tue, 26 Jan 2010 12:40:29 -0500 Subject: removing container inline js function of observed elements :function callback --- actionpack/lib/action_view/helpers/ajax_helper.rb | 6 +----- actionpack/test/template/ajax_helper_test.rb | 11 +++++++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 5b706ba942..65315fd709 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -566,7 +566,7 @@ module ActionView attributes = extract_remote_attributes!(options) attributes["data-observe"] = true attributes["data-observed"] = options.delete(:observed) - attributes["data-onobserve"] = create_js_function(callback, "element", "value") if callback + attributes["data-onobserve"] = callback if callback attributes["data-frequency"] = frequency.to_i if frequency && frequency != 0 attributes.delete("data-remote") @@ -577,10 +577,6 @@ module ActionView attributes.delete_if {|key, value| value.nil? } attributes end - - def create_js_function(statements, *arguments) - "function(#{arguments.join(", ")}) {#{statements}}" - end end # TODO: All evaled goes here per wycat diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index 47d458e4ef..6d332d4fca 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -171,6 +171,13 @@ class AjaxHelperTest < AjaxHelperBaseTest ) end + test "periodically_call_remote_with_function" do + assert_dom_equal( + "", + periodically_call_remote(:frequency => 2, :function => "alert('test')") + ) + end + test "form_remote_tag" do assert_dom_equal %(
), form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }) @@ -297,7 +304,7 @@ class AjaxHelperTest < AjaxHelperBaseTest end test "observe_field using function for callback" do - assert_dom_equal %(), + assert_dom_equal %(), observe_field("glass", :frequency => 5.minutes, :function => "alert('Element changed')") end @@ -307,7 +314,7 @@ class AjaxHelperTest < AjaxHelperBaseTest end test "observe_form using function for callback" do - assert_dom_equal %(), + assert_dom_equal %(), observe_form("cart", :frequency => 2, :function => "alert('Form changed')") end -- cgit v1.2.3 From c0f63883ea24925d4e03c258b874e49cf507cc33 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Tue, 26 Jan 2010 14:38:57 -0500 Subject: :href should be comming in through html_options and not options --- actionpack/lib/action_view/helpers/ajax_helper.rb | 2 +- actionpack/test/template/ajax_helper_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 65315fd709..2ef791b834 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -304,7 +304,7 @@ module ActionView end attributes.merge!(html_options) - href = options[:href].nil? ? "#" : options[:href] + href = html_options[:href].nil? ? "#" : html_options[:href] attributes.merge!(:href => href) content_tag(:a, name, attributes) diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index 6d332d4fca..4e48543c81 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -103,7 +103,7 @@ class AjaxHelperTest < AjaxHelperBaseTest test "link_to_remote using explicit :href" do expected = %(Remote outauthor) - assert_dom_equal expected, link_to_remote("Remote outauthor", :href => 'http://www.example.com/testhref', :url => { :action => "whatnot" }, :condition => '$(\'foo\').val() == true') + assert_dom_equal expected, link_to_remote("Remote outauthor", {:url => { :action => "whatnot" }, :condition => '$(\'foo\').val() == true'}, :href => 'http://www.example.com/testhref') end test "link_to_remote using :submit" do -- cgit v1.2.3 From 1b8ced53c4031170538c455c3d3fae3c967cc247 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Tue, 26 Jan 2010 14:08:10 -0600 Subject: Added regression tests that discovered the previous issue. --- actionpack/test/template/ajax_helper_test.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index 4e48543c81..ed020d74f8 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -86,6 +86,20 @@ class AjaxHelperTest < AjaxHelperBaseTest link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :position => :bottom) end + test "link_to_remote using both url and href" do + expected = 'Delete this Post' + assert_dom_equal expected, link_to_remote( "Delete this Post", + { :update => "posts", + :url => { :action => "destroy" } }, + :href => url_for(:action => "destroy")) + end + + test "link_to_remote with update-success and url" do + expected = 'Delete this Post' + assert_dom_equal expected, link_to_remote( "Delete this Post", :url => { :action => "destroy", :id => 5 }, + :update => { :success => "posts", :failure => "error" }) + end + test "link_to_remote with before/after callbacks" do assert_dom_equal %(Remote outauthor), link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :before => "before();", :after => "after();") -- cgit v1.2.3 From 5584d58e656c5c09db20d15727d9387ed39f8cf2 Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Tue, 26 Jan 2010 15:20:23 -0500 Subject: refactored to be more dry, data-update-failure now correctly works, combine compat and driver, namespaced events, and support for periodically_call_remote --- .../templates/public/javascripts/jquery.compat.js | 33 ---- .../templates/public/javascripts/jquery.driver.js | 214 ++++++++++++++------- 2 files changed, 145 insertions(+), 102 deletions(-) delete mode 100644 railties/lib/generators/rails/app/templates/public/javascripts/jquery.compat.js diff --git a/railties/lib/generators/rails/app/templates/public/javascripts/jquery.compat.js b/railties/lib/generators/rails/app/templates/public/javascripts/jquery.compat.js deleted file mode 100644 index 6f5427fbce..0000000000 --- a/railties/lib/generators/rails/app/templates/public/javascripts/jquery.compat.js +++ /dev/null @@ -1,33 +0,0 @@ -jQuery(function ($) { - function evalAttribute(element, attribute) { - var el = $(element); - var attr = el.attr('data-' + attribute); - if(attr) { - eval(attr); - } - } - - $('form[data-remote="true"],a[data-remote="true"],input[data-remote="true"]') - .live('before', function (e) { - evalAttribute(this, 'onbefore'); - }) - .live('after', function (e, xhr) { - evalAttribute(this, 'onafter'); - }) - .live('loading', function (e, xhr) { - evalAttribute(this, 'onloading'); - }) - .live('loaded', function (e, xhr) { - evalAttribute(this, 'onloaded'); - }) - .live('complete', function (e, xhr) { - evalAttribute(this, 'oncomplete'); - evalAttribute(this, 'on' + xhr.status); - }) - .live('success', function (e, data, status, xhr) { - evalAttribute(this, 'onsuccess'); - }) - .live('failure', function (e, xhr, status, error) { - evalAttribute(this, 'onfailure'); - }); -}); diff --git a/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js b/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js index 1fa993cbb0..849b571558 100644 --- a/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js +++ b/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js @@ -1,78 +1,154 @@ +// TODO: confirm +// TODO: popup +// TODO: disable_with jQuery(function ($) { + var rails = { + update: function (selector, content, position) { + var element = selector.charAt(0) == '#' ? selector : '#' + selector; + if (position) { + switch (position) { + case "before": + $(element).before(content); + break; + case "after": + $(element).after(content); + break; + case "top": + $(element).prepend(content); + break; + case "bottom": + $(element).append(content); + break; + default: + $(element).append(content); + break; + } + } else { + $(element).html(content); + } + }, + remote: function (e) { + var el = $(this), + data = [], + condition = el.attr('data-condition') ? eval(el.attr('data-condition')) : true, + method = el.attr('method') || el.attr('data-method') || 'GET', + url = el.attr('action') || el.attr('data-url') || '#', + async = el.attr('data-remote-type') === 'synchronous' ? false : true; - function handleRemote (e) { - var el = $(this), - data = [], - condition = el.attr('data-condition') ? eval(el.attr('data-condition')) : true, - method = el.attr('method') || el.attr('data-method') || 'GET', - url = el.attr('action') || el.attr('data-url') || '#', - async = el.attr('data-remote-type') === 'synchronous' ? false : true, - update = el.attr('data-update-success'), - position = el.attr('data-update-position'); - - if (el.attr('data-submit')) { - data = $('#' + el.attr('data-submit')).serializeArray(); - } else if (el.attr('data-with')) { - data = el.attr('data-with'); - } else if(e.target.tagName.toUpperCase() == 'FORM') { - data = el.serializeArray(); - } else if(e.target.tagName.toUpperCase() == 'INPUT') { - data = el.closest('form').serializeArray(); - } - - if(condition) { - el.trigger('before'); + if (el.attr('data-submit')) { + data = $('#' + el.attr('data-submit')).serializeArray(); + } else if (el.attr('data-with')) { + data = el.attr('data-with'); + } else if (e && e.target.tagName.toUpperCase() == 'FORM') { + data = el.serializeArray(); + } else if (e && e.target.tagName.toUpperCase() == 'INPUT') { + data = el.closest('form').serializeArray(); + } - $.ajax({ - async: async, - url: url, - data: data, - type: method.toUpperCase(), - beforeSend: function (xhr) { - el.trigger('after', xhr); - el.trigger('loading', xhr); - }, - success: function (data, status, xhr) { - el.trigger('success', [data, status, xhr]); - - if (update) { - var element = update.charAt(0) == '#' ? update : '#' + update; - if(position) { - switch(el.attr('data-update-position')) { - case "before": - $(element).before(data); - break; - case "after": - $(element).after(data); - break; - case "top": - $(element).prepend(data); - break; - case "bottom": - $(element).append(data); - break; - default: - $(element).append(data); - break; - } - } else { - $(element).html(data); + if (condition) { + el.trigger('rails:before'); + + $.ajax({ + async: async, + url: url, + data: data, + type: method.toUpperCase(), + beforeSend: function (xhr) { + el.trigger('rails:after', xhr); + el.trigger('rails:loading', xhr); + }, + success: function (data, status, xhr) { + el.trigger('rails:success', [data, status, xhr]); + if (el.attr('data-update-success')) { + rails.update(el.attr('data-update-success'), data, el.attr('data-update-position')); + } + }, + complete: function (xhr) { + el.trigger('rails:complete', xhr); + el.trigger('rails:loaded', xhr); + }, + error: function (xhr, status, error) { + el.trigger('rails:failure', [xhr, status, error]); + if (el.attr('data-update-failure')) { + rails.update(el.attr('data-update-failure'), data, el.attr('data-update-position')); } } - }, - complete: function (xhr) { - el.trigger('complete', xhr); - el.trigger('loaded', xhr); - }, - error: function (xhr, status, error) { - el.trigger('failure', [xhr, status, error]); - } - }); + }); + } + e.preventDefault(); } - - e.preventDefault(); } - $('form[data-remote="true"]').live('submit', handleRemote); - $('a[data-remote="true"],input[data-remote="true"],input[data-remote-submit="true"]').live('click', handleRemote); + /** + * observe_form, and observe_field + */ + $('script[data-observe="true"]').each(function (index, el) { + // TODO: hook to onchange event of field or form being observed + }); + + /** + * periodically_call_remote + */ + $('script[data-periodical="true"]').each(function (index, e) { + var el = $(e), + frequency = el.attr('data-frequency') ? el.attr('data-frequency') : 10, + remote = function() { + var event = new jQuery.Event('periodical'); + event.target = e; + + rails.remote.call(el, event); + }; + + setInterval(remote, frequency * 1000); + }); + + /** + * remote_form_tag, and remote_form_for + */ + $('form[data-remote="true"]').live('submit', rails.remote); + + /** + * link_to_remote, button_to_remote, and submit_to_remote + */ + $('a[data-remote="true"],input[data-remote="true"],input[data-remote-submit="true"]').live('click', rails.remote); + + + /** + * + * Rails 2.x Helper / Event Handlers + * By default we listen to all callbacks, and status code callbacks and + * check the element for data- attribute and eval it. + * + */ + rails.compat = { + evalAttribute: function (element, attribute) { + var el = $(element), + attr = el.attr('data-' + attribute); + return (attr) ? eval(attr) : true; + } + }; + + $('form[data-remote="true"],a[data-remote="true"],input[data-remote="true"]') + .live('rails:before', function (e) { + rails.compat.evalAttribute(this, 'onbefore'); + }) + .live('rails:after', function (e, xhr) { + rails.compat.evalAttribute(this, 'onafter'); + }) + .live('rails:loading', function (e, xhr) { + rails.compat.evalAttribute(this, 'onloading'); + }) + .live('rails:loaded', function (e, xhr) { + rails.compat.evalAttribute(this, 'onloaded'); + }) + .live('rails:complete', function (e, xhr) { + rails.compat.evalAttribute(this, 'oncomplete'); + rails.compat.evalAttribute(this, 'on' + xhr.status); + }) + .live('rails:success', function (e, data, status, xhr) { + rails.compat.evalAttribute(this, 'onsuccess'); + }) + .live('rails:failure', function (e, xhr, status, error) { + rails.compat.evalAttribute(this, 'onfailure'); + }); }); -- cgit v1.2.3 From 3c7d39d65f6ad55543cd2d12aec22dd8f927f1c6 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Tue, 26 Jan 2010 16:20:25 -0500 Subject: observe_form now supports :with option as it should --- actionpack/lib/action_view/helpers/ajax_helper.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 2ef791b834..343bd78bbd 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -496,8 +496,11 @@ module ActionView # +observe_field+. The JavaScript variable +value+ available to the # :with option is set to the serialized form by default. def observe_form(name, options = {}) + html_options = options.delete(:callbacks) + options[:observed] = name attributes = extract_observer_attributes!(options) + attributes.merge!(html_options) if html_options script_decorator(attributes).html_safe! end @@ -609,6 +612,13 @@ module ActionView options.merge!(:callbacks => html) super end + + def observe_form(name, options = {}) + html = {} + set_with_and_condition_attributes(options, html) + options.merge!(:callbacks => html) + super + end private def set_callbacks(options, html) -- cgit v1.2.3 From d13f25416055d56a7742d522dcf985354c518998 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Tue, 26 Jan 2010 16:21:37 -0500 Subject: initial prototype of prototype js driver --- .../public/javascripts/prototype.driver.js | 79 +++++++++++++++++----- 1 file changed, 62 insertions(+), 17 deletions(-) diff --git a/railties/lib/generators/rails/app/templates/public/javascripts/prototype.driver.js b/railties/lib/generators/rails/app/templates/public/javascripts/prototype.driver.js index 7d73f4f9ec..aaed677fda 100644 --- a/railties/lib/generators/rails/app/templates/public/javascripts/prototype.driver.js +++ b/railties/lib/generators/rails/app/templates/public/javascripts/prototype.driver.js @@ -1,5 +1,5 @@ Event.observe(document, 'dom:loaded', function() { - function handleRemote(e, el){ + function handle_remote(el, e){ var data = null, method = el.readAttribute('method') || el.readAttribute('data-method') || 'GET', url = el.readAttribute('action') || el.readAttribute('data-url') || '#', @@ -13,14 +13,28 @@ Event.observe(document, 'dom:loaded', function() { data = submit_el.serialize(); } } else if (el.readAttribute('data-with')) { - data = el.readAttribute('data-with'); + // It seems there is a big inconsistency between what :with means depending on the element type + // so this is going to look a bit crazy + if(el.tagName.toUpperCase() === 'SCRIPT' && el.readAttribute('data-observed') !== null){ + // Handle observe_field and observe_form + var observed_element = $(el.readAttribute('data-observed')); + + if(observed_element.tagName.toUpperCase() === 'FORM'){ + data = el.readAttribute('data-with') + '=' + observed_element.serialize(); + } else if(observed_element.tagName.toUpperCase() === 'INPUT' && observed_element.readAttribute('type').toUpperCase() !== "BUTTON" && observed_element.readAttribute('type').toUpperCase() !== "SUBMIT") { + data = el.readAttribute('data-with') + '=' + observed_element.getValue(); + } + } else { + // Handle link_to and button_to + data = evalAttribute(el, 'data-with'); + } } else if(el.tagName.toUpperCase() === 'FORM') { data = el.serialize(); } document.fire('rails:before'); - new Ajax.Request(url, { + var request = new Ajax.Request(url, { method: method, asynchronous: async, parameters: data, @@ -55,7 +69,7 @@ Event.observe(document, 'dom:loaded', function() { } function getEventProperty(e, property){ - if(e.memo !== undefined && e.memo[property] !== undefined){ + if(e !== null && e.memo !== undefined && e.memo[property] !== undefined){ return e.memo[property]; } } @@ -117,10 +131,38 @@ Event.observe(document, 'dom:loaded', function() { } } + $$("script[data-periodical=true]").each(function(el){ + var executor = new PeriodicalExecuter(function() { handle_remote(el);}, el.readAttribute('data-frequency')); + }); + + $$("script[data-observe=true]").each(function(el){ + var observed_element = $(el.readAttribute('data-observed')); + var original_value = observed_element.tagName.toUpperCase() === 'FORM' ? observed_element.serialize() : observed_element.getValue(); + var callback = el.readAttribute('data-onobserve'); + var executor = new PeriodicalExecuter(function() { + var value = observed_element.tagName.toUpperCase() === 'FORM' ? observed_element.serialize() : observed_element.getValue(); + + if(original_value !== value){ + original_value = value; + + if(callback !== null){ + evalAttribute(el, 'onobserve'); + } else if(el.readAttribute('data-url') !== null){ + handle_remote(el); + } + } + }, el.readAttribute('data-frequency')); + + }); + /** * * Event Listeners * + * the original element is contained inside the event, + * for some reason prototype wont let me listen for custom events on document + * if the event wasn't fired on document + * */ Event.observe(document, 'submit', function (e) { @@ -135,7 +177,7 @@ Event.observe(document, 'dom:loaded', function() { if(form.readAttribute('data-remote') === 'true'){ Event.stop(e); - handleRemote(e, form); + handle_remote(form, e); } } }); @@ -160,16 +202,14 @@ Event.observe(document, 'dom:loaded', function() { if(el.readAttribute('data-remote') === 'true'){ Event.stop(e); - handleRemote(e, el); + handle_remote(el, e); } else if(el.readAttribute('data-popup') !== null){ Event.stop(e); - console.log('firing rails:popup'); document.fire('rails:popup', {element: el}); } } }); - /** * * Default Event Handlers @@ -180,7 +220,6 @@ Event.observe(document, 'dom:loaded', function() { }); Event.observe(document, 'rails:popup', function(e){ - console.log('in rails:popup'); var el = getEventProperty(e, 'element'); var url = el.readAttribute('href') || el.readAttribute('data-url'); @@ -249,31 +288,37 @@ Event.observe(document, 'dom:loaded', function() { } Event.observe(document, 'rails:success', function(e){ - evalAttribute('onsuccess'); + evalAttribute(el, 'onsuccess'); }); Event.observe(document, 'rails:failure', function(e){ - evalAttribute('onfailure'); + evalAttribute(el, 'onfailure'); }); Event.observe(document, 'rails:complete', function(e){ - evalAttribute('oncomplete'); - evalAttribute(this, 'on' + getEventProperty('xhr', xhr.status)); + var el = getEventProperty(e, 'element'); + + evalAttribute(el, 'oncomplete'); + evalAttribute(el, 'on' + getEventProperty('xhr', xhr.status)); + + if(el.readAttribute('data-periodical') === 'true'){ + evalAttribute(el, 'onobserve'); + } }); Event.observe(document, 'rails:loading', function(e){ - evalAttribute('onloading'); + evalAttribute(el, 'onloading'); }); Event.observe(document, 'rails:loaded', function(e){ - evalAttribute('onloaded'); + evalAttribute(el, 'onloaded'); }); Event.observe(document, 'rails:before', function(e){ - evalAttribute('onbefore'); + evalAttribute(el, 'onbefore'); }); Event.observe(document, 'rails:after', function(e){ - evalAttribute('onafter'); + evalAttribute(el, 'onafter'); }); }); -- cgit v1.2.3 From da19dfa41998964f32c5ed106e6a23ab76a020c3 Mon Sep 17 00:00:00 2001 From: "Stephen St. Martin" Date: Tue, 26 Jan 2010 23:56:38 -0500 Subject: support for observers in jquery driver, and minor bug fixes --- .../templates/public/javascripts/jquery.driver.js | 69 ++++++++++++++++------ 1 file changed, 52 insertions(+), 17 deletions(-) diff --git a/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js b/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js index 849b571558..20938b002e 100644 --- a/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js +++ b/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js @@ -4,27 +4,27 @@ jQuery(function ($) { var rails = { update: function (selector, content, position) { - var element = selector.charAt(0) == '#' ? selector : '#' + selector; + var element = $('#' + selector); if (position) { switch (position) { case "before": - $(element).before(content); + element.before(content); break; case "after": - $(element).after(content); + element.after(content); break; case "top": - $(element).prepend(content); + element.prepend(content); break; case "bottom": - $(element).append(content); + element.append(content); break; default: - $(element).append(content); + element.append(content); break; } } else { - $(element).html(content); + element.html(content); } }, remote: function (e) { @@ -38,7 +38,18 @@ jQuery(function ($) { if (el.attr('data-submit')) { data = $('#' + el.attr('data-submit')).serializeArray(); } else if (el.attr('data-with')) { - data = el.attr('data-with'); + + if (e && e.target.tagName.toUpperCase() == 'SCRIPT' && el.attr('data-observed') !== null) { + var observed = $('#' + el.attr('data-observed')); + if(observed[0].tagName.toUpperCase() === 'FORM'){ + data = el.attr('data-with') + '=' + observed.serialize(); + } else if(observed[0].tagName.toUpperCase() === 'INPUT' && observed.attr('type').toUpperCase() !== "BUTTON" && observed.attr('type').toUpperCase() !== "SUBMIT") { + data = el.attr('data-with') + '=' + observed.val(); + } + } else { + // TODO: remove eval when deprecated + data = eval(el.attr('data-with')); + } } else if (e && e.target.tagName.toUpperCase() == 'FORM') { data = el.serializeArray(); } else if (e && e.target.tagName.toUpperCase() == 'INPUT') { @@ -54,6 +65,7 @@ jQuery(function ($) { data: data, type: method.toUpperCase(), beforeSend: function (xhr) { + xhr.setRequestHeader("Accept", "text/javascript") el.trigger('rails:after', xhr); el.trigger('rails:loading', xhr); }, @@ -70,7 +82,7 @@ jQuery(function ($) { error: function (xhr, status, error) { el.trigger('rails:failure', [xhr, status, error]); if (el.attr('data-update-failure')) { - rails.update(el.attr('data-update-failure'), data, el.attr('data-update-position')); + rails.update(el.attr('data-update-failure'), xhr.responseText, el.attr('data-update-position')); } } }); @@ -82,8 +94,27 @@ jQuery(function ($) { /** * observe_form, and observe_field */ - $('script[data-observe="true"]').each(function (index, el) { - // TODO: hook to onchange event of field or form being observed + $('script[data-observe="true"]').each(function (index, e) { + var el = $(e), + observed = $('#' + $(e).attr('data-observed')); + frequency = el.attr('data-frequency') ? el.attr('data-frequency') : 10, + value = observed[0].tagName.toUpperCase() === 'FORM' ? observed.serialize() : observed.val(); + + var observe = function (observed, frequency, value, e) { + return function () { + var event = new jQuery.Event('periodical'), + newValue = observed[0].tagName.toUpperCase() === 'FORM' ? observed.serialize() : observed.val(); + event.target = e; + + if(value !== newValue) { + value = newValue; + $(e).trigger('rails:observe'); + rails.remote.call(el, event); + } + } + }(observed, frequency, value, e); + + setInterval(observe, frequency * 1000); }); /** @@ -91,15 +122,16 @@ jQuery(function ($) { */ $('script[data-periodical="true"]').each(function (index, e) { var el = $(e), - frequency = el.attr('data-frequency') ? el.attr('data-frequency') : 10, - remote = function() { + frequency = el.attr('data-frequency') ? el.attr('data-frequency') : 10; + + setInterval(function () { + return function () { var event = new jQuery.Event('periodical'); event.target = e; rails.remote.call(el, event); - }; - - setInterval(remote, frequency * 1000); + } + }(e, el), frequency * 1000); }); /** @@ -128,7 +160,7 @@ jQuery(function ($) { } }; - $('form[data-remote="true"],a[data-remote="true"],input[data-remote="true"]') + $('form[data-remote="true"],a[data-remote="true"],input[data-remote="true"],script[data-observe="true"]') .live('rails:before', function (e) { rails.compat.evalAttribute(this, 'onbefore'); }) @@ -150,5 +182,8 @@ jQuery(function ($) { }) .live('rails:failure', function (e, xhr, status, error) { rails.compat.evalAttribute(this, 'onfailure'); + }) + .live('rails:observe', function (e) { + rails.compat.evalAttribute(this, 'onobserve'); }); }); -- cgit v1.2.3 From 253f335294d8207e050d3994eaabe2c8c1fca8b6 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Tue, 26 Jan 2010 00:50:26 -0600 Subject: tests + docs --- actionpack/lib/action_view/helpers/ajax_helper.rb | 152 +++++++++++++--------- 1 file changed, 90 insertions(+), 62 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 343bd78bbd..445e59d3a5 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -5,23 +5,26 @@ module ActionView # Rails classes should not be aware of individual JS frameworks include PrototypeHelper - # Creates a form that will submit using XMLHttpRequest in the background - # instead of the regular reloading POST arrangement and a scope around a - # specific resource that is used as a base for questioning about - # values for the fields. + # Returns a form that will allow the unobtrusive JavaScript drivers to submit the + # form the dynamic nature of their choice. The default behaviour is an XMLHttpRequest + # in the background instead of the regular POST arrangement. Even though it's using + # JavaScript to serialize the form elements, the form submission will work just like + # a regular submission as viewed by the receiving side (all elements available in + # params). The options for specifying the target with :url and + # defining callbacks is the same as +link_to_remote+. # # === Resource # # Example: # # # Generates: - # # ... + # # ... # # - # <% remote_form_for(@post) do |f| %> + # <% remote_form_for(@record, {:html => { :id => 'create-author' }}) do |f| %> # ... # <% end %> # @@ -47,7 +50,10 @@ module ActionView # # This will expand to be the same as: # - # <% remote_form_for :comment, @comment, :url => post_comment_path(@post, @comment), :html => { :method => :put, :class => "edit_comment", :id => "edit_comment_45" } do |f| %> + # <% remote_form_for :comment, @comment, :url => post_comment_path(@post, @comment), + # :html => { :method => :put, + # :class => "edit_comment", + # :id => "edit_comment_45" } do |f| %> # ... # <% end %> # @@ -69,13 +75,14 @@ module ActionView end alias_method :form_remote_for, :remote_form_for - # Returns a form tag that will submit using XMLHttpRequest in the - # background instead of the regular reloading POST arrangement. Even - # though it's using JavaScript to serialize the form elements, the form - # submission will work just like a regular submission as viewed by the - # receiving side (all elements available in params). The options for - # specifying the target with :url and defining callbacks is the same as - # +link_to_remote+. + # Returns a form tag that will allow the unobtrusive JavaScript drivers to submit the + # form via the dynamic behaviour of choice. The default behaviour is an XMLHttpRequest + # in the background instead of the regular POST arrangement. Even though it's using + # JavaScript to serialize the form elements, the form submission will work just like + # a regular submission as viewed by the receiving side (all elements available in + # params). The options for specifying the target with :url and + # defining callbacks is the same as +link_to_remote+. + # # # A "fall-through" target for browsers that doesn't do JavaScript can be # specified with the :action/:method options on :html. @@ -83,13 +90,12 @@ module ActionView # Example: # # # Generates: - # #
... + # # # # - # form_remote_tag :html => { :action => - # url_for(:controller => "some", :action => "place") } - # < form data-remote action="/some/place" method="post" > + # form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }) # # The Hash passed to the :html key is equivalent to the options (2nd) # argument in the FormTagHelper.form_tag method. @@ -108,7 +114,17 @@ module ActionView # <% form_remote_tag :url => '/posts' do -%> #
<%= submit_tag 'Save' %>
# <% end -%> - + # + # # Generates: + # # Hello world!
+ # # + # <% form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }) do -%> + # <% concat "Hello world!" %> + # <% end -%> + # def form_remote_tag(options = {}, &block) html_options = options.delete(:callbacks) @@ -121,43 +137,40 @@ module ActionView form_tag(attributes.delete(:action) || attributes.delete("data-url"), attributes, &block) end - # Returns a link to a remote action defined by options[:url] - # (using the url_for format) that's called in the background using - # XMLHttpRequest. The result of that request can then be inserted into a - # DOM object whose id can be specified with options[:update]. - # Usually, the result would be a partial prepared by the controller with - # render :partial. + # Returns a link that will allow unobtrusive JavaScript to dynamical adjust its + # behaviour. The default behaviour is an XMLHttpRequest in the background instead + # of the regular GET arrangement. The result of that request can then be inserted + # into a DOM object whose id can be specified with options[:update]. Usually, + # the result would be a partial prepared by the controller with render :partial. # # Examples: # - # # Generates: - # # Delete this post + # # Generates: + # # Remove Author # # - # link_to_remote "Delete this post", :update => "posts", - # :url => { :action => "destroy", :id => post.id } + # link_to_remote("Remove Author", { :url => { :action => "whatnot" }, + # :method => "delete"}) # - # # Generates: - # # - # # - # # - # link_to_remote(image_tag("refresh"), :update => "emails", - # :url => { :action => "list_emails" }) # # You can override the generated HTML options by specifying a hash in # options[:html]. # - # # Generates: - # # Delete this post + # # Generates: + # # Remove Author # # - # link_to_remote "Delete this post", :update => "posts", - # :url => post_url(@post), :method => :delete, - # :html => { :class => "destructive" } + # link_to_remote("Remove Author", { :url => { :action => "whatnot" }, + # :method => "delete", + # :html => { :class => "fine" }}) + # # # You can also specify a hash for options[:update] to allow for # easy redirection of output to an other DOM element if a server-side @@ -210,7 +223,7 @@ module ActionView # :url => { :action => "undo", :n => word_counter }, # :complete => "undoRequestCompleted(request)" # - # The callbacks that may be specified are (in order): (deprecated) + # The callbacks that may be specified are (in order): # # :loading:: Called when the remote document is being # loaded with data by the browser. @@ -292,8 +305,8 @@ module ActionView # # data-method='delete'> Delete this post # # # link_to_remote "Delete this post", - # { :update => "posts", :url => { :action => "destroy", :id => post.id } }, - # :href => url_for(:action => "destroy", :id => post.id) + # { :update => "posts", :url => { :action => "destroy", :id => post.id } } + # def link_to_remote(name, options, html_options = {}) attributes = {} attributes.merge!(:rel => "nofollow") if options[:method] && options[:method].to_s.downcase == "delete" @@ -310,10 +323,23 @@ module ActionView content_tag(:a, name, attributes) end - # Creates a button with an onclick event which calls a remote action - # via XMLHttpRequest - # The options for specifying the target with :url - # and defining callbacks is the same as link_to_remote. + # Returns an input of type button, which allows the unobtrusive JavaScript driver + # to dynamically adjust its behaviour. The default driver behaviour is to call a + # remote action via XMLHttpRequest in the background. + # The options for specifying the target with :url and defining callbacks is the same + # as link_to_remote. + # + # Example: + # + # # Generates: + # # + # # + # button_to_remote("Remote outpost", { :url => { :action => "whatnot" }}, { :class => "fine" }) + # def button_to_remote(name, options = {}, html_options = {}) attributes = html_options.merge!(:type => "button", :value => name) @@ -330,9 +356,11 @@ module ActionView tag(:input, attributes) end - # Returns a button input tag with the element name of +name+ and a value (i.e., display text) of +value+ - # that will submit form using XMLHttpRequest in the background instead of a regular POST request that - # reloads the page. + # Returns an input tag of type button, with the element name of +name+ and a value (i.e., display text) + # of +value+ which will allow the unobtrusive JavaScript driver to dynamically adjust its behaviour + # The default behaviour is to call a remote action via XMLHttpRequest in the background. + # + # request that reloads the page. # # # Create a button that submits to the create action # # -- cgit v1.2.3 From 2e338aed706b3ee8fb8d51040be87689597e087b Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Wed, 27 Jan 2010 12:35:32 -0600 Subject: updated tests + docs, plus minor inconsistency fixes --- actionpack/lib/action_view/helpers/ajax_helper.rb | 142 +++++++----- actionpack/test/template/ajax_helper_test.rb | 268 +++++++++++++++------- 2 files changed, 272 insertions(+), 138 deletions(-) diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 445e59d3a5..169a803848 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -6,12 +6,11 @@ module ActionView include PrototypeHelper # Returns a form that will allow the unobtrusive JavaScript drivers to submit the - # form the dynamic nature of their choice. The default behaviour is an XMLHttpRequest - # in the background instead of the regular POST arrangement. Even though it's using - # JavaScript to serialize the form elements, the form submission will work just like - # a regular submission as viewed by the receiving side (all elements available in - # params). The options for specifying the target with :url and - # defining callbacks is the same as +link_to_remote+. + # form dynamically. The default driver behaviour is an XMLHttpRequest in the background + # instead of the regular POST arrangement. Even though it's using JavaScript to serialize + # the form elements, the form submission will work just like a regular submission as + # viewed by the receiving side (all elements available in params). The options + # for specifying the target with :url anddefining callbacks is the same as +link_to_remote+. # # === Resource # @@ -30,7 +29,10 @@ module ActionView # # This will expand to be the same as: # - # <% remote_form_for :post, @post, :url => post_path(@post), :html => { :method => :put, :class => "edit_post", :id => "edit_post_45" } do |f| %> + # <% remote_form_for :post, @post, :url => post_path(@post), + # :html => { :method => :put, + # :class => "edit_post", + # :id => "edit_post_45" } do |f| %> # ... # <% end %> # @@ -38,22 +40,22 @@ module ActionView # # Example: # # Generates: - # #
... + # # id='new_article'>
# # - # <% remote_form_for([@post, @comment]) do |f| %> + # <% remote_form_for([@author, @article]) do |f| %> # ... # <% end %> # # This will expand to be the same as: # - # <% remote_form_for :comment, @comment, :url => post_comment_path(@post, @comment), + # <% remote_form_for :article, @article, :url => author_article_path(@author, @article), # :html => { :method => :put, - # :class => "edit_comment", - # :id => "edit_comment_45" } do |f| %> + # :class => "new_article", + # :id => "new_comment" } do |f| %> # ... # <% end %> # @@ -76,14 +78,13 @@ module ActionView alias_method :form_remote_for, :remote_form_for # Returns a form tag that will allow the unobtrusive JavaScript drivers to submit the - # form via the dynamic behaviour of choice. The default behaviour is an XMLHttpRequest + # form dynamically. The default JavaScript driver behaviour is an XMLHttpRequest # in the background instead of the regular POST arrangement. Even though it's using # JavaScript to serialize the form elements, the form submission will work just like # a regular submission as viewed by the receiving side (all elements available in # params). The options for specifying the target with :url and # defining callbacks is the same as +link_to_remote+. # - # # A "fall-through" target for browsers that doesn't do JavaScript can be # specified with the :action/:method options on :html. # @@ -93,9 +94,9 @@ module ActionView # #
+ # # data-update-success="glass_of_beer">
# # - # form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }) + # form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }) {} # # The Hash passed to the :html key is equivalent to the options (2nd) # argument in the FormTagHelper.form_tag method. @@ -105,14 +106,14 @@ module ActionView # # form_remote_tag also takes a block, like form_tag: # # Generates: - # #
- # #
+ # # # #
# # # <% form_remote_tag :url => '/posts' do -%> - #
<%= submit_tag 'Save' %>
+ # <%= submit_tag 'Save' %> # <% end -%> # # # Generates: @@ -122,7 +123,7 @@ module ActionView # # data-update-success="glass_of_beer">Hello world! # # # <% form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }) do -%> - # <% concat "Hello world!" %> + # "Hello world!" # <% end -%> # def form_remote_tag(options = {}, &block) @@ -178,27 +179,38 @@ module ActionView # # Example: # # Generates: - # # Delete this post + # # + # # Delete this Post' # # # link_to_remote "Delete this post", - # :url => { :action => "destroy", :id => post.id }, + # :url => { :action => "destroy"}, # :update => { :success => "posts", :failure => "error" } # # Optionally, you can use the options[:position] parameter to # influence how the target DOM element is updated. It must be one of # :before, :top, :bottom, or :after. # + # Example: + # # Generates: + # # Remove Author + # # + # link_to_remote("Remove Author", :url => { :action => "whatnot" }, :position => :bottom) + # + # # The method used is by default POST. You can also specify GET or you # can simulate PUT or DELETE over POST. All specified with options[:method] # # Example: # # Generates: - # # Destroy @@ -215,12 +227,14 @@ module ActionView # # Example: # # Generates: - # # hello # # - # word = 'hello' - # link_to_remote word, - # :url => { :action => "undo", :n => word_counter }, + # # undo + # # + # link_to_remote "undo", + # :url => { :controller => "words", :action => "undo", :n => word_counter }, # :complete => "undoRequestCompleted(request)" # # The callbacks that may be specified are (in order): @@ -290,7 +304,7 @@ module ActionView # # :with => "'name=' + $('name').value" # - # You can generate a link that uses AJAX in the general case, while + # You can generate a link that uses the UJS drivers in the general case, while # degrading gracefully to plain link behavior in the absence of # JavaScript by setting html_options[:href] to an alternate URL. # Note the extra curly braces around the options hash separate @@ -309,6 +323,7 @@ module ActionView # def link_to_remote(name, options, html_options = {}) attributes = {} + attributes.merge!(:rel => "nofollow") if options[:method] && options[:method].to_s.downcase == "delete" attributes.merge!(extract_remote_attributes!(options)) @@ -369,7 +384,7 @@ module ActionView # # type='button' # # value='Create' # # data-remote='true' - # # data-url='/testing/create' /> + # # data-url='/create' /> # # # <%= submit_to_remote 'create_btn', 'Create', :url => { :action => 'create' } %> # @@ -380,7 +395,7 @@ module ActionView # # @@ -401,34 +416,49 @@ module ActionView tag(:input, attributes) end - # Periodically calls the specified url (options[:url]) every - # options[:frequency] seconds (default is 10). Usually used to + # Periodically provides the UJS driver with the information to call the specified + # url (options[:url]) every options[:frequency] seconds (default is 10). Usually used to # update a specified div (options[:update]) with the results # of the remote call. The options for specifying the target with :url # and defining callbacks is the same as link_to_remote. # Examples: # # Call get_averages and put its results in 'avg' every 10 seconds # # Generates: - # # new PeriodicalExecuter(function() {new Ajax.Updater('avg', '/grades/get_averages', - # # {asynchronous:true, evalScripts:true})}, 10) + # # + # # # periodically_call_remote(:url => { :action => 'get_averages' }, :update => 'avg') # # # Call invoice every 10 seconds with the id of the customer # # If it succeeds, update the invoice DIV; if it fails, update the error DIV # # Generates: - # # new PeriodicalExecuter(function() {new Ajax.Updater({success:'invoice',failure:'error'}, - # # '/testing/invoice/16', {asynchronous:true, evalScripts:true})}, 10) - # periodically_call_remote(:url => { :action => 'invoice', :id => customer.id }, + # # " + # # + # periodically_call_remote(:url => { :action => 'invoice', :id => 1 }, # :update => { :success => "invoice", :failure => "error" } # # # Call update every 20 seconds and update the new_block DIV # # Generates: - # # new PeriodicalExecuter(function() {new Ajax.Updater('news_block', 'update', {asynchronous:true, evalScripts:true})}, 20) + # # + # # # periodically_call_remote(:url => 'update', :frequency => '20', :update => 'news_block') # def periodically_call_remote(options = {}) attributes = extract_observer_attributes!(options) attributes["data-periodical"] = true + attributes["data-frequency"] ||= 10 # periodically_call_remote does not need data-observe=true attributes.delete('data-observe') @@ -442,8 +472,16 @@ module ActionView # parameter with the Ajax call. # # Example: - # # Generates: new Form.Element.Observer('suggest', 0.25, function(element, value) {new Ajax.Updater('suggest', - # # '/testing/find_suggestion', {asynchronous:true, evalScripts:true, parameters:'q=' + value})}) + # # Generates: + # # "" + # # # <%= observe_field :suggest, :url => { :action => :find_suggestion }, # :frequency => 0.25, # :update => :suggest, @@ -567,7 +605,7 @@ module ActionView url_options = options.delete(:url) url_options = url_options.merge(:escape => false) if url_options.is_a?(Hash) - attributes["data-url"] = escape_javascript(url_for(url_options)) + attributes["data-url"] = escape_javascript(url_for(url_options)) if url_options purge_unused_attributes!(attributes) end @@ -591,14 +629,14 @@ module ActionView def extract_observer_attributes!(options) callback = options.delete(:function) - frequency = options.delete(:frequency) + frequency = options.delete(:frequency) || 10 attributes = extract_remote_attributes!(options) attributes["data-observe"] = true attributes["data-observed"] = options.delete(:observed) attributes["data-onobserve"] = callback if callback - attributes["data-frequency"] = frequency.to_i if frequency && frequency != 0 + attributes["data-frequency"] = frequency if frequency && frequency.to_f != 0 attributes.delete("data-remote") purge_unused_attributes!(attributes) diff --git a/actionpack/test/template/ajax_helper_test.rb b/actionpack/test/template/ajax_helper_test.rb index ed020d74f8..c925dbb8f6 100644 --- a/actionpack/test/template/ajax_helper_test.rb +++ b/actionpack/test/template/ajax_helper_test.rb @@ -6,8 +6,14 @@ class Author include ActiveModel::Conversion attr_reader :id - def save; @id = 1 end - def new_record?; @id.nil? end + def save + @id = 1 + end + + def new_record? + @id.nil? + end + def name @id.nil? ? 'new author' : "author ##{@id}" end @@ -18,8 +24,16 @@ class Article include ActiveModel::Conversion attr_reader :id attr_reader :author_id - def save; @id = 1; @author_id = 1 end - def new_record?; @id.nil? end + + def save + @id = 1 + @author_id = 1 + end + + def new_record? + @id.nil? + end + def name @id.nil? ? 'new article' : "article ##{@id}" end @@ -36,17 +50,34 @@ class AjaxHelperBaseTest < ActionView::TestCase super @template = self @controller = Class.new do + def url_for(options) - if options.is_a?(String) - options - else - url = "http://www.example.com/" - url << options[:action].to_s if options and options[:action] - url << "?a=#{options[:a]}" if options && options[:a] - url << "&b=#{options[:b]}" if options && options[:a] && options[:b] - url + return optons unless options.is_a?(Hash) + + url = options.delete(:only_path) ? '/' : 'http://www.example.com' + + if controller = options.delete(:controller) + url << '/' << controller.to_s + end + if action = options.delete(:action) + url << '/' << action.to_s end + + if id = options.delete(:id) + url << '/' << id.to_s + end + + url << hash_to_param(options) if options.any? + + url.gsub!(/\/\/+/,'/') + + url end + + private + def hash_to_param(hash) + hash.map { |k,v| "#{k}=#{v}" }.join('&').insert(0,'?') + end end.new end @@ -70,24 +101,36 @@ class AjaxHelperTest < AjaxHelperBaseTest end test "link_to_remote" do - assert_dom_equal %(Remote outauthor), - link_to_remote("Remote outauthor", { :url => { :action => "whatnot" }}, { :class => "fine" }) - assert_dom_equal %(Remote outauthor), - link_to_remote("Remote outauthor", :complete => "alert(request.responseText)", :url => { :action => "whatnot" }) - assert_dom_equal %(Remote outauthor), - link_to_remote("Remote outauthor", :success => "alert(request.responseText)", :url => { :action => "whatnot" }) - assert_dom_equal %(Remote outauthor), - link_to_remote("Remote outauthor", :failure => "alert(request.responseText)", :url => { :action => "whatnot" }) - assert_dom_equal %(Remote outauthor), - link_to_remote("Remote outauthor", :failure => "alert(request.responseText)", :url => { :action => "whatnot", :a => '10', :b => '20' }) - assert_dom_equal %(Remote outauthor), - link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :type => :synchronous) - assert_dom_equal %(Remote outauthor), - link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :position => :bottom) + assert_dom_equal %(Remove Author), + link_to_remote("Remove Author", { :url => { :action => "whatnot" }}, { :class => "fine" }) + assert_dom_equal %(Remove Author), + link_to_remote("Remove Author", :complete => "alert(request.responseText)", :url => { :action => "whatnot" }) + assert_dom_equal %(Remove Author), + link_to_remote("Remove Author", :success => "alert(request.responseText)", :url => { :action => "whatnot" }) + assert_dom_equal %(Remove Author), + link_to_remote("Remove Author", :failure => "alert(request.responseText)", :url => { :action => "whatnot" }) + assert_dom_equal %(Remove Author), + link_to_remote("Remove Author", :failure => "alert(request.responseText)", :url => { :action => "whatnot", :a => '10', :b => '20' }) + assert_dom_equal %(Remove Author), + link_to_remote("Remove Author", :url => { :action => "whatnot" }, :type => :synchronous) + assert_dom_equal %(Remove Author), + link_to_remote("Remove Author", :url => { :action => "whatnot" }, :position => :bottom) + end + + test "link_to_remote with url and oncomplete" do + actual = link_to_remote "undo", :url => { :controller => "words", :action => "undo", :n => 5 }, :complete => "undoRequestCompleted(request)" + expected = 'undo' + assert_dom_equal expected, actual + end + + test "link_to_remote with delete" do + actual = link_to_remote("Remove Author", { :url => { :action => "whatnot" }, :method => 'delete'}, { :class => "fine" }) + expected = 'Remove Author' + assert_dom_equal expected, actual end - + test "link_to_remote using both url and href" do - expected = 'Delete this Post' + expected = 'Delete this Post' assert_dom_equal expected, link_to_remote( "Delete this Post", { :update => "posts", :url => { :action => "destroy" } }, @@ -95,135 +138,162 @@ class AjaxHelperTest < AjaxHelperBaseTest end test "link_to_remote with update-success and url" do - expected = 'Delete this Post' - assert_dom_equal expected, link_to_remote( "Delete this Post", :url => { :action => "destroy", :id => 5 }, + expected = 'Delete this Post' + assert_dom_equal expected, link_to_remote( "Delete this Post", :url => { :action => "destroy"}, :update => { :success => "posts", :failure => "error" }) end test "link_to_remote with before/after callbacks" do - assert_dom_equal %(Remote outauthor), + assert_dom_equal %(Remote outauthor), link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :before => "before();", :after => "after();") end test "link_to_remote using :with expression" do - expected = %(Remote outauthor) + expected = %(Remote outauthor) assert_dom_equal expected, link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :with => "id=123") end test "link_to_remote using :condition expression" do - expected = %(Remote outauthor) + expected = %(Remote outauthor) assert_dom_equal expected, link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :condition => '$(\'foo\').val() == true') end test "link_to_remote using explicit :href" do - expected = %(Remote outauthor) + expected = %(Remote outauthor) assert_dom_equal expected, link_to_remote("Remote outauthor", {:url => { :action => "whatnot" }, :condition => '$(\'foo\').val() == true'}, :href => 'http://www.example.com/testhref') end test "link_to_remote using :submit" do - expected = %(Remote outauthor) + expected = %(Remote outauthor) assert_dom_equal expected, link_to_remote("Remote outauthor", :url => { :action => "whatnot" }, :submit => 'myForm') end test "link_to_remote with method delete" do - assert_dom_equal %(Remote outauthor), + assert_dom_equal %(Remote outauthor), link_to_remote("Remote outauthor", { :url => { :action => "whatnot" }, :method => "delete"}, { :class => "fine" }) end test "link_to_remote with method delete as symbol" do - assert_dom_equal %(Remote outauthor), + assert_dom_equal %(Remote outauthor), link_to_remote("Remote outauthor", { :url => { :action => "whatnot" }, :method => :delete}, { :class => "fine" }) end test "link_to_remote html options" do - assert_dom_equal %(Remote outauthor), + assert_dom_equal %(Remote outauthor), link_to_remote("Remote outauthor", { :url => { :action => "whatnot" }, :html => { :class => "fine" } }) end test "link_to_remote url quote escaping" do - assert_dom_equal %(Remote), + assert_dom_equal %(Remote), link_to_remote("Remote", { :url => { :action => "whatnot's" } }) end test "link_to_remote with confirm" do - assert_dom_equal %(Remote confirm), + assert_dom_equal %(Remote confirm), link_to_remote("Remote confirm", { :url => { :action => "whatnot" }, :method => "delete", :confirm => "Are you sure?"}, { :class => "fine" }) end test "button_to_remote" do - assert_dom_equal %(), + assert_dom_equal %(), button_to_remote("Remote outpost", { :url => { :action => "whatnot" }}, { :class => "fine" }) - assert_dom_equal %(), + assert_dom_equal %(), button_to_remote("Remote outpost", :complete => "alert(request.reponseText)", :url => { :action => "whatnot" }) - assert_dom_equal %(), + assert_dom_equal %(), button_to_remote("Remote outpost", :success => "alert(request.reponseText)", :url => { :action => "whatnot" }) - assert_dom_equal %(), + assert_dom_equal %(), button_to_remote("Remote outpost", :failure => "alert(request.reponseText)", :url => { :action => "whatnot" }) - assert_dom_equal %(), + assert_dom_equal %(), button_to_remote("Remote outpost", :failure => "alert(request.reponseText)", :url => { :action => "whatnot", :a => '10', :b => '20' }) end test "button_to_remote with confirm" do - assert_dom_equal %(), + assert_dom_equal %(), button_to_remote("Remote outpost", { :url => { :action => "whatnot" }, :confirm => "Are you sure?"}, { :class => "fine" }) end test "button_to_remote with :submit" do - assert_dom_equal %(), + assert_dom_equal %(), button_to_remote("Remote outpost", { :url => { :action => "whatnot" }, :submit => "myForm"}, { :class => "fine" }) end test "periodically_call_remote" do - assert_dom_equal %(), - periodically_call_remote(:update => "schremser_bier", :url => { :action => "mehr_bier" }) + expected = "" + actual = periodically_call_remote(:update => "schremser_bier", :url => { :action => "mehr_bier" }) + assert_dom_equal expected, actual end test "periodically_call_remote_with_frequency" do - assert_dom_equal( - "", - periodically_call_remote(:frequency => 2) - ) + expected = "" + actual = periodically_call_remote(:frequency => 2) + assert_dom_equal expected, actual end test "periodically_call_remote_with_function" do - assert_dom_equal( - "", - periodically_call_remote(:frequency => 2, :function => "alert('test')") - ) + expected = "" + actual = periodically_call_remote(:frequency => 2, :function => "alert('test')") + assert_dom_equal expected, actual + end + + test "periodically_call_remote_with_update" do + actual = periodically_call_remote(:url => { :action => 'get_averages' }, :update => 'avg') + expected = "" + assert_dom_equal expected, actual + end + + test "periodically_call_remote with update success and failure" do + actual = periodically_call_remote(:url => { :action => 'invoice', :id => 1 },:update => { :success => "invoice", :failure => "error" }) + expected = "" + assert_dom_equal expected, actual + end + + test "periodically_call_remote with frequency and update" do + actual = periodically_call_remote(:url => 'update', :frequency => '20', :update => 'news_block') + expected = "" + assert_dom_equal expected, actual end test "form_remote_tag" do - assert_dom_equal %(
), - form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }) - assert_dom_equal %(), + assert_dom_equal %(), + form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast } ) + assert_dom_equal %(), form_remote_tag(:update => { :success => "glass_of_beer" }, :url => { :action => :fast }) - assert_dom_equal %(), + assert_dom_equal %(), form_remote_tag(:update => { :failure => "glass_of_water" }, :url => { :action => :fast }) - assert_dom_equal %(), + assert_dom_equal %(), form_remote_tag(:update => { :success => 'glass_of_beer', :failure => "glass_of_water" }, :url => { :action => :fast }) end test "form_remote_tag with method" do - assert_dom_equal %(
), + assert_dom_equal %(
), form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, :html => { :method => :put }) end + test "form_remote_tag with url" do + form_remote_tag(:url => '/posts' ){} + expected = "
" + assert_dom_equal expected, output_buffer + end + test "form_remote_tag with block in erb" do __in_erb_template = '' form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }) { concat "Hello world!" } - assert_dom_equal %(
Hello world!
), output_buffer + assert_dom_equal %(
Hello world!
), output_buffer end test "remote_form_for with record identification with new record" do remote_form_for(@record, {:html => { :id => 'create-author' }}) {} - expected = %(
) assert_dom_equal expected, output_buffer end + test "remote_form_for with url" do + remote_form_for(@record, {:html => { :id => 'create-author' }}) {} + expected = "
" + assert_dom_equal expected, output_buffer + end + test "remote_form_for with record identification without html options" do remote_form_for(@record) {} - expected = %(
) assert_dom_equal expected, output_buffer end @@ -236,7 +306,8 @@ class AjaxHelperTest < AjaxHelperBaseTest assert_dom_equal expected, output_buffer end - test "remote_form_for with new object in list" do + test "remote_form_for with new nested object and an excisting parent" do + @author.save remote_form_for([@author, @article]) {} expected = %(
) @@ -246,94 +317,119 @@ class AjaxHelperTest < AjaxHelperBaseTest test "remote_form_for with existing object in list" do @author.save @article.save + remote_form_for([@author, @article]) {} - expected = %(
) + expected = %(
) assert_dom_equal expected, output_buffer end test "on callbacks" do callbacks = [:uninitialized, :loading, :loaded, :interactive, :complete, :success, :failure] callbacks.each do |callback| - assert_dom_equal %(
), + assert_dom_equal %(), form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, callback=>"monkeys();") - assert_dom_equal %(), + assert_dom_equal %(), form_remote_tag(:update => { :success => "glass_of_beer" }, :url => { :action => :fast }, callback=>"monkeys();") - assert_dom_equal %(), + assert_dom_equal %(), form_remote_tag(:update => { :failure => "glass_of_beer" }, :url => { :action => :fast }, callback=>"monkeys();") - assert_dom_equal %(), + assert_dom_equal %(), form_remote_tag(:update => { :success => "glass_of_beer", :failure => "glass_of_water" }, :url => { :action => :fast }, callback=>"monkeys();") end #HTTP status codes 200 up to 599 have callbacks #these should work 100.upto(599) do |callback| - assert_dom_equal %(), + assert_dom_equal %(), form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, callback=>"monkeys();") end #test 200 and 404 - assert_dom_equal %(), + assert_dom_equal %(), form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, 200=>"monkeys();", 404=>"bananas();") #these shouldn't 1.upto(99) do |callback| - assert_dom_equal %(), + assert_dom_equal %(), form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, callback=>"monkeys();") end 600.upto(999) do |callback| - assert_dom_equal %(), + assert_dom_equal %(), form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, callback=>"monkeys();") end #test ultimate combo - assert_dom_equal %(), + assert_dom_equal %(), form_remote_tag(:update => "glass_of_beer", :url => { :action => :fast }, :loading => "c1()", :success => "s()", :failure => "f();", :complete => "c();", 200=>"monkeys();", 404=>"bananas();") end test "submit_to_remote" do - assert_dom_equal %(), + assert_dom_equal %(), submit_to_remote("More beer!", 1_000_000, :url => { :action => 'empty_bottle' }, :update => "empty_bottle") end + test "submit_to_remote simple" do + expected = "" + actual = submit_to_remote 'create_btn', 'Create', :url => { :action => 'create' } + assert_dom_equal expected, actual + end + + test "submit_to_remote with success and failure" do + expected = "" + actual = submit_to_remote 'update_btn', 'Update', :url => { :action => 'update' }, :update => { :success => "succeed", :failure => "fail" } + assert_dom_equal expected, actual + end + test "observe_field" do - assert_dom_equal %(), + assert_dom_equal %(), observe_field("glass", :frequency => 5.minutes, :url => { :action => "reorder_if_empty" }) end + test "observe_field with url, frequency, update and with" do + actual = observe_field :suggest, :url => { :action => :find_suggestion }, :frequency => 0.25, :update => :suggest, :with => 'q' + expected = "" + assert_dom_equal actual, expected + end + + test "observe_field default frequency" do + actual = observe_field :suggest + expected = "" + assert_dom_equal actual, expected + end + test "observe_field using with option" do - expected = %() + expected = %() assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => 'id=123') end test "observe_field using condition option" do - expected = %() + expected = %() assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :condition => '$(\'foo\').val() == true') end test "observe_field using json in with option" do - expected = %() + expected = %() assert_dom_equal expected, observe_field("glass", :frequency => 5.minutes, :url => { :action => "check_value" }, :with => "{'id':value}") end test "observe_field using function for callback" do - assert_dom_equal %(), + assert_dom_equal %(), observe_field("glass", :frequency => 5.minutes, :function => "alert('Element changed')") end test "observe_form" do - assert_dom_equal %(), + assert_dom_equal %(), observe_form("cart", :frequency => 2, :url => { :action => "cart_changed" }) end test "observe_form using function for callback" do - assert_dom_equal %(), + assert_dom_equal %(), observe_form("cart", :frequency => 2, :function => "alert('Form changed')") end test "observe_field without frequency" do - assert_dom_equal %(), + assert_dom_equal %(), observe_field("glass") end -- cgit v1.2.3 From 7b8c6472ffb6df4d341b0657f82e63c19e9a429c Mon Sep 17 00:00:00 2001 From: Gregor Schmidt Date: Tue, 26 Jan 2010 12:02:31 +0100 Subject: Adding custom yaml (de-)serialization for OrderedHash [#3608 state:committed] Signed-off-by: Jeremy Kemper --- activesupport/CHANGELOG | 2 ++ activesupport/lib/active_support/ordered_hash.rb | 23 ++++++++++++++++++++++- activesupport/test/ordered_hash_test.rb | 24 ++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 710e5c81e0..0454cb731d 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,5 +1,7 @@ *Edge* +* YAML serialization for OrderedHash. #3608 [Gregor Schmidt] + * Update bundled TZInfo to v0.3.16 [Geoff Buesing] * Georgetown TimeZone is now mapped to "America/Guyana" instead of "America/Argentina/San_Juan" #1821 [Geoff Buesing, Reuben Sivan] diff --git a/activesupport/lib/active_support/ordered_hash.rb b/activesupport/lib/active_support/ordered_hash.rb index b492648610..6723805d32 100644 --- a/activesupport/lib/active_support/ordered_hash.rb +++ b/activesupport/lib/active_support/ordered_hash.rb @@ -2,7 +2,8 @@ module ActiveSupport # Hash is ordered in Ruby 1.9! if RUBY_VERSION >= '1.9' - OrderedHash = ::Hash + class OrderedHash < ::Hash #:nodoc: + end else class OrderedHash < Hash #:nodoc: def initialize(*args, &block) @@ -138,4 +139,24 @@ module ActiveSupport end end end + + class OrderedHash #:nodoc: + def to_yaml_type + "!tag:yaml.org,2002:omap" + end + + def to_yaml(opts = {}) + YAML.quick_emit(self, opts) do |out| + out.seq(taguri, to_yaml_style) do |seq| + each do |k, v| + seq.add(k => v) + end + end + end + end + end + + YAML.add_builtin_type("omap") do |type, val| + ActiveSupport::OrderedHash[val.map(&:to_a).map(&:first)] + end end diff --git a/activesupport/test/ordered_hash_test.rb b/activesupport/test/ordered_hash_test.rb index 1521279437..d070206d44 100644 --- a/activesupport/test/ordered_hash_test.rb +++ b/activesupport/test/ordered_hash_test.rb @@ -198,4 +198,28 @@ class OrderedHashTest < Test::Unit::TestCase assert_same original, @ordered_hash assert_equal @other_ordered_hash.keys, @ordered_hash.keys end + + def test_each_after_yaml_serialization + values = [] + @deserialized_ordered_hash = YAML::load(YAML::dump(@ordered_hash)) + + @deserialized_ordered_hash.each {|key, value| values << value} + assert_equal @values, values + end + + def test_order_after_yaml_serialization + @deserialized_ordered_hash = YAML::load(YAML::dump(@ordered_hash)) + + assert_equal @keys, @deserialized_ordered_hash.keys + assert_equal @values, @deserialized_ordered_hash.values + end + + def test_order_after_yaml_serialization_with_nested_arrays + @ordered_hash[:array] = %w(a b c) + + @deserialized_ordered_hash = YAML::load(YAML::dump(@ordered_hash)) + + assert_equal @ordered_hash.keys, @deserialized_ordered_hash.keys + assert_equal @ordered_hash.values, @deserialized_ordered_hash.values + end end -- cgit v1.2.3 From 32ce2bb37fcc4f41322d69d74d686d08c0bb39c7 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Thu, 28 Jan 2010 11:33:58 +1100 Subject: Updated mail requirement to 2.1.2 --- actionmailer/actionmailer.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionmailer/actionmailer.gemspec b/actionmailer/actionmailer.gemspec index d73f86cd65..b0ec3d798e 100644 --- a/actionmailer/actionmailer.gemspec +++ b/actionmailer/actionmailer.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |s| s.homepage = "http://www.rubyonrails.org" s.add_dependency('actionpack', '= 3.0.pre') - s.add_dependency('mail', '~> 2.1.1') + s.add_dependency('mail', '~> 2.1.2') s.files = Dir['CHANGELOG', 'README', 'MIT-LICENSE', 'lib/**/*'] s.has_rdoc = true -- cgit v1.2.3 From 9029efce410ea49de6eb65481fb2ad8143e69c35 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Thu, 28 Jan 2010 11:46:54 +1100 Subject: Unbundling TZInfo --- activesupport/CHANGELOG | 2 + activesupport/Rakefile | 99 ---- activesupport/activesupport.gemspec | 1 + activesupport/lib/active_support/vendor.rb | 2 +- .../vendor/tzinfo-0.3.16/lib/tzinfo.rb | 33 -- .../tzinfo-0.3.16/lib/tzinfo/data_timezone.rb | 47 -- .../tzinfo-0.3.16/lib/tzinfo/data_timezone_info.rb | 228 --------- .../lib/tzinfo/definitions/Africa/Algiers.rb | 55 --- .../lib/tzinfo/definitions/Africa/Cairo.rb | 219 --------- .../lib/tzinfo/definitions/Africa/Casablanca.rb | 42 -- .../lib/tzinfo/definitions/Africa/Harare.rb | 18 - .../lib/tzinfo/definitions/Africa/Johannesburg.rb | 25 - .../lib/tzinfo/definitions/Africa/Monrovia.rb | 22 - .../lib/tzinfo/definitions/Africa/Nairobi.rb | 23 - .../definitions/America/Argentina/Buenos_Aires.rb | 84 ---- .../lib/tzinfo/definitions/America/Bogota.rb | 23 - .../lib/tzinfo/definitions/America/Caracas.rb | 23 - .../lib/tzinfo/definitions/America/Chicago.rb | 283 ------------ .../lib/tzinfo/definitions/America/Chihuahua.rb | 136 ------ .../lib/tzinfo/definitions/America/Denver.rb | 204 --------- .../lib/tzinfo/definitions/America/Godthab.rb | 161 ------- .../lib/tzinfo/definitions/America/Guatemala.rb | 27 -- .../lib/tzinfo/definitions/America/Guyana.rb | 24 - .../lib/tzinfo/definitions/America/Halifax.rb | 274 ----------- .../definitions/America/Indiana/Indianapolis.rb | 149 ------ .../lib/tzinfo/definitions/America/Juneau.rb | 194 -------- .../lib/tzinfo/definitions/America/La_Paz.rb | 22 - .../lib/tzinfo/definitions/America/Lima.rb | 35 -- .../lib/tzinfo/definitions/America/Los_Angeles.rb | 232 ---------- .../lib/tzinfo/definitions/America/Mazatlan.rb | 139 ------ .../lib/tzinfo/definitions/America/Mexico_City.rb | 144 ------ .../lib/tzinfo/definitions/America/Monterrey.rb | 131 ------ .../lib/tzinfo/definitions/America/New_York.rb | 282 ------------ .../lib/tzinfo/definitions/America/Phoenix.rb | 30 -- .../lib/tzinfo/definitions/America/Regina.rb | 74 --- .../lib/tzinfo/definitions/America/Santiago.rb | 205 --------- .../lib/tzinfo/definitions/America/Sao_Paulo.rb | 171 ------- .../lib/tzinfo/definitions/America/St_Johns.rb | 288 ------------ .../lib/tzinfo/definitions/America/Tijuana.rb | 196 -------- .../lib/tzinfo/definitions/Asia/Almaty.rb | 67 --- .../lib/tzinfo/definitions/Asia/Baghdad.rb | 73 --- .../lib/tzinfo/definitions/Asia/Baku.rb | 161 ------- .../lib/tzinfo/definitions/Asia/Bangkok.rb | 20 - .../lib/tzinfo/definitions/Asia/Chongqing.rb | 33 -- .../lib/tzinfo/definitions/Asia/Colombo.rb | 30 -- .../lib/tzinfo/definitions/Asia/Dhaka.rb | 112 ----- .../lib/tzinfo/definitions/Asia/Hong_Kong.rb | 90 ---- .../lib/tzinfo/definitions/Asia/Irkutsk.rb | 165 ------- .../lib/tzinfo/definitions/Asia/Jakarta.rb | 30 -- .../lib/tzinfo/definitions/Asia/Jerusalem.rb | 163 ------- .../lib/tzinfo/definitions/Asia/Kabul.rb | 20 - .../lib/tzinfo/definitions/Asia/Kamchatka.rb | 163 ------- .../lib/tzinfo/definitions/Asia/Karachi.rb | 114 ----- .../lib/tzinfo/definitions/Asia/Kathmandu.rb | 20 - .../lib/tzinfo/definitions/Asia/Kolkata.rb | 25 - .../lib/tzinfo/definitions/Asia/Krasnoyarsk.rb | 163 ------- .../lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb | 31 -- .../lib/tzinfo/definitions/Asia/Kuwait.rb | 18 - .../lib/tzinfo/definitions/Asia/Magadan.rb | 163 ------- .../lib/tzinfo/definitions/Asia/Muscat.rb | 18 - .../lib/tzinfo/definitions/Asia/Novosibirsk.rb | 164 ------- .../lib/tzinfo/definitions/Asia/Rangoon.rb | 24 - .../lib/tzinfo/definitions/Asia/Riyadh.rb | 18 - .../lib/tzinfo/definitions/Asia/Seoul.rb | 34 -- .../lib/tzinfo/definitions/Asia/Shanghai.rb | 35 -- .../lib/tzinfo/definitions/Asia/Singapore.rb | 33 -- .../lib/tzinfo/definitions/Asia/Taipei.rb | 59 --- .../lib/tzinfo/definitions/Asia/Tashkent.rb | 47 -- .../lib/tzinfo/definitions/Asia/Tbilisi.rb | 78 ---- .../lib/tzinfo/definitions/Asia/Tehran.rb | 121 ----- .../lib/tzinfo/definitions/Asia/Tokyo.rb | 30 -- .../lib/tzinfo/definitions/Asia/Ulaanbaatar.rb | 65 --- .../lib/tzinfo/definitions/Asia/Urumqi.rb | 33 -- .../lib/tzinfo/definitions/Asia/Vladivostok.rb | 164 ------- .../lib/tzinfo/definitions/Asia/Yakutsk.rb | 163 ------- .../lib/tzinfo/definitions/Asia/Yekaterinburg.rb | 165 ------- .../lib/tzinfo/definitions/Asia/Yerevan.rb | 165 ------- .../lib/tzinfo/definitions/Atlantic/Azores.rb | 270 ----------- .../lib/tzinfo/definitions/Atlantic/Cape_Verde.rb | 23 - .../tzinfo/definitions/Atlantic/South_Georgia.rb | 18 - .../lib/tzinfo/definitions/Australia/Adelaide.rb | 187 -------- .../lib/tzinfo/definitions/Australia/Brisbane.rb | 35 -- .../lib/tzinfo/definitions/Australia/Darwin.rb | 29 -- .../lib/tzinfo/definitions/Australia/Hobart.rb | 193 -------- .../lib/tzinfo/definitions/Australia/Melbourne.rb | 185 -------- .../lib/tzinfo/definitions/Australia/Perth.rb | 37 -- .../lib/tzinfo/definitions/Australia/Sydney.rb | 185 -------- .../lib/tzinfo/definitions/Etc/UTC.rb | 16 - .../lib/tzinfo/definitions/Europe/Amsterdam.rb | 228 --------- .../lib/tzinfo/definitions/Europe/Athens.rb | 185 -------- .../lib/tzinfo/definitions/Europe/Belgrade.rb | 163 ------- .../lib/tzinfo/definitions/Europe/Berlin.rb | 188 -------- .../lib/tzinfo/definitions/Europe/Bratislava.rb | 13 - .../lib/tzinfo/definitions/Europe/Brussels.rb | 232 ---------- .../lib/tzinfo/definitions/Europe/Bucharest.rb | 181 -------- .../lib/tzinfo/definitions/Europe/Budapest.rb | 197 -------- .../lib/tzinfo/definitions/Europe/Copenhagen.rb | 179 -------- .../lib/tzinfo/definitions/Europe/Dublin.rb | 276 ----------- .../lib/tzinfo/definitions/Europe/Helsinki.rb | 163 ------- .../lib/tzinfo/definitions/Europe/Istanbul.rb | 218 --------- .../lib/tzinfo/definitions/Europe/Kiev.rb | 168 ------- .../lib/tzinfo/definitions/Europe/Lisbon.rb | 268 ----------- .../lib/tzinfo/definitions/Europe/Ljubljana.rb | 13 - .../lib/tzinfo/definitions/Europe/London.rb | 288 ------------ .../lib/tzinfo/definitions/Europe/Madrid.rb | 211 --------- .../lib/tzinfo/definitions/Europe/Minsk.rb | 170 ------- .../lib/tzinfo/definitions/Europe/Moscow.rb | 181 -------- .../lib/tzinfo/definitions/Europe/Paris.rb | 232 ---------- .../lib/tzinfo/definitions/Europe/Prague.rb | 187 -------- .../lib/tzinfo/definitions/Europe/Riga.rb | 176 ------- .../lib/tzinfo/definitions/Europe/Rome.rb | 215 --------- .../lib/tzinfo/definitions/Europe/Sarajevo.rb | 13 - .../lib/tzinfo/definitions/Europe/Skopje.rb | 13 - .../lib/tzinfo/definitions/Europe/Sofia.rb | 173 ------- .../lib/tzinfo/definitions/Europe/Stockholm.rb | 165 ------- .../lib/tzinfo/definitions/Europe/Tallinn.rb | 172 ------- .../lib/tzinfo/definitions/Europe/Vienna.rb | 183 -------- .../lib/tzinfo/definitions/Europe/Vilnius.rb | 170 ------- .../lib/tzinfo/definitions/Europe/Warsaw.rb | 212 --------- .../lib/tzinfo/definitions/Europe/Zagreb.rb | 13 - .../lib/tzinfo/definitions/Pacific/Auckland.rb | 202 -------- .../lib/tzinfo/definitions/Pacific/Fiji.rb | 25 - .../lib/tzinfo/definitions/Pacific/Guam.rb | 22 - .../lib/tzinfo/definitions/Pacific/Honolulu.rb | 28 -- .../lib/tzinfo/definitions/Pacific/Majuro.rb | 20 - .../lib/tzinfo/definitions/Pacific/Midway.rb | 25 - .../lib/tzinfo/definitions/Pacific/Noumea.rb | 25 - .../lib/tzinfo/definitions/Pacific/Pago_Pago.rb | 26 -- .../lib/tzinfo/definitions/Pacific/Port_Moresby.rb | 20 - .../lib/tzinfo/definitions/Pacific/Tongatapu.rb | 27 -- .../tzinfo-0.3.16/lib/tzinfo/info_timezone.rb | 52 --- .../tzinfo-0.3.16/lib/tzinfo/linked_timezone.rb | 51 --- .../lib/tzinfo/linked_timezone_info.rb | 44 -- .../tzinfo-0.3.16/lib/tzinfo/offset_rationals.rb | 98 ---- .../tzinfo-0.3.16/lib/tzinfo/ruby_core_support.rb | 56 --- .../tzinfo-0.3.16/lib/tzinfo/time_or_datetime.rb | 292 ------------ .../vendor/tzinfo-0.3.16/lib/tzinfo/timezone.rb | 508 --------------------- .../lib/tzinfo/timezone_definition.rb | 56 --- .../tzinfo-0.3.16/lib/tzinfo/timezone_info.rb | 40 -- .../lib/tzinfo/timezone_offset_info.rb | 94 ---- .../tzinfo-0.3.16/lib/tzinfo/timezone_period.rb | 198 -------- .../lib/tzinfo/timezone_transition_info.rb | 129 ------ 142 files changed, 4 insertions(+), 16082 deletions(-) delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone_info.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Algiers.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Cairo.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Casablanca.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Harare.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Johannesburg.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Monrovia.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Nairobi.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Argentina/Buenos_Aires.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Bogota.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Caracas.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chicago.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chihuahua.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Denver.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Godthab.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guatemala.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guyana.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Halifax.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Indiana/Indianapolis.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Juneau.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/La_Paz.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Lima.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Los_Angeles.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mazatlan.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mexico_City.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Monterrey.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/New_York.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Phoenix.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Regina.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Santiago.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Sao_Paulo.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/St_Johns.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Tijuana.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Almaty.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baghdad.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baku.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Bangkok.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Chongqing.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Colombo.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Dhaka.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Hong_Kong.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Irkutsk.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jakarta.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jerusalem.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kabul.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kamchatka.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Karachi.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kathmandu.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kolkata.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Krasnoyarsk.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuwait.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Magadan.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Muscat.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Novosibirsk.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Rangoon.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Riyadh.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Seoul.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Shanghai.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Singapore.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Taipei.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tashkent.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tbilisi.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tehran.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tokyo.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Ulaanbaatar.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Urumqi.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Vladivostok.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yakutsk.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yekaterinburg.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yerevan.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Azores.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Cape_Verde.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/South_Georgia.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Adelaide.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Brisbane.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Darwin.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Hobart.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Melbourne.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Perth.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Sydney.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Etc/UTC.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Amsterdam.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Athens.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Belgrade.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Berlin.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bratislava.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Brussels.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bucharest.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Budapest.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Copenhagen.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Dublin.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Helsinki.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Istanbul.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Kiev.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Lisbon.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Ljubljana.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/London.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Madrid.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Minsk.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Moscow.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Paris.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Prague.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Riga.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Rome.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sarajevo.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Skopje.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sofia.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Stockholm.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Tallinn.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vienna.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vilnius.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Warsaw.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Zagreb.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Auckland.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Fiji.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Guam.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Honolulu.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Majuro.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Midway.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Noumea.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Pago_Pago.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Port_Moresby.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Tongatapu.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/info_timezone.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone_info.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/offset_rationals.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/ruby_core_support.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/time_or_datetime.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_definition.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_info.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_offset_info.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_period.rb delete mode 100644 activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_transition_info.rb diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 0454cb731d..3f008ac6f8 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,5 +1,7 @@ *Edge* +* Unvendor'd TZInfo. Now requires the TZInfo gem as a dependency + * YAML serialization for OrderedHash. #3608 [Gregor Schmidt] * Update bundled TZInfo to v0.3.16 [Geoff Buesing] diff --git a/activesupport/Rakefile b/activesupport/Rakefile index 08af1d6fca..434c5e2ed4 100644 --- a/activesupport/Rakefile +++ b/activesupport/Rakefile @@ -74,102 +74,3 @@ task :release => [ :package ] do rubyforge.login rubyforge.add_release(PKG_NAME, PKG_NAME, "REL #{PKG_VERSION}", *packages) end - - -$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/lib" -require 'active_support/values/time_zone' - -namespace :tzinfo do - desc "Update bundled tzinfo gem. Only copies the subset of classes and definitions required to support Rails time zone features." - task :update => ['tzinfo:copy_classes', 'tzinfo:copy_definitions'] do - Rake::Task['tzinfo:cleanup_tmp'].invoke - puts <<-EOV - *** FINAL TZINFO BUNDLING STEPS *** - - 1. Update TZInfo version in lib/active_support/vendor.rb - 2. gem uninstall tzinfo on local system before running tests, to ensure tests are running against bundled version - - If a test fails because a particular zone can't be found, it's likely because the TZInfo identifier in the - ActiveSupport::TimeZone::MAPPING hash is referencing a linked timezone instead of referencing the timezone directly. - In this case, just change the MAPPING value to the correct identifier, and unpack TZInfo again. - EOV - end - - task :unpack_gem do - mkdir_p "tmp" - cd "tmp" - sh "gem unpack --version #{ENV['VERSION'] || "'> 0'"} tzinfo" - cd ".." - end - - task :copy_classes => :unpack_gem do - mkdir_p "#{destination_path}/lib/tzinfo" - cp "#{tmp_path}/lib/tzinfo.rb", "#{destination_path}/lib" - comment_requires_for_excluded_classes!('lib/tzinfo.rb') - files = FileList["#{tmp_path}/lib/tzinfo/*.rb"] - files.each do |file| - filename = File.basename(file) - unless excluded_classes.include? filename.sub(/.rb$/, '') - cp "#{tmp_path}/lib/tzinfo/#{filename}", "#{destination_path}/lib/tzinfo" - comment_requires_for_excluded_classes!("lib/tzinfo/#{filename}") - end - end - end - - task :copy_definitions => :unpack_gem do - definitions_path = "#{destination_path}/lib/tzinfo/definitions/" - mkdir_p definitions_path - ActiveSupport::TimeZone::MAPPING.values.each do |zone| - subdir = nil - if /\// === zone - subdir = zone.sub(/\w+$/, '') - mkdir_p "#{definitions_path}/#{subdir}" - end - cp "#{tmp_path}/lib/tzinfo/definitions/#{zone}.rb", "#{definitions_path}/#{subdir}" - end - end - - task :cleanup_tmp do - rm_rf "tmp" - end - - def comment_requires_for_excluded_classes!(file) - lines = open("#{destination_path}/#{file}") {|f| f.readlines} - updated = false - - new_lines = [] - lines.each do |line| - if Regexp.new("require 'tzinfo/(#{excluded_classes.join('|')})'") === line - updated = true - new_lines << "# #{line}" - else - new_lines << line - end - end - - if updated - open("#{destination_path}/#{file}", "w") {|f| f.write(new_lines.join)} - end - end - - def version - ENV['VERSION'] ||= get_unpacked_version - end - - def get_unpacked_version - m = (FileList["tmp/tzinfo-*"].to_s.match /\d+\.\d+\.\d+/) - m ? m[0] : raise(LoadError, "TZInfo gem must be installed locally. `gem install tzinfo` and try again") - end - - def tmp_path - "tmp/tzinfo-#{version}" - end - - def destination_path - "lib/active_support/vendor/tzinfo-#{version}" - end - - def excluded_classes - %w(country country_index_definition country_info country_timezone timezone_index_definition timezone_proxy tzdataparser) - end -end diff --git a/activesupport/activesupport.gemspec b/activesupport/activesupport.gemspec index 8b9dd55b53..e610456a5e 100644 --- a/activesupport/activesupport.gemspec +++ b/activesupport/activesupport.gemspec @@ -7,6 +7,7 @@ Gem::Specification.new do |s| s.description = %q{Utility library which carries commonly used classes and goodies from the Rails framework} s.add_dependency('i18n', '~> 0.3.0') + s.add_dependency('tzinfo', '~> 0.3.16') s.files = Dir['CHANGELOG', 'README', 'lib/**/*'] s.require_path = 'lib' diff --git a/activesupport/lib/active_support/vendor.rb b/activesupport/lib/active_support/vendor.rb index ca70beb0a8..caa77d19e2 100644 --- a/activesupport/lib/active_support/vendor.rb +++ b/activesupport/lib/active_support/vendor.rb @@ -4,7 +4,7 @@ def ActiveSupport.requirable?(file) $LOAD_PATH.any? { |p| Dir.glob("#{p}/#{file}.*").any? } end -[%w(builder 2.1.2), %w(memcache-client 1.7.5), %w(tzinfo 0.3.16)].each do |lib, version| +[%w(builder 2.1.2), %w(memcache-client 1.7.5)].each do |lib, version| # If the lib is not already requirable unless ActiveSupport.requirable? lib # Try to activate a gem ~> satisfying the requested version first. diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo.rb deleted file mode 100644 index c8bdbeec5d..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo.rb +++ /dev/null @@ -1,33 +0,0 @@ -#-- -# Copyright (c) 2005-2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -# Add the directory containing this file to the start of the load path if it -# isn't there already. -$:.unshift(File.dirname(__FILE__)) unless - $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) - -require 'tzinfo/timezone' -# require 'tzinfo/country' -# require 'tzinfo/tzdataparser' -# require 'tzinfo/timezone_proxy' -require 'tzinfo/data_timezone' -require 'tzinfo/linked_timezone' \ No newline at end of file diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone.rb deleted file mode 100644 index 5eccbdf0db..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone.rb +++ /dev/null @@ -1,47 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/info_timezone' - -module TZInfo - - # A Timezone based on a DataTimezoneInfo. - class DataTimezone < InfoTimezone #:nodoc: - - # Returns the TimezonePeriod for the given UTC time. utc can either be - # a DateTime, Time or integer timestamp (Time.to_i). Any timezone - # information in utc is ignored (it is treated as a UTC time). - # - # If no TimezonePeriod could be found, PeriodNotFound is raised. - def period_for_utc(utc) - info.period_for_utc(utc) - end - - # Returns the set of TimezonePeriod instances that are valid for the given - # local time as an array. If you just want a single period, use - # period_for_local instead and specify how abiguities should be resolved. - # Raises PeriodNotFound if no periods are found for the given time. - def periods_for_local(local) - info.periods_for_local(local) - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone_info.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone_info.rb deleted file mode 100644 index a45d94554b..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/data_timezone_info.rb +++ /dev/null @@ -1,228 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/time_or_datetime' -require 'tzinfo/timezone_info' -require 'tzinfo/timezone_offset_info' -require 'tzinfo/timezone_period' -require 'tzinfo/timezone_transition_info' - -module TZInfo - # Thrown if no offsets have been defined when calling period_for_utc or - # periods_for_local. Indicates an error in the timezone data. - class NoOffsetsDefined < StandardError - end - - # Represents a (non-linked) timezone defined in a data module. - class DataTimezoneInfo < TimezoneInfo #:nodoc: - - # Constructs a new TimezoneInfo with its identifier. - def initialize(identifier) - super(identifier) - @offsets = {} - @transitions = [] - @previous_offset = nil - @transitions_index = nil - end - - # Defines a offset. The id uniquely identifies this offset within the - # timezone. utc_offset and std_offset define the offset in seconds of - # standard time from UTC and daylight savings from standard time - # respectively. abbreviation describes the timezone offset (e.g. GMT, BST, - # EST or EDT). - # - # The first offset to be defined is treated as the offset that applies - # until the first transition. This will usually be in Local Mean Time (LMT). - # - # ArgumentError will be raised if the id is already defined. - def offset(id, utc_offset, std_offset, abbreviation) - raise ArgumentError, 'Offset already defined' if @offsets.has_key?(id) - - offset = TimezoneOffsetInfo.new(utc_offset, std_offset, abbreviation) - @offsets[id] = offset - @previous_offset = offset unless @previous_offset - end - - # Defines a transition. Transitions must be defined in chronological order. - # ArgumentError will be raised if a transition is added out of order. - # offset_id refers to an id defined with offset. ArgumentError will be - # raised if the offset_id cannot be found. numerator_or_time and - # denomiator specify the time the transition occurs as. See - # TimezoneTransitionInfo for more detail about specifying times. - def transition(year, month, offset_id, numerator_or_time, denominator = nil) - offset = @offsets[offset_id] - raise ArgumentError, 'Offset not found' unless offset - - if @transitions_index - if year < @last_year || (year == @last_year && month < @last_month) - raise ArgumentError, 'Transitions must be increasing date order' - end - - # Record the position of the first transition with this index. - index = transition_index(year, month) - @transitions_index[index] ||= @transitions.length - - # Fill in any gaps - (index - 1).downto(0) do |i| - break if @transitions_index[i] - @transitions_index[i] = @transitions.length - end - else - @transitions_index = [@transitions.length] - @start_year = year - @start_month = month - end - - @transitions << TimezoneTransitionInfo.new(offset, @previous_offset, - numerator_or_time, denominator) - @last_year = year - @last_month = month - @previous_offset = offset - end - - # Returns the TimezonePeriod for the given UTC time. - # Raises NoOffsetsDefined if no offsets have been defined. - def period_for_utc(utc) - unless @transitions.empty? - utc = TimeOrDateTime.wrap(utc) - index = transition_index(utc.year, utc.mon) - - start_transition = nil - start = transition_before_end(index) - if start - start.downto(0) do |i| - if @transitions[i].at <= utc - start_transition = @transitions[i] - break - end - end - end - - end_transition = nil - start = transition_after_start(index) - if start - start.upto(@transitions.length - 1) do |i| - if @transitions[i].at > utc - end_transition = @transitions[i] - break - end - end - end - - if start_transition || end_transition - TimezonePeriod.new(start_transition, end_transition) - else - # Won't happen since there are transitions. Must always find one - # transition that is either >= or < the specified time. - raise 'No transitions found in search' - end - else - raise NoOffsetsDefined, 'No offsets have been defined' unless @previous_offset - TimezonePeriod.new(nil, nil, @previous_offset) - end - end - - # Returns the set of TimezonePeriods for the given local time as an array. - # Results returned are ordered by increasing UTC start date. - # Returns an empty array if no periods are found for the given time. - # Raises NoOffsetsDefined if no offsets have been defined. - def periods_for_local(local) - unless @transitions.empty? - local = TimeOrDateTime.wrap(local) - index = transition_index(local.year, local.mon) - - result = [] - - start_index = transition_after_start(index - 1) - if start_index && @transitions[start_index].local_end > local - if start_index > 0 - if @transitions[start_index - 1].local_start <= local - result << TimezonePeriod.new(@transitions[start_index - 1], @transitions[start_index]) - end - else - result << TimezonePeriod.new(nil, @transitions[start_index]) - end - end - - end_index = transition_before_end(index + 1) - - if end_index - start_index = end_index unless start_index - - start_index.upto(transition_before_end(index + 1)) do |i| - if @transitions[i].local_start <= local - if i + 1 < @transitions.length - if @transitions[i + 1].local_end > local - result << TimezonePeriod.new(@transitions[i], @transitions[i + 1]) - end - else - result << TimezonePeriod.new(@transitions[i], nil) - end - end - end - end - - result - else - raise NoOffsetsDefined, 'No offsets have been defined' unless @previous_offset - [TimezonePeriod.new(nil, nil, @previous_offset)] - end - end - - private - # Returns the index into the @transitions_index array for a given year - # and month. - def transition_index(year, month) - index = (year - @start_year) * 2 - index += 1 if month > 6 - index -= 1 if @start_month > 6 - index - end - - # Returns the index into @transitions of the first transition that occurs - # on or after the start of the given index into @transitions_index. - # Returns nil if there are no such transitions. - def transition_after_start(index) - if index >= @transitions_index.length - nil - else - index = 0 if index < 0 - @transitions_index[index] - end - end - - # Returns the index into @transitions of the first transition that occurs - # before the end of the given index into @transitions_index. - # Returns nil if there are no such transitions. - def transition_before_end(index) - index = index + 1 - - if index <= 0 - nil - elsif index >= @transitions_index.length - @transitions.length - 1 - else - @transitions_index[index] - 1 - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Algiers.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Algiers.rb deleted file mode 100644 index 8c5f25577f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Algiers.rb +++ /dev/null @@ -1,55 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Algiers - include TimezoneDefinition - - timezone 'Africa/Algiers' do |tz| - tz.offset :o0, 732, 0, :LMT - tz.offset :o1, 561, 0, :PMT - tz.offset :o2, 0, 0, :WET - tz.offset :o3, 0, 3600, :WEST - tz.offset :o4, 3600, 0, :CET - tz.offset :o5, 3600, 3600, :CEST - - tz.transition 1891, 3, :o1, 2170625843, 900 - tz.transition 1911, 3, :o2, 69670267013, 28800 - tz.transition 1916, 6, :o3, 58104707, 24 - tz.transition 1916, 10, :o2, 58107323, 24 - tz.transition 1917, 3, :o3, 58111499, 24 - tz.transition 1917, 10, :o2, 58116227, 24 - tz.transition 1918, 3, :o3, 58119899, 24 - tz.transition 1918, 10, :o2, 58124963, 24 - tz.transition 1919, 3, :o3, 58128467, 24 - tz.transition 1919, 10, :o2, 58133699, 24 - tz.transition 1920, 2, :o3, 58136867, 24 - tz.transition 1920, 10, :o2, 58142915, 24 - tz.transition 1921, 3, :o3, 58146323, 24 - tz.transition 1921, 6, :o2, 58148699, 24 - tz.transition 1939, 9, :o3, 58308443, 24 - tz.transition 1939, 11, :o2, 4859173, 2 - tz.transition 1940, 2, :o4, 29156215, 12 - tz.transition 1944, 4, :o5, 58348405, 24 - tz.transition 1944, 10, :o4, 4862743, 2 - tz.transition 1945, 4, :o5, 58357141, 24 - tz.transition 1945, 9, :o4, 58361147, 24 - tz.transition 1946, 10, :o2, 58370411, 24 - tz.transition 1956, 1, :o4, 4871003, 2 - tz.transition 1963, 4, :o2, 58515203, 24 - tz.transition 1971, 4, :o3, 41468400 - tz.transition 1971, 9, :o2, 54774000 - tz.transition 1977, 5, :o3, 231724800 - tz.transition 1977, 10, :o4, 246236400 - tz.transition 1978, 3, :o5, 259545600 - tz.transition 1978, 9, :o4, 275274000 - tz.transition 1979, 10, :o2, 309740400 - tz.transition 1980, 4, :o3, 325468800 - tz.transition 1980, 10, :o2, 341802000 - tz.transition 1981, 5, :o4, 357523200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Cairo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Cairo.rb deleted file mode 100644 index b7ed8e8244..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Cairo.rb +++ /dev/null @@ -1,219 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Cairo - include TimezoneDefinition - - timezone 'Africa/Cairo' do |tz| - tz.offset :o0, 7500, 0, :LMT - tz.offset :o1, 7200, 0, :EET - tz.offset :o2, 7200, 3600, :EEST - - tz.transition 1900, 9, :o1, 695604503, 288 - tz.transition 1940, 7, :o2, 29157905, 12 - tz.transition 1940, 9, :o1, 19439227, 8 - tz.transition 1941, 4, :o2, 29161193, 12 - tz.transition 1941, 9, :o1, 19442027, 8 - tz.transition 1942, 3, :o2, 29165405, 12 - tz.transition 1942, 10, :o1, 19445275, 8 - tz.transition 1943, 3, :o2, 29169785, 12 - tz.transition 1943, 10, :o1, 19448235, 8 - tz.transition 1944, 3, :o2, 29174177, 12 - tz.transition 1944, 10, :o1, 19451163, 8 - tz.transition 1945, 4, :o2, 29178737, 12 - tz.transition 1945, 10, :o1, 19454083, 8 - tz.transition 1957, 5, :o2, 29231621, 12 - tz.transition 1957, 9, :o1, 19488899, 8 - tz.transition 1958, 4, :o2, 29235893, 12 - tz.transition 1958, 9, :o1, 19491819, 8 - tz.transition 1959, 4, :o2, 58480547, 24 - tz.transition 1959, 9, :o1, 4873683, 2 - tz.transition 1960, 4, :o2, 58489331, 24 - tz.transition 1960, 9, :o1, 4874415, 2 - tz.transition 1961, 4, :o2, 58498091, 24 - tz.transition 1961, 9, :o1, 4875145, 2 - tz.transition 1962, 4, :o2, 58506851, 24 - tz.transition 1962, 9, :o1, 4875875, 2 - tz.transition 1963, 4, :o2, 58515611, 24 - tz.transition 1963, 9, :o1, 4876605, 2 - tz.transition 1964, 4, :o2, 58524395, 24 - tz.transition 1964, 9, :o1, 4877337, 2 - tz.transition 1965, 4, :o2, 58533155, 24 - tz.transition 1965, 9, :o1, 4878067, 2 - tz.transition 1966, 4, :o2, 58541915, 24 - tz.transition 1966, 10, :o1, 4878799, 2 - tz.transition 1967, 4, :o2, 58550675, 24 - tz.transition 1967, 10, :o1, 4879529, 2 - tz.transition 1968, 4, :o2, 58559459, 24 - tz.transition 1968, 10, :o1, 4880261, 2 - tz.transition 1969, 4, :o2, 58568219, 24 - tz.transition 1969, 10, :o1, 4880991, 2 - tz.transition 1970, 4, :o2, 10364400 - tz.transition 1970, 10, :o1, 23587200 - tz.transition 1971, 4, :o2, 41900400 - tz.transition 1971, 10, :o1, 55123200 - tz.transition 1972, 4, :o2, 73522800 - tz.transition 1972, 10, :o1, 86745600 - tz.transition 1973, 4, :o2, 105058800 - tz.transition 1973, 10, :o1, 118281600 - tz.transition 1974, 4, :o2, 136594800 - tz.transition 1974, 10, :o1, 149817600 - tz.transition 1975, 4, :o2, 168130800 - tz.transition 1975, 10, :o1, 181353600 - tz.transition 1976, 4, :o2, 199753200 - tz.transition 1976, 10, :o1, 212976000 - tz.transition 1977, 4, :o2, 231289200 - tz.transition 1977, 10, :o1, 244512000 - tz.transition 1978, 4, :o2, 262825200 - tz.transition 1978, 10, :o1, 276048000 - tz.transition 1979, 4, :o2, 294361200 - tz.transition 1979, 10, :o1, 307584000 - tz.transition 1980, 4, :o2, 325983600 - tz.transition 1980, 10, :o1, 339206400 - tz.transition 1981, 4, :o2, 357519600 - tz.transition 1981, 10, :o1, 370742400 - tz.transition 1982, 7, :o2, 396399600 - tz.transition 1982, 10, :o1, 402278400 - tz.transition 1983, 7, :o2, 426812400 - tz.transition 1983, 10, :o1, 433814400 - tz.transition 1984, 4, :o2, 452214000 - tz.transition 1984, 10, :o1, 465436800 - tz.transition 1985, 4, :o2, 483750000 - tz.transition 1985, 10, :o1, 496972800 - tz.transition 1986, 4, :o2, 515286000 - tz.transition 1986, 10, :o1, 528508800 - tz.transition 1987, 4, :o2, 546822000 - tz.transition 1987, 10, :o1, 560044800 - tz.transition 1988, 4, :o2, 578444400 - tz.transition 1988, 10, :o1, 591667200 - tz.transition 1989, 5, :o2, 610412400 - tz.transition 1989, 10, :o1, 623203200 - tz.transition 1990, 4, :o2, 641516400 - tz.transition 1990, 10, :o1, 654739200 - tz.transition 1991, 4, :o2, 673052400 - tz.transition 1991, 10, :o1, 686275200 - tz.transition 1992, 4, :o2, 704674800 - tz.transition 1992, 10, :o1, 717897600 - tz.transition 1993, 4, :o2, 736210800 - tz.transition 1993, 10, :o1, 749433600 - tz.transition 1994, 4, :o2, 767746800 - tz.transition 1994, 10, :o1, 780969600 - tz.transition 1995, 4, :o2, 799020000 - tz.transition 1995, 9, :o1, 812322000 - tz.transition 1996, 4, :o2, 830469600 - tz.transition 1996, 9, :o1, 843771600 - tz.transition 1997, 4, :o2, 861919200 - tz.transition 1997, 9, :o1, 875221200 - tz.transition 1998, 4, :o2, 893368800 - tz.transition 1998, 9, :o1, 906670800 - tz.transition 1999, 4, :o2, 925423200 - tz.transition 1999, 9, :o1, 938725200 - tz.transition 2000, 4, :o2, 956872800 - tz.transition 2000, 9, :o1, 970174800 - tz.transition 2001, 4, :o2, 988322400 - tz.transition 2001, 9, :o1, 1001624400 - tz.transition 2002, 4, :o2, 1019772000 - tz.transition 2002, 9, :o1, 1033074000 - tz.transition 2003, 4, :o2, 1051221600 - tz.transition 2003, 9, :o1, 1064523600 - tz.transition 2004, 4, :o2, 1083276000 - tz.transition 2004, 9, :o1, 1096578000 - tz.transition 2005, 4, :o2, 1114725600 - tz.transition 2005, 9, :o1, 1128027600 - tz.transition 2006, 4, :o2, 1146175200 - tz.transition 2006, 9, :o1, 1158872400 - tz.transition 2007, 4, :o2, 1177624800 - tz.transition 2007, 9, :o1, 1189112400 - tz.transition 2008, 4, :o2, 1209074400 - tz.transition 2008, 8, :o1, 1219957200 - tz.transition 2009, 4, :o2, 1240524000 - tz.transition 2009, 8, :o1, 1250802000 - tz.transition 2010, 4, :o2, 1272578400 - tz.transition 2010, 9, :o1, 1285880400 - tz.transition 2011, 4, :o2, 1304028000 - tz.transition 2011, 9, :o1, 1317330000 - tz.transition 2012, 4, :o2, 1335477600 - tz.transition 2012, 9, :o1, 1348779600 - tz.transition 2013, 4, :o2, 1366927200 - tz.transition 2013, 9, :o1, 1380229200 - tz.transition 2014, 4, :o2, 1398376800 - tz.transition 2014, 9, :o1, 1411678800 - tz.transition 2015, 4, :o2, 1429826400 - tz.transition 2015, 9, :o1, 1443128400 - tz.transition 2016, 4, :o2, 1461880800 - tz.transition 2016, 9, :o1, 1475182800 - tz.transition 2017, 4, :o2, 1493330400 - tz.transition 2017, 9, :o1, 1506632400 - tz.transition 2018, 4, :o2, 1524780000 - tz.transition 2018, 9, :o1, 1538082000 - tz.transition 2019, 4, :o2, 1556229600 - tz.transition 2019, 9, :o1, 1569531600 - tz.transition 2020, 4, :o2, 1587679200 - tz.transition 2020, 9, :o1, 1600981200 - tz.transition 2021, 4, :o2, 1619733600 - tz.transition 2021, 9, :o1, 1633035600 - tz.transition 2022, 4, :o2, 1651183200 - tz.transition 2022, 9, :o1, 1664485200 - tz.transition 2023, 4, :o2, 1682632800 - tz.transition 2023, 9, :o1, 1695934800 - tz.transition 2024, 4, :o2, 1714082400 - tz.transition 2024, 9, :o1, 1727384400 - tz.transition 2025, 4, :o2, 1745532000 - tz.transition 2025, 9, :o1, 1758834000 - tz.transition 2026, 4, :o2, 1776981600 - tz.transition 2026, 9, :o1, 1790283600 - tz.transition 2027, 4, :o2, 1809036000 - tz.transition 2027, 9, :o1, 1822338000 - tz.transition 2028, 4, :o2, 1840485600 - tz.transition 2028, 9, :o1, 1853787600 - tz.transition 2029, 4, :o2, 1871935200 - tz.transition 2029, 9, :o1, 1885237200 - tz.transition 2030, 4, :o2, 1903384800 - tz.transition 2030, 9, :o1, 1916686800 - tz.transition 2031, 4, :o2, 1934834400 - tz.transition 2031, 9, :o1, 1948136400 - tz.transition 2032, 4, :o2, 1966888800 - tz.transition 2032, 9, :o1, 1980190800 - tz.transition 2033, 4, :o2, 1998338400 - tz.transition 2033, 9, :o1, 2011640400 - tz.transition 2034, 4, :o2, 2029788000 - tz.transition 2034, 9, :o1, 2043090000 - tz.transition 2035, 4, :o2, 2061237600 - tz.transition 2035, 9, :o1, 2074539600 - tz.transition 2036, 4, :o2, 2092687200 - tz.transition 2036, 9, :o1, 2105989200 - tz.transition 2037, 4, :o2, 2124136800 - tz.transition 2037, 9, :o1, 2137438800 - tz.transition 2038, 4, :o2, 29586521, 12 - tz.transition 2038, 9, :o1, 19725579, 8 - tz.transition 2039, 4, :o2, 29590889, 12 - tz.transition 2039, 9, :o1, 19728491, 8 - tz.transition 2040, 4, :o2, 29595257, 12 - tz.transition 2040, 9, :o1, 19731403, 8 - tz.transition 2041, 4, :o2, 29599625, 12 - tz.transition 2041, 9, :o1, 19734315, 8 - tz.transition 2042, 4, :o2, 29603993, 12 - tz.transition 2042, 9, :o1, 19737227, 8 - tz.transition 2043, 4, :o2, 29608361, 12 - tz.transition 2043, 9, :o1, 19740139, 8 - tz.transition 2044, 4, :o2, 29612813, 12 - tz.transition 2044, 9, :o1, 19743107, 8 - tz.transition 2045, 4, :o2, 29617181, 12 - tz.transition 2045, 9, :o1, 19746019, 8 - tz.transition 2046, 4, :o2, 29621549, 12 - tz.transition 2046, 9, :o1, 19748931, 8 - tz.transition 2047, 4, :o2, 29625917, 12 - tz.transition 2047, 9, :o1, 19751843, 8 - tz.transition 2048, 4, :o2, 29630285, 12 - tz.transition 2048, 9, :o1, 19754755, 8 - tz.transition 2049, 4, :o2, 29634737, 12 - tz.transition 2049, 9, :o1, 19757723, 8 - tz.transition 2050, 4, :o2, 29639105, 12 - tz.transition 2050, 9, :o1, 19760635, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Casablanca.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Casablanca.rb deleted file mode 100644 index 18d73c93a0..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Casablanca.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Casablanca - include TimezoneDefinition - - timezone 'Africa/Casablanca' do |tz| - tz.offset :o0, -1820, 0, :LMT - tz.offset :o1, 0, 0, :WET - tz.offset :o2, 0, 3600, :WEST - tz.offset :o3, 3600, 0, :CET - - tz.transition 1913, 10, :o1, 10454687371, 4320 - tz.transition 1939, 9, :o2, 4859037, 2 - tz.transition 1939, 11, :o1, 58310075, 24 - tz.transition 1940, 2, :o2, 4859369, 2 - tz.transition 1945, 11, :o1, 58362659, 24 - tz.transition 1950, 6, :o2, 4866887, 2 - tz.transition 1950, 10, :o1, 58406003, 24 - tz.transition 1967, 6, :o2, 2439645, 1 - tz.transition 1967, 9, :o1, 58554347, 24 - tz.transition 1974, 6, :o2, 141264000 - tz.transition 1974, 8, :o1, 147222000 - tz.transition 1976, 5, :o2, 199756800 - tz.transition 1976, 7, :o1, 207702000 - tz.transition 1977, 5, :o2, 231292800 - tz.transition 1977, 9, :o1, 244249200 - tz.transition 1978, 6, :o2, 265507200 - tz.transition 1978, 8, :o1, 271033200 - tz.transition 1984, 3, :o3, 448243200 - tz.transition 1985, 12, :o1, 504918000 - tz.transition 2008, 6, :o2, 1212278400 - tz.transition 2008, 8, :o1, 1220223600 - tz.transition 2009, 6, :o2, 1243814400 - tz.transition 2009, 8, :o1, 1250809200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Harare.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Harare.rb deleted file mode 100644 index 070c95ae0f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Harare.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Harare - include TimezoneDefinition - - timezone 'Africa/Harare' do |tz| - tz.offset :o0, 7452, 0, :LMT - tz.offset :o1, 7200, 0, :CAT - - tz.transition 1903, 2, :o1, 1932939531, 800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Johannesburg.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Johannesburg.rb deleted file mode 100644 index f0af0d8e33..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Johannesburg.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Johannesburg - include TimezoneDefinition - - timezone 'Africa/Johannesburg' do |tz| - tz.offset :o0, 6720, 0, :LMT - tz.offset :o1, 5400, 0, :SAST - tz.offset :o2, 7200, 0, :SAST - tz.offset :o3, 7200, 3600, :SAST - - tz.transition 1892, 2, :o1, 108546139, 45 - tz.transition 1903, 2, :o2, 38658791, 16 - tz.transition 1942, 9, :o3, 4861245, 2 - tz.transition 1943, 3, :o2, 58339307, 24 - tz.transition 1943, 9, :o3, 4861973, 2 - tz.transition 1944, 3, :o2, 58348043, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Monrovia.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Monrovia.rb deleted file mode 100644 index 40e711fa44..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Monrovia.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Monrovia - include TimezoneDefinition - - timezone 'Africa/Monrovia' do |tz| - tz.offset :o0, -2588, 0, :LMT - tz.offset :o1, -2588, 0, :MMT - tz.offset :o2, -2670, 0, :LRT - tz.offset :o3, 0, 0, :GMT - - tz.transition 1882, 1, :o1, 52022445047, 21600 - tz.transition 1919, 3, :o2, 52315600247, 21600 - tz.transition 1972, 5, :o3, 73529070 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Nairobi.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Nairobi.rb deleted file mode 100644 index 7b0a2f43be..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Africa/Nairobi.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Nairobi - include TimezoneDefinition - - timezone 'Africa/Nairobi' do |tz| - tz.offset :o0, 8836, 0, :LMT - tz.offset :o1, 10800, 0, :EAT - tz.offset :o2, 9000, 0, :BEAT - tz.offset :o3, 9885, 0, :BEAUT - - tz.transition 1928, 6, :o1, 52389253391, 21600 - tz.transition 1929, 12, :o2, 19407819, 8 - tz.transition 1939, 12, :o3, 116622211, 48 - tz.transition 1959, 12, :o1, 14036742061, 5760 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Argentina/Buenos_Aires.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Argentina/Buenos_Aires.rb deleted file mode 100644 index 307f9546de..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +++ /dev/null @@ -1,84 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Argentina - module Buenos_Aires - include TimezoneDefinition - - timezone 'America/Argentina/Buenos_Aires' do |tz| - tz.offset :o0, -14028, 0, :LMT - tz.offset :o1, -15408, 0, :CMT - tz.offset :o2, -14400, 0, :ART - tz.offset :o3, -14400, 3600, :ARST - tz.offset :o4, -10800, 0, :ART - tz.offset :o5, -10800, 3600, :ARST - - tz.transition 1894, 10, :o1, 17374555169, 7200 - tz.transition 1920, 5, :o2, 1453467407, 600 - tz.transition 1930, 12, :o3, 7278935, 3 - tz.transition 1931, 4, :o2, 19411461, 8 - tz.transition 1931, 10, :o3, 7279889, 3 - tz.transition 1932, 3, :o2, 19414141, 8 - tz.transition 1932, 11, :o3, 7281038, 3 - tz.transition 1933, 3, :o2, 19417061, 8 - tz.transition 1933, 11, :o3, 7282133, 3 - tz.transition 1934, 3, :o2, 19419981, 8 - tz.transition 1934, 11, :o3, 7283228, 3 - tz.transition 1935, 3, :o2, 19422901, 8 - tz.transition 1935, 11, :o3, 7284323, 3 - tz.transition 1936, 3, :o2, 19425829, 8 - tz.transition 1936, 11, :o3, 7285421, 3 - tz.transition 1937, 3, :o2, 19428749, 8 - tz.transition 1937, 11, :o3, 7286516, 3 - tz.transition 1938, 3, :o2, 19431669, 8 - tz.transition 1938, 11, :o3, 7287611, 3 - tz.transition 1939, 3, :o2, 19434589, 8 - tz.transition 1939, 11, :o3, 7288706, 3 - tz.transition 1940, 3, :o2, 19437517, 8 - tz.transition 1940, 7, :o3, 7289435, 3 - tz.transition 1941, 6, :o2, 19441285, 8 - tz.transition 1941, 10, :o3, 7290848, 3 - tz.transition 1943, 8, :o2, 19447501, 8 - tz.transition 1943, 10, :o3, 7293038, 3 - tz.transition 1946, 3, :o2, 19455045, 8 - tz.transition 1946, 10, :o3, 7296284, 3 - tz.transition 1963, 10, :o2, 19506429, 8 - tz.transition 1963, 12, :o3, 7315136, 3 - tz.transition 1964, 3, :o2, 19507645, 8 - tz.transition 1964, 10, :o3, 7316051, 3 - tz.transition 1965, 3, :o2, 19510565, 8 - tz.transition 1965, 10, :o3, 7317146, 3 - tz.transition 1966, 3, :o2, 19513485, 8 - tz.transition 1966, 10, :o3, 7318241, 3 - tz.transition 1967, 4, :o2, 19516661, 8 - tz.transition 1967, 10, :o3, 7319294, 3 - tz.transition 1968, 4, :o2, 19519629, 8 - tz.transition 1968, 10, :o3, 7320407, 3 - tz.transition 1969, 4, :o2, 19522541, 8 - tz.transition 1969, 10, :o4, 7321499, 3 - tz.transition 1974, 1, :o5, 128142000 - tz.transition 1974, 5, :o4, 136605600 - tz.transition 1988, 12, :o5, 596948400 - tz.transition 1989, 3, :o4, 605066400 - tz.transition 1989, 10, :o5, 624423600 - tz.transition 1990, 3, :o4, 636516000 - tz.transition 1990, 10, :o5, 656478000 - tz.transition 1991, 3, :o4, 667965600 - tz.transition 1991, 10, :o5, 687927600 - tz.transition 1992, 3, :o4, 699415200 - tz.transition 1992, 10, :o5, 719377200 - tz.transition 1993, 3, :o4, 731469600 - tz.transition 1999, 10, :o3, 938919600 - tz.transition 2000, 3, :o4, 952052400 - tz.transition 2007, 12, :o5, 1198983600 - tz.transition 2008, 3, :o4, 1205632800 - tz.transition 2008, 10, :o5, 1224385200 - tz.transition 2009, 3, :o4, 1237082400 - end - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Bogota.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Bogota.rb deleted file mode 100644 index ef96435c6a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Bogota.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Bogota - include TimezoneDefinition - - timezone 'America/Bogota' do |tz| - tz.offset :o0, -17780, 0, :LMT - tz.offset :o1, -17780, 0, :BMT - tz.offset :o2, -18000, 0, :COT - tz.offset :o3, -18000, 3600, :COST - - tz.transition 1884, 3, :o1, 10407954409, 4320 - tz.transition 1914, 11, :o2, 10456385929, 4320 - tz.transition 1992, 5, :o3, 704869200 - tz.transition 1993, 4, :o2, 733896000 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Caracas.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Caracas.rb deleted file mode 100644 index 27392a540a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Caracas.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Caracas - include TimezoneDefinition - - timezone 'America/Caracas' do |tz| - tz.offset :o0, -16064, 0, :LMT - tz.offset :o1, -16060, 0, :CMT - tz.offset :o2, -16200, 0, :VET - tz.offset :o3, -14400, 0, :VET - - tz.transition 1890, 1, :o1, 1627673863, 675 - tz.transition 1912, 2, :o2, 10452001043, 4320 - tz.transition 1965, 1, :o3, 39020187, 16 - tz.transition 2007, 12, :o2, 1197183600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chicago.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chicago.rb deleted file mode 100644 index 0996857cf0..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chicago.rb +++ /dev/null @@ -1,283 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Chicago - include TimezoneDefinition - - timezone 'America/Chicago' do |tz| - tz.offset :o0, -21036, 0, :LMT - tz.offset :o1, -21600, 0, :CST - tz.offset :o2, -21600, 3600, :CDT - tz.offset :o3, -18000, 0, :EST - tz.offset :o4, -21600, 3600, :CWT - tz.offset :o5, -21600, 3600, :CPT - - tz.transition 1883, 11, :o1, 9636533, 4 - tz.transition 1918, 3, :o2, 14530103, 6 - tz.transition 1918, 10, :o1, 58125451, 24 - tz.transition 1919, 3, :o2, 14532287, 6 - tz.transition 1919, 10, :o1, 58134187, 24 - tz.transition 1920, 6, :o2, 14534933, 6 - tz.transition 1920, 10, :o1, 58143091, 24 - tz.transition 1921, 3, :o2, 14536655, 6 - tz.transition 1921, 10, :o1, 58151827, 24 - tz.transition 1922, 4, :o2, 14539049, 6 - tz.transition 1922, 9, :o1, 58159723, 24 - tz.transition 1923, 4, :o2, 14541233, 6 - tz.transition 1923, 9, :o1, 58168627, 24 - tz.transition 1924, 4, :o2, 14543417, 6 - tz.transition 1924, 9, :o1, 58177363, 24 - tz.transition 1925, 4, :o2, 14545601, 6 - tz.transition 1925, 9, :o1, 58186099, 24 - tz.transition 1926, 4, :o2, 14547785, 6 - tz.transition 1926, 9, :o1, 58194835, 24 - tz.transition 1927, 4, :o2, 14549969, 6 - tz.transition 1927, 9, :o1, 58203571, 24 - tz.transition 1928, 4, :o2, 14552195, 6 - tz.transition 1928, 9, :o1, 58212475, 24 - tz.transition 1929, 4, :o2, 14554379, 6 - tz.transition 1929, 9, :o1, 58221211, 24 - tz.transition 1930, 4, :o2, 14556563, 6 - tz.transition 1930, 9, :o1, 58229947, 24 - tz.transition 1931, 4, :o2, 14558747, 6 - tz.transition 1931, 9, :o1, 58238683, 24 - tz.transition 1932, 4, :o2, 14560931, 6 - tz.transition 1932, 9, :o1, 58247419, 24 - tz.transition 1933, 4, :o2, 14563157, 6 - tz.transition 1933, 9, :o1, 58256155, 24 - tz.transition 1934, 4, :o2, 14565341, 6 - tz.transition 1934, 9, :o1, 58265059, 24 - tz.transition 1935, 4, :o2, 14567525, 6 - tz.transition 1935, 9, :o1, 58273795, 24 - tz.transition 1936, 3, :o3, 14569373, 6 - tz.transition 1936, 11, :o1, 58283707, 24 - tz.transition 1937, 4, :o2, 14571893, 6 - tz.transition 1937, 9, :o1, 58291267, 24 - tz.transition 1938, 4, :o2, 14574077, 6 - tz.transition 1938, 9, :o1, 58300003, 24 - tz.transition 1939, 4, :o2, 14576303, 6 - tz.transition 1939, 9, :o1, 58308739, 24 - tz.transition 1940, 4, :o2, 14578487, 6 - tz.transition 1940, 9, :o1, 58317643, 24 - tz.transition 1941, 4, :o2, 14580671, 6 - tz.transition 1941, 9, :o1, 58326379, 24 - tz.transition 1942, 2, :o4, 14582399, 6 - tz.transition 1945, 8, :o5, 58360379, 24 - tz.transition 1945, 9, :o1, 58361491, 24 - tz.transition 1946, 4, :o2, 14591633, 6 - tz.transition 1946, 9, :o1, 58370227, 24 - tz.transition 1947, 4, :o2, 14593817, 6 - tz.transition 1947, 9, :o1, 58378963, 24 - tz.transition 1948, 4, :o2, 14596001, 6 - tz.transition 1948, 9, :o1, 58387699, 24 - tz.transition 1949, 4, :o2, 14598185, 6 - tz.transition 1949, 9, :o1, 58396435, 24 - tz.transition 1950, 4, :o2, 14600411, 6 - tz.transition 1950, 9, :o1, 58405171, 24 - tz.transition 1951, 4, :o2, 14602595, 6 - tz.transition 1951, 9, :o1, 58414075, 24 - tz.transition 1952, 4, :o2, 14604779, 6 - tz.transition 1952, 9, :o1, 58422811, 24 - tz.transition 1953, 4, :o2, 14606963, 6 - tz.transition 1953, 9, :o1, 58431547, 24 - tz.transition 1954, 4, :o2, 14609147, 6 - tz.transition 1954, 9, :o1, 58440283, 24 - tz.transition 1955, 4, :o2, 14611331, 6 - tz.transition 1955, 10, :o1, 58449859, 24 - tz.transition 1956, 4, :o2, 14613557, 6 - tz.transition 1956, 10, :o1, 58458595, 24 - tz.transition 1957, 4, :o2, 14615741, 6 - tz.transition 1957, 10, :o1, 58467331, 24 - tz.transition 1958, 4, :o2, 14617925, 6 - tz.transition 1958, 10, :o1, 58476067, 24 - tz.transition 1959, 4, :o2, 14620109, 6 - tz.transition 1959, 10, :o1, 58484803, 24 - tz.transition 1960, 4, :o2, 14622293, 6 - tz.transition 1960, 10, :o1, 58493707, 24 - tz.transition 1961, 4, :o2, 14624519, 6 - tz.transition 1961, 10, :o1, 58502443, 24 - tz.transition 1962, 4, :o2, 14626703, 6 - tz.transition 1962, 10, :o1, 58511179, 24 - tz.transition 1963, 4, :o2, 14628887, 6 - tz.transition 1963, 10, :o1, 58519915, 24 - tz.transition 1964, 4, :o2, 14631071, 6 - tz.transition 1964, 10, :o1, 58528651, 24 - tz.transition 1965, 4, :o2, 14633255, 6 - tz.transition 1965, 10, :o1, 58537555, 24 - tz.transition 1966, 4, :o2, 14635439, 6 - tz.transition 1966, 10, :o1, 58546291, 24 - tz.transition 1967, 4, :o2, 14637665, 6 - tz.transition 1967, 10, :o1, 58555027, 24 - tz.transition 1968, 4, :o2, 14639849, 6 - tz.transition 1968, 10, :o1, 58563763, 24 - tz.transition 1969, 4, :o2, 14642033, 6 - tz.transition 1969, 10, :o1, 58572499, 24 - tz.transition 1970, 4, :o2, 9964800 - tz.transition 1970, 10, :o1, 25686000 - tz.transition 1971, 4, :o2, 41414400 - tz.transition 1971, 10, :o1, 57740400 - tz.transition 1972, 4, :o2, 73468800 - tz.transition 1972, 10, :o1, 89190000 - tz.transition 1973, 4, :o2, 104918400 - tz.transition 1973, 10, :o1, 120639600 - tz.transition 1974, 1, :o2, 126691200 - tz.transition 1974, 10, :o1, 152089200 - tz.transition 1975, 2, :o2, 162374400 - tz.transition 1975, 10, :o1, 183538800 - tz.transition 1976, 4, :o2, 199267200 - tz.transition 1976, 10, :o1, 215593200 - tz.transition 1977, 4, :o2, 230716800 - tz.transition 1977, 10, :o1, 247042800 - tz.transition 1978, 4, :o2, 262771200 - tz.transition 1978, 10, :o1, 278492400 - tz.transition 1979, 4, :o2, 294220800 - tz.transition 1979, 10, :o1, 309942000 - tz.transition 1980, 4, :o2, 325670400 - tz.transition 1980, 10, :o1, 341391600 - tz.transition 1981, 4, :o2, 357120000 - tz.transition 1981, 10, :o1, 372841200 - tz.transition 1982, 4, :o2, 388569600 - tz.transition 1982, 10, :o1, 404895600 - tz.transition 1983, 4, :o2, 420019200 - tz.transition 1983, 10, :o1, 436345200 - tz.transition 1984, 4, :o2, 452073600 - tz.transition 1984, 10, :o1, 467794800 - tz.transition 1985, 4, :o2, 483523200 - tz.transition 1985, 10, :o1, 499244400 - tz.transition 1986, 4, :o2, 514972800 - tz.transition 1986, 10, :o1, 530694000 - tz.transition 1987, 4, :o2, 544608000 - tz.transition 1987, 10, :o1, 562143600 - tz.transition 1988, 4, :o2, 576057600 - tz.transition 1988, 10, :o1, 594198000 - tz.transition 1989, 4, :o2, 607507200 - tz.transition 1989, 10, :o1, 625647600 - tz.transition 1990, 4, :o2, 638956800 - tz.transition 1990, 10, :o1, 657097200 - tz.transition 1991, 4, :o2, 671011200 - tz.transition 1991, 10, :o1, 688546800 - tz.transition 1992, 4, :o2, 702460800 - tz.transition 1992, 10, :o1, 719996400 - tz.transition 1993, 4, :o2, 733910400 - tz.transition 1993, 10, :o1, 752050800 - tz.transition 1994, 4, :o2, 765360000 - tz.transition 1994, 10, :o1, 783500400 - tz.transition 1995, 4, :o2, 796809600 - tz.transition 1995, 10, :o1, 814950000 - tz.transition 1996, 4, :o2, 828864000 - tz.transition 1996, 10, :o1, 846399600 - tz.transition 1997, 4, :o2, 860313600 - tz.transition 1997, 10, :o1, 877849200 - tz.transition 1998, 4, :o2, 891763200 - tz.transition 1998, 10, :o1, 909298800 - tz.transition 1999, 4, :o2, 923212800 - tz.transition 1999, 10, :o1, 941353200 - tz.transition 2000, 4, :o2, 954662400 - tz.transition 2000, 10, :o1, 972802800 - tz.transition 2001, 4, :o2, 986112000 - tz.transition 2001, 10, :o1, 1004252400 - tz.transition 2002, 4, :o2, 1018166400 - tz.transition 2002, 10, :o1, 1035702000 - tz.transition 2003, 4, :o2, 1049616000 - tz.transition 2003, 10, :o1, 1067151600 - tz.transition 2004, 4, :o2, 1081065600 - tz.transition 2004, 10, :o1, 1099206000 - tz.transition 2005, 4, :o2, 1112515200 - tz.transition 2005, 10, :o1, 1130655600 - tz.transition 2006, 4, :o2, 1143964800 - tz.transition 2006, 10, :o1, 1162105200 - tz.transition 2007, 3, :o2, 1173600000 - tz.transition 2007, 11, :o1, 1194159600 - tz.transition 2008, 3, :o2, 1205049600 - tz.transition 2008, 11, :o1, 1225609200 - tz.transition 2009, 3, :o2, 1236499200 - tz.transition 2009, 11, :o1, 1257058800 - tz.transition 2010, 3, :o2, 1268553600 - tz.transition 2010, 11, :o1, 1289113200 - tz.transition 2011, 3, :o2, 1300003200 - tz.transition 2011, 11, :o1, 1320562800 - tz.transition 2012, 3, :o2, 1331452800 - tz.transition 2012, 11, :o1, 1352012400 - tz.transition 2013, 3, :o2, 1362902400 - tz.transition 2013, 11, :o1, 1383462000 - tz.transition 2014, 3, :o2, 1394352000 - tz.transition 2014, 11, :o1, 1414911600 - tz.transition 2015, 3, :o2, 1425801600 - tz.transition 2015, 11, :o1, 1446361200 - tz.transition 2016, 3, :o2, 1457856000 - tz.transition 2016, 11, :o1, 1478415600 - tz.transition 2017, 3, :o2, 1489305600 - tz.transition 2017, 11, :o1, 1509865200 - tz.transition 2018, 3, :o2, 1520755200 - tz.transition 2018, 11, :o1, 1541314800 - tz.transition 2019, 3, :o2, 1552204800 - tz.transition 2019, 11, :o1, 1572764400 - tz.transition 2020, 3, :o2, 1583654400 - tz.transition 2020, 11, :o1, 1604214000 - tz.transition 2021, 3, :o2, 1615708800 - tz.transition 2021, 11, :o1, 1636268400 - tz.transition 2022, 3, :o2, 1647158400 - tz.transition 2022, 11, :o1, 1667718000 - tz.transition 2023, 3, :o2, 1678608000 - tz.transition 2023, 11, :o1, 1699167600 - tz.transition 2024, 3, :o2, 1710057600 - tz.transition 2024, 11, :o1, 1730617200 - tz.transition 2025, 3, :o2, 1741507200 - tz.transition 2025, 11, :o1, 1762066800 - tz.transition 2026, 3, :o2, 1772956800 - tz.transition 2026, 11, :o1, 1793516400 - tz.transition 2027, 3, :o2, 1805011200 - tz.transition 2027, 11, :o1, 1825570800 - tz.transition 2028, 3, :o2, 1836460800 - tz.transition 2028, 11, :o1, 1857020400 - tz.transition 2029, 3, :o2, 1867910400 - tz.transition 2029, 11, :o1, 1888470000 - tz.transition 2030, 3, :o2, 1899360000 - tz.transition 2030, 11, :o1, 1919919600 - tz.transition 2031, 3, :o2, 1930809600 - tz.transition 2031, 11, :o1, 1951369200 - tz.transition 2032, 3, :o2, 1962864000 - tz.transition 2032, 11, :o1, 1983423600 - tz.transition 2033, 3, :o2, 1994313600 - tz.transition 2033, 11, :o1, 2014873200 - tz.transition 2034, 3, :o2, 2025763200 - tz.transition 2034, 11, :o1, 2046322800 - tz.transition 2035, 3, :o2, 2057212800 - tz.transition 2035, 11, :o1, 2077772400 - tz.transition 2036, 3, :o2, 2088662400 - tz.transition 2036, 11, :o1, 2109222000 - tz.transition 2037, 3, :o2, 2120112000 - tz.transition 2037, 11, :o1, 2140671600 - tz.transition 2038, 3, :o2, 14792981, 6 - tz.transition 2038, 11, :o1, 59177635, 24 - tz.transition 2039, 3, :o2, 14795165, 6 - tz.transition 2039, 11, :o1, 59186371, 24 - tz.transition 2040, 3, :o2, 14797349, 6 - tz.transition 2040, 11, :o1, 59195107, 24 - tz.transition 2041, 3, :o2, 14799533, 6 - tz.transition 2041, 11, :o1, 59203843, 24 - tz.transition 2042, 3, :o2, 14801717, 6 - tz.transition 2042, 11, :o1, 59212579, 24 - tz.transition 2043, 3, :o2, 14803901, 6 - tz.transition 2043, 11, :o1, 59221315, 24 - tz.transition 2044, 3, :o2, 14806127, 6 - tz.transition 2044, 11, :o1, 59230219, 24 - tz.transition 2045, 3, :o2, 14808311, 6 - tz.transition 2045, 11, :o1, 59238955, 24 - tz.transition 2046, 3, :o2, 14810495, 6 - tz.transition 2046, 11, :o1, 59247691, 24 - tz.transition 2047, 3, :o2, 14812679, 6 - tz.transition 2047, 11, :o1, 59256427, 24 - tz.transition 2048, 3, :o2, 14814863, 6 - tz.transition 2048, 11, :o1, 59265163, 24 - tz.transition 2049, 3, :o2, 14817089, 6 - tz.transition 2049, 11, :o1, 59274067, 24 - tz.transition 2050, 3, :o2, 14819273, 6 - tz.transition 2050, 11, :o1, 59282803, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chihuahua.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chihuahua.rb deleted file mode 100644 index 1710b57c79..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Chihuahua.rb +++ /dev/null @@ -1,136 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Chihuahua - include TimezoneDefinition - - timezone 'America/Chihuahua' do |tz| - tz.offset :o0, -25460, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -21600, 0, :CST - tz.offset :o3, -21600, 3600, :CDT - tz.offset :o4, -25200, 3600, :MDT - - tz.transition 1922, 1, :o1, 58153339, 24 - tz.transition 1927, 6, :o2, 9700171, 4 - tz.transition 1930, 11, :o1, 9705183, 4 - tz.transition 1931, 5, :o2, 9705855, 4 - tz.transition 1931, 10, :o1, 9706463, 4 - tz.transition 1932, 4, :o2, 58243171, 24 - tz.transition 1996, 4, :o3, 828864000 - tz.transition 1996, 10, :o2, 846399600 - tz.transition 1997, 4, :o3, 860313600 - tz.transition 1997, 10, :o2, 877849200 - tz.transition 1998, 4, :o4, 891766800 - tz.transition 1998, 10, :o1, 909302400 - tz.transition 1999, 4, :o4, 923216400 - tz.transition 1999, 10, :o1, 941356800 - tz.transition 2000, 4, :o4, 954666000 - tz.transition 2000, 10, :o1, 972806400 - tz.transition 2001, 5, :o4, 989139600 - tz.transition 2001, 9, :o1, 1001836800 - tz.transition 2002, 4, :o4, 1018170000 - tz.transition 2002, 10, :o1, 1035705600 - tz.transition 2003, 4, :o4, 1049619600 - tz.transition 2003, 10, :o1, 1067155200 - tz.transition 2004, 4, :o4, 1081069200 - tz.transition 2004, 10, :o1, 1099209600 - tz.transition 2005, 4, :o4, 1112518800 - tz.transition 2005, 10, :o1, 1130659200 - tz.transition 2006, 4, :o4, 1143968400 - tz.transition 2006, 10, :o1, 1162108800 - tz.transition 2007, 4, :o4, 1175418000 - tz.transition 2007, 10, :o1, 1193558400 - tz.transition 2008, 4, :o4, 1207472400 - tz.transition 2008, 10, :o1, 1225008000 - tz.transition 2009, 4, :o4, 1238922000 - tz.transition 2009, 10, :o1, 1256457600 - tz.transition 2010, 4, :o4, 1270371600 - tz.transition 2010, 10, :o1, 1288512000 - tz.transition 2011, 4, :o4, 1301821200 - tz.transition 2011, 10, :o1, 1319961600 - tz.transition 2012, 4, :o4, 1333270800 - tz.transition 2012, 10, :o1, 1351411200 - tz.transition 2013, 4, :o4, 1365325200 - tz.transition 2013, 10, :o1, 1382860800 - tz.transition 2014, 4, :o4, 1396774800 - tz.transition 2014, 10, :o1, 1414310400 - tz.transition 2015, 4, :o4, 1428224400 - tz.transition 2015, 10, :o1, 1445760000 - tz.transition 2016, 4, :o4, 1459674000 - tz.transition 2016, 10, :o1, 1477814400 - tz.transition 2017, 4, :o4, 1491123600 - tz.transition 2017, 10, :o1, 1509264000 - tz.transition 2018, 4, :o4, 1522573200 - tz.transition 2018, 10, :o1, 1540713600 - tz.transition 2019, 4, :o4, 1554627600 - tz.transition 2019, 10, :o1, 1572163200 - tz.transition 2020, 4, :o4, 1586077200 - tz.transition 2020, 10, :o1, 1603612800 - tz.transition 2021, 4, :o4, 1617526800 - tz.transition 2021, 10, :o1, 1635667200 - tz.transition 2022, 4, :o4, 1648976400 - tz.transition 2022, 10, :o1, 1667116800 - tz.transition 2023, 4, :o4, 1680426000 - tz.transition 2023, 10, :o1, 1698566400 - tz.transition 2024, 4, :o4, 1712480400 - tz.transition 2024, 10, :o1, 1730016000 - tz.transition 2025, 4, :o4, 1743930000 - tz.transition 2025, 10, :o1, 1761465600 - tz.transition 2026, 4, :o4, 1775379600 - tz.transition 2026, 10, :o1, 1792915200 - tz.transition 2027, 4, :o4, 1806829200 - tz.transition 2027, 10, :o1, 1824969600 - tz.transition 2028, 4, :o4, 1838278800 - tz.transition 2028, 10, :o1, 1856419200 - tz.transition 2029, 4, :o4, 1869728400 - tz.transition 2029, 10, :o1, 1887868800 - tz.transition 2030, 4, :o4, 1901782800 - tz.transition 2030, 10, :o1, 1919318400 - tz.transition 2031, 4, :o4, 1933232400 - tz.transition 2031, 10, :o1, 1950768000 - tz.transition 2032, 4, :o4, 1964682000 - tz.transition 2032, 10, :o1, 1982822400 - tz.transition 2033, 4, :o4, 1996131600 - tz.transition 2033, 10, :o1, 2014272000 - tz.transition 2034, 4, :o4, 2027581200 - tz.transition 2034, 10, :o1, 2045721600 - tz.transition 2035, 4, :o4, 2059030800 - tz.transition 2035, 10, :o1, 2077171200 - tz.transition 2036, 4, :o4, 2091085200 - tz.transition 2036, 10, :o1, 2108620800 - tz.transition 2037, 4, :o4, 2122534800 - tz.transition 2037, 10, :o1, 2140070400 - tz.transition 2038, 4, :o4, 19724143, 8 - tz.transition 2038, 10, :o1, 14794367, 6 - tz.transition 2039, 4, :o4, 19727055, 8 - tz.transition 2039, 10, :o1, 14796551, 6 - tz.transition 2040, 4, :o4, 19729967, 8 - tz.transition 2040, 10, :o1, 14798735, 6 - tz.transition 2041, 4, :o4, 19732935, 8 - tz.transition 2041, 10, :o1, 14800919, 6 - tz.transition 2042, 4, :o4, 19735847, 8 - tz.transition 2042, 10, :o1, 14803103, 6 - tz.transition 2043, 4, :o4, 19738759, 8 - tz.transition 2043, 10, :o1, 14805287, 6 - tz.transition 2044, 4, :o4, 19741671, 8 - tz.transition 2044, 10, :o1, 14807513, 6 - tz.transition 2045, 4, :o4, 19744583, 8 - tz.transition 2045, 10, :o1, 14809697, 6 - tz.transition 2046, 4, :o4, 19747495, 8 - tz.transition 2046, 10, :o1, 14811881, 6 - tz.transition 2047, 4, :o4, 19750463, 8 - tz.transition 2047, 10, :o1, 14814065, 6 - tz.transition 2048, 4, :o4, 19753375, 8 - tz.transition 2048, 10, :o1, 14816249, 6 - tz.transition 2049, 4, :o4, 19756287, 8 - tz.transition 2049, 10, :o1, 14818475, 6 - tz.transition 2050, 4, :o4, 19759199, 8 - tz.transition 2050, 10, :o1, 14820659, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Denver.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Denver.rb deleted file mode 100644 index 1c1efb5ff3..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Denver.rb +++ /dev/null @@ -1,204 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Denver - include TimezoneDefinition - - timezone 'America/Denver' do |tz| - tz.offset :o0, -25196, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -25200, 3600, :MDT - tz.offset :o3, -25200, 3600, :MWT - tz.offset :o4, -25200, 3600, :MPT - - tz.transition 1883, 11, :o1, 57819199, 24 - tz.transition 1918, 3, :o2, 19373471, 8 - tz.transition 1918, 10, :o1, 14531363, 6 - tz.transition 1919, 3, :o2, 19376383, 8 - tz.transition 1919, 10, :o1, 14533547, 6 - tz.transition 1920, 3, :o2, 19379295, 8 - tz.transition 1920, 10, :o1, 14535773, 6 - tz.transition 1921, 3, :o2, 19382207, 8 - tz.transition 1921, 5, :o1, 14536991, 6 - tz.transition 1942, 2, :o3, 19443199, 8 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 14590373, 6 - tz.transition 1965, 4, :o2, 19511007, 8 - tz.transition 1965, 10, :o1, 14634389, 6 - tz.transition 1966, 4, :o2, 19513919, 8 - tz.transition 1966, 10, :o1, 14636573, 6 - tz.transition 1967, 4, :o2, 19516887, 8 - tz.transition 1967, 10, :o1, 14638757, 6 - tz.transition 1968, 4, :o2, 19519799, 8 - tz.transition 1968, 10, :o1, 14640941, 6 - tz.transition 1969, 4, :o2, 19522711, 8 - tz.transition 1969, 10, :o1, 14643125, 6 - tz.transition 1970, 4, :o2, 9968400 - tz.transition 1970, 10, :o1, 25689600 - tz.transition 1971, 4, :o2, 41418000 - tz.transition 1971, 10, :o1, 57744000 - tz.transition 1972, 4, :o2, 73472400 - tz.transition 1972, 10, :o1, 89193600 - tz.transition 1973, 4, :o2, 104922000 - tz.transition 1973, 10, :o1, 120643200 - tz.transition 1974, 1, :o2, 126694800 - tz.transition 1974, 10, :o1, 152092800 - tz.transition 1975, 2, :o2, 162378000 - tz.transition 1975, 10, :o1, 183542400 - tz.transition 1976, 4, :o2, 199270800 - tz.transition 1976, 10, :o1, 215596800 - tz.transition 1977, 4, :o2, 230720400 - tz.transition 1977, 10, :o1, 247046400 - tz.transition 1978, 4, :o2, 262774800 - tz.transition 1978, 10, :o1, 278496000 - tz.transition 1979, 4, :o2, 294224400 - tz.transition 1979, 10, :o1, 309945600 - tz.transition 1980, 4, :o2, 325674000 - tz.transition 1980, 10, :o1, 341395200 - tz.transition 1981, 4, :o2, 357123600 - tz.transition 1981, 10, :o1, 372844800 - tz.transition 1982, 4, :o2, 388573200 - tz.transition 1982, 10, :o1, 404899200 - tz.transition 1983, 4, :o2, 420022800 - tz.transition 1983, 10, :o1, 436348800 - tz.transition 1984, 4, :o2, 452077200 - tz.transition 1984, 10, :o1, 467798400 - tz.transition 1985, 4, :o2, 483526800 - tz.transition 1985, 10, :o1, 499248000 - tz.transition 1986, 4, :o2, 514976400 - tz.transition 1986, 10, :o1, 530697600 - tz.transition 1987, 4, :o2, 544611600 - tz.transition 1987, 10, :o1, 562147200 - tz.transition 1988, 4, :o2, 576061200 - tz.transition 1988, 10, :o1, 594201600 - tz.transition 1989, 4, :o2, 607510800 - tz.transition 1989, 10, :o1, 625651200 - tz.transition 1990, 4, :o2, 638960400 - tz.transition 1990, 10, :o1, 657100800 - tz.transition 1991, 4, :o2, 671014800 - tz.transition 1991, 10, :o1, 688550400 - tz.transition 1992, 4, :o2, 702464400 - tz.transition 1992, 10, :o1, 720000000 - tz.transition 1993, 4, :o2, 733914000 - tz.transition 1993, 10, :o1, 752054400 - tz.transition 1994, 4, :o2, 765363600 - tz.transition 1994, 10, :o1, 783504000 - tz.transition 1995, 4, :o2, 796813200 - tz.transition 1995, 10, :o1, 814953600 - tz.transition 1996, 4, :o2, 828867600 - tz.transition 1996, 10, :o1, 846403200 - tz.transition 1997, 4, :o2, 860317200 - tz.transition 1997, 10, :o1, 877852800 - tz.transition 1998, 4, :o2, 891766800 - tz.transition 1998, 10, :o1, 909302400 - tz.transition 1999, 4, :o2, 923216400 - tz.transition 1999, 10, :o1, 941356800 - tz.transition 2000, 4, :o2, 954666000 - tz.transition 2000, 10, :o1, 972806400 - tz.transition 2001, 4, :o2, 986115600 - tz.transition 2001, 10, :o1, 1004256000 - tz.transition 2002, 4, :o2, 1018170000 - tz.transition 2002, 10, :o1, 1035705600 - tz.transition 2003, 4, :o2, 1049619600 - tz.transition 2003, 10, :o1, 1067155200 - tz.transition 2004, 4, :o2, 1081069200 - tz.transition 2004, 10, :o1, 1099209600 - tz.transition 2005, 4, :o2, 1112518800 - tz.transition 2005, 10, :o1, 1130659200 - tz.transition 2006, 4, :o2, 1143968400 - tz.transition 2006, 10, :o1, 1162108800 - tz.transition 2007, 3, :o2, 1173603600 - tz.transition 2007, 11, :o1, 1194163200 - tz.transition 2008, 3, :o2, 1205053200 - tz.transition 2008, 11, :o1, 1225612800 - tz.transition 2009, 3, :o2, 1236502800 - tz.transition 2009, 11, :o1, 1257062400 - tz.transition 2010, 3, :o2, 1268557200 - tz.transition 2010, 11, :o1, 1289116800 - tz.transition 2011, 3, :o2, 1300006800 - tz.transition 2011, 11, :o1, 1320566400 - tz.transition 2012, 3, :o2, 1331456400 - tz.transition 2012, 11, :o1, 1352016000 - tz.transition 2013, 3, :o2, 1362906000 - tz.transition 2013, 11, :o1, 1383465600 - tz.transition 2014, 3, :o2, 1394355600 - tz.transition 2014, 11, :o1, 1414915200 - tz.transition 2015, 3, :o2, 1425805200 - tz.transition 2015, 11, :o1, 1446364800 - tz.transition 2016, 3, :o2, 1457859600 - tz.transition 2016, 11, :o1, 1478419200 - tz.transition 2017, 3, :o2, 1489309200 - tz.transition 2017, 11, :o1, 1509868800 - tz.transition 2018, 3, :o2, 1520758800 - tz.transition 2018, 11, :o1, 1541318400 - tz.transition 2019, 3, :o2, 1552208400 - tz.transition 2019, 11, :o1, 1572768000 - tz.transition 2020, 3, :o2, 1583658000 - tz.transition 2020, 11, :o1, 1604217600 - tz.transition 2021, 3, :o2, 1615712400 - tz.transition 2021, 11, :o1, 1636272000 - tz.transition 2022, 3, :o2, 1647162000 - tz.transition 2022, 11, :o1, 1667721600 - tz.transition 2023, 3, :o2, 1678611600 - tz.transition 2023, 11, :o1, 1699171200 - tz.transition 2024, 3, :o2, 1710061200 - tz.transition 2024, 11, :o1, 1730620800 - tz.transition 2025, 3, :o2, 1741510800 - tz.transition 2025, 11, :o1, 1762070400 - tz.transition 2026, 3, :o2, 1772960400 - tz.transition 2026, 11, :o1, 1793520000 - tz.transition 2027, 3, :o2, 1805014800 - tz.transition 2027, 11, :o1, 1825574400 - tz.transition 2028, 3, :o2, 1836464400 - tz.transition 2028, 11, :o1, 1857024000 - tz.transition 2029, 3, :o2, 1867914000 - tz.transition 2029, 11, :o1, 1888473600 - tz.transition 2030, 3, :o2, 1899363600 - tz.transition 2030, 11, :o1, 1919923200 - tz.transition 2031, 3, :o2, 1930813200 - tz.transition 2031, 11, :o1, 1951372800 - tz.transition 2032, 3, :o2, 1962867600 - tz.transition 2032, 11, :o1, 1983427200 - tz.transition 2033, 3, :o2, 1994317200 - tz.transition 2033, 11, :o1, 2014876800 - tz.transition 2034, 3, :o2, 2025766800 - tz.transition 2034, 11, :o1, 2046326400 - tz.transition 2035, 3, :o2, 2057216400 - tz.transition 2035, 11, :o1, 2077776000 - tz.transition 2036, 3, :o2, 2088666000 - tz.transition 2036, 11, :o1, 2109225600 - tz.transition 2037, 3, :o2, 2120115600 - tz.transition 2037, 11, :o1, 2140675200 - tz.transition 2038, 3, :o2, 19723975, 8 - tz.transition 2038, 11, :o1, 14794409, 6 - tz.transition 2039, 3, :o2, 19726887, 8 - tz.transition 2039, 11, :o1, 14796593, 6 - tz.transition 2040, 3, :o2, 19729799, 8 - tz.transition 2040, 11, :o1, 14798777, 6 - tz.transition 2041, 3, :o2, 19732711, 8 - tz.transition 2041, 11, :o1, 14800961, 6 - tz.transition 2042, 3, :o2, 19735623, 8 - tz.transition 2042, 11, :o1, 14803145, 6 - tz.transition 2043, 3, :o2, 19738535, 8 - tz.transition 2043, 11, :o1, 14805329, 6 - tz.transition 2044, 3, :o2, 19741503, 8 - tz.transition 2044, 11, :o1, 14807555, 6 - tz.transition 2045, 3, :o2, 19744415, 8 - tz.transition 2045, 11, :o1, 14809739, 6 - tz.transition 2046, 3, :o2, 19747327, 8 - tz.transition 2046, 11, :o1, 14811923, 6 - tz.transition 2047, 3, :o2, 19750239, 8 - tz.transition 2047, 11, :o1, 14814107, 6 - tz.transition 2048, 3, :o2, 19753151, 8 - tz.transition 2048, 11, :o1, 14816291, 6 - tz.transition 2049, 3, :o2, 19756119, 8 - tz.transition 2049, 11, :o1, 14818517, 6 - tz.transition 2050, 3, :o2, 19759031, 8 - tz.transition 2050, 11, :o1, 14820701, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Godthab.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Godthab.rb deleted file mode 100644 index 1e05518b0d..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Godthab.rb +++ /dev/null @@ -1,161 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Godthab - include TimezoneDefinition - - timezone 'America/Godthab' do |tz| - tz.offset :o0, -12416, 0, :LMT - tz.offset :o1, -10800, 0, :WGT - tz.offset :o2, -10800, 3600, :WGST - - tz.transition 1916, 7, :o1, 3268448069, 1350 - tz.transition 1980, 4, :o2, 323845200 - tz.transition 1980, 9, :o1, 338950800 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 9, :o1, 370400400 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 9, :o1, 401850000 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o1, 717555600 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 9, :o1, 749005200 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 9, :o1, 780454800 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 9, :o1, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guatemala.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guatemala.rb deleted file mode 100644 index a2bf73401c..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guatemala.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Guatemala - include TimezoneDefinition - - timezone 'America/Guatemala' do |tz| - tz.offset :o0, -21724, 0, :LMT - tz.offset :o1, -21600, 0, :CST - tz.offset :o2, -21600, 3600, :CDT - - tz.transition 1918, 10, :o1, 52312429831, 21600 - tz.transition 1973, 11, :o2, 123055200 - tz.transition 1974, 2, :o1, 130914000 - tz.transition 1983, 5, :o2, 422344800 - tz.transition 1983, 9, :o1, 433054800 - tz.transition 1991, 3, :o2, 669708000 - tz.transition 1991, 9, :o1, 684219600 - tz.transition 2006, 4, :o2, 1146376800 - tz.transition 2006, 10, :o1, 1159678800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guyana.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guyana.rb deleted file mode 100644 index fccca4ceb4..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Guyana.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Guyana - include TimezoneDefinition - - timezone 'America/Guyana' do |tz| - tz.offset :o0, -13960, 0, :LMT - tz.offset :o1, -13500, 0, :GBGT - tz.offset :o2, -13500, 0, :GYT - tz.offset :o3, -10800, 0, :GYT - tz.offset :o4, -14400, 0, :GYT - - tz.transition 1915, 3, :o1, 5228404549, 2160 - tz.transition 1966, 5, :o2, 78056693, 32 - tz.transition 1975, 7, :o3, 176010300 - tz.transition 1991, 1, :o4, 662698800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Halifax.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Halifax.rb deleted file mode 100644 index d25ae775b3..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Halifax.rb +++ /dev/null @@ -1,274 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Halifax - include TimezoneDefinition - - timezone 'America/Halifax' do |tz| - tz.offset :o0, -15264, 0, :LMT - tz.offset :o1, -14400, 0, :AST - tz.offset :o2, -14400, 3600, :ADT - tz.offset :o3, -14400, 3600, :AWT - tz.offset :o4, -14400, 3600, :APT - - tz.transition 1902, 6, :o1, 724774703, 300 - tz.transition 1916, 4, :o2, 7262864, 3 - tz.transition 1916, 10, :o1, 19369101, 8 - tz.transition 1918, 4, :o2, 9686791, 4 - tz.transition 1918, 10, :o1, 58125545, 24 - tz.transition 1920, 5, :o2, 7267361, 3 - tz.transition 1920, 8, :o1, 19380525, 8 - tz.transition 1921, 5, :o2, 7268447, 3 - tz.transition 1921, 9, :o1, 19383501, 8 - tz.transition 1922, 4, :o2, 7269524, 3 - tz.transition 1922, 9, :o1, 19386421, 8 - tz.transition 1923, 5, :o2, 7270637, 3 - tz.transition 1923, 9, :o1, 19389333, 8 - tz.transition 1924, 5, :o2, 7271729, 3 - tz.transition 1924, 9, :o1, 19392349, 8 - tz.transition 1925, 5, :o2, 7272821, 3 - tz.transition 1925, 9, :o1, 19395373, 8 - tz.transition 1926, 5, :o2, 7273955, 3 - tz.transition 1926, 9, :o1, 19398173, 8 - tz.transition 1927, 5, :o2, 7275005, 3 - tz.transition 1927, 9, :o1, 19401197, 8 - tz.transition 1928, 5, :o2, 7276139, 3 - tz.transition 1928, 9, :o1, 19403989, 8 - tz.transition 1929, 5, :o2, 7277231, 3 - tz.transition 1929, 9, :o1, 19406861, 8 - tz.transition 1930, 5, :o2, 7278323, 3 - tz.transition 1930, 9, :o1, 19409877, 8 - tz.transition 1931, 5, :o2, 7279415, 3 - tz.transition 1931, 9, :o1, 19412901, 8 - tz.transition 1932, 5, :o2, 7280486, 3 - tz.transition 1932, 9, :o1, 19415813, 8 - tz.transition 1933, 4, :o2, 7281578, 3 - tz.transition 1933, 10, :o1, 19418781, 8 - tz.transition 1934, 5, :o2, 7282733, 3 - tz.transition 1934, 9, :o1, 19421573, 8 - tz.transition 1935, 6, :o2, 7283867, 3 - tz.transition 1935, 9, :o1, 19424605, 8 - tz.transition 1936, 6, :o2, 7284962, 3 - tz.transition 1936, 9, :o1, 19427405, 8 - tz.transition 1937, 5, :o2, 7285967, 3 - tz.transition 1937, 9, :o1, 19430429, 8 - tz.transition 1938, 5, :o2, 7287059, 3 - tz.transition 1938, 9, :o1, 19433341, 8 - tz.transition 1939, 5, :o2, 7288235, 3 - tz.transition 1939, 9, :o1, 19436253, 8 - tz.transition 1940, 5, :o2, 7289264, 3 - tz.transition 1940, 9, :o1, 19439221, 8 - tz.transition 1941, 5, :o2, 7290356, 3 - tz.transition 1941, 9, :o1, 19442133, 8 - tz.transition 1942, 2, :o3, 9721599, 4 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 58361489, 24 - tz.transition 1946, 4, :o2, 9727755, 4 - tz.transition 1946, 9, :o1, 58370225, 24 - tz.transition 1947, 4, :o2, 9729211, 4 - tz.transition 1947, 9, :o1, 58378961, 24 - tz.transition 1948, 4, :o2, 9730667, 4 - tz.transition 1948, 9, :o1, 58387697, 24 - tz.transition 1949, 4, :o2, 9732123, 4 - tz.transition 1949, 9, :o1, 58396433, 24 - tz.transition 1951, 4, :o2, 9735063, 4 - tz.transition 1951, 9, :o1, 58414073, 24 - tz.transition 1952, 4, :o2, 9736519, 4 - tz.transition 1952, 9, :o1, 58422809, 24 - tz.transition 1953, 4, :o2, 9737975, 4 - tz.transition 1953, 9, :o1, 58431545, 24 - tz.transition 1954, 4, :o2, 9739431, 4 - tz.transition 1954, 9, :o1, 58440281, 24 - tz.transition 1956, 4, :o2, 9742371, 4 - tz.transition 1956, 9, :o1, 58457921, 24 - tz.transition 1957, 4, :o2, 9743827, 4 - tz.transition 1957, 9, :o1, 58466657, 24 - tz.transition 1958, 4, :o2, 9745283, 4 - tz.transition 1958, 9, :o1, 58475393, 24 - tz.transition 1959, 4, :o2, 9746739, 4 - tz.transition 1959, 9, :o1, 58484129, 24 - tz.transition 1962, 4, :o2, 9751135, 4 - tz.transition 1962, 10, :o1, 58511177, 24 - tz.transition 1963, 4, :o2, 9752591, 4 - tz.transition 1963, 10, :o1, 58519913, 24 - tz.transition 1964, 4, :o2, 9754047, 4 - tz.transition 1964, 10, :o1, 58528649, 24 - tz.transition 1965, 4, :o2, 9755503, 4 - tz.transition 1965, 10, :o1, 58537553, 24 - tz.transition 1966, 4, :o2, 9756959, 4 - tz.transition 1966, 10, :o1, 58546289, 24 - tz.transition 1967, 4, :o2, 9758443, 4 - tz.transition 1967, 10, :o1, 58555025, 24 - tz.transition 1968, 4, :o2, 9759899, 4 - tz.transition 1968, 10, :o1, 58563761, 24 - tz.transition 1969, 4, :o2, 9761355, 4 - tz.transition 1969, 10, :o1, 58572497, 24 - tz.transition 1970, 4, :o2, 9957600 - tz.transition 1970, 10, :o1, 25678800 - tz.transition 1971, 4, :o2, 41407200 - tz.transition 1971, 10, :o1, 57733200 - tz.transition 1972, 4, :o2, 73461600 - tz.transition 1972, 10, :o1, 89182800 - tz.transition 1973, 4, :o2, 104911200 - tz.transition 1973, 10, :o1, 120632400 - tz.transition 1974, 4, :o2, 136360800 - tz.transition 1974, 10, :o1, 152082000 - tz.transition 1975, 4, :o2, 167810400 - tz.transition 1975, 10, :o1, 183531600 - tz.transition 1976, 4, :o2, 199260000 - tz.transition 1976, 10, :o1, 215586000 - tz.transition 1977, 4, :o2, 230709600 - tz.transition 1977, 10, :o1, 247035600 - tz.transition 1978, 4, :o2, 262764000 - tz.transition 1978, 10, :o1, 278485200 - tz.transition 1979, 4, :o2, 294213600 - tz.transition 1979, 10, :o1, 309934800 - tz.transition 1980, 4, :o2, 325663200 - tz.transition 1980, 10, :o1, 341384400 - tz.transition 1981, 4, :o2, 357112800 - tz.transition 1981, 10, :o1, 372834000 - tz.transition 1982, 4, :o2, 388562400 - tz.transition 1982, 10, :o1, 404888400 - tz.transition 1983, 4, :o2, 420012000 - tz.transition 1983, 10, :o1, 436338000 - tz.transition 1984, 4, :o2, 452066400 - tz.transition 1984, 10, :o1, 467787600 - tz.transition 1985, 4, :o2, 483516000 - tz.transition 1985, 10, :o1, 499237200 - tz.transition 1986, 4, :o2, 514965600 - tz.transition 1986, 10, :o1, 530686800 - tz.transition 1987, 4, :o2, 544600800 - tz.transition 1987, 10, :o1, 562136400 - tz.transition 1988, 4, :o2, 576050400 - tz.transition 1988, 10, :o1, 594190800 - tz.transition 1989, 4, :o2, 607500000 - tz.transition 1989, 10, :o1, 625640400 - tz.transition 1990, 4, :o2, 638949600 - tz.transition 1990, 10, :o1, 657090000 - tz.transition 1991, 4, :o2, 671004000 - tz.transition 1991, 10, :o1, 688539600 - tz.transition 1992, 4, :o2, 702453600 - tz.transition 1992, 10, :o1, 719989200 - tz.transition 1993, 4, :o2, 733903200 - tz.transition 1993, 10, :o1, 752043600 - tz.transition 1994, 4, :o2, 765352800 - tz.transition 1994, 10, :o1, 783493200 - tz.transition 1995, 4, :o2, 796802400 - tz.transition 1995, 10, :o1, 814942800 - tz.transition 1996, 4, :o2, 828856800 - tz.transition 1996, 10, :o1, 846392400 - tz.transition 1997, 4, :o2, 860306400 - tz.transition 1997, 10, :o1, 877842000 - tz.transition 1998, 4, :o2, 891756000 - tz.transition 1998, 10, :o1, 909291600 - tz.transition 1999, 4, :o2, 923205600 - tz.transition 1999, 10, :o1, 941346000 - tz.transition 2000, 4, :o2, 954655200 - tz.transition 2000, 10, :o1, 972795600 - tz.transition 2001, 4, :o2, 986104800 - tz.transition 2001, 10, :o1, 1004245200 - tz.transition 2002, 4, :o2, 1018159200 - tz.transition 2002, 10, :o1, 1035694800 - tz.transition 2003, 4, :o2, 1049608800 - tz.transition 2003, 10, :o1, 1067144400 - tz.transition 2004, 4, :o2, 1081058400 - tz.transition 2004, 10, :o1, 1099198800 - tz.transition 2005, 4, :o2, 1112508000 - tz.transition 2005, 10, :o1, 1130648400 - tz.transition 2006, 4, :o2, 1143957600 - tz.transition 2006, 10, :o1, 1162098000 - tz.transition 2007, 3, :o2, 1173592800 - tz.transition 2007, 11, :o1, 1194152400 - tz.transition 2008, 3, :o2, 1205042400 - tz.transition 2008, 11, :o1, 1225602000 - tz.transition 2009, 3, :o2, 1236492000 - tz.transition 2009, 11, :o1, 1257051600 - tz.transition 2010, 3, :o2, 1268546400 - tz.transition 2010, 11, :o1, 1289106000 - tz.transition 2011, 3, :o2, 1299996000 - tz.transition 2011, 11, :o1, 1320555600 - tz.transition 2012, 3, :o2, 1331445600 - tz.transition 2012, 11, :o1, 1352005200 - tz.transition 2013, 3, :o2, 1362895200 - tz.transition 2013, 11, :o1, 1383454800 - tz.transition 2014, 3, :o2, 1394344800 - tz.transition 2014, 11, :o1, 1414904400 - tz.transition 2015, 3, :o2, 1425794400 - tz.transition 2015, 11, :o1, 1446354000 - tz.transition 2016, 3, :o2, 1457848800 - tz.transition 2016, 11, :o1, 1478408400 - tz.transition 2017, 3, :o2, 1489298400 - tz.transition 2017, 11, :o1, 1509858000 - tz.transition 2018, 3, :o2, 1520748000 - tz.transition 2018, 11, :o1, 1541307600 - tz.transition 2019, 3, :o2, 1552197600 - tz.transition 2019, 11, :o1, 1572757200 - tz.transition 2020, 3, :o2, 1583647200 - tz.transition 2020, 11, :o1, 1604206800 - tz.transition 2021, 3, :o2, 1615701600 - tz.transition 2021, 11, :o1, 1636261200 - tz.transition 2022, 3, :o2, 1647151200 - tz.transition 2022, 11, :o1, 1667710800 - tz.transition 2023, 3, :o2, 1678600800 - tz.transition 2023, 11, :o1, 1699160400 - tz.transition 2024, 3, :o2, 1710050400 - tz.transition 2024, 11, :o1, 1730610000 - tz.transition 2025, 3, :o2, 1741500000 - tz.transition 2025, 11, :o1, 1762059600 - tz.transition 2026, 3, :o2, 1772949600 - tz.transition 2026, 11, :o1, 1793509200 - tz.transition 2027, 3, :o2, 1805004000 - tz.transition 2027, 11, :o1, 1825563600 - tz.transition 2028, 3, :o2, 1836453600 - tz.transition 2028, 11, :o1, 1857013200 - tz.transition 2029, 3, :o2, 1867903200 - tz.transition 2029, 11, :o1, 1888462800 - tz.transition 2030, 3, :o2, 1899352800 - tz.transition 2030, 11, :o1, 1919912400 - tz.transition 2031, 3, :o2, 1930802400 - tz.transition 2031, 11, :o1, 1951362000 - tz.transition 2032, 3, :o2, 1962856800 - tz.transition 2032, 11, :o1, 1983416400 - tz.transition 2033, 3, :o2, 1994306400 - tz.transition 2033, 11, :o1, 2014866000 - tz.transition 2034, 3, :o2, 2025756000 - tz.transition 2034, 11, :o1, 2046315600 - tz.transition 2035, 3, :o2, 2057205600 - tz.transition 2035, 11, :o1, 2077765200 - tz.transition 2036, 3, :o2, 2088655200 - tz.transition 2036, 11, :o1, 2109214800 - tz.transition 2037, 3, :o2, 2120104800 - tz.transition 2037, 11, :o1, 2140664400 - tz.transition 2038, 3, :o2, 9861987, 4 - tz.transition 2038, 11, :o1, 59177633, 24 - tz.transition 2039, 3, :o2, 9863443, 4 - tz.transition 2039, 11, :o1, 59186369, 24 - tz.transition 2040, 3, :o2, 9864899, 4 - tz.transition 2040, 11, :o1, 59195105, 24 - tz.transition 2041, 3, :o2, 9866355, 4 - tz.transition 2041, 11, :o1, 59203841, 24 - tz.transition 2042, 3, :o2, 9867811, 4 - tz.transition 2042, 11, :o1, 59212577, 24 - tz.transition 2043, 3, :o2, 9869267, 4 - tz.transition 2043, 11, :o1, 59221313, 24 - tz.transition 2044, 3, :o2, 9870751, 4 - tz.transition 2044, 11, :o1, 59230217, 24 - tz.transition 2045, 3, :o2, 9872207, 4 - tz.transition 2045, 11, :o1, 59238953, 24 - tz.transition 2046, 3, :o2, 9873663, 4 - tz.transition 2046, 11, :o1, 59247689, 24 - tz.transition 2047, 3, :o2, 9875119, 4 - tz.transition 2047, 11, :o1, 59256425, 24 - tz.transition 2048, 3, :o2, 9876575, 4 - tz.transition 2048, 11, :o1, 59265161, 24 - tz.transition 2049, 3, :o2, 9878059, 4 - tz.transition 2049, 11, :o1, 59274065, 24 - tz.transition 2050, 3, :o2, 9879515, 4 - tz.transition 2050, 11, :o1, 59282801, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Indiana/Indianapolis.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Indiana/Indianapolis.rb deleted file mode 100644 index f1430f6c24..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Indiana/Indianapolis.rb +++ /dev/null @@ -1,149 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Indiana - module Indianapolis - include TimezoneDefinition - - timezone 'America/Indiana/Indianapolis' do |tz| - tz.offset :o0, -20678, 0, :LMT - tz.offset :o1, -21600, 0, :CST - tz.offset :o2, -21600, 3600, :CDT - tz.offset :o3, -21600, 3600, :CWT - tz.offset :o4, -21600, 3600, :CPT - tz.offset :o5, -18000, 0, :EST - tz.offset :o6, -18000, 3600, :EDT - - tz.transition 1883, 11, :o1, 9636533, 4 - tz.transition 1918, 3, :o2, 14530103, 6 - tz.transition 1918, 10, :o1, 58125451, 24 - tz.transition 1919, 3, :o2, 14532287, 6 - tz.transition 1919, 10, :o1, 58134187, 24 - tz.transition 1941, 6, :o2, 14581007, 6 - tz.transition 1941, 9, :o1, 58326379, 24 - tz.transition 1942, 2, :o3, 14582399, 6 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 58361491, 24 - tz.transition 1946, 4, :o2, 14591633, 6 - tz.transition 1946, 9, :o1, 58370227, 24 - tz.transition 1947, 4, :o2, 14593817, 6 - tz.transition 1947, 9, :o1, 58378963, 24 - tz.transition 1948, 4, :o2, 14596001, 6 - tz.transition 1948, 9, :o1, 58387699, 24 - tz.transition 1949, 4, :o2, 14598185, 6 - tz.transition 1949, 9, :o1, 58396435, 24 - tz.transition 1950, 4, :o2, 14600411, 6 - tz.transition 1950, 9, :o1, 58405171, 24 - tz.transition 1951, 4, :o2, 14602595, 6 - tz.transition 1951, 9, :o1, 58414075, 24 - tz.transition 1952, 4, :o2, 14604779, 6 - tz.transition 1952, 9, :o1, 58422811, 24 - tz.transition 1953, 4, :o2, 14606963, 6 - tz.transition 1953, 9, :o1, 58431547, 24 - tz.transition 1954, 4, :o2, 14609147, 6 - tz.transition 1954, 9, :o1, 58440283, 24 - tz.transition 1955, 4, :o5, 14611331, 6 - tz.transition 1957, 9, :o1, 58466659, 24 - tz.transition 1958, 4, :o5, 14617925, 6 - tz.transition 1969, 4, :o6, 58568131, 24 - tz.transition 1969, 10, :o5, 9762083, 4 - tz.transition 1970, 4, :o6, 9961200 - tz.transition 1970, 10, :o5, 25682400 - tz.transition 2006, 4, :o6, 1143961200 - tz.transition 2006, 10, :o5, 1162101600 - tz.transition 2007, 3, :o6, 1173596400 - tz.transition 2007, 11, :o5, 1194156000 - tz.transition 2008, 3, :o6, 1205046000 - tz.transition 2008, 11, :o5, 1225605600 - tz.transition 2009, 3, :o6, 1236495600 - tz.transition 2009, 11, :o5, 1257055200 - tz.transition 2010, 3, :o6, 1268550000 - tz.transition 2010, 11, :o5, 1289109600 - tz.transition 2011, 3, :o6, 1299999600 - tz.transition 2011, 11, :o5, 1320559200 - tz.transition 2012, 3, :o6, 1331449200 - tz.transition 2012, 11, :o5, 1352008800 - tz.transition 2013, 3, :o6, 1362898800 - tz.transition 2013, 11, :o5, 1383458400 - tz.transition 2014, 3, :o6, 1394348400 - tz.transition 2014, 11, :o5, 1414908000 - tz.transition 2015, 3, :o6, 1425798000 - tz.transition 2015, 11, :o5, 1446357600 - tz.transition 2016, 3, :o6, 1457852400 - tz.transition 2016, 11, :o5, 1478412000 - tz.transition 2017, 3, :o6, 1489302000 - tz.transition 2017, 11, :o5, 1509861600 - tz.transition 2018, 3, :o6, 1520751600 - tz.transition 2018, 11, :o5, 1541311200 - tz.transition 2019, 3, :o6, 1552201200 - tz.transition 2019, 11, :o5, 1572760800 - tz.transition 2020, 3, :o6, 1583650800 - tz.transition 2020, 11, :o5, 1604210400 - tz.transition 2021, 3, :o6, 1615705200 - tz.transition 2021, 11, :o5, 1636264800 - tz.transition 2022, 3, :o6, 1647154800 - tz.transition 2022, 11, :o5, 1667714400 - tz.transition 2023, 3, :o6, 1678604400 - tz.transition 2023, 11, :o5, 1699164000 - tz.transition 2024, 3, :o6, 1710054000 - tz.transition 2024, 11, :o5, 1730613600 - tz.transition 2025, 3, :o6, 1741503600 - tz.transition 2025, 11, :o5, 1762063200 - tz.transition 2026, 3, :o6, 1772953200 - tz.transition 2026, 11, :o5, 1793512800 - tz.transition 2027, 3, :o6, 1805007600 - tz.transition 2027, 11, :o5, 1825567200 - tz.transition 2028, 3, :o6, 1836457200 - tz.transition 2028, 11, :o5, 1857016800 - tz.transition 2029, 3, :o6, 1867906800 - tz.transition 2029, 11, :o5, 1888466400 - tz.transition 2030, 3, :o6, 1899356400 - tz.transition 2030, 11, :o5, 1919916000 - tz.transition 2031, 3, :o6, 1930806000 - tz.transition 2031, 11, :o5, 1951365600 - tz.transition 2032, 3, :o6, 1962860400 - tz.transition 2032, 11, :o5, 1983420000 - tz.transition 2033, 3, :o6, 1994310000 - tz.transition 2033, 11, :o5, 2014869600 - tz.transition 2034, 3, :o6, 2025759600 - tz.transition 2034, 11, :o5, 2046319200 - tz.transition 2035, 3, :o6, 2057209200 - tz.transition 2035, 11, :o5, 2077768800 - tz.transition 2036, 3, :o6, 2088658800 - tz.transition 2036, 11, :o5, 2109218400 - tz.transition 2037, 3, :o6, 2120108400 - tz.transition 2037, 11, :o5, 2140668000 - tz.transition 2038, 3, :o6, 59171923, 24 - tz.transition 2038, 11, :o5, 9862939, 4 - tz.transition 2039, 3, :o6, 59180659, 24 - tz.transition 2039, 11, :o5, 9864395, 4 - tz.transition 2040, 3, :o6, 59189395, 24 - tz.transition 2040, 11, :o5, 9865851, 4 - tz.transition 2041, 3, :o6, 59198131, 24 - tz.transition 2041, 11, :o5, 9867307, 4 - tz.transition 2042, 3, :o6, 59206867, 24 - tz.transition 2042, 11, :o5, 9868763, 4 - tz.transition 2043, 3, :o6, 59215603, 24 - tz.transition 2043, 11, :o5, 9870219, 4 - tz.transition 2044, 3, :o6, 59224507, 24 - tz.transition 2044, 11, :o5, 9871703, 4 - tz.transition 2045, 3, :o6, 59233243, 24 - tz.transition 2045, 11, :o5, 9873159, 4 - tz.transition 2046, 3, :o6, 59241979, 24 - tz.transition 2046, 11, :o5, 9874615, 4 - tz.transition 2047, 3, :o6, 59250715, 24 - tz.transition 2047, 11, :o5, 9876071, 4 - tz.transition 2048, 3, :o6, 59259451, 24 - tz.transition 2048, 11, :o5, 9877527, 4 - tz.transition 2049, 3, :o6, 59268355, 24 - tz.transition 2049, 11, :o5, 9879011, 4 - tz.transition 2050, 3, :o6, 59277091, 24 - tz.transition 2050, 11, :o5, 9880467, 4 - end - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Juneau.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Juneau.rb deleted file mode 100644 index f646f3f54a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Juneau.rb +++ /dev/null @@ -1,194 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Juneau - include TimezoneDefinition - - timezone 'America/Juneau' do |tz| - tz.offset :o0, 54139, 0, :LMT - tz.offset :o1, -32261, 0, :LMT - tz.offset :o2, -28800, 0, :PST - tz.offset :o3, -28800, 3600, :PWT - tz.offset :o4, -28800, 3600, :PPT - tz.offset :o5, -28800, 3600, :PDT - tz.offset :o6, -32400, 0, :YST - tz.offset :o7, -32400, 0, :AKST - tz.offset :o8, -32400, 3600, :AKDT - - tz.transition 1867, 10, :o1, 207641393861, 86400 - tz.transition 1900, 8, :o2, 208677805061, 86400 - tz.transition 1942, 2, :o3, 29164799, 12 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o2, 19453831, 8 - tz.transition 1969, 4, :o5, 29284067, 12 - tz.transition 1969, 10, :o2, 19524167, 8 - tz.transition 1970, 4, :o5, 9972000 - tz.transition 1970, 10, :o2, 25693200 - tz.transition 1971, 4, :o5, 41421600 - tz.transition 1971, 10, :o2, 57747600 - tz.transition 1972, 4, :o5, 73476000 - tz.transition 1972, 10, :o2, 89197200 - tz.transition 1973, 4, :o5, 104925600 - tz.transition 1973, 10, :o2, 120646800 - tz.transition 1974, 1, :o5, 126698400 - tz.transition 1974, 10, :o2, 152096400 - tz.transition 1975, 2, :o5, 162381600 - tz.transition 1975, 10, :o2, 183546000 - tz.transition 1976, 4, :o5, 199274400 - tz.transition 1976, 10, :o2, 215600400 - tz.transition 1977, 4, :o5, 230724000 - tz.transition 1977, 10, :o2, 247050000 - tz.transition 1978, 4, :o5, 262778400 - tz.transition 1978, 10, :o2, 278499600 - tz.transition 1979, 4, :o5, 294228000 - tz.transition 1979, 10, :o2, 309949200 - tz.transition 1980, 4, :o5, 325677600 - tz.transition 1980, 10, :o2, 341398800 - tz.transition 1981, 4, :o5, 357127200 - tz.transition 1981, 10, :o2, 372848400 - tz.transition 1982, 4, :o5, 388576800 - tz.transition 1982, 10, :o2, 404902800 - tz.transition 1983, 4, :o5, 420026400 - tz.transition 1983, 10, :o6, 436352400 - tz.transition 1983, 11, :o7, 439030800 - tz.transition 1984, 4, :o8, 452084400 - tz.transition 1984, 10, :o7, 467805600 - tz.transition 1985, 4, :o8, 483534000 - tz.transition 1985, 10, :o7, 499255200 - tz.transition 1986, 4, :o8, 514983600 - tz.transition 1986, 10, :o7, 530704800 - tz.transition 1987, 4, :o8, 544618800 - tz.transition 1987, 10, :o7, 562154400 - tz.transition 1988, 4, :o8, 576068400 - tz.transition 1988, 10, :o7, 594208800 - tz.transition 1989, 4, :o8, 607518000 - tz.transition 1989, 10, :o7, 625658400 - tz.transition 1990, 4, :o8, 638967600 - tz.transition 1990, 10, :o7, 657108000 - tz.transition 1991, 4, :o8, 671022000 - tz.transition 1991, 10, :o7, 688557600 - tz.transition 1992, 4, :o8, 702471600 - tz.transition 1992, 10, :o7, 720007200 - tz.transition 1993, 4, :o8, 733921200 - tz.transition 1993, 10, :o7, 752061600 - tz.transition 1994, 4, :o8, 765370800 - tz.transition 1994, 10, :o7, 783511200 - tz.transition 1995, 4, :o8, 796820400 - tz.transition 1995, 10, :o7, 814960800 - tz.transition 1996, 4, :o8, 828874800 - tz.transition 1996, 10, :o7, 846410400 - tz.transition 1997, 4, :o8, 860324400 - tz.transition 1997, 10, :o7, 877860000 - tz.transition 1998, 4, :o8, 891774000 - tz.transition 1998, 10, :o7, 909309600 - tz.transition 1999, 4, :o8, 923223600 - tz.transition 1999, 10, :o7, 941364000 - tz.transition 2000, 4, :o8, 954673200 - tz.transition 2000, 10, :o7, 972813600 - tz.transition 2001, 4, :o8, 986122800 - tz.transition 2001, 10, :o7, 1004263200 - tz.transition 2002, 4, :o8, 1018177200 - tz.transition 2002, 10, :o7, 1035712800 - tz.transition 2003, 4, :o8, 1049626800 - tz.transition 2003, 10, :o7, 1067162400 - tz.transition 2004, 4, :o8, 1081076400 - tz.transition 2004, 10, :o7, 1099216800 - tz.transition 2005, 4, :o8, 1112526000 - tz.transition 2005, 10, :o7, 1130666400 - tz.transition 2006, 4, :o8, 1143975600 - tz.transition 2006, 10, :o7, 1162116000 - tz.transition 2007, 3, :o8, 1173610800 - tz.transition 2007, 11, :o7, 1194170400 - tz.transition 2008, 3, :o8, 1205060400 - tz.transition 2008, 11, :o7, 1225620000 - tz.transition 2009, 3, :o8, 1236510000 - tz.transition 2009, 11, :o7, 1257069600 - tz.transition 2010, 3, :o8, 1268564400 - tz.transition 2010, 11, :o7, 1289124000 - tz.transition 2011, 3, :o8, 1300014000 - tz.transition 2011, 11, :o7, 1320573600 - tz.transition 2012, 3, :o8, 1331463600 - tz.transition 2012, 11, :o7, 1352023200 - tz.transition 2013, 3, :o8, 1362913200 - tz.transition 2013, 11, :o7, 1383472800 - tz.transition 2014, 3, :o8, 1394362800 - tz.transition 2014, 11, :o7, 1414922400 - tz.transition 2015, 3, :o8, 1425812400 - tz.transition 2015, 11, :o7, 1446372000 - tz.transition 2016, 3, :o8, 1457866800 - tz.transition 2016, 11, :o7, 1478426400 - tz.transition 2017, 3, :o8, 1489316400 - tz.transition 2017, 11, :o7, 1509876000 - tz.transition 2018, 3, :o8, 1520766000 - tz.transition 2018, 11, :o7, 1541325600 - tz.transition 2019, 3, :o8, 1552215600 - tz.transition 2019, 11, :o7, 1572775200 - tz.transition 2020, 3, :o8, 1583665200 - tz.transition 2020, 11, :o7, 1604224800 - tz.transition 2021, 3, :o8, 1615719600 - tz.transition 2021, 11, :o7, 1636279200 - tz.transition 2022, 3, :o8, 1647169200 - tz.transition 2022, 11, :o7, 1667728800 - tz.transition 2023, 3, :o8, 1678618800 - tz.transition 2023, 11, :o7, 1699178400 - tz.transition 2024, 3, :o8, 1710068400 - tz.transition 2024, 11, :o7, 1730628000 - tz.transition 2025, 3, :o8, 1741518000 - tz.transition 2025, 11, :o7, 1762077600 - tz.transition 2026, 3, :o8, 1772967600 - tz.transition 2026, 11, :o7, 1793527200 - tz.transition 2027, 3, :o8, 1805022000 - tz.transition 2027, 11, :o7, 1825581600 - tz.transition 2028, 3, :o8, 1836471600 - tz.transition 2028, 11, :o7, 1857031200 - tz.transition 2029, 3, :o8, 1867921200 - tz.transition 2029, 11, :o7, 1888480800 - tz.transition 2030, 3, :o8, 1899370800 - tz.transition 2030, 11, :o7, 1919930400 - tz.transition 2031, 3, :o8, 1930820400 - tz.transition 2031, 11, :o7, 1951380000 - tz.transition 2032, 3, :o8, 1962874800 - tz.transition 2032, 11, :o7, 1983434400 - tz.transition 2033, 3, :o8, 1994324400 - tz.transition 2033, 11, :o7, 2014884000 - tz.transition 2034, 3, :o8, 2025774000 - tz.transition 2034, 11, :o7, 2046333600 - tz.transition 2035, 3, :o8, 2057223600 - tz.transition 2035, 11, :o7, 2077783200 - tz.transition 2036, 3, :o8, 2088673200 - tz.transition 2036, 11, :o7, 2109232800 - tz.transition 2037, 3, :o8, 2120122800 - tz.transition 2037, 11, :o7, 2140682400 - tz.transition 2038, 3, :o8, 59171927, 24 - tz.transition 2038, 11, :o7, 29588819, 12 - tz.transition 2039, 3, :o8, 59180663, 24 - tz.transition 2039, 11, :o7, 29593187, 12 - tz.transition 2040, 3, :o8, 59189399, 24 - tz.transition 2040, 11, :o7, 29597555, 12 - tz.transition 2041, 3, :o8, 59198135, 24 - tz.transition 2041, 11, :o7, 29601923, 12 - tz.transition 2042, 3, :o8, 59206871, 24 - tz.transition 2042, 11, :o7, 29606291, 12 - tz.transition 2043, 3, :o8, 59215607, 24 - tz.transition 2043, 11, :o7, 29610659, 12 - tz.transition 2044, 3, :o8, 59224511, 24 - tz.transition 2044, 11, :o7, 29615111, 12 - tz.transition 2045, 3, :o8, 59233247, 24 - tz.transition 2045, 11, :o7, 29619479, 12 - tz.transition 2046, 3, :o8, 59241983, 24 - tz.transition 2046, 11, :o7, 29623847, 12 - tz.transition 2047, 3, :o8, 59250719, 24 - tz.transition 2047, 11, :o7, 29628215, 12 - tz.transition 2048, 3, :o8, 59259455, 24 - tz.transition 2048, 11, :o7, 29632583, 12 - tz.transition 2049, 3, :o8, 59268359, 24 - tz.transition 2049, 11, :o7, 29637035, 12 - tz.transition 2050, 3, :o8, 59277095, 24 - tz.transition 2050, 11, :o7, 29641403, 12 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/La_Paz.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/La_Paz.rb deleted file mode 100644 index 45c907899f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/La_Paz.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module La_Paz - include TimezoneDefinition - - timezone 'America/La_Paz' do |tz| - tz.offset :o0, -16356, 0, :LMT - tz.offset :o1, -16356, 0, :CMT - tz.offset :o2, -16356, 3600, :BOST - tz.offset :o3, -14400, 0, :BOT - - tz.transition 1890, 1, :o1, 17361854563, 7200 - tz.transition 1931, 10, :o2, 17471733763, 7200 - tz.transition 1932, 3, :o3, 17472871063, 7200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Lima.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Lima.rb deleted file mode 100644 index af68ac29f7..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Lima.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Lima - include TimezoneDefinition - - timezone 'America/Lima' do |tz| - tz.offset :o0, -18492, 0, :LMT - tz.offset :o1, -18516, 0, :LMT - tz.offset :o2, -18000, 0, :PET - tz.offset :o3, -18000, 3600, :PEST - - tz.transition 1890, 1, :o1, 17361854741, 7200 - tz.transition 1908, 7, :o2, 17410685143, 7200 - tz.transition 1938, 1, :o3, 58293593, 24 - tz.transition 1938, 4, :o2, 7286969, 3 - tz.transition 1938, 9, :o3, 58300001, 24 - tz.transition 1939, 3, :o2, 7288046, 3 - tz.transition 1939, 9, :o3, 58308737, 24 - tz.transition 1940, 3, :o2, 7289138, 3 - tz.transition 1986, 1, :o3, 504939600 - tz.transition 1986, 4, :o2, 512712000 - tz.transition 1987, 1, :o3, 536475600 - tz.transition 1987, 4, :o2, 544248000 - tz.transition 1990, 1, :o3, 631170000 - tz.transition 1990, 4, :o2, 638942400 - tz.transition 1994, 1, :o3, 757400400 - tz.transition 1994, 4, :o2, 765172800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Los_Angeles.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Los_Angeles.rb deleted file mode 100644 index 16007fd675..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Los_Angeles.rb +++ /dev/null @@ -1,232 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Los_Angeles - include TimezoneDefinition - - timezone 'America/Los_Angeles' do |tz| - tz.offset :o0, -28378, 0, :LMT - tz.offset :o1, -28800, 0, :PST - tz.offset :o2, -28800, 3600, :PDT - tz.offset :o3, -28800, 3600, :PWT - tz.offset :o4, -28800, 3600, :PPT - - tz.transition 1883, 11, :o1, 7227400, 3 - tz.transition 1918, 3, :o2, 29060207, 12 - tz.transition 1918, 10, :o1, 19375151, 8 - tz.transition 1919, 3, :o2, 29064575, 12 - tz.transition 1919, 10, :o1, 19378063, 8 - tz.transition 1942, 2, :o3, 29164799, 12 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 19453831, 8 - tz.transition 1948, 3, :o2, 29191499, 12 - tz.transition 1949, 1, :o1, 19463343, 8 - tz.transition 1950, 4, :o2, 29200823, 12 - tz.transition 1950, 9, :o1, 19468391, 8 - tz.transition 1951, 4, :o2, 29205191, 12 - tz.transition 1951, 9, :o1, 19471359, 8 - tz.transition 1952, 4, :o2, 29209559, 12 - tz.transition 1952, 9, :o1, 19474271, 8 - tz.transition 1953, 4, :o2, 29213927, 12 - tz.transition 1953, 9, :o1, 19477183, 8 - tz.transition 1954, 4, :o2, 29218295, 12 - tz.transition 1954, 9, :o1, 19480095, 8 - tz.transition 1955, 4, :o2, 29222663, 12 - tz.transition 1955, 9, :o1, 19483007, 8 - tz.transition 1956, 4, :o2, 29227115, 12 - tz.transition 1956, 9, :o1, 19485975, 8 - tz.transition 1957, 4, :o2, 29231483, 12 - tz.transition 1957, 9, :o1, 19488887, 8 - tz.transition 1958, 4, :o2, 29235851, 12 - tz.transition 1958, 9, :o1, 19491799, 8 - tz.transition 1959, 4, :o2, 29240219, 12 - tz.transition 1959, 9, :o1, 19494711, 8 - tz.transition 1960, 4, :o2, 29244587, 12 - tz.transition 1960, 9, :o1, 19497623, 8 - tz.transition 1961, 4, :o2, 29249039, 12 - tz.transition 1961, 9, :o1, 19500535, 8 - tz.transition 1962, 4, :o2, 29253407, 12 - tz.transition 1962, 10, :o1, 19503727, 8 - tz.transition 1963, 4, :o2, 29257775, 12 - tz.transition 1963, 10, :o1, 19506639, 8 - tz.transition 1964, 4, :o2, 29262143, 12 - tz.transition 1964, 10, :o1, 19509551, 8 - tz.transition 1965, 4, :o2, 29266511, 12 - tz.transition 1965, 10, :o1, 19512519, 8 - tz.transition 1966, 4, :o2, 29270879, 12 - tz.transition 1966, 10, :o1, 19515431, 8 - tz.transition 1967, 4, :o2, 29275331, 12 - tz.transition 1967, 10, :o1, 19518343, 8 - tz.transition 1968, 4, :o2, 29279699, 12 - tz.transition 1968, 10, :o1, 19521255, 8 - tz.transition 1969, 4, :o2, 29284067, 12 - tz.transition 1969, 10, :o1, 19524167, 8 - tz.transition 1970, 4, :o2, 9972000 - tz.transition 1970, 10, :o1, 25693200 - tz.transition 1971, 4, :o2, 41421600 - tz.transition 1971, 10, :o1, 57747600 - tz.transition 1972, 4, :o2, 73476000 - tz.transition 1972, 10, :o1, 89197200 - tz.transition 1973, 4, :o2, 104925600 - tz.transition 1973, 10, :o1, 120646800 - tz.transition 1974, 1, :o2, 126698400 - tz.transition 1974, 10, :o1, 152096400 - tz.transition 1975, 2, :o2, 162381600 - tz.transition 1975, 10, :o1, 183546000 - tz.transition 1976, 4, :o2, 199274400 - tz.transition 1976, 10, :o1, 215600400 - tz.transition 1977, 4, :o2, 230724000 - tz.transition 1977, 10, :o1, 247050000 - tz.transition 1978, 4, :o2, 262778400 - tz.transition 1978, 10, :o1, 278499600 - tz.transition 1979, 4, :o2, 294228000 - tz.transition 1979, 10, :o1, 309949200 - tz.transition 1980, 4, :o2, 325677600 - tz.transition 1980, 10, :o1, 341398800 - tz.transition 1981, 4, :o2, 357127200 - tz.transition 1981, 10, :o1, 372848400 - tz.transition 1982, 4, :o2, 388576800 - tz.transition 1982, 10, :o1, 404902800 - tz.transition 1983, 4, :o2, 420026400 - tz.transition 1983, 10, :o1, 436352400 - tz.transition 1984, 4, :o2, 452080800 - tz.transition 1984, 10, :o1, 467802000 - tz.transition 1985, 4, :o2, 483530400 - tz.transition 1985, 10, :o1, 499251600 - tz.transition 1986, 4, :o2, 514980000 - tz.transition 1986, 10, :o1, 530701200 - tz.transition 1987, 4, :o2, 544615200 - tz.transition 1987, 10, :o1, 562150800 - tz.transition 1988, 4, :o2, 576064800 - tz.transition 1988, 10, :o1, 594205200 - tz.transition 1989, 4, :o2, 607514400 - tz.transition 1989, 10, :o1, 625654800 - tz.transition 1990, 4, :o2, 638964000 - tz.transition 1990, 10, :o1, 657104400 - tz.transition 1991, 4, :o2, 671018400 - tz.transition 1991, 10, :o1, 688554000 - tz.transition 1992, 4, :o2, 702468000 - tz.transition 1992, 10, :o1, 720003600 - tz.transition 1993, 4, :o2, 733917600 - tz.transition 1993, 10, :o1, 752058000 - tz.transition 1994, 4, :o2, 765367200 - tz.transition 1994, 10, :o1, 783507600 - tz.transition 1995, 4, :o2, 796816800 - tz.transition 1995, 10, :o1, 814957200 - tz.transition 1996, 4, :o2, 828871200 - tz.transition 1996, 10, :o1, 846406800 - tz.transition 1997, 4, :o2, 860320800 - tz.transition 1997, 10, :o1, 877856400 - tz.transition 1998, 4, :o2, 891770400 - tz.transition 1998, 10, :o1, 909306000 - tz.transition 1999, 4, :o2, 923220000 - tz.transition 1999, 10, :o1, 941360400 - tz.transition 2000, 4, :o2, 954669600 - tz.transition 2000, 10, :o1, 972810000 - tz.transition 2001, 4, :o2, 986119200 - tz.transition 2001, 10, :o1, 1004259600 - tz.transition 2002, 4, :o2, 1018173600 - tz.transition 2002, 10, :o1, 1035709200 - tz.transition 2003, 4, :o2, 1049623200 - tz.transition 2003, 10, :o1, 1067158800 - tz.transition 2004, 4, :o2, 1081072800 - tz.transition 2004, 10, :o1, 1099213200 - tz.transition 2005, 4, :o2, 1112522400 - tz.transition 2005, 10, :o1, 1130662800 - tz.transition 2006, 4, :o2, 1143972000 - tz.transition 2006, 10, :o1, 1162112400 - tz.transition 2007, 3, :o2, 1173607200 - tz.transition 2007, 11, :o1, 1194166800 - tz.transition 2008, 3, :o2, 1205056800 - tz.transition 2008, 11, :o1, 1225616400 - tz.transition 2009, 3, :o2, 1236506400 - tz.transition 2009, 11, :o1, 1257066000 - tz.transition 2010, 3, :o2, 1268560800 - tz.transition 2010, 11, :o1, 1289120400 - tz.transition 2011, 3, :o2, 1300010400 - tz.transition 2011, 11, :o1, 1320570000 - tz.transition 2012, 3, :o2, 1331460000 - tz.transition 2012, 11, :o1, 1352019600 - tz.transition 2013, 3, :o2, 1362909600 - tz.transition 2013, 11, :o1, 1383469200 - tz.transition 2014, 3, :o2, 1394359200 - tz.transition 2014, 11, :o1, 1414918800 - tz.transition 2015, 3, :o2, 1425808800 - tz.transition 2015, 11, :o1, 1446368400 - tz.transition 2016, 3, :o2, 1457863200 - tz.transition 2016, 11, :o1, 1478422800 - tz.transition 2017, 3, :o2, 1489312800 - tz.transition 2017, 11, :o1, 1509872400 - tz.transition 2018, 3, :o2, 1520762400 - tz.transition 2018, 11, :o1, 1541322000 - tz.transition 2019, 3, :o2, 1552212000 - tz.transition 2019, 11, :o1, 1572771600 - tz.transition 2020, 3, :o2, 1583661600 - tz.transition 2020, 11, :o1, 1604221200 - tz.transition 2021, 3, :o2, 1615716000 - tz.transition 2021, 11, :o1, 1636275600 - tz.transition 2022, 3, :o2, 1647165600 - tz.transition 2022, 11, :o1, 1667725200 - tz.transition 2023, 3, :o2, 1678615200 - tz.transition 2023, 11, :o1, 1699174800 - tz.transition 2024, 3, :o2, 1710064800 - tz.transition 2024, 11, :o1, 1730624400 - tz.transition 2025, 3, :o2, 1741514400 - tz.transition 2025, 11, :o1, 1762074000 - tz.transition 2026, 3, :o2, 1772964000 - tz.transition 2026, 11, :o1, 1793523600 - tz.transition 2027, 3, :o2, 1805018400 - tz.transition 2027, 11, :o1, 1825578000 - tz.transition 2028, 3, :o2, 1836468000 - tz.transition 2028, 11, :o1, 1857027600 - tz.transition 2029, 3, :o2, 1867917600 - tz.transition 2029, 11, :o1, 1888477200 - tz.transition 2030, 3, :o2, 1899367200 - tz.transition 2030, 11, :o1, 1919926800 - tz.transition 2031, 3, :o2, 1930816800 - tz.transition 2031, 11, :o1, 1951376400 - tz.transition 2032, 3, :o2, 1962871200 - tz.transition 2032, 11, :o1, 1983430800 - tz.transition 2033, 3, :o2, 1994320800 - tz.transition 2033, 11, :o1, 2014880400 - tz.transition 2034, 3, :o2, 2025770400 - tz.transition 2034, 11, :o1, 2046330000 - tz.transition 2035, 3, :o2, 2057220000 - tz.transition 2035, 11, :o1, 2077779600 - tz.transition 2036, 3, :o2, 2088669600 - tz.transition 2036, 11, :o1, 2109229200 - tz.transition 2037, 3, :o2, 2120119200 - tz.transition 2037, 11, :o1, 2140678800 - tz.transition 2038, 3, :o2, 29585963, 12 - tz.transition 2038, 11, :o1, 19725879, 8 - tz.transition 2039, 3, :o2, 29590331, 12 - tz.transition 2039, 11, :o1, 19728791, 8 - tz.transition 2040, 3, :o2, 29594699, 12 - tz.transition 2040, 11, :o1, 19731703, 8 - tz.transition 2041, 3, :o2, 29599067, 12 - tz.transition 2041, 11, :o1, 19734615, 8 - tz.transition 2042, 3, :o2, 29603435, 12 - tz.transition 2042, 11, :o1, 19737527, 8 - tz.transition 2043, 3, :o2, 29607803, 12 - tz.transition 2043, 11, :o1, 19740439, 8 - tz.transition 2044, 3, :o2, 29612255, 12 - tz.transition 2044, 11, :o1, 19743407, 8 - tz.transition 2045, 3, :o2, 29616623, 12 - tz.transition 2045, 11, :o1, 19746319, 8 - tz.transition 2046, 3, :o2, 29620991, 12 - tz.transition 2046, 11, :o1, 19749231, 8 - tz.transition 2047, 3, :o2, 29625359, 12 - tz.transition 2047, 11, :o1, 19752143, 8 - tz.transition 2048, 3, :o2, 29629727, 12 - tz.transition 2048, 11, :o1, 19755055, 8 - tz.transition 2049, 3, :o2, 29634179, 12 - tz.transition 2049, 11, :o1, 19758023, 8 - tz.transition 2050, 3, :o2, 29638547, 12 - tz.transition 2050, 11, :o1, 19760935, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mazatlan.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mazatlan.rb deleted file mode 100644 index ba9e6efcf1..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mazatlan.rb +++ /dev/null @@ -1,139 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Mazatlan - include TimezoneDefinition - - timezone 'America/Mazatlan' do |tz| - tz.offset :o0, -25540, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -21600, 0, :CST - tz.offset :o3, -28800, 0, :PST - tz.offset :o4, -25200, 3600, :MDT - - tz.transition 1922, 1, :o1, 58153339, 24 - tz.transition 1927, 6, :o2, 9700171, 4 - tz.transition 1930, 11, :o1, 9705183, 4 - tz.transition 1931, 5, :o2, 9705855, 4 - tz.transition 1931, 10, :o1, 9706463, 4 - tz.transition 1932, 4, :o2, 58243171, 24 - tz.transition 1942, 4, :o1, 9721895, 4 - tz.transition 1949, 1, :o3, 58390339, 24 - tz.transition 1970, 1, :o1, 28800 - tz.transition 1996, 4, :o4, 828867600 - tz.transition 1996, 10, :o1, 846403200 - tz.transition 1997, 4, :o4, 860317200 - tz.transition 1997, 10, :o1, 877852800 - tz.transition 1998, 4, :o4, 891766800 - tz.transition 1998, 10, :o1, 909302400 - tz.transition 1999, 4, :o4, 923216400 - tz.transition 1999, 10, :o1, 941356800 - tz.transition 2000, 4, :o4, 954666000 - tz.transition 2000, 10, :o1, 972806400 - tz.transition 2001, 5, :o4, 989139600 - tz.transition 2001, 9, :o1, 1001836800 - tz.transition 2002, 4, :o4, 1018170000 - tz.transition 2002, 10, :o1, 1035705600 - tz.transition 2003, 4, :o4, 1049619600 - tz.transition 2003, 10, :o1, 1067155200 - tz.transition 2004, 4, :o4, 1081069200 - tz.transition 2004, 10, :o1, 1099209600 - tz.transition 2005, 4, :o4, 1112518800 - tz.transition 2005, 10, :o1, 1130659200 - tz.transition 2006, 4, :o4, 1143968400 - tz.transition 2006, 10, :o1, 1162108800 - tz.transition 2007, 4, :o4, 1175418000 - tz.transition 2007, 10, :o1, 1193558400 - tz.transition 2008, 4, :o4, 1207472400 - tz.transition 2008, 10, :o1, 1225008000 - tz.transition 2009, 4, :o4, 1238922000 - tz.transition 2009, 10, :o1, 1256457600 - tz.transition 2010, 4, :o4, 1270371600 - tz.transition 2010, 10, :o1, 1288512000 - tz.transition 2011, 4, :o4, 1301821200 - tz.transition 2011, 10, :o1, 1319961600 - tz.transition 2012, 4, :o4, 1333270800 - tz.transition 2012, 10, :o1, 1351411200 - tz.transition 2013, 4, :o4, 1365325200 - tz.transition 2013, 10, :o1, 1382860800 - tz.transition 2014, 4, :o4, 1396774800 - tz.transition 2014, 10, :o1, 1414310400 - tz.transition 2015, 4, :o4, 1428224400 - tz.transition 2015, 10, :o1, 1445760000 - tz.transition 2016, 4, :o4, 1459674000 - tz.transition 2016, 10, :o1, 1477814400 - tz.transition 2017, 4, :o4, 1491123600 - tz.transition 2017, 10, :o1, 1509264000 - tz.transition 2018, 4, :o4, 1522573200 - tz.transition 2018, 10, :o1, 1540713600 - tz.transition 2019, 4, :o4, 1554627600 - tz.transition 2019, 10, :o1, 1572163200 - tz.transition 2020, 4, :o4, 1586077200 - tz.transition 2020, 10, :o1, 1603612800 - tz.transition 2021, 4, :o4, 1617526800 - tz.transition 2021, 10, :o1, 1635667200 - tz.transition 2022, 4, :o4, 1648976400 - tz.transition 2022, 10, :o1, 1667116800 - tz.transition 2023, 4, :o4, 1680426000 - tz.transition 2023, 10, :o1, 1698566400 - tz.transition 2024, 4, :o4, 1712480400 - tz.transition 2024, 10, :o1, 1730016000 - tz.transition 2025, 4, :o4, 1743930000 - tz.transition 2025, 10, :o1, 1761465600 - tz.transition 2026, 4, :o4, 1775379600 - tz.transition 2026, 10, :o1, 1792915200 - tz.transition 2027, 4, :o4, 1806829200 - tz.transition 2027, 10, :o1, 1824969600 - tz.transition 2028, 4, :o4, 1838278800 - tz.transition 2028, 10, :o1, 1856419200 - tz.transition 2029, 4, :o4, 1869728400 - tz.transition 2029, 10, :o1, 1887868800 - tz.transition 2030, 4, :o4, 1901782800 - tz.transition 2030, 10, :o1, 1919318400 - tz.transition 2031, 4, :o4, 1933232400 - tz.transition 2031, 10, :o1, 1950768000 - tz.transition 2032, 4, :o4, 1964682000 - tz.transition 2032, 10, :o1, 1982822400 - tz.transition 2033, 4, :o4, 1996131600 - tz.transition 2033, 10, :o1, 2014272000 - tz.transition 2034, 4, :o4, 2027581200 - tz.transition 2034, 10, :o1, 2045721600 - tz.transition 2035, 4, :o4, 2059030800 - tz.transition 2035, 10, :o1, 2077171200 - tz.transition 2036, 4, :o4, 2091085200 - tz.transition 2036, 10, :o1, 2108620800 - tz.transition 2037, 4, :o4, 2122534800 - tz.transition 2037, 10, :o1, 2140070400 - tz.transition 2038, 4, :o4, 19724143, 8 - tz.transition 2038, 10, :o1, 14794367, 6 - tz.transition 2039, 4, :o4, 19727055, 8 - tz.transition 2039, 10, :o1, 14796551, 6 - tz.transition 2040, 4, :o4, 19729967, 8 - tz.transition 2040, 10, :o1, 14798735, 6 - tz.transition 2041, 4, :o4, 19732935, 8 - tz.transition 2041, 10, :o1, 14800919, 6 - tz.transition 2042, 4, :o4, 19735847, 8 - tz.transition 2042, 10, :o1, 14803103, 6 - tz.transition 2043, 4, :o4, 19738759, 8 - tz.transition 2043, 10, :o1, 14805287, 6 - tz.transition 2044, 4, :o4, 19741671, 8 - tz.transition 2044, 10, :o1, 14807513, 6 - tz.transition 2045, 4, :o4, 19744583, 8 - tz.transition 2045, 10, :o1, 14809697, 6 - tz.transition 2046, 4, :o4, 19747495, 8 - tz.transition 2046, 10, :o1, 14811881, 6 - tz.transition 2047, 4, :o4, 19750463, 8 - tz.transition 2047, 10, :o1, 14814065, 6 - tz.transition 2048, 4, :o4, 19753375, 8 - tz.transition 2048, 10, :o1, 14816249, 6 - tz.transition 2049, 4, :o4, 19756287, 8 - tz.transition 2049, 10, :o1, 14818475, 6 - tz.transition 2050, 4, :o4, 19759199, 8 - tz.transition 2050, 10, :o1, 14820659, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mexico_City.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mexico_City.rb deleted file mode 100644 index 2347fce647..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Mexico_City.rb +++ /dev/null @@ -1,144 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Mexico_City - include TimezoneDefinition - - timezone 'America/Mexico_City' do |tz| - tz.offset :o0, -23796, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -21600, 0, :CST - tz.offset :o3, -21600, 3600, :CDT - tz.offset :o4, -21600, 3600, :CWT - - tz.transition 1922, 1, :o1, 58153339, 24 - tz.transition 1927, 6, :o2, 9700171, 4 - tz.transition 1930, 11, :o1, 9705183, 4 - tz.transition 1931, 5, :o2, 9705855, 4 - tz.transition 1931, 10, :o1, 9706463, 4 - tz.transition 1932, 4, :o2, 58243171, 24 - tz.transition 1939, 2, :o3, 9717199, 4 - tz.transition 1939, 6, :o2, 58306553, 24 - tz.transition 1940, 12, :o3, 9719891, 4 - tz.transition 1941, 4, :o2, 58322057, 24 - tz.transition 1943, 12, :o4, 9724299, 4 - tz.transition 1944, 5, :o2, 58349081, 24 - tz.transition 1950, 2, :o3, 9733299, 4 - tz.transition 1950, 7, :o2, 58403825, 24 - tz.transition 1996, 4, :o3, 828864000 - tz.transition 1996, 10, :o2, 846399600 - tz.transition 1997, 4, :o3, 860313600 - tz.transition 1997, 10, :o2, 877849200 - tz.transition 1998, 4, :o3, 891763200 - tz.transition 1998, 10, :o2, 909298800 - tz.transition 1999, 4, :o3, 923212800 - tz.transition 1999, 10, :o2, 941353200 - tz.transition 2000, 4, :o3, 954662400 - tz.transition 2000, 10, :o2, 972802800 - tz.transition 2001, 5, :o3, 989136000 - tz.transition 2001, 9, :o2, 1001833200 - tz.transition 2002, 4, :o3, 1018166400 - tz.transition 2002, 10, :o2, 1035702000 - tz.transition 2003, 4, :o3, 1049616000 - tz.transition 2003, 10, :o2, 1067151600 - tz.transition 2004, 4, :o3, 1081065600 - tz.transition 2004, 10, :o2, 1099206000 - tz.transition 2005, 4, :o3, 1112515200 - tz.transition 2005, 10, :o2, 1130655600 - tz.transition 2006, 4, :o3, 1143964800 - tz.transition 2006, 10, :o2, 1162105200 - tz.transition 2007, 4, :o3, 1175414400 - tz.transition 2007, 10, :o2, 1193554800 - tz.transition 2008, 4, :o3, 1207468800 - tz.transition 2008, 10, :o2, 1225004400 - tz.transition 2009, 4, :o3, 1238918400 - tz.transition 2009, 10, :o2, 1256454000 - tz.transition 2010, 4, :o3, 1270368000 - tz.transition 2010, 10, :o2, 1288508400 - tz.transition 2011, 4, :o3, 1301817600 - tz.transition 2011, 10, :o2, 1319958000 - tz.transition 2012, 4, :o3, 1333267200 - tz.transition 2012, 10, :o2, 1351407600 - tz.transition 2013, 4, :o3, 1365321600 - tz.transition 2013, 10, :o2, 1382857200 - tz.transition 2014, 4, :o3, 1396771200 - tz.transition 2014, 10, :o2, 1414306800 - tz.transition 2015, 4, :o3, 1428220800 - tz.transition 2015, 10, :o2, 1445756400 - tz.transition 2016, 4, :o3, 1459670400 - tz.transition 2016, 10, :o2, 1477810800 - tz.transition 2017, 4, :o3, 1491120000 - tz.transition 2017, 10, :o2, 1509260400 - tz.transition 2018, 4, :o3, 1522569600 - tz.transition 2018, 10, :o2, 1540710000 - tz.transition 2019, 4, :o3, 1554624000 - tz.transition 2019, 10, :o2, 1572159600 - tz.transition 2020, 4, :o3, 1586073600 - tz.transition 2020, 10, :o2, 1603609200 - tz.transition 2021, 4, :o3, 1617523200 - tz.transition 2021, 10, :o2, 1635663600 - tz.transition 2022, 4, :o3, 1648972800 - tz.transition 2022, 10, :o2, 1667113200 - tz.transition 2023, 4, :o3, 1680422400 - tz.transition 2023, 10, :o2, 1698562800 - tz.transition 2024, 4, :o3, 1712476800 - tz.transition 2024, 10, :o2, 1730012400 - tz.transition 2025, 4, :o3, 1743926400 - tz.transition 2025, 10, :o2, 1761462000 - tz.transition 2026, 4, :o3, 1775376000 - tz.transition 2026, 10, :o2, 1792911600 - tz.transition 2027, 4, :o3, 1806825600 - tz.transition 2027, 10, :o2, 1824966000 - tz.transition 2028, 4, :o3, 1838275200 - tz.transition 2028, 10, :o2, 1856415600 - tz.transition 2029, 4, :o3, 1869724800 - tz.transition 2029, 10, :o2, 1887865200 - tz.transition 2030, 4, :o3, 1901779200 - tz.transition 2030, 10, :o2, 1919314800 - tz.transition 2031, 4, :o3, 1933228800 - tz.transition 2031, 10, :o2, 1950764400 - tz.transition 2032, 4, :o3, 1964678400 - tz.transition 2032, 10, :o2, 1982818800 - tz.transition 2033, 4, :o3, 1996128000 - tz.transition 2033, 10, :o2, 2014268400 - tz.transition 2034, 4, :o3, 2027577600 - tz.transition 2034, 10, :o2, 2045718000 - tz.transition 2035, 4, :o3, 2059027200 - tz.transition 2035, 10, :o2, 2077167600 - tz.transition 2036, 4, :o3, 2091081600 - tz.transition 2036, 10, :o2, 2108617200 - tz.transition 2037, 4, :o3, 2122531200 - tz.transition 2037, 10, :o2, 2140066800 - tz.transition 2038, 4, :o3, 14793107, 6 - tz.transition 2038, 10, :o2, 59177467, 24 - tz.transition 2039, 4, :o3, 14795291, 6 - tz.transition 2039, 10, :o2, 59186203, 24 - tz.transition 2040, 4, :o3, 14797475, 6 - tz.transition 2040, 10, :o2, 59194939, 24 - tz.transition 2041, 4, :o3, 14799701, 6 - tz.transition 2041, 10, :o2, 59203675, 24 - tz.transition 2042, 4, :o3, 14801885, 6 - tz.transition 2042, 10, :o2, 59212411, 24 - tz.transition 2043, 4, :o3, 14804069, 6 - tz.transition 2043, 10, :o2, 59221147, 24 - tz.transition 2044, 4, :o3, 14806253, 6 - tz.transition 2044, 10, :o2, 59230051, 24 - tz.transition 2045, 4, :o3, 14808437, 6 - tz.transition 2045, 10, :o2, 59238787, 24 - tz.transition 2046, 4, :o3, 14810621, 6 - tz.transition 2046, 10, :o2, 59247523, 24 - tz.transition 2047, 4, :o3, 14812847, 6 - tz.transition 2047, 10, :o2, 59256259, 24 - tz.transition 2048, 4, :o3, 14815031, 6 - tz.transition 2048, 10, :o2, 59264995, 24 - tz.transition 2049, 4, :o3, 14817215, 6 - tz.transition 2049, 10, :o2, 59273899, 24 - tz.transition 2050, 4, :o3, 14819399, 6 - tz.transition 2050, 10, :o2, 59282635, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Monterrey.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Monterrey.rb deleted file mode 100644 index 5816a9eab1..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Monterrey.rb +++ /dev/null @@ -1,131 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Monterrey - include TimezoneDefinition - - timezone 'America/Monterrey' do |tz| - tz.offset :o0, -24076, 0, :LMT - tz.offset :o1, -21600, 0, :CST - tz.offset :o2, -21600, 3600, :CDT - - tz.transition 1922, 1, :o1, 9692223, 4 - tz.transition 1988, 4, :o2, 576057600 - tz.transition 1988, 10, :o1, 594198000 - tz.transition 1996, 4, :o2, 828864000 - tz.transition 1996, 10, :o1, 846399600 - tz.transition 1997, 4, :o2, 860313600 - tz.transition 1997, 10, :o1, 877849200 - tz.transition 1998, 4, :o2, 891763200 - tz.transition 1998, 10, :o1, 909298800 - tz.transition 1999, 4, :o2, 923212800 - tz.transition 1999, 10, :o1, 941353200 - tz.transition 2000, 4, :o2, 954662400 - tz.transition 2000, 10, :o1, 972802800 - tz.transition 2001, 5, :o2, 989136000 - tz.transition 2001, 9, :o1, 1001833200 - tz.transition 2002, 4, :o2, 1018166400 - tz.transition 2002, 10, :o1, 1035702000 - tz.transition 2003, 4, :o2, 1049616000 - tz.transition 2003, 10, :o1, 1067151600 - tz.transition 2004, 4, :o2, 1081065600 - tz.transition 2004, 10, :o1, 1099206000 - tz.transition 2005, 4, :o2, 1112515200 - tz.transition 2005, 10, :o1, 1130655600 - tz.transition 2006, 4, :o2, 1143964800 - tz.transition 2006, 10, :o1, 1162105200 - tz.transition 2007, 4, :o2, 1175414400 - tz.transition 2007, 10, :o1, 1193554800 - tz.transition 2008, 4, :o2, 1207468800 - tz.transition 2008, 10, :o1, 1225004400 - tz.transition 2009, 4, :o2, 1238918400 - tz.transition 2009, 10, :o1, 1256454000 - tz.transition 2010, 4, :o2, 1270368000 - tz.transition 2010, 10, :o1, 1288508400 - tz.transition 2011, 4, :o2, 1301817600 - tz.transition 2011, 10, :o1, 1319958000 - tz.transition 2012, 4, :o2, 1333267200 - tz.transition 2012, 10, :o1, 1351407600 - tz.transition 2013, 4, :o2, 1365321600 - tz.transition 2013, 10, :o1, 1382857200 - tz.transition 2014, 4, :o2, 1396771200 - tz.transition 2014, 10, :o1, 1414306800 - tz.transition 2015, 4, :o2, 1428220800 - tz.transition 2015, 10, :o1, 1445756400 - tz.transition 2016, 4, :o2, 1459670400 - tz.transition 2016, 10, :o1, 1477810800 - tz.transition 2017, 4, :o2, 1491120000 - tz.transition 2017, 10, :o1, 1509260400 - tz.transition 2018, 4, :o2, 1522569600 - tz.transition 2018, 10, :o1, 1540710000 - tz.transition 2019, 4, :o2, 1554624000 - tz.transition 2019, 10, :o1, 1572159600 - tz.transition 2020, 4, :o2, 1586073600 - tz.transition 2020, 10, :o1, 1603609200 - tz.transition 2021, 4, :o2, 1617523200 - tz.transition 2021, 10, :o1, 1635663600 - tz.transition 2022, 4, :o2, 1648972800 - tz.transition 2022, 10, :o1, 1667113200 - tz.transition 2023, 4, :o2, 1680422400 - tz.transition 2023, 10, :o1, 1698562800 - tz.transition 2024, 4, :o2, 1712476800 - tz.transition 2024, 10, :o1, 1730012400 - tz.transition 2025, 4, :o2, 1743926400 - tz.transition 2025, 10, :o1, 1761462000 - tz.transition 2026, 4, :o2, 1775376000 - tz.transition 2026, 10, :o1, 1792911600 - tz.transition 2027, 4, :o2, 1806825600 - tz.transition 2027, 10, :o1, 1824966000 - tz.transition 2028, 4, :o2, 1838275200 - tz.transition 2028, 10, :o1, 1856415600 - tz.transition 2029, 4, :o2, 1869724800 - tz.transition 2029, 10, :o1, 1887865200 - tz.transition 2030, 4, :o2, 1901779200 - tz.transition 2030, 10, :o1, 1919314800 - tz.transition 2031, 4, :o2, 1933228800 - tz.transition 2031, 10, :o1, 1950764400 - tz.transition 2032, 4, :o2, 1964678400 - tz.transition 2032, 10, :o1, 1982818800 - tz.transition 2033, 4, :o2, 1996128000 - tz.transition 2033, 10, :o1, 2014268400 - tz.transition 2034, 4, :o2, 2027577600 - tz.transition 2034, 10, :o1, 2045718000 - tz.transition 2035, 4, :o2, 2059027200 - tz.transition 2035, 10, :o1, 2077167600 - tz.transition 2036, 4, :o2, 2091081600 - tz.transition 2036, 10, :o1, 2108617200 - tz.transition 2037, 4, :o2, 2122531200 - tz.transition 2037, 10, :o1, 2140066800 - tz.transition 2038, 4, :o2, 14793107, 6 - tz.transition 2038, 10, :o1, 59177467, 24 - tz.transition 2039, 4, :o2, 14795291, 6 - tz.transition 2039, 10, :o1, 59186203, 24 - tz.transition 2040, 4, :o2, 14797475, 6 - tz.transition 2040, 10, :o1, 59194939, 24 - tz.transition 2041, 4, :o2, 14799701, 6 - tz.transition 2041, 10, :o1, 59203675, 24 - tz.transition 2042, 4, :o2, 14801885, 6 - tz.transition 2042, 10, :o1, 59212411, 24 - tz.transition 2043, 4, :o2, 14804069, 6 - tz.transition 2043, 10, :o1, 59221147, 24 - tz.transition 2044, 4, :o2, 14806253, 6 - tz.transition 2044, 10, :o1, 59230051, 24 - tz.transition 2045, 4, :o2, 14808437, 6 - tz.transition 2045, 10, :o1, 59238787, 24 - tz.transition 2046, 4, :o2, 14810621, 6 - tz.transition 2046, 10, :o1, 59247523, 24 - tz.transition 2047, 4, :o2, 14812847, 6 - tz.transition 2047, 10, :o1, 59256259, 24 - tz.transition 2048, 4, :o2, 14815031, 6 - tz.transition 2048, 10, :o1, 59264995, 24 - tz.transition 2049, 4, :o2, 14817215, 6 - tz.transition 2049, 10, :o1, 59273899, 24 - tz.transition 2050, 4, :o2, 14819399, 6 - tz.transition 2050, 10, :o1, 59282635, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/New_York.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/New_York.rb deleted file mode 100644 index 7d802bd2de..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/New_York.rb +++ /dev/null @@ -1,282 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module New_York - include TimezoneDefinition - - timezone 'America/New_York' do |tz| - tz.offset :o0, -17762, 0, :LMT - tz.offset :o1, -18000, 0, :EST - tz.offset :o2, -18000, 3600, :EDT - tz.offset :o3, -18000, 3600, :EWT - tz.offset :o4, -18000, 3600, :EPT - - tz.transition 1883, 11, :o1, 57819197, 24 - tz.transition 1918, 3, :o2, 58120411, 24 - tz.transition 1918, 10, :o1, 9687575, 4 - tz.transition 1919, 3, :o2, 58129147, 24 - tz.transition 1919, 10, :o1, 9689031, 4 - tz.transition 1920, 3, :o2, 58137883, 24 - tz.transition 1920, 10, :o1, 9690515, 4 - tz.transition 1921, 4, :o2, 58147291, 24 - tz.transition 1921, 9, :o1, 9691831, 4 - tz.transition 1922, 4, :o2, 58156195, 24 - tz.transition 1922, 9, :o1, 9693287, 4 - tz.transition 1923, 4, :o2, 58164931, 24 - tz.transition 1923, 9, :o1, 9694771, 4 - tz.transition 1924, 4, :o2, 58173667, 24 - tz.transition 1924, 9, :o1, 9696227, 4 - tz.transition 1925, 4, :o2, 58182403, 24 - tz.transition 1925, 9, :o1, 9697683, 4 - tz.transition 1926, 4, :o2, 58191139, 24 - tz.transition 1926, 9, :o1, 9699139, 4 - tz.transition 1927, 4, :o2, 58199875, 24 - tz.transition 1927, 9, :o1, 9700595, 4 - tz.transition 1928, 4, :o2, 58208779, 24 - tz.transition 1928, 9, :o1, 9702079, 4 - tz.transition 1929, 4, :o2, 58217515, 24 - tz.transition 1929, 9, :o1, 9703535, 4 - tz.transition 1930, 4, :o2, 58226251, 24 - tz.transition 1930, 9, :o1, 9704991, 4 - tz.transition 1931, 4, :o2, 58234987, 24 - tz.transition 1931, 9, :o1, 9706447, 4 - tz.transition 1932, 4, :o2, 58243723, 24 - tz.transition 1932, 9, :o1, 9707903, 4 - tz.transition 1933, 4, :o2, 58252627, 24 - tz.transition 1933, 9, :o1, 9709359, 4 - tz.transition 1934, 4, :o2, 58261363, 24 - tz.transition 1934, 9, :o1, 9710843, 4 - tz.transition 1935, 4, :o2, 58270099, 24 - tz.transition 1935, 9, :o1, 9712299, 4 - tz.transition 1936, 4, :o2, 58278835, 24 - tz.transition 1936, 9, :o1, 9713755, 4 - tz.transition 1937, 4, :o2, 58287571, 24 - tz.transition 1937, 9, :o1, 9715211, 4 - tz.transition 1938, 4, :o2, 58296307, 24 - tz.transition 1938, 9, :o1, 9716667, 4 - tz.transition 1939, 4, :o2, 58305211, 24 - tz.transition 1939, 9, :o1, 9718123, 4 - tz.transition 1940, 4, :o2, 58313947, 24 - tz.transition 1940, 9, :o1, 9719607, 4 - tz.transition 1941, 4, :o2, 58322683, 24 - tz.transition 1941, 9, :o1, 9721063, 4 - tz.transition 1942, 2, :o3, 58329595, 24 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 9726915, 4 - tz.transition 1946, 4, :o2, 58366531, 24 - tz.transition 1946, 9, :o1, 9728371, 4 - tz.transition 1947, 4, :o2, 58375267, 24 - tz.transition 1947, 9, :o1, 9729827, 4 - tz.transition 1948, 4, :o2, 58384003, 24 - tz.transition 1948, 9, :o1, 9731283, 4 - tz.transition 1949, 4, :o2, 58392739, 24 - tz.transition 1949, 9, :o1, 9732739, 4 - tz.transition 1950, 4, :o2, 58401643, 24 - tz.transition 1950, 9, :o1, 9734195, 4 - tz.transition 1951, 4, :o2, 58410379, 24 - tz.transition 1951, 9, :o1, 9735679, 4 - tz.transition 1952, 4, :o2, 58419115, 24 - tz.transition 1952, 9, :o1, 9737135, 4 - tz.transition 1953, 4, :o2, 58427851, 24 - tz.transition 1953, 9, :o1, 9738591, 4 - tz.transition 1954, 4, :o2, 58436587, 24 - tz.transition 1954, 9, :o1, 9740047, 4 - tz.transition 1955, 4, :o2, 58445323, 24 - tz.transition 1955, 10, :o1, 9741643, 4 - tz.transition 1956, 4, :o2, 58454227, 24 - tz.transition 1956, 10, :o1, 9743099, 4 - tz.transition 1957, 4, :o2, 58462963, 24 - tz.transition 1957, 10, :o1, 9744555, 4 - tz.transition 1958, 4, :o2, 58471699, 24 - tz.transition 1958, 10, :o1, 9746011, 4 - tz.transition 1959, 4, :o2, 58480435, 24 - tz.transition 1959, 10, :o1, 9747467, 4 - tz.transition 1960, 4, :o2, 58489171, 24 - tz.transition 1960, 10, :o1, 9748951, 4 - tz.transition 1961, 4, :o2, 58498075, 24 - tz.transition 1961, 10, :o1, 9750407, 4 - tz.transition 1962, 4, :o2, 58506811, 24 - tz.transition 1962, 10, :o1, 9751863, 4 - tz.transition 1963, 4, :o2, 58515547, 24 - tz.transition 1963, 10, :o1, 9753319, 4 - tz.transition 1964, 4, :o2, 58524283, 24 - tz.transition 1964, 10, :o1, 9754775, 4 - tz.transition 1965, 4, :o2, 58533019, 24 - tz.transition 1965, 10, :o1, 9756259, 4 - tz.transition 1966, 4, :o2, 58541755, 24 - tz.transition 1966, 10, :o1, 9757715, 4 - tz.transition 1967, 4, :o2, 58550659, 24 - tz.transition 1967, 10, :o1, 9759171, 4 - tz.transition 1968, 4, :o2, 58559395, 24 - tz.transition 1968, 10, :o1, 9760627, 4 - tz.transition 1969, 4, :o2, 58568131, 24 - tz.transition 1969, 10, :o1, 9762083, 4 - tz.transition 1970, 4, :o2, 9961200 - tz.transition 1970, 10, :o1, 25682400 - tz.transition 1971, 4, :o2, 41410800 - tz.transition 1971, 10, :o1, 57736800 - tz.transition 1972, 4, :o2, 73465200 - tz.transition 1972, 10, :o1, 89186400 - tz.transition 1973, 4, :o2, 104914800 - tz.transition 1973, 10, :o1, 120636000 - tz.transition 1974, 1, :o2, 126687600 - tz.transition 1974, 10, :o1, 152085600 - tz.transition 1975, 2, :o2, 162370800 - tz.transition 1975, 10, :o1, 183535200 - tz.transition 1976, 4, :o2, 199263600 - tz.transition 1976, 10, :o1, 215589600 - tz.transition 1977, 4, :o2, 230713200 - tz.transition 1977, 10, :o1, 247039200 - tz.transition 1978, 4, :o2, 262767600 - tz.transition 1978, 10, :o1, 278488800 - tz.transition 1979, 4, :o2, 294217200 - tz.transition 1979, 10, :o1, 309938400 - tz.transition 1980, 4, :o2, 325666800 - tz.transition 1980, 10, :o1, 341388000 - tz.transition 1981, 4, :o2, 357116400 - tz.transition 1981, 10, :o1, 372837600 - tz.transition 1982, 4, :o2, 388566000 - tz.transition 1982, 10, :o1, 404892000 - tz.transition 1983, 4, :o2, 420015600 - tz.transition 1983, 10, :o1, 436341600 - tz.transition 1984, 4, :o2, 452070000 - tz.transition 1984, 10, :o1, 467791200 - tz.transition 1985, 4, :o2, 483519600 - tz.transition 1985, 10, :o1, 499240800 - tz.transition 1986, 4, :o2, 514969200 - tz.transition 1986, 10, :o1, 530690400 - tz.transition 1987, 4, :o2, 544604400 - tz.transition 1987, 10, :o1, 562140000 - tz.transition 1988, 4, :o2, 576054000 - tz.transition 1988, 10, :o1, 594194400 - tz.transition 1989, 4, :o2, 607503600 - tz.transition 1989, 10, :o1, 625644000 - tz.transition 1990, 4, :o2, 638953200 - tz.transition 1990, 10, :o1, 657093600 - tz.transition 1991, 4, :o2, 671007600 - tz.transition 1991, 10, :o1, 688543200 - tz.transition 1992, 4, :o2, 702457200 - tz.transition 1992, 10, :o1, 719992800 - tz.transition 1993, 4, :o2, 733906800 - tz.transition 1993, 10, :o1, 752047200 - tz.transition 1994, 4, :o2, 765356400 - tz.transition 1994, 10, :o1, 783496800 - tz.transition 1995, 4, :o2, 796806000 - tz.transition 1995, 10, :o1, 814946400 - tz.transition 1996, 4, :o2, 828860400 - tz.transition 1996, 10, :o1, 846396000 - tz.transition 1997, 4, :o2, 860310000 - tz.transition 1997, 10, :o1, 877845600 - tz.transition 1998, 4, :o2, 891759600 - tz.transition 1998, 10, :o1, 909295200 - tz.transition 1999, 4, :o2, 923209200 - tz.transition 1999, 10, :o1, 941349600 - tz.transition 2000, 4, :o2, 954658800 - tz.transition 2000, 10, :o1, 972799200 - tz.transition 2001, 4, :o2, 986108400 - tz.transition 2001, 10, :o1, 1004248800 - tz.transition 2002, 4, :o2, 1018162800 - tz.transition 2002, 10, :o1, 1035698400 - tz.transition 2003, 4, :o2, 1049612400 - tz.transition 2003, 10, :o1, 1067148000 - tz.transition 2004, 4, :o2, 1081062000 - tz.transition 2004, 10, :o1, 1099202400 - tz.transition 2005, 4, :o2, 1112511600 - tz.transition 2005, 10, :o1, 1130652000 - tz.transition 2006, 4, :o2, 1143961200 - tz.transition 2006, 10, :o1, 1162101600 - tz.transition 2007, 3, :o2, 1173596400 - tz.transition 2007, 11, :o1, 1194156000 - tz.transition 2008, 3, :o2, 1205046000 - tz.transition 2008, 11, :o1, 1225605600 - tz.transition 2009, 3, :o2, 1236495600 - tz.transition 2009, 11, :o1, 1257055200 - tz.transition 2010, 3, :o2, 1268550000 - tz.transition 2010, 11, :o1, 1289109600 - tz.transition 2011, 3, :o2, 1299999600 - tz.transition 2011, 11, :o1, 1320559200 - tz.transition 2012, 3, :o2, 1331449200 - tz.transition 2012, 11, :o1, 1352008800 - tz.transition 2013, 3, :o2, 1362898800 - tz.transition 2013, 11, :o1, 1383458400 - tz.transition 2014, 3, :o2, 1394348400 - tz.transition 2014, 11, :o1, 1414908000 - tz.transition 2015, 3, :o2, 1425798000 - tz.transition 2015, 11, :o1, 1446357600 - tz.transition 2016, 3, :o2, 1457852400 - tz.transition 2016, 11, :o1, 1478412000 - tz.transition 2017, 3, :o2, 1489302000 - tz.transition 2017, 11, :o1, 1509861600 - tz.transition 2018, 3, :o2, 1520751600 - tz.transition 2018, 11, :o1, 1541311200 - tz.transition 2019, 3, :o2, 1552201200 - tz.transition 2019, 11, :o1, 1572760800 - tz.transition 2020, 3, :o2, 1583650800 - tz.transition 2020, 11, :o1, 1604210400 - tz.transition 2021, 3, :o2, 1615705200 - tz.transition 2021, 11, :o1, 1636264800 - tz.transition 2022, 3, :o2, 1647154800 - tz.transition 2022, 11, :o1, 1667714400 - tz.transition 2023, 3, :o2, 1678604400 - tz.transition 2023, 11, :o1, 1699164000 - tz.transition 2024, 3, :o2, 1710054000 - tz.transition 2024, 11, :o1, 1730613600 - tz.transition 2025, 3, :o2, 1741503600 - tz.transition 2025, 11, :o1, 1762063200 - tz.transition 2026, 3, :o2, 1772953200 - tz.transition 2026, 11, :o1, 1793512800 - tz.transition 2027, 3, :o2, 1805007600 - tz.transition 2027, 11, :o1, 1825567200 - tz.transition 2028, 3, :o2, 1836457200 - tz.transition 2028, 11, :o1, 1857016800 - tz.transition 2029, 3, :o2, 1867906800 - tz.transition 2029, 11, :o1, 1888466400 - tz.transition 2030, 3, :o2, 1899356400 - tz.transition 2030, 11, :o1, 1919916000 - tz.transition 2031, 3, :o2, 1930806000 - tz.transition 2031, 11, :o1, 1951365600 - tz.transition 2032, 3, :o2, 1962860400 - tz.transition 2032, 11, :o1, 1983420000 - tz.transition 2033, 3, :o2, 1994310000 - tz.transition 2033, 11, :o1, 2014869600 - tz.transition 2034, 3, :o2, 2025759600 - tz.transition 2034, 11, :o1, 2046319200 - tz.transition 2035, 3, :o2, 2057209200 - tz.transition 2035, 11, :o1, 2077768800 - tz.transition 2036, 3, :o2, 2088658800 - tz.transition 2036, 11, :o1, 2109218400 - tz.transition 2037, 3, :o2, 2120108400 - tz.transition 2037, 11, :o1, 2140668000 - tz.transition 2038, 3, :o2, 59171923, 24 - tz.transition 2038, 11, :o1, 9862939, 4 - tz.transition 2039, 3, :o2, 59180659, 24 - tz.transition 2039, 11, :o1, 9864395, 4 - tz.transition 2040, 3, :o2, 59189395, 24 - tz.transition 2040, 11, :o1, 9865851, 4 - tz.transition 2041, 3, :o2, 59198131, 24 - tz.transition 2041, 11, :o1, 9867307, 4 - tz.transition 2042, 3, :o2, 59206867, 24 - tz.transition 2042, 11, :o1, 9868763, 4 - tz.transition 2043, 3, :o2, 59215603, 24 - tz.transition 2043, 11, :o1, 9870219, 4 - tz.transition 2044, 3, :o2, 59224507, 24 - tz.transition 2044, 11, :o1, 9871703, 4 - tz.transition 2045, 3, :o2, 59233243, 24 - tz.transition 2045, 11, :o1, 9873159, 4 - tz.transition 2046, 3, :o2, 59241979, 24 - tz.transition 2046, 11, :o1, 9874615, 4 - tz.transition 2047, 3, :o2, 59250715, 24 - tz.transition 2047, 11, :o1, 9876071, 4 - tz.transition 2048, 3, :o2, 59259451, 24 - tz.transition 2048, 11, :o1, 9877527, 4 - tz.transition 2049, 3, :o2, 59268355, 24 - tz.transition 2049, 11, :o1, 9879011, 4 - tz.transition 2050, 3, :o2, 59277091, 24 - tz.transition 2050, 11, :o1, 9880467, 4 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Phoenix.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Phoenix.rb deleted file mode 100644 index b514e0c0f9..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Phoenix.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Phoenix - include TimezoneDefinition - - timezone 'America/Phoenix' do |tz| - tz.offset :o0, -26898, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -25200, 3600, :MDT - tz.offset :o3, -25200, 3600, :MWT - - tz.transition 1883, 11, :o1, 57819199, 24 - tz.transition 1918, 3, :o2, 19373471, 8 - tz.transition 1918, 10, :o1, 14531363, 6 - tz.transition 1919, 3, :o2, 19376383, 8 - tz.transition 1919, 10, :o1, 14533547, 6 - tz.transition 1942, 2, :o3, 19443199, 8 - tz.transition 1944, 1, :o1, 3500770681, 1440 - tz.transition 1944, 4, :o3, 3500901781, 1440 - tz.transition 1944, 10, :o1, 3501165241, 1440 - tz.transition 1967, 4, :o2, 19516887, 8 - tz.transition 1967, 10, :o1, 14638757, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Regina.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Regina.rb deleted file mode 100644 index ebdb68814a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Regina.rb +++ /dev/null @@ -1,74 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Regina - include TimezoneDefinition - - timezone 'America/Regina' do |tz| - tz.offset :o0, -25116, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -25200, 3600, :MDT - tz.offset :o3, -25200, 3600, :MWT - tz.offset :o4, -25200, 3600, :MPT - tz.offset :o5, -21600, 0, :CST - - tz.transition 1905, 9, :o1, 17403046493, 7200 - tz.transition 1918, 4, :o2, 19373583, 8 - tz.transition 1918, 10, :o1, 14531387, 6 - tz.transition 1930, 5, :o2, 58226419, 24 - tz.transition 1930, 10, :o1, 9705019, 4 - tz.transition 1931, 5, :o2, 58235155, 24 - tz.transition 1931, 10, :o1, 9706475, 4 - tz.transition 1932, 5, :o2, 58243891, 24 - tz.transition 1932, 10, :o1, 9707931, 4 - tz.transition 1933, 5, :o2, 58252795, 24 - tz.transition 1933, 10, :o1, 9709387, 4 - tz.transition 1934, 5, :o2, 58261531, 24 - tz.transition 1934, 10, :o1, 9710871, 4 - tz.transition 1937, 4, :o2, 58287235, 24 - tz.transition 1937, 10, :o1, 9715267, 4 - tz.transition 1938, 4, :o2, 58295971, 24 - tz.transition 1938, 10, :o1, 9716695, 4 - tz.transition 1939, 4, :o2, 58304707, 24 - tz.transition 1939, 10, :o1, 9718179, 4 - tz.transition 1940, 4, :o2, 58313611, 24 - tz.transition 1940, 10, :o1, 9719663, 4 - tz.transition 1941, 4, :o2, 58322347, 24 - tz.transition 1941, 10, :o1, 9721119, 4 - tz.transition 1942, 2, :o3, 19443199, 8 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 14590373, 6 - tz.transition 1946, 4, :o2, 19455399, 8 - tz.transition 1946, 10, :o1, 14592641, 6 - tz.transition 1947, 4, :o2, 19458423, 8 - tz.transition 1947, 9, :o1, 14594741, 6 - tz.transition 1948, 4, :o2, 19461335, 8 - tz.transition 1948, 9, :o1, 14596925, 6 - tz.transition 1949, 4, :o2, 19464247, 8 - tz.transition 1949, 9, :o1, 14599109, 6 - tz.transition 1950, 4, :o2, 19467215, 8 - tz.transition 1950, 9, :o1, 14601293, 6 - tz.transition 1951, 4, :o2, 19470127, 8 - tz.transition 1951, 9, :o1, 14603519, 6 - tz.transition 1952, 4, :o2, 19473039, 8 - tz.transition 1952, 9, :o1, 14605703, 6 - tz.transition 1953, 4, :o2, 19475951, 8 - tz.transition 1953, 9, :o1, 14607887, 6 - tz.transition 1954, 4, :o2, 19478863, 8 - tz.transition 1954, 9, :o1, 14610071, 6 - tz.transition 1955, 4, :o2, 19481775, 8 - tz.transition 1955, 9, :o1, 14612255, 6 - tz.transition 1956, 4, :o2, 19484743, 8 - tz.transition 1956, 9, :o1, 14614481, 6 - tz.transition 1957, 4, :o2, 19487655, 8 - tz.transition 1957, 9, :o1, 14616665, 6 - tz.transition 1959, 4, :o2, 19493479, 8 - tz.transition 1959, 10, :o1, 14621201, 6 - tz.transition 1960, 4, :o5, 19496391, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Santiago.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Santiago.rb deleted file mode 100644 index 0287c9ebc4..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Santiago.rb +++ /dev/null @@ -1,205 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Santiago - include TimezoneDefinition - - timezone 'America/Santiago' do |tz| - tz.offset :o0, -16966, 0, :LMT - tz.offset :o1, -16966, 0, :SMT - tz.offset :o2, -18000, 0, :CLT - tz.offset :o3, -14400, 0, :CLT - tz.offset :o4, -18000, 3600, :CLST - tz.offset :o5, -14400, 3600, :CLST - - tz.transition 1890, 1, :o1, 104171127683, 43200 - tz.transition 1910, 1, :o2, 104486660483, 43200 - tz.transition 1916, 7, :o1, 58105097, 24 - tz.transition 1918, 9, :o3, 104623388483, 43200 - tz.transition 1919, 7, :o1, 7266422, 3 - tz.transition 1927, 9, :o4, 104765386883, 43200 - tz.transition 1928, 4, :o2, 7276013, 3 - tz.transition 1928, 9, :o4, 58211777, 24 - tz.transition 1929, 4, :o2, 7277108, 3 - tz.transition 1929, 9, :o4, 58220537, 24 - tz.transition 1930, 4, :o2, 7278203, 3 - tz.transition 1930, 9, :o4, 58229297, 24 - tz.transition 1931, 4, :o2, 7279298, 3 - tz.transition 1931, 9, :o4, 58238057, 24 - tz.transition 1932, 4, :o2, 7280396, 3 - tz.transition 1932, 9, :o4, 58246841, 24 - tz.transition 1942, 6, :o2, 7291535, 3 - tz.transition 1942, 8, :o4, 58333745, 24 - tz.transition 1946, 9, :o2, 19456517, 8 - tz.transition 1947, 5, :o3, 58375865, 24 - tz.transition 1968, 11, :o5, 7320491, 3 - tz.transition 1969, 3, :o3, 19522485, 8 - tz.transition 1969, 11, :o5, 7321646, 3 - tz.transition 1970, 3, :o3, 7527600 - tz.transition 1970, 10, :o5, 24465600 - tz.transition 1971, 3, :o3, 37767600 - tz.transition 1971, 10, :o5, 55915200 - tz.transition 1972, 3, :o3, 69217200 - tz.transition 1972, 10, :o5, 87969600 - tz.transition 1973, 3, :o3, 100666800 - tz.transition 1973, 9, :o5, 118209600 - tz.transition 1974, 3, :o3, 132116400 - tz.transition 1974, 10, :o5, 150868800 - tz.transition 1975, 3, :o3, 163566000 - tz.transition 1975, 10, :o5, 182318400 - tz.transition 1976, 3, :o3, 195620400 - tz.transition 1976, 10, :o5, 213768000 - tz.transition 1977, 3, :o3, 227070000 - tz.transition 1977, 10, :o5, 245217600 - tz.transition 1978, 3, :o3, 258519600 - tz.transition 1978, 10, :o5, 277272000 - tz.transition 1979, 3, :o3, 289969200 - tz.transition 1979, 10, :o5, 308721600 - tz.transition 1980, 3, :o3, 321418800 - tz.transition 1980, 10, :o5, 340171200 - tz.transition 1981, 3, :o3, 353473200 - tz.transition 1981, 10, :o5, 371620800 - tz.transition 1982, 3, :o3, 384922800 - tz.transition 1982, 10, :o5, 403070400 - tz.transition 1983, 3, :o3, 416372400 - tz.transition 1983, 10, :o5, 434520000 - tz.transition 1984, 3, :o3, 447822000 - tz.transition 1984, 10, :o5, 466574400 - tz.transition 1985, 3, :o3, 479271600 - tz.transition 1985, 10, :o5, 498024000 - tz.transition 1986, 3, :o3, 510721200 - tz.transition 1986, 10, :o5, 529473600 - tz.transition 1987, 4, :o3, 545194800 - tz.transition 1987, 10, :o5, 560923200 - tz.transition 1988, 3, :o3, 574225200 - tz.transition 1988, 10, :o5, 591768000 - tz.transition 1989, 3, :o3, 605674800 - tz.transition 1989, 10, :o5, 624427200 - tz.transition 1990, 3, :o3, 637729200 - tz.transition 1990, 9, :o5, 653457600 - tz.transition 1991, 3, :o3, 668574000 - tz.transition 1991, 10, :o5, 687326400 - tz.transition 1992, 3, :o3, 700628400 - tz.transition 1992, 10, :o5, 718776000 - tz.transition 1993, 3, :o3, 732078000 - tz.transition 1993, 10, :o5, 750225600 - tz.transition 1994, 3, :o3, 763527600 - tz.transition 1994, 10, :o5, 781675200 - tz.transition 1995, 3, :o3, 794977200 - tz.transition 1995, 10, :o5, 813729600 - tz.transition 1996, 3, :o3, 826426800 - tz.transition 1996, 10, :o5, 845179200 - tz.transition 1997, 3, :o3, 859690800 - tz.transition 1997, 10, :o5, 876628800 - tz.transition 1998, 3, :o3, 889930800 - tz.transition 1998, 9, :o5, 906868800 - tz.transition 1999, 4, :o3, 923194800 - tz.transition 1999, 10, :o5, 939528000 - tz.transition 2000, 3, :o3, 952830000 - tz.transition 2000, 10, :o5, 971582400 - tz.transition 2001, 3, :o3, 984279600 - tz.transition 2001, 10, :o5, 1003032000 - tz.transition 2002, 3, :o3, 1015729200 - tz.transition 2002, 10, :o5, 1034481600 - tz.transition 2003, 3, :o3, 1047178800 - tz.transition 2003, 10, :o5, 1065931200 - tz.transition 2004, 3, :o3, 1079233200 - tz.transition 2004, 10, :o5, 1097380800 - tz.transition 2005, 3, :o3, 1110682800 - tz.transition 2005, 10, :o5, 1128830400 - tz.transition 2006, 3, :o3, 1142132400 - tz.transition 2006, 10, :o5, 1160884800 - tz.transition 2007, 3, :o3, 1173582000 - tz.transition 2007, 10, :o5, 1192334400 - tz.transition 2008, 3, :o3, 1206846000 - tz.transition 2008, 10, :o5, 1223784000 - tz.transition 2009, 3, :o3, 1237086000 - tz.transition 2009, 10, :o5, 1255233600 - tz.transition 2010, 3, :o3, 1268535600 - tz.transition 2010, 10, :o5, 1286683200 - tz.transition 2011, 3, :o3, 1299985200 - tz.transition 2011, 10, :o5, 1318132800 - tz.transition 2012, 3, :o3, 1331434800 - tz.transition 2012, 10, :o5, 1350187200 - tz.transition 2013, 3, :o3, 1362884400 - tz.transition 2013, 10, :o5, 1381636800 - tz.transition 2014, 3, :o3, 1394334000 - tz.transition 2014, 10, :o5, 1413086400 - tz.transition 2015, 3, :o3, 1426388400 - tz.transition 2015, 10, :o5, 1444536000 - tz.transition 2016, 3, :o3, 1457838000 - tz.transition 2016, 10, :o5, 1475985600 - tz.transition 2017, 3, :o3, 1489287600 - tz.transition 2017, 10, :o5, 1508040000 - tz.transition 2018, 3, :o3, 1520737200 - tz.transition 2018, 10, :o5, 1539489600 - tz.transition 2019, 3, :o3, 1552186800 - tz.transition 2019, 10, :o5, 1570939200 - tz.transition 2020, 3, :o3, 1584241200 - tz.transition 2020, 10, :o5, 1602388800 - tz.transition 2021, 3, :o3, 1615690800 - tz.transition 2021, 10, :o5, 1633838400 - tz.transition 2022, 3, :o3, 1647140400 - tz.transition 2022, 10, :o5, 1665288000 - tz.transition 2023, 3, :o3, 1678590000 - tz.transition 2023, 10, :o5, 1697342400 - tz.transition 2024, 3, :o3, 1710039600 - tz.transition 2024, 10, :o5, 1728792000 - tz.transition 2025, 3, :o3, 1741489200 - tz.transition 2025, 10, :o5, 1760241600 - tz.transition 2026, 3, :o3, 1773543600 - tz.transition 2026, 10, :o5, 1791691200 - tz.transition 2027, 3, :o3, 1804993200 - tz.transition 2027, 10, :o5, 1823140800 - tz.transition 2028, 3, :o3, 1836442800 - tz.transition 2028, 10, :o5, 1855195200 - tz.transition 2029, 3, :o3, 1867892400 - tz.transition 2029, 10, :o5, 1886644800 - tz.transition 2030, 3, :o3, 1899342000 - tz.transition 2030, 10, :o5, 1918094400 - tz.transition 2031, 3, :o3, 1930791600 - tz.transition 2031, 10, :o5, 1949544000 - tz.transition 2032, 3, :o3, 1962846000 - tz.transition 2032, 10, :o5, 1980993600 - tz.transition 2033, 3, :o3, 1994295600 - tz.transition 2033, 10, :o5, 2012443200 - tz.transition 2034, 3, :o3, 2025745200 - tz.transition 2034, 10, :o5, 2044497600 - tz.transition 2035, 3, :o3, 2057194800 - tz.transition 2035, 10, :o5, 2075947200 - tz.transition 2036, 3, :o3, 2088644400 - tz.transition 2036, 10, :o5, 2107396800 - tz.transition 2037, 3, :o3, 2120698800 - tz.transition 2037, 10, :o5, 2138846400 - tz.transition 2038, 3, :o3, 19723973, 8 - tz.transition 2038, 10, :o5, 7397120, 3 - tz.transition 2039, 3, :o3, 19726885, 8 - tz.transition 2039, 10, :o5, 7398212, 3 - tz.transition 2040, 3, :o3, 19729797, 8 - tz.transition 2040, 10, :o5, 7399325, 3 - tz.transition 2041, 3, :o3, 19732709, 8 - tz.transition 2041, 10, :o5, 7400417, 3 - tz.transition 2042, 3, :o3, 19735621, 8 - tz.transition 2042, 10, :o5, 7401509, 3 - tz.transition 2043, 3, :o3, 19738589, 8 - tz.transition 2043, 10, :o5, 7402601, 3 - tz.transition 2044, 3, :o3, 19741501, 8 - tz.transition 2044, 10, :o5, 7403693, 3 - tz.transition 2045, 3, :o3, 19744413, 8 - tz.transition 2045, 10, :o5, 7404806, 3 - tz.transition 2046, 3, :o3, 19747325, 8 - tz.transition 2046, 10, :o5, 7405898, 3 - tz.transition 2047, 3, :o3, 19750237, 8 - tz.transition 2047, 10, :o5, 7406990, 3 - tz.transition 2048, 3, :o3, 19753205, 8 - tz.transition 2048, 10, :o5, 7408082, 3 - tz.transition 2049, 3, :o3, 19756117, 8 - tz.transition 2049, 10, :o5, 7409174, 3 - tz.transition 2050, 3, :o3, 19759029, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Sao_Paulo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Sao_Paulo.rb deleted file mode 100644 index 0524f81c04..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Sao_Paulo.rb +++ /dev/null @@ -1,171 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Sao_Paulo - include TimezoneDefinition - - timezone 'America/Sao_Paulo' do |tz| - tz.offset :o0, -11188, 0, :LMT - tz.offset :o1, -10800, 0, :BRT - tz.offset :o2, -10800, 3600, :BRST - - tz.transition 1914, 1, :o1, 52274886397, 21600 - tz.transition 1931, 10, :o2, 29119417, 12 - tz.transition 1932, 4, :o1, 29121583, 12 - tz.transition 1932, 10, :o2, 19415869, 8 - tz.transition 1933, 4, :o1, 29125963, 12 - tz.transition 1949, 12, :o2, 19466013, 8 - tz.transition 1950, 4, :o1, 19467101, 8 - tz.transition 1950, 12, :o2, 19468933, 8 - tz.transition 1951, 4, :o1, 29204851, 12 - tz.transition 1951, 12, :o2, 19471853, 8 - tz.transition 1952, 4, :o1, 29209243, 12 - tz.transition 1952, 12, :o2, 19474781, 8 - tz.transition 1953, 3, :o1, 29213251, 12 - tz.transition 1963, 10, :o2, 19506605, 8 - tz.transition 1964, 3, :o1, 29261467, 12 - tz.transition 1965, 1, :o2, 19510333, 8 - tz.transition 1965, 3, :o1, 29266207, 12 - tz.transition 1965, 12, :o2, 19512765, 8 - tz.transition 1966, 3, :o1, 29270227, 12 - tz.transition 1966, 11, :o2, 19515445, 8 - tz.transition 1967, 3, :o1, 29274607, 12 - tz.transition 1967, 11, :o2, 19518365, 8 - tz.transition 1968, 3, :o1, 29278999, 12 - tz.transition 1985, 11, :o2, 499748400 - tz.transition 1986, 3, :o1, 511236000 - tz.transition 1986, 10, :o2, 530593200 - tz.transition 1987, 2, :o1, 540266400 - tz.transition 1987, 10, :o2, 562129200 - tz.transition 1988, 2, :o1, 571197600 - tz.transition 1988, 10, :o2, 592974000 - tz.transition 1989, 1, :o1, 602042400 - tz.transition 1989, 10, :o2, 624423600 - tz.transition 1990, 2, :o1, 634701600 - tz.transition 1990, 10, :o2, 656478000 - tz.transition 1991, 2, :o1, 666756000 - tz.transition 1991, 10, :o2, 687927600 - tz.transition 1992, 2, :o1, 697600800 - tz.transition 1992, 10, :o2, 719982000 - tz.transition 1993, 1, :o1, 728445600 - tz.transition 1993, 10, :o2, 750826800 - tz.transition 1994, 2, :o1, 761709600 - tz.transition 1994, 10, :o2, 782276400 - tz.transition 1995, 2, :o1, 793159200 - tz.transition 1995, 10, :o2, 813726000 - tz.transition 1996, 2, :o1, 824004000 - tz.transition 1996, 10, :o2, 844570800 - tz.transition 1997, 2, :o1, 856058400 - tz.transition 1997, 10, :o2, 876106800 - tz.transition 1998, 3, :o1, 888717600 - tz.transition 1998, 10, :o2, 908074800 - tz.transition 1999, 2, :o1, 919562400 - tz.transition 1999, 10, :o2, 938919600 - tz.transition 2000, 2, :o1, 951616800 - tz.transition 2000, 10, :o2, 970974000 - tz.transition 2001, 2, :o1, 982461600 - tz.transition 2001, 10, :o2, 1003028400 - tz.transition 2002, 2, :o1, 1013911200 - tz.transition 2002, 11, :o2, 1036292400 - tz.transition 2003, 2, :o1, 1045360800 - tz.transition 2003, 10, :o2, 1066532400 - tz.transition 2004, 2, :o1, 1076810400 - tz.transition 2004, 11, :o2, 1099364400 - tz.transition 2005, 2, :o1, 1108864800 - tz.transition 2005, 10, :o2, 1129431600 - tz.transition 2006, 2, :o1, 1140314400 - tz.transition 2006, 11, :o2, 1162695600 - tz.transition 2007, 2, :o1, 1172368800 - tz.transition 2007, 10, :o2, 1192330800 - tz.transition 2008, 2, :o1, 1203213600 - tz.transition 2008, 10, :o2, 1224385200 - tz.transition 2009, 2, :o1, 1234663200 - tz.transition 2009, 10, :o2, 1255834800 - tz.transition 2010, 2, :o1, 1266717600 - tz.transition 2010, 10, :o2, 1287284400 - tz.transition 2011, 2, :o1, 1298167200 - tz.transition 2011, 10, :o2, 1318734000 - tz.transition 2012, 2, :o1, 1330221600 - tz.transition 2012, 10, :o2, 1350788400 - tz.transition 2013, 2, :o1, 1361066400 - tz.transition 2013, 10, :o2, 1382238000 - tz.transition 2014, 2, :o1, 1392516000 - tz.transition 2014, 10, :o2, 1413687600 - tz.transition 2015, 2, :o1, 1424570400 - tz.transition 2015, 10, :o2, 1445137200 - tz.transition 2016, 2, :o1, 1456020000 - tz.transition 2016, 10, :o2, 1476586800 - tz.transition 2017, 2, :o1, 1487469600 - tz.transition 2017, 10, :o2, 1508036400 - tz.transition 2018, 2, :o1, 1518919200 - tz.transition 2018, 10, :o2, 1540090800 - tz.transition 2019, 2, :o1, 1550368800 - tz.transition 2019, 10, :o2, 1571540400 - tz.transition 2020, 2, :o1, 1581818400 - tz.transition 2020, 10, :o2, 1602990000 - tz.transition 2021, 2, :o1, 1613872800 - tz.transition 2021, 10, :o2, 1634439600 - tz.transition 2022, 2, :o1, 1645322400 - tz.transition 2022, 10, :o2, 1665889200 - tz.transition 2023, 2, :o1, 1677376800 - tz.transition 2023, 10, :o2, 1697338800 - tz.transition 2024, 2, :o1, 1708221600 - tz.transition 2024, 10, :o2, 1729393200 - tz.transition 2025, 2, :o1, 1739671200 - tz.transition 2025, 10, :o2, 1760842800 - tz.transition 2026, 2, :o1, 1771725600 - tz.transition 2026, 10, :o2, 1792292400 - tz.transition 2027, 2, :o1, 1803175200 - tz.transition 2027, 10, :o2, 1823742000 - tz.transition 2028, 2, :o1, 1834624800 - tz.transition 2028, 10, :o2, 1855191600 - tz.transition 2029, 2, :o1, 1866074400 - tz.transition 2029, 10, :o2, 1887246000 - tz.transition 2030, 2, :o1, 1897524000 - tz.transition 2030, 10, :o2, 1918695600 - tz.transition 2031, 2, :o1, 1928973600 - tz.transition 2031, 10, :o2, 1950145200 - tz.transition 2032, 2, :o1, 1960423200 - tz.transition 2032, 10, :o2, 1981594800 - tz.transition 2033, 2, :o1, 1992477600 - tz.transition 2033, 10, :o2, 2013044400 - tz.transition 2034, 2, :o1, 2024532000 - tz.transition 2034, 10, :o2, 2044494000 - tz.transition 2035, 2, :o1, 2055376800 - tz.transition 2035, 10, :o2, 2076548400 - tz.transition 2036, 2, :o1, 2086826400 - tz.transition 2036, 10, :o2, 2107998000 - tz.transition 2037, 2, :o1, 2118880800 - tz.transition 2037, 10, :o2, 2139447600 - tz.transition 2038, 2, :o1, 29585707, 12 - tz.transition 2038, 10, :o2, 19725709, 8 - tz.transition 2039, 2, :o1, 29590075, 12 - tz.transition 2039, 10, :o2, 19728621, 8 - tz.transition 2040, 2, :o1, 29594443, 12 - tz.transition 2040, 10, :o2, 19731589, 8 - tz.transition 2041, 2, :o1, 29598811, 12 - tz.transition 2041, 10, :o2, 19734501, 8 - tz.transition 2042, 2, :o1, 29603179, 12 - tz.transition 2042, 10, :o2, 19737413, 8 - tz.transition 2043, 2, :o1, 29607547, 12 - tz.transition 2043, 10, :o2, 19740325, 8 - tz.transition 2044, 2, :o1, 29611999, 12 - tz.transition 2044, 10, :o2, 19743237, 8 - tz.transition 2045, 2, :o1, 29616367, 12 - tz.transition 2045, 10, :o2, 19746149, 8 - tz.transition 2046, 2, :o1, 29620735, 12 - tz.transition 2046, 10, :o2, 19749117, 8 - tz.transition 2047, 2, :o1, 29625103, 12 - tz.transition 2047, 10, :o2, 19752029, 8 - tz.transition 2048, 2, :o1, 29629471, 12 - tz.transition 2048, 10, :o2, 19754941, 8 - tz.transition 2049, 2, :o1, 29633923, 12 - tz.transition 2049, 10, :o2, 19757853, 8 - tz.transition 2050, 2, :o1, 29638291, 12 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/St_Johns.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/St_Johns.rb deleted file mode 100644 index e4a3599d35..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/St_Johns.rb +++ /dev/null @@ -1,288 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module St_Johns - include TimezoneDefinition - - timezone 'America/St_Johns' do |tz| - tz.offset :o0, -12652, 0, :LMT - tz.offset :o1, -12652, 0, :NST - tz.offset :o2, -12652, 3600, :NDT - tz.offset :o3, -12600, 0, :NST - tz.offset :o4, -12600, 3600, :NDT - tz.offset :o5, -12600, 3600, :NWT - tz.offset :o6, -12600, 3600, :NPT - tz.offset :o7, -12600, 7200, :NDDT - - tz.transition 1884, 1, :o1, 52038215563, 21600 - tz.transition 1917, 4, :o2, 52300657363, 21600 - tz.transition 1917, 9, :o1, 52304155663, 21600 - tz.transition 1918, 4, :o2, 52308670963, 21600 - tz.transition 1918, 10, :o1, 52312990063, 21600 - tz.transition 1919, 5, :o2, 52317027463, 21600 - tz.transition 1919, 8, :o1, 52319164963, 21600 - tz.transition 1920, 5, :o2, 52324868263, 21600 - tz.transition 1920, 11, :o1, 52328798563, 21600 - tz.transition 1921, 5, :o2, 52332730663, 21600 - tz.transition 1921, 10, :o1, 52336660963, 21600 - tz.transition 1922, 5, :o2, 52340744263, 21600 - tz.transition 1922, 10, :o1, 52344523363, 21600 - tz.transition 1923, 5, :o2, 52348606663, 21600 - tz.transition 1923, 10, :o1, 52352385763, 21600 - tz.transition 1924, 5, :o2, 52356469063, 21600 - tz.transition 1924, 10, :o1, 52360248163, 21600 - tz.transition 1925, 5, :o2, 52364331463, 21600 - tz.transition 1925, 10, :o1, 52368110563, 21600 - tz.transition 1926, 5, :o2, 52372193863, 21600 - tz.transition 1926, 11, :o1, 52376124163, 21600 - tz.transition 1927, 5, :o2, 52380056263, 21600 - tz.transition 1927, 10, :o1, 52383986563, 21600 - tz.transition 1928, 5, :o2, 52388069863, 21600 - tz.transition 1928, 10, :o1, 52391848963, 21600 - tz.transition 1929, 5, :o2, 52395932263, 21600 - tz.transition 1929, 10, :o1, 52399711363, 21600 - tz.transition 1930, 5, :o2, 52403794663, 21600 - tz.transition 1930, 10, :o1, 52407573763, 21600 - tz.transition 1931, 5, :o2, 52411657063, 21600 - tz.transition 1931, 10, :o1, 52415436163, 21600 - tz.transition 1932, 5, :o2, 52419519463, 21600 - tz.transition 1932, 10, :o1, 52423449763, 21600 - tz.transition 1933, 5, :o2, 52427533063, 21600 - tz.transition 1933, 10, :o1, 52431312163, 21600 - tz.transition 1934, 5, :o2, 52435395463, 21600 - tz.transition 1934, 10, :o1, 52439174563, 21600 - tz.transition 1935, 3, :o3, 52442459563, 21600 - tz.transition 1935, 5, :o4, 116540573, 48 - tz.transition 1935, 10, :o3, 38849657, 16 - tz.transition 1936, 5, :o4, 116558383, 48 - tz.transition 1936, 10, :o3, 116565437, 48 - tz.transition 1937, 5, :o4, 116575855, 48 - tz.transition 1937, 10, :o3, 116582909, 48 - tz.transition 1938, 5, :o4, 116593327, 48 - tz.transition 1938, 10, :o3, 116600381, 48 - tz.transition 1939, 5, :o4, 116611135, 48 - tz.transition 1939, 10, :o3, 116617853, 48 - tz.transition 1940, 5, :o4, 116628607, 48 - tz.transition 1940, 10, :o3, 116635661, 48 - tz.transition 1941, 5, :o4, 116646079, 48 - tz.transition 1941, 10, :o3, 116653133, 48 - tz.transition 1942, 5, :o5, 116663551, 48 - tz.transition 1945, 8, :o6, 58360379, 24 - tz.transition 1945, 9, :o3, 38907659, 16 - tz.transition 1946, 5, :o4, 116733731, 48 - tz.transition 1946, 10, :o3, 38913595, 16 - tz.transition 1947, 5, :o4, 116751203, 48 - tz.transition 1947, 10, :o3, 38919419, 16 - tz.transition 1948, 5, :o4, 116768675, 48 - tz.transition 1948, 10, :o3, 38925243, 16 - tz.transition 1949, 5, :o4, 116786147, 48 - tz.transition 1949, 10, :o3, 38931067, 16 - tz.transition 1950, 5, :o4, 116803955, 48 - tz.transition 1950, 10, :o3, 38937003, 16 - tz.transition 1951, 4, :o4, 116820755, 48 - tz.transition 1951, 9, :o3, 38942715, 16 - tz.transition 1952, 4, :o4, 116838227, 48 - tz.transition 1952, 9, :o3, 38948539, 16 - tz.transition 1953, 4, :o4, 116855699, 48 - tz.transition 1953, 9, :o3, 38954363, 16 - tz.transition 1954, 4, :o4, 116873171, 48 - tz.transition 1954, 9, :o3, 38960187, 16 - tz.transition 1955, 4, :o4, 116890643, 48 - tz.transition 1955, 9, :o3, 38966011, 16 - tz.transition 1956, 4, :o4, 116908451, 48 - tz.transition 1956, 9, :o3, 38971947, 16 - tz.transition 1957, 4, :o4, 116925923, 48 - tz.transition 1957, 9, :o3, 38977771, 16 - tz.transition 1958, 4, :o4, 116943395, 48 - tz.transition 1958, 9, :o3, 38983595, 16 - tz.transition 1959, 4, :o4, 116960867, 48 - tz.transition 1959, 9, :o3, 38989419, 16 - tz.transition 1960, 4, :o4, 116978339, 48 - tz.transition 1960, 10, :o3, 38995803, 16 - tz.transition 1961, 4, :o4, 116996147, 48 - tz.transition 1961, 10, :o3, 39001627, 16 - tz.transition 1962, 4, :o4, 117013619, 48 - tz.transition 1962, 10, :o3, 39007451, 16 - tz.transition 1963, 4, :o4, 117031091, 48 - tz.transition 1963, 10, :o3, 39013275, 16 - tz.transition 1964, 4, :o4, 117048563, 48 - tz.transition 1964, 10, :o3, 39019099, 16 - tz.transition 1965, 4, :o4, 117066035, 48 - tz.transition 1965, 10, :o3, 39025035, 16 - tz.transition 1966, 4, :o4, 117083507, 48 - tz.transition 1966, 10, :o3, 39030859, 16 - tz.transition 1967, 4, :o4, 117101315, 48 - tz.transition 1967, 10, :o3, 39036683, 16 - tz.transition 1968, 4, :o4, 117118787, 48 - tz.transition 1968, 10, :o3, 39042507, 16 - tz.transition 1969, 4, :o4, 117136259, 48 - tz.transition 1969, 10, :o3, 39048331, 16 - tz.transition 1970, 4, :o4, 9955800 - tz.transition 1970, 10, :o3, 25677000 - tz.transition 1971, 4, :o4, 41405400 - tz.transition 1971, 10, :o3, 57731400 - tz.transition 1972, 4, :o4, 73459800 - tz.transition 1972, 10, :o3, 89181000 - tz.transition 1973, 4, :o4, 104909400 - tz.transition 1973, 10, :o3, 120630600 - tz.transition 1974, 4, :o4, 136359000 - tz.transition 1974, 10, :o3, 152080200 - tz.transition 1975, 4, :o4, 167808600 - tz.transition 1975, 10, :o3, 183529800 - tz.transition 1976, 4, :o4, 199258200 - tz.transition 1976, 10, :o3, 215584200 - tz.transition 1977, 4, :o4, 230707800 - tz.transition 1977, 10, :o3, 247033800 - tz.transition 1978, 4, :o4, 262762200 - tz.transition 1978, 10, :o3, 278483400 - tz.transition 1979, 4, :o4, 294211800 - tz.transition 1979, 10, :o3, 309933000 - tz.transition 1980, 4, :o4, 325661400 - tz.transition 1980, 10, :o3, 341382600 - tz.transition 1981, 4, :o4, 357111000 - tz.transition 1981, 10, :o3, 372832200 - tz.transition 1982, 4, :o4, 388560600 - tz.transition 1982, 10, :o3, 404886600 - tz.transition 1983, 4, :o4, 420010200 - tz.transition 1983, 10, :o3, 436336200 - tz.transition 1984, 4, :o4, 452064600 - tz.transition 1984, 10, :o3, 467785800 - tz.transition 1985, 4, :o4, 483514200 - tz.transition 1985, 10, :o3, 499235400 - tz.transition 1986, 4, :o4, 514963800 - tz.transition 1986, 10, :o3, 530685000 - tz.transition 1987, 4, :o4, 544591860 - tz.transition 1987, 10, :o3, 562127460 - tz.transition 1988, 4, :o7, 576041460 - tz.transition 1988, 10, :o3, 594178260 - tz.transition 1989, 4, :o4, 607491060 - tz.transition 1989, 10, :o3, 625631460 - tz.transition 1990, 4, :o4, 638940660 - tz.transition 1990, 10, :o3, 657081060 - tz.transition 1991, 4, :o4, 670995060 - tz.transition 1991, 10, :o3, 688530660 - tz.transition 1992, 4, :o4, 702444660 - tz.transition 1992, 10, :o3, 719980260 - tz.transition 1993, 4, :o4, 733894260 - tz.transition 1993, 10, :o3, 752034660 - tz.transition 1994, 4, :o4, 765343860 - tz.transition 1994, 10, :o3, 783484260 - tz.transition 1995, 4, :o4, 796793460 - tz.transition 1995, 10, :o3, 814933860 - tz.transition 1996, 4, :o4, 828847860 - tz.transition 1996, 10, :o3, 846383460 - tz.transition 1997, 4, :o4, 860297460 - tz.transition 1997, 10, :o3, 877833060 - tz.transition 1998, 4, :o4, 891747060 - tz.transition 1998, 10, :o3, 909282660 - tz.transition 1999, 4, :o4, 923196660 - tz.transition 1999, 10, :o3, 941337060 - tz.transition 2000, 4, :o4, 954646260 - tz.transition 2000, 10, :o3, 972786660 - tz.transition 2001, 4, :o4, 986095860 - tz.transition 2001, 10, :o3, 1004236260 - tz.transition 2002, 4, :o4, 1018150260 - tz.transition 2002, 10, :o3, 1035685860 - tz.transition 2003, 4, :o4, 1049599860 - tz.transition 2003, 10, :o3, 1067135460 - tz.transition 2004, 4, :o4, 1081049460 - tz.transition 2004, 10, :o3, 1099189860 - tz.transition 2005, 4, :o4, 1112499060 - tz.transition 2005, 10, :o3, 1130639460 - tz.transition 2006, 4, :o4, 1143948660 - tz.transition 2006, 10, :o3, 1162089060 - tz.transition 2007, 3, :o4, 1173583860 - tz.transition 2007, 11, :o3, 1194143460 - tz.transition 2008, 3, :o4, 1205033460 - tz.transition 2008, 11, :o3, 1225593060 - tz.transition 2009, 3, :o4, 1236483060 - tz.transition 2009, 11, :o3, 1257042660 - tz.transition 2010, 3, :o4, 1268537460 - tz.transition 2010, 11, :o3, 1289097060 - tz.transition 2011, 3, :o4, 1299987060 - tz.transition 2011, 11, :o3, 1320546660 - tz.transition 2012, 3, :o4, 1331436660 - tz.transition 2012, 11, :o3, 1351996260 - tz.transition 2013, 3, :o4, 1362886260 - tz.transition 2013, 11, :o3, 1383445860 - tz.transition 2014, 3, :o4, 1394335860 - tz.transition 2014, 11, :o3, 1414895460 - tz.transition 2015, 3, :o4, 1425785460 - tz.transition 2015, 11, :o3, 1446345060 - tz.transition 2016, 3, :o4, 1457839860 - tz.transition 2016, 11, :o3, 1478399460 - tz.transition 2017, 3, :o4, 1489289460 - tz.transition 2017, 11, :o3, 1509849060 - tz.transition 2018, 3, :o4, 1520739060 - tz.transition 2018, 11, :o3, 1541298660 - tz.transition 2019, 3, :o4, 1552188660 - tz.transition 2019, 11, :o3, 1572748260 - tz.transition 2020, 3, :o4, 1583638260 - tz.transition 2020, 11, :o3, 1604197860 - tz.transition 2021, 3, :o4, 1615692660 - tz.transition 2021, 11, :o3, 1636252260 - tz.transition 2022, 3, :o4, 1647142260 - tz.transition 2022, 11, :o3, 1667701860 - tz.transition 2023, 3, :o4, 1678591860 - tz.transition 2023, 11, :o3, 1699151460 - tz.transition 2024, 3, :o4, 1710041460 - tz.transition 2024, 11, :o3, 1730601060 - tz.transition 2025, 3, :o4, 1741491060 - tz.transition 2025, 11, :o3, 1762050660 - tz.transition 2026, 3, :o4, 1772940660 - tz.transition 2026, 11, :o3, 1793500260 - tz.transition 2027, 3, :o4, 1804995060 - tz.transition 2027, 11, :o3, 1825554660 - tz.transition 2028, 3, :o4, 1836444660 - tz.transition 2028, 11, :o3, 1857004260 - tz.transition 2029, 3, :o4, 1867894260 - tz.transition 2029, 11, :o3, 1888453860 - tz.transition 2030, 3, :o4, 1899343860 - tz.transition 2030, 11, :o3, 1919903460 - tz.transition 2031, 3, :o4, 1930793460 - tz.transition 2031, 11, :o3, 1951353060 - tz.transition 2032, 3, :o4, 1962847860 - tz.transition 2032, 11, :o3, 1983407460 - tz.transition 2033, 3, :o4, 1994297460 - tz.transition 2033, 11, :o3, 2014857060 - tz.transition 2034, 3, :o4, 2025747060 - tz.transition 2034, 11, :o3, 2046306660 - tz.transition 2035, 3, :o4, 2057196660 - tz.transition 2035, 11, :o3, 2077756260 - tz.transition 2036, 3, :o4, 2088646260 - tz.transition 2036, 11, :o3, 2109205860 - tz.transition 2037, 3, :o4, 2120095860 - tz.transition 2037, 11, :o3, 2140655460 - tz.transition 2038, 3, :o4, 3550315171, 1440 - tz.transition 2038, 11, :o3, 3550657831, 1440 - tz.transition 2039, 3, :o4, 3550839331, 1440 - tz.transition 2039, 11, :o3, 3551181991, 1440 - tz.transition 2040, 3, :o4, 3551363491, 1440 - tz.transition 2040, 11, :o3, 3551706151, 1440 - tz.transition 2041, 3, :o4, 3551887651, 1440 - tz.transition 2041, 11, :o3, 3552230311, 1440 - tz.transition 2042, 3, :o4, 3552411811, 1440 - tz.transition 2042, 11, :o3, 3552754471, 1440 - tz.transition 2043, 3, :o4, 3552935971, 1440 - tz.transition 2043, 11, :o3, 3553278631, 1440 - tz.transition 2044, 3, :o4, 3553470211, 1440 - tz.transition 2044, 11, :o3, 3553812871, 1440 - tz.transition 2045, 3, :o4, 3553994371, 1440 - tz.transition 2045, 11, :o3, 3554337031, 1440 - tz.transition 2046, 3, :o4, 3554518531, 1440 - tz.transition 2046, 11, :o3, 3554861191, 1440 - tz.transition 2047, 3, :o4, 3555042691, 1440 - tz.transition 2047, 11, :o3, 3555385351, 1440 - tz.transition 2048, 3, :o4, 3555566851, 1440 - tz.transition 2048, 11, :o3, 3555909511, 1440 - tz.transition 2049, 3, :o4, 3556101091, 1440 - tz.transition 2049, 11, :o3, 3556443751, 1440 - tz.transition 2050, 3, :o4, 3556625251, 1440 - tz.transition 2050, 11, :o3, 3556967911, 1440 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Tijuana.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Tijuana.rb deleted file mode 100644 index 423059da46..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/America/Tijuana.rb +++ /dev/null @@ -1,196 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Tijuana - include TimezoneDefinition - - timezone 'America/Tijuana' do |tz| - tz.offset :o0, -28084, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -28800, 0, :PST - tz.offset :o3, -28800, 3600, :PDT - tz.offset :o4, -28800, 3600, :PWT - tz.offset :o5, -28800, 3600, :PPT - - tz.transition 1922, 1, :o1, 14538335, 6 - tz.transition 1924, 1, :o2, 58170859, 24 - tz.transition 1927, 6, :o1, 58201027, 24 - tz.transition 1930, 11, :o2, 58231099, 24 - tz.transition 1931, 4, :o3, 14558597, 6 - tz.transition 1931, 9, :o2, 58238755, 24 - tz.transition 1942, 4, :o4, 14582843, 6 - tz.transition 1945, 8, :o5, 58360379, 24 - tz.transition 1945, 11, :o2, 58362523, 24 - tz.transition 1948, 4, :o3, 14595881, 6 - tz.transition 1949, 1, :o2, 58390339, 24 - tz.transition 1954, 4, :o3, 29218295, 12 - tz.transition 1954, 9, :o2, 19480095, 8 - tz.transition 1955, 4, :o3, 29222663, 12 - tz.transition 1955, 9, :o2, 19483007, 8 - tz.transition 1956, 4, :o3, 29227115, 12 - tz.transition 1956, 9, :o2, 19485975, 8 - tz.transition 1957, 4, :o3, 29231483, 12 - tz.transition 1957, 9, :o2, 19488887, 8 - tz.transition 1958, 4, :o3, 29235851, 12 - tz.transition 1958, 9, :o2, 19491799, 8 - tz.transition 1959, 4, :o3, 29240219, 12 - tz.transition 1959, 9, :o2, 19494711, 8 - tz.transition 1960, 4, :o3, 29244587, 12 - tz.transition 1960, 9, :o2, 19497623, 8 - tz.transition 1976, 4, :o3, 199274400 - tz.transition 1976, 10, :o2, 215600400 - tz.transition 1977, 4, :o3, 230724000 - tz.transition 1977, 10, :o2, 247050000 - tz.transition 1978, 4, :o3, 262778400 - tz.transition 1978, 10, :o2, 278499600 - tz.transition 1979, 4, :o3, 294228000 - tz.transition 1979, 10, :o2, 309949200 - tz.transition 1980, 4, :o3, 325677600 - tz.transition 1980, 10, :o2, 341398800 - tz.transition 1981, 4, :o3, 357127200 - tz.transition 1981, 10, :o2, 372848400 - tz.transition 1982, 4, :o3, 388576800 - tz.transition 1982, 10, :o2, 404902800 - tz.transition 1983, 4, :o3, 420026400 - tz.transition 1983, 10, :o2, 436352400 - tz.transition 1984, 4, :o3, 452080800 - tz.transition 1984, 10, :o2, 467802000 - tz.transition 1985, 4, :o3, 483530400 - tz.transition 1985, 10, :o2, 499251600 - tz.transition 1986, 4, :o3, 514980000 - tz.transition 1986, 10, :o2, 530701200 - tz.transition 1987, 4, :o3, 544615200 - tz.transition 1987, 10, :o2, 562150800 - tz.transition 1988, 4, :o3, 576064800 - tz.transition 1988, 10, :o2, 594205200 - tz.transition 1989, 4, :o3, 607514400 - tz.transition 1989, 10, :o2, 625654800 - tz.transition 1990, 4, :o3, 638964000 - tz.transition 1990, 10, :o2, 657104400 - tz.transition 1991, 4, :o3, 671018400 - tz.transition 1991, 10, :o2, 688554000 - tz.transition 1992, 4, :o3, 702468000 - tz.transition 1992, 10, :o2, 720003600 - tz.transition 1993, 4, :o3, 733917600 - tz.transition 1993, 10, :o2, 752058000 - tz.transition 1994, 4, :o3, 765367200 - tz.transition 1994, 10, :o2, 783507600 - tz.transition 1995, 4, :o3, 796816800 - tz.transition 1995, 10, :o2, 814957200 - tz.transition 1996, 4, :o3, 828871200 - tz.transition 1996, 10, :o2, 846406800 - tz.transition 1997, 4, :o3, 860320800 - tz.transition 1997, 10, :o2, 877856400 - tz.transition 1998, 4, :o3, 891770400 - tz.transition 1998, 10, :o2, 909306000 - tz.transition 1999, 4, :o3, 923220000 - tz.transition 1999, 10, :o2, 941360400 - tz.transition 2000, 4, :o3, 954669600 - tz.transition 2000, 10, :o2, 972810000 - tz.transition 2001, 4, :o3, 986119200 - tz.transition 2001, 10, :o2, 1004259600 - tz.transition 2002, 4, :o3, 1018173600 - tz.transition 2002, 10, :o2, 1035709200 - tz.transition 2003, 4, :o3, 1049623200 - tz.transition 2003, 10, :o2, 1067158800 - tz.transition 2004, 4, :o3, 1081072800 - tz.transition 2004, 10, :o2, 1099213200 - tz.transition 2005, 4, :o3, 1112522400 - tz.transition 2005, 10, :o2, 1130662800 - tz.transition 2006, 4, :o3, 1143972000 - tz.transition 2006, 10, :o2, 1162112400 - tz.transition 2007, 4, :o3, 1175421600 - tz.transition 2007, 10, :o2, 1193562000 - tz.transition 2008, 4, :o3, 1207476000 - tz.transition 2008, 10, :o2, 1225011600 - tz.transition 2009, 4, :o3, 1238925600 - tz.transition 2009, 10, :o2, 1256461200 - tz.transition 2010, 4, :o3, 1270375200 - tz.transition 2010, 10, :o2, 1288515600 - tz.transition 2011, 4, :o3, 1301824800 - tz.transition 2011, 10, :o2, 1319965200 - tz.transition 2012, 4, :o3, 1333274400 - tz.transition 2012, 10, :o2, 1351414800 - tz.transition 2013, 4, :o3, 1365328800 - tz.transition 2013, 10, :o2, 1382864400 - tz.transition 2014, 4, :o3, 1396778400 - tz.transition 2014, 10, :o2, 1414314000 - tz.transition 2015, 4, :o3, 1428228000 - tz.transition 2015, 10, :o2, 1445763600 - tz.transition 2016, 4, :o3, 1459677600 - tz.transition 2016, 10, :o2, 1477818000 - tz.transition 2017, 4, :o3, 1491127200 - tz.transition 2017, 10, :o2, 1509267600 - tz.transition 2018, 4, :o3, 1522576800 - tz.transition 2018, 10, :o2, 1540717200 - tz.transition 2019, 4, :o3, 1554631200 - tz.transition 2019, 10, :o2, 1572166800 - tz.transition 2020, 4, :o3, 1586080800 - tz.transition 2020, 10, :o2, 1603616400 - tz.transition 2021, 4, :o3, 1617530400 - tz.transition 2021, 10, :o2, 1635670800 - tz.transition 2022, 4, :o3, 1648980000 - tz.transition 2022, 10, :o2, 1667120400 - tz.transition 2023, 4, :o3, 1680429600 - tz.transition 2023, 10, :o2, 1698570000 - tz.transition 2024, 4, :o3, 1712484000 - tz.transition 2024, 10, :o2, 1730019600 - tz.transition 2025, 4, :o3, 1743933600 - tz.transition 2025, 10, :o2, 1761469200 - tz.transition 2026, 4, :o3, 1775383200 - tz.transition 2026, 10, :o2, 1792918800 - tz.transition 2027, 4, :o3, 1806832800 - tz.transition 2027, 10, :o2, 1824973200 - tz.transition 2028, 4, :o3, 1838282400 - tz.transition 2028, 10, :o2, 1856422800 - tz.transition 2029, 4, :o3, 1869732000 - tz.transition 2029, 10, :o2, 1887872400 - tz.transition 2030, 4, :o3, 1901786400 - tz.transition 2030, 10, :o2, 1919322000 - tz.transition 2031, 4, :o3, 1933236000 - tz.transition 2031, 10, :o2, 1950771600 - tz.transition 2032, 4, :o3, 1964685600 - tz.transition 2032, 10, :o2, 1982826000 - tz.transition 2033, 4, :o3, 1996135200 - tz.transition 2033, 10, :o2, 2014275600 - tz.transition 2034, 4, :o3, 2027584800 - tz.transition 2034, 10, :o2, 2045725200 - tz.transition 2035, 4, :o3, 2059034400 - tz.transition 2035, 10, :o2, 2077174800 - tz.transition 2036, 4, :o3, 2091088800 - tz.transition 2036, 10, :o2, 2108624400 - tz.transition 2037, 4, :o3, 2122538400 - tz.transition 2037, 10, :o2, 2140074000 - tz.transition 2038, 4, :o3, 29586215, 12 - tz.transition 2038, 10, :o2, 19725823, 8 - tz.transition 2039, 4, :o3, 29590583, 12 - tz.transition 2039, 10, :o2, 19728735, 8 - tz.transition 2040, 4, :o3, 29594951, 12 - tz.transition 2040, 10, :o2, 19731647, 8 - tz.transition 2041, 4, :o3, 29599403, 12 - tz.transition 2041, 10, :o2, 19734559, 8 - tz.transition 2042, 4, :o3, 29603771, 12 - tz.transition 2042, 10, :o2, 19737471, 8 - tz.transition 2043, 4, :o3, 29608139, 12 - tz.transition 2043, 10, :o2, 19740383, 8 - tz.transition 2044, 4, :o3, 29612507, 12 - tz.transition 2044, 10, :o2, 19743351, 8 - tz.transition 2045, 4, :o3, 29616875, 12 - tz.transition 2045, 10, :o2, 19746263, 8 - tz.transition 2046, 4, :o3, 29621243, 12 - tz.transition 2046, 10, :o2, 19749175, 8 - tz.transition 2047, 4, :o3, 29625695, 12 - tz.transition 2047, 10, :o2, 19752087, 8 - tz.transition 2048, 4, :o3, 29630063, 12 - tz.transition 2048, 10, :o2, 19754999, 8 - tz.transition 2049, 4, :o3, 29634431, 12 - tz.transition 2049, 10, :o2, 19757967, 8 - tz.transition 2050, 4, :o3, 29638799, 12 - tz.transition 2050, 10, :o2, 19760879, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Almaty.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Almaty.rb deleted file mode 100644 index 9ee18970f1..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Almaty.rb +++ /dev/null @@ -1,67 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Almaty - include TimezoneDefinition - - timezone 'Asia/Almaty' do |tz| - tz.offset :o0, 18468, 0, :LMT - tz.offset :o1, 18000, 0, :ALMT - tz.offset :o2, 21600, 0, :ALMT - tz.offset :o3, 21600, 3600, :ALMST - - tz.transition 1924, 5, :o1, 1939125829, 800 - tz.transition 1930, 6, :o2, 58227559, 24 - tz.transition 1981, 3, :o3, 354909600 - tz.transition 1981, 9, :o2, 370717200 - tz.transition 1982, 3, :o3, 386445600 - tz.transition 1982, 9, :o2, 402253200 - tz.transition 1983, 3, :o3, 417981600 - tz.transition 1983, 9, :o2, 433789200 - tz.transition 1984, 3, :o3, 449604000 - tz.transition 1984, 9, :o2, 465336000 - tz.transition 1985, 3, :o3, 481060800 - tz.transition 1985, 9, :o2, 496785600 - tz.transition 1986, 3, :o3, 512510400 - tz.transition 1986, 9, :o2, 528235200 - tz.transition 1987, 3, :o3, 543960000 - tz.transition 1987, 9, :o2, 559684800 - tz.transition 1988, 3, :o3, 575409600 - tz.transition 1988, 9, :o2, 591134400 - tz.transition 1989, 3, :o3, 606859200 - tz.transition 1989, 9, :o2, 622584000 - tz.transition 1990, 3, :o3, 638308800 - tz.transition 1990, 9, :o2, 654638400 - tz.transition 1992, 3, :o3, 701802000 - tz.transition 1992, 9, :o2, 717523200 - tz.transition 1993, 3, :o3, 733262400 - tz.transition 1993, 9, :o2, 748987200 - tz.transition 1994, 3, :o3, 764712000 - tz.transition 1994, 9, :o2, 780436800 - tz.transition 1995, 3, :o3, 796161600 - tz.transition 1995, 9, :o2, 811886400 - tz.transition 1996, 3, :o3, 828216000 - tz.transition 1996, 10, :o2, 846360000 - tz.transition 1997, 3, :o3, 859665600 - tz.transition 1997, 10, :o2, 877809600 - tz.transition 1998, 3, :o3, 891115200 - tz.transition 1998, 10, :o2, 909259200 - tz.transition 1999, 3, :o3, 922564800 - tz.transition 1999, 10, :o2, 941313600 - tz.transition 2000, 3, :o3, 954014400 - tz.transition 2000, 10, :o2, 972763200 - tz.transition 2001, 3, :o3, 985464000 - tz.transition 2001, 10, :o2, 1004212800 - tz.transition 2002, 3, :o3, 1017518400 - tz.transition 2002, 10, :o2, 1035662400 - tz.transition 2003, 3, :o3, 1048968000 - tz.transition 2003, 10, :o2, 1067112000 - tz.transition 2004, 3, :o3, 1080417600 - tz.transition 2004, 10, :o2, 1099166400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baghdad.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baghdad.rb deleted file mode 100644 index 774dca1587..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baghdad.rb +++ /dev/null @@ -1,73 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Baghdad - include TimezoneDefinition - - timezone 'Asia/Baghdad' do |tz| - tz.offset :o0, 10660, 0, :LMT - tz.offset :o1, 10656, 0, :BMT - tz.offset :o2, 10800, 0, :AST - tz.offset :o3, 10800, 3600, :ADT - - tz.transition 1889, 12, :o1, 10417111387, 4320 - tz.transition 1917, 12, :o2, 726478313, 300 - tz.transition 1982, 4, :o3, 389048400 - tz.transition 1982, 9, :o2, 402264000 - tz.transition 1983, 3, :o3, 417906000 - tz.transition 1983, 9, :o2, 433800000 - tz.transition 1984, 3, :o3, 449614800 - tz.transition 1984, 9, :o2, 465422400 - tz.transition 1985, 3, :o3, 481150800 - tz.transition 1985, 9, :o2, 496792800 - tz.transition 1986, 3, :o3, 512517600 - tz.transition 1986, 9, :o2, 528242400 - tz.transition 1987, 3, :o3, 543967200 - tz.transition 1987, 9, :o2, 559692000 - tz.transition 1988, 3, :o3, 575416800 - tz.transition 1988, 9, :o2, 591141600 - tz.transition 1989, 3, :o3, 606866400 - tz.transition 1989, 9, :o2, 622591200 - tz.transition 1990, 3, :o3, 638316000 - tz.transition 1990, 9, :o2, 654645600 - tz.transition 1991, 4, :o3, 670464000 - tz.transition 1991, 10, :o2, 686275200 - tz.transition 1992, 4, :o3, 702086400 - tz.transition 1992, 10, :o2, 717897600 - tz.transition 1993, 4, :o3, 733622400 - tz.transition 1993, 10, :o2, 749433600 - tz.transition 1994, 4, :o3, 765158400 - tz.transition 1994, 10, :o2, 780969600 - tz.transition 1995, 4, :o3, 796694400 - tz.transition 1995, 10, :o2, 812505600 - tz.transition 1996, 4, :o3, 828316800 - tz.transition 1996, 10, :o2, 844128000 - tz.transition 1997, 4, :o3, 859852800 - tz.transition 1997, 10, :o2, 875664000 - tz.transition 1998, 4, :o3, 891388800 - tz.transition 1998, 10, :o2, 907200000 - tz.transition 1999, 4, :o3, 922924800 - tz.transition 1999, 10, :o2, 938736000 - tz.transition 2000, 4, :o3, 954547200 - tz.transition 2000, 10, :o2, 970358400 - tz.transition 2001, 4, :o3, 986083200 - tz.transition 2001, 10, :o2, 1001894400 - tz.transition 2002, 4, :o3, 1017619200 - tz.transition 2002, 10, :o2, 1033430400 - tz.transition 2003, 4, :o3, 1049155200 - tz.transition 2003, 10, :o2, 1064966400 - tz.transition 2004, 4, :o3, 1080777600 - tz.transition 2004, 10, :o2, 1096588800 - tz.transition 2005, 4, :o3, 1112313600 - tz.transition 2005, 10, :o2, 1128124800 - tz.transition 2006, 4, :o3, 1143849600 - tz.transition 2006, 10, :o2, 1159660800 - tz.transition 2007, 4, :o3, 1175385600 - tz.transition 2007, 10, :o2, 1191196800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baku.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baku.rb deleted file mode 100644 index e86340ebfa..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Baku.rb +++ /dev/null @@ -1,161 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Baku - include TimezoneDefinition - - timezone 'Asia/Baku' do |tz| - tz.offset :o0, 11964, 0, :LMT - tz.offset :o1, 10800, 0, :BAKT - tz.offset :o2, 14400, 0, :BAKT - tz.offset :o3, 14400, 3600, :BAKST - tz.offset :o4, 10800, 3600, :BAKST - tz.offset :o5, 10800, 3600, :AZST - tz.offset :o6, 10800, 0, :AZT - tz.offset :o7, 14400, 0, :AZT - tz.offset :o8, 14400, 3600, :AZST - - tz.transition 1924, 5, :o1, 17452133003, 7200 - tz.transition 1957, 2, :o2, 19487187, 8 - tz.transition 1981, 3, :o3, 354916800 - tz.transition 1981, 9, :o2, 370724400 - tz.transition 1982, 3, :o3, 386452800 - tz.transition 1982, 9, :o2, 402260400 - tz.transition 1983, 3, :o3, 417988800 - tz.transition 1983, 9, :o2, 433796400 - tz.transition 1984, 3, :o3, 449611200 - tz.transition 1984, 9, :o2, 465343200 - tz.transition 1985, 3, :o3, 481068000 - tz.transition 1985, 9, :o2, 496792800 - tz.transition 1986, 3, :o3, 512517600 - tz.transition 1986, 9, :o2, 528242400 - tz.transition 1987, 3, :o3, 543967200 - tz.transition 1987, 9, :o2, 559692000 - tz.transition 1988, 3, :o3, 575416800 - tz.transition 1988, 9, :o2, 591141600 - tz.transition 1989, 3, :o3, 606866400 - tz.transition 1989, 9, :o2, 622591200 - tz.transition 1990, 3, :o3, 638316000 - tz.transition 1990, 9, :o2, 654645600 - tz.transition 1991, 3, :o4, 670370400 - tz.transition 1991, 8, :o5, 683496000 - tz.transition 1991, 9, :o6, 686098800 - tz.transition 1992, 3, :o5, 701812800 - tz.transition 1992, 9, :o7, 717534000 - tz.transition 1996, 3, :o8, 828234000 - tz.transition 1996, 10, :o7, 846378000 - tz.transition 1997, 3, :o8, 859680000 - tz.transition 1997, 10, :o7, 877824000 - tz.transition 1998, 3, :o8, 891129600 - tz.transition 1998, 10, :o7, 909273600 - tz.transition 1999, 3, :o8, 922579200 - tz.transition 1999, 10, :o7, 941328000 - tz.transition 2000, 3, :o8, 954028800 - tz.transition 2000, 10, :o7, 972777600 - tz.transition 2001, 3, :o8, 985478400 - tz.transition 2001, 10, :o7, 1004227200 - tz.transition 2002, 3, :o8, 1017532800 - tz.transition 2002, 10, :o7, 1035676800 - tz.transition 2003, 3, :o8, 1048982400 - tz.transition 2003, 10, :o7, 1067126400 - tz.transition 2004, 3, :o8, 1080432000 - tz.transition 2004, 10, :o7, 1099180800 - tz.transition 2005, 3, :o8, 1111881600 - tz.transition 2005, 10, :o7, 1130630400 - tz.transition 2006, 3, :o8, 1143331200 - tz.transition 2006, 10, :o7, 1162080000 - tz.transition 2007, 3, :o8, 1174780800 - tz.transition 2007, 10, :o7, 1193529600 - tz.transition 2008, 3, :o8, 1206835200 - tz.transition 2008, 10, :o7, 1224979200 - tz.transition 2009, 3, :o8, 1238284800 - tz.transition 2009, 10, :o7, 1256428800 - tz.transition 2010, 3, :o8, 1269734400 - tz.transition 2010, 10, :o7, 1288483200 - tz.transition 2011, 3, :o8, 1301184000 - tz.transition 2011, 10, :o7, 1319932800 - tz.transition 2012, 3, :o8, 1332633600 - tz.transition 2012, 10, :o7, 1351382400 - tz.transition 2013, 3, :o8, 1364688000 - tz.transition 2013, 10, :o7, 1382832000 - tz.transition 2014, 3, :o8, 1396137600 - tz.transition 2014, 10, :o7, 1414281600 - tz.transition 2015, 3, :o8, 1427587200 - tz.transition 2015, 10, :o7, 1445731200 - tz.transition 2016, 3, :o8, 1459036800 - tz.transition 2016, 10, :o7, 1477785600 - tz.transition 2017, 3, :o8, 1490486400 - tz.transition 2017, 10, :o7, 1509235200 - tz.transition 2018, 3, :o8, 1521936000 - tz.transition 2018, 10, :o7, 1540684800 - tz.transition 2019, 3, :o8, 1553990400 - tz.transition 2019, 10, :o7, 1572134400 - tz.transition 2020, 3, :o8, 1585440000 - tz.transition 2020, 10, :o7, 1603584000 - tz.transition 2021, 3, :o8, 1616889600 - tz.transition 2021, 10, :o7, 1635638400 - tz.transition 2022, 3, :o8, 1648339200 - tz.transition 2022, 10, :o7, 1667088000 - tz.transition 2023, 3, :o8, 1679788800 - tz.transition 2023, 10, :o7, 1698537600 - tz.transition 2024, 3, :o8, 1711843200 - tz.transition 2024, 10, :o7, 1729987200 - tz.transition 2025, 3, :o8, 1743292800 - tz.transition 2025, 10, :o7, 1761436800 - tz.transition 2026, 3, :o8, 1774742400 - tz.transition 2026, 10, :o7, 1792886400 - tz.transition 2027, 3, :o8, 1806192000 - tz.transition 2027, 10, :o7, 1824940800 - tz.transition 2028, 3, :o8, 1837641600 - tz.transition 2028, 10, :o7, 1856390400 - tz.transition 2029, 3, :o8, 1869091200 - tz.transition 2029, 10, :o7, 1887840000 - tz.transition 2030, 3, :o8, 1901145600 - tz.transition 2030, 10, :o7, 1919289600 - tz.transition 2031, 3, :o8, 1932595200 - tz.transition 2031, 10, :o7, 1950739200 - tz.transition 2032, 3, :o8, 1964044800 - tz.transition 2032, 10, :o7, 1982793600 - tz.transition 2033, 3, :o8, 1995494400 - tz.transition 2033, 10, :o7, 2014243200 - tz.transition 2034, 3, :o8, 2026944000 - tz.transition 2034, 10, :o7, 2045692800 - tz.transition 2035, 3, :o8, 2058393600 - tz.transition 2035, 10, :o7, 2077142400 - tz.transition 2036, 3, :o8, 2090448000 - tz.transition 2036, 10, :o7, 2108592000 - tz.transition 2037, 3, :o8, 2121897600 - tz.transition 2037, 10, :o7, 2140041600 - tz.transition 2038, 3, :o8, 4931021, 2 - tz.transition 2038, 10, :o7, 4931455, 2 - tz.transition 2039, 3, :o8, 4931749, 2 - tz.transition 2039, 10, :o7, 4932183, 2 - tz.transition 2040, 3, :o8, 4932477, 2 - tz.transition 2040, 10, :o7, 4932911, 2 - tz.transition 2041, 3, :o8, 4933219, 2 - tz.transition 2041, 10, :o7, 4933639, 2 - tz.transition 2042, 3, :o8, 4933947, 2 - tz.transition 2042, 10, :o7, 4934367, 2 - tz.transition 2043, 3, :o8, 4934675, 2 - tz.transition 2043, 10, :o7, 4935095, 2 - tz.transition 2044, 3, :o8, 4935403, 2 - tz.transition 2044, 10, :o7, 4935837, 2 - tz.transition 2045, 3, :o8, 4936131, 2 - tz.transition 2045, 10, :o7, 4936565, 2 - tz.transition 2046, 3, :o8, 4936859, 2 - tz.transition 2046, 10, :o7, 4937293, 2 - tz.transition 2047, 3, :o8, 4937601, 2 - tz.transition 2047, 10, :o7, 4938021, 2 - tz.transition 2048, 3, :o8, 4938329, 2 - tz.transition 2048, 10, :o7, 4938749, 2 - tz.transition 2049, 3, :o8, 4939057, 2 - tz.transition 2049, 10, :o7, 4939491, 2 - tz.transition 2050, 3, :o8, 4939785, 2 - tz.transition 2050, 10, :o7, 4940219, 2 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Bangkok.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Bangkok.rb deleted file mode 100644 index 139194e5e5..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Bangkok.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Bangkok - include TimezoneDefinition - - timezone 'Asia/Bangkok' do |tz| - tz.offset :o0, 24124, 0, :LMT - tz.offset :o1, 24124, 0, :BMT - tz.offset :o2, 25200, 0, :ICT - - tz.transition 1879, 12, :o1, 52006648769, 21600 - tz.transition 1920, 3, :o2, 52324168769, 21600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Chongqing.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Chongqing.rb deleted file mode 100644 index 8c94b4ba86..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Chongqing.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Chongqing - include TimezoneDefinition - - timezone 'Asia/Chongqing' do |tz| - tz.offset :o0, 25580, 0, :LMT - tz.offset :o1, 25200, 0, :LONT - tz.offset :o2, 28800, 0, :CST - tz.offset :o3, 28800, 3600, :CDT - - tz.transition 1927, 12, :o1, 10477063601, 4320 - tz.transition 1980, 4, :o2, 325962000 - tz.transition 1986, 5, :o3, 515520000 - tz.transition 1986, 9, :o2, 527007600 - tz.transition 1987, 4, :o3, 545155200 - tz.transition 1987, 9, :o2, 558457200 - tz.transition 1988, 4, :o3, 576604800 - tz.transition 1988, 9, :o2, 589906800 - tz.transition 1989, 4, :o3, 608659200 - tz.transition 1989, 9, :o2, 621961200 - tz.transition 1990, 4, :o3, 640108800 - tz.transition 1990, 9, :o2, 653410800 - tz.transition 1991, 4, :o3, 671558400 - tz.transition 1991, 9, :o2, 684860400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Colombo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Colombo.rb deleted file mode 100644 index f6531fa819..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Colombo.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Colombo - include TimezoneDefinition - - timezone 'Asia/Colombo' do |tz| - tz.offset :o0, 19164, 0, :LMT - tz.offset :o1, 19172, 0, :MMT - tz.offset :o2, 19800, 0, :IST - tz.offset :o3, 19800, 1800, :IHST - tz.offset :o4, 19800, 3600, :IST - tz.offset :o5, 23400, 0, :LKT - tz.offset :o6, 21600, 0, :LKT - - tz.transition 1879, 12, :o1, 17335550003, 7200 - tz.transition 1905, 12, :o2, 52211763607, 21600 - tz.transition 1942, 1, :o3, 116657485, 48 - tz.transition 1942, 8, :o4, 9722413, 4 - tz.transition 1945, 10, :o2, 38907909, 16 - tz.transition 1996, 5, :o5, 832962600 - tz.transition 1996, 10, :o6, 846266400 - tz.transition 2006, 4, :o2, 1145039400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Dhaka.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Dhaka.rb deleted file mode 100644 index ec3f753dec..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Dhaka.rb +++ /dev/null @@ -1,112 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Dhaka - include TimezoneDefinition - - timezone 'Asia/Dhaka' do |tz| - tz.offset :o0, 21700, 0, :LMT - tz.offset :o1, 21200, 0, :HMT - tz.offset :o2, 23400, 0, :BURT - tz.offset :o3, 19800, 0, :IST - tz.offset :o4, 21600, 0, :DACT - tz.offset :o5, 21600, 0, :BDT - tz.offset :o6, 21600, 3600, :BDST - - tz.transition 1889, 12, :o1, 2083422167, 864 - tz.transition 1941, 9, :o2, 524937943, 216 - tz.transition 1942, 5, :o3, 116663723, 48 - tz.transition 1942, 8, :o2, 116668957, 48 - tz.transition 1951, 9, :o4, 116828123, 48 - tz.transition 1971, 3, :o5, 38772000 - tz.transition 2009, 6, :o6, 1246294800 - tz.transition 2009, 12, :o5, 1262278800 - tz.transition 2010, 3, :o6, 1270054800 - tz.transition 2010, 10, :o5, 1288544400 - tz.transition 2011, 3, :o6, 1301590800 - tz.transition 2011, 10, :o5, 1320080400 - tz.transition 2012, 3, :o6, 1333213200 - tz.transition 2012, 10, :o5, 1351702800 - tz.transition 2013, 3, :o6, 1364749200 - tz.transition 2013, 10, :o5, 1383238800 - tz.transition 2014, 3, :o6, 1396285200 - tz.transition 2014, 10, :o5, 1414774800 - tz.transition 2015, 3, :o6, 1427821200 - tz.transition 2015, 10, :o5, 1446310800 - tz.transition 2016, 3, :o6, 1459443600 - tz.transition 2016, 10, :o5, 1477933200 - tz.transition 2017, 3, :o6, 1490979600 - tz.transition 2017, 10, :o5, 1509469200 - tz.transition 2018, 3, :o6, 1522515600 - tz.transition 2018, 10, :o5, 1541005200 - tz.transition 2019, 3, :o6, 1554051600 - tz.transition 2019, 10, :o5, 1572541200 - tz.transition 2020, 3, :o6, 1585674000 - tz.transition 2020, 10, :o5, 1604163600 - tz.transition 2021, 3, :o6, 1617210000 - tz.transition 2021, 10, :o5, 1635699600 - tz.transition 2022, 3, :o6, 1648746000 - tz.transition 2022, 10, :o5, 1667235600 - tz.transition 2023, 3, :o6, 1680282000 - tz.transition 2023, 10, :o5, 1698771600 - tz.transition 2024, 3, :o6, 1711904400 - tz.transition 2024, 10, :o5, 1730394000 - tz.transition 2025, 3, :o6, 1743440400 - tz.transition 2025, 10, :o5, 1761930000 - tz.transition 2026, 3, :o6, 1774976400 - tz.transition 2026, 10, :o5, 1793466000 - tz.transition 2027, 3, :o6, 1806512400 - tz.transition 2027, 10, :o5, 1825002000 - tz.transition 2028, 3, :o6, 1838134800 - tz.transition 2028, 10, :o5, 1856624400 - tz.transition 2029, 3, :o6, 1869670800 - tz.transition 2029, 10, :o5, 1888160400 - tz.transition 2030, 3, :o6, 1901206800 - tz.transition 2030, 10, :o5, 1919696400 - tz.transition 2031, 3, :o6, 1932742800 - tz.transition 2031, 10, :o5, 1951232400 - tz.transition 2032, 3, :o6, 1964365200 - tz.transition 2032, 10, :o5, 1982854800 - tz.transition 2033, 3, :o6, 1995901200 - tz.transition 2033, 10, :o5, 2014390800 - tz.transition 2034, 3, :o6, 2027437200 - tz.transition 2034, 10, :o5, 2045926800 - tz.transition 2035, 3, :o6, 2058973200 - tz.transition 2035, 10, :o5, 2077462800 - tz.transition 2036, 3, :o6, 2090595600 - tz.transition 2036, 10, :o5, 2109085200 - tz.transition 2037, 3, :o6, 2122131600 - tz.transition 2037, 10, :o5, 2140621200 - tz.transition 2038, 3, :o6, 59172341, 24 - tz.transition 2038, 10, :o5, 59177477, 24 - tz.transition 2039, 3, :o6, 59181101, 24 - tz.transition 2039, 10, :o5, 59186237, 24 - tz.transition 2040, 3, :o6, 59189885, 24 - tz.transition 2040, 10, :o5, 59195021, 24 - tz.transition 2041, 3, :o6, 59198645, 24 - tz.transition 2041, 10, :o5, 59203781, 24 - tz.transition 2042, 3, :o6, 59207405, 24 - tz.transition 2042, 10, :o5, 59212541, 24 - tz.transition 2043, 3, :o6, 59216165, 24 - tz.transition 2043, 10, :o5, 59221301, 24 - tz.transition 2044, 3, :o6, 59224949, 24 - tz.transition 2044, 10, :o5, 59230085, 24 - tz.transition 2045, 3, :o6, 59233709, 24 - tz.transition 2045, 10, :o5, 59238845, 24 - tz.transition 2046, 3, :o6, 59242469, 24 - tz.transition 2046, 10, :o5, 59247605, 24 - tz.transition 2047, 3, :o6, 59251229, 24 - tz.transition 2047, 10, :o5, 59256365, 24 - tz.transition 2048, 3, :o6, 59260013, 24 - tz.transition 2048, 10, :o5, 59265149, 24 - tz.transition 2049, 3, :o6, 59268773, 24 - tz.transition 2049, 10, :o5, 59273909, 24 - tz.transition 2050, 3, :o6, 59277533, 24 - tz.transition 2050, 10, :o5, 59282669, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Hong_Kong.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Hong_Kong.rb deleted file mode 100644 index 94bd6e0821..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Hong_Kong.rb +++ /dev/null @@ -1,90 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Hong_Kong - include TimezoneDefinition - - timezone 'Asia/Hong_Kong' do |tz| - tz.offset :o0, 27396, 0, :LMT - tz.offset :o1, 28800, 0, :HKT - tz.offset :o2, 28800, 3600, :HKST - tz.offset :o3, 32400, 0, :JST - - tz.transition 1904, 10, :o1, 5800279639, 2400 - tz.transition 1941, 3, :o2, 38881365, 16 - tz.transition 1941, 9, :o1, 116652829, 48 - tz.transition 1941, 12, :o3, 14582119, 6 - tz.transition 1945, 9, :o1, 19453705, 8 - tz.transition 1946, 4, :o2, 38910885, 16 - tz.transition 1946, 11, :o1, 116743453, 48 - tz.transition 1947, 4, :o2, 38916613, 16 - tz.transition 1947, 12, :o1, 116762365, 48 - tz.transition 1948, 5, :o2, 38922773, 16 - tz.transition 1948, 10, :o1, 116777053, 48 - tz.transition 1949, 4, :o2, 38928149, 16 - tz.transition 1949, 10, :o1, 116794525, 48 - tz.transition 1950, 4, :o2, 38933973, 16 - tz.transition 1950, 10, :o1, 116811997, 48 - tz.transition 1951, 3, :o2, 38939797, 16 - tz.transition 1951, 10, :o1, 116829469, 48 - tz.transition 1952, 4, :o2, 38945733, 16 - tz.transition 1952, 10, :o1, 116846893, 48 - tz.transition 1953, 4, :o2, 38951557, 16 - tz.transition 1953, 10, :o1, 116864749, 48 - tz.transition 1954, 3, :o2, 38957157, 16 - tz.transition 1954, 10, :o1, 116882221, 48 - tz.transition 1955, 3, :o2, 38962981, 16 - tz.transition 1955, 11, :o1, 116900029, 48 - tz.transition 1956, 3, :o2, 38968805, 16 - tz.transition 1956, 11, :o1, 116917501, 48 - tz.transition 1957, 3, :o2, 38974741, 16 - tz.transition 1957, 11, :o1, 116934973, 48 - tz.transition 1958, 3, :o2, 38980565, 16 - tz.transition 1958, 11, :o1, 116952445, 48 - tz.transition 1959, 3, :o2, 38986389, 16 - tz.transition 1959, 10, :o1, 116969917, 48 - tz.transition 1960, 3, :o2, 38992213, 16 - tz.transition 1960, 11, :o1, 116987725, 48 - tz.transition 1961, 3, :o2, 38998037, 16 - tz.transition 1961, 11, :o1, 117005197, 48 - tz.transition 1962, 3, :o2, 39003861, 16 - tz.transition 1962, 11, :o1, 117022669, 48 - tz.transition 1963, 3, :o2, 39009797, 16 - tz.transition 1963, 11, :o1, 117040141, 48 - tz.transition 1964, 3, :o2, 39015621, 16 - tz.transition 1964, 10, :o1, 117057613, 48 - tz.transition 1965, 4, :o2, 39021893, 16 - tz.transition 1965, 10, :o1, 117074413, 48 - tz.transition 1966, 4, :o2, 39027717, 16 - tz.transition 1966, 10, :o1, 117091885, 48 - tz.transition 1967, 4, :o2, 39033541, 16 - tz.transition 1967, 10, :o1, 117109693, 48 - tz.transition 1968, 4, :o2, 39039477, 16 - tz.transition 1968, 10, :o1, 117127165, 48 - tz.transition 1969, 4, :o2, 39045301, 16 - tz.transition 1969, 10, :o1, 117144637, 48 - tz.transition 1970, 4, :o2, 9315000 - tz.transition 1970, 10, :o1, 25036200 - tz.transition 1971, 4, :o2, 40764600 - tz.transition 1971, 10, :o1, 56485800 - tz.transition 1972, 4, :o2, 72214200 - tz.transition 1972, 10, :o1, 88540200 - tz.transition 1973, 4, :o2, 104268600 - tz.transition 1973, 10, :o1, 119989800 - tz.transition 1973, 12, :o2, 126041400 - tz.transition 1974, 10, :o1, 151439400 - tz.transition 1975, 4, :o2, 167167800 - tz.transition 1975, 10, :o1, 182889000 - tz.transition 1976, 4, :o2, 198617400 - tz.transition 1976, 10, :o1, 214338600 - tz.transition 1977, 4, :o2, 230067000 - tz.transition 1977, 10, :o1, 245788200 - tz.transition 1979, 5, :o2, 295385400 - tz.transition 1979, 10, :o1, 309292200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Irkutsk.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Irkutsk.rb deleted file mode 100644 index 2d47d9580b..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Irkutsk.rb +++ /dev/null @@ -1,165 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Irkutsk - include TimezoneDefinition - - timezone 'Asia/Irkutsk' do |tz| - tz.offset :o0, 25040, 0, :LMT - tz.offset :o1, 25040, 0, :IMT - tz.offset :o2, 25200, 0, :IRKT - tz.offset :o3, 28800, 0, :IRKT - tz.offset :o4, 28800, 3600, :IRKST - tz.offset :o5, 25200, 3600, :IRKST - - tz.transition 1879, 12, :o1, 2600332427, 1080 - tz.transition 1920, 1, :o2, 2616136067, 1080 - tz.transition 1930, 6, :o3, 58227557, 24 - tz.transition 1981, 3, :o4, 354902400 - tz.transition 1981, 9, :o3, 370710000 - tz.transition 1982, 3, :o4, 386438400 - tz.transition 1982, 9, :o3, 402246000 - tz.transition 1983, 3, :o4, 417974400 - tz.transition 1983, 9, :o3, 433782000 - tz.transition 1984, 3, :o4, 449596800 - tz.transition 1984, 9, :o3, 465328800 - tz.transition 1985, 3, :o4, 481053600 - tz.transition 1985, 9, :o3, 496778400 - tz.transition 1986, 3, :o4, 512503200 - tz.transition 1986, 9, :o3, 528228000 - tz.transition 1987, 3, :o4, 543952800 - tz.transition 1987, 9, :o3, 559677600 - tz.transition 1988, 3, :o4, 575402400 - tz.transition 1988, 9, :o3, 591127200 - tz.transition 1989, 3, :o4, 606852000 - tz.transition 1989, 9, :o3, 622576800 - tz.transition 1990, 3, :o4, 638301600 - tz.transition 1990, 9, :o3, 654631200 - tz.transition 1991, 3, :o5, 670356000 - tz.transition 1991, 9, :o2, 686084400 - tz.transition 1992, 1, :o3, 695761200 - tz.transition 1992, 3, :o4, 701794800 - tz.transition 1992, 9, :o3, 717516000 - tz.transition 1993, 3, :o4, 733255200 - tz.transition 1993, 9, :o3, 748980000 - tz.transition 1994, 3, :o4, 764704800 - tz.transition 1994, 9, :o3, 780429600 - tz.transition 1995, 3, :o4, 796154400 - tz.transition 1995, 9, :o3, 811879200 - tz.transition 1996, 3, :o4, 828208800 - tz.transition 1996, 10, :o3, 846352800 - tz.transition 1997, 3, :o4, 859658400 - tz.transition 1997, 10, :o3, 877802400 - tz.transition 1998, 3, :o4, 891108000 - tz.transition 1998, 10, :o3, 909252000 - tz.transition 1999, 3, :o4, 922557600 - tz.transition 1999, 10, :o3, 941306400 - tz.transition 2000, 3, :o4, 954007200 - tz.transition 2000, 10, :o3, 972756000 - tz.transition 2001, 3, :o4, 985456800 - tz.transition 2001, 10, :o3, 1004205600 - tz.transition 2002, 3, :o4, 1017511200 - tz.transition 2002, 10, :o3, 1035655200 - tz.transition 2003, 3, :o4, 1048960800 - tz.transition 2003, 10, :o3, 1067104800 - tz.transition 2004, 3, :o4, 1080410400 - tz.transition 2004, 10, :o3, 1099159200 - tz.transition 2005, 3, :o4, 1111860000 - tz.transition 2005, 10, :o3, 1130608800 - tz.transition 2006, 3, :o4, 1143309600 - tz.transition 2006, 10, :o3, 1162058400 - tz.transition 2007, 3, :o4, 1174759200 - tz.transition 2007, 10, :o3, 1193508000 - tz.transition 2008, 3, :o4, 1206813600 - tz.transition 2008, 10, :o3, 1224957600 - tz.transition 2009, 3, :o4, 1238263200 - tz.transition 2009, 10, :o3, 1256407200 - tz.transition 2010, 3, :o4, 1269712800 - tz.transition 2010, 10, :o3, 1288461600 - tz.transition 2011, 3, :o4, 1301162400 - tz.transition 2011, 10, :o3, 1319911200 - tz.transition 2012, 3, :o4, 1332612000 - tz.transition 2012, 10, :o3, 1351360800 - tz.transition 2013, 3, :o4, 1364666400 - tz.transition 2013, 10, :o3, 1382810400 - tz.transition 2014, 3, :o4, 1396116000 - tz.transition 2014, 10, :o3, 1414260000 - tz.transition 2015, 3, :o4, 1427565600 - tz.transition 2015, 10, :o3, 1445709600 - tz.transition 2016, 3, :o4, 1459015200 - tz.transition 2016, 10, :o3, 1477764000 - tz.transition 2017, 3, :o4, 1490464800 - tz.transition 2017, 10, :o3, 1509213600 - tz.transition 2018, 3, :o4, 1521914400 - tz.transition 2018, 10, :o3, 1540663200 - tz.transition 2019, 3, :o4, 1553968800 - tz.transition 2019, 10, :o3, 1572112800 - tz.transition 2020, 3, :o4, 1585418400 - tz.transition 2020, 10, :o3, 1603562400 - tz.transition 2021, 3, :o4, 1616868000 - tz.transition 2021, 10, :o3, 1635616800 - tz.transition 2022, 3, :o4, 1648317600 - tz.transition 2022, 10, :o3, 1667066400 - tz.transition 2023, 3, :o4, 1679767200 - tz.transition 2023, 10, :o3, 1698516000 - tz.transition 2024, 3, :o4, 1711821600 - tz.transition 2024, 10, :o3, 1729965600 - tz.transition 2025, 3, :o4, 1743271200 - tz.transition 2025, 10, :o3, 1761415200 - tz.transition 2026, 3, :o4, 1774720800 - tz.transition 2026, 10, :o3, 1792864800 - tz.transition 2027, 3, :o4, 1806170400 - tz.transition 2027, 10, :o3, 1824919200 - tz.transition 2028, 3, :o4, 1837620000 - tz.transition 2028, 10, :o3, 1856368800 - tz.transition 2029, 3, :o4, 1869069600 - tz.transition 2029, 10, :o3, 1887818400 - tz.transition 2030, 3, :o4, 1901124000 - tz.transition 2030, 10, :o3, 1919268000 - tz.transition 2031, 3, :o4, 1932573600 - tz.transition 2031, 10, :o3, 1950717600 - tz.transition 2032, 3, :o4, 1964023200 - tz.transition 2032, 10, :o3, 1982772000 - tz.transition 2033, 3, :o4, 1995472800 - tz.transition 2033, 10, :o3, 2014221600 - tz.transition 2034, 3, :o4, 2026922400 - tz.transition 2034, 10, :o3, 2045671200 - tz.transition 2035, 3, :o4, 2058372000 - tz.transition 2035, 10, :o3, 2077120800 - tz.transition 2036, 3, :o4, 2090426400 - tz.transition 2036, 10, :o3, 2108570400 - tz.transition 2037, 3, :o4, 2121876000 - tz.transition 2037, 10, :o3, 2140020000 - tz.transition 2038, 3, :o4, 9862041, 4 - tz.transition 2038, 10, :o3, 9862909, 4 - tz.transition 2039, 3, :o4, 9863497, 4 - tz.transition 2039, 10, :o3, 9864365, 4 - tz.transition 2040, 3, :o4, 9864953, 4 - tz.transition 2040, 10, :o3, 9865821, 4 - tz.transition 2041, 3, :o4, 9866437, 4 - tz.transition 2041, 10, :o3, 9867277, 4 - tz.transition 2042, 3, :o4, 9867893, 4 - tz.transition 2042, 10, :o3, 9868733, 4 - tz.transition 2043, 3, :o4, 9869349, 4 - tz.transition 2043, 10, :o3, 9870189, 4 - tz.transition 2044, 3, :o4, 9870805, 4 - tz.transition 2044, 10, :o3, 9871673, 4 - tz.transition 2045, 3, :o4, 9872261, 4 - tz.transition 2045, 10, :o3, 9873129, 4 - tz.transition 2046, 3, :o4, 9873717, 4 - tz.transition 2046, 10, :o3, 9874585, 4 - tz.transition 2047, 3, :o4, 9875201, 4 - tz.transition 2047, 10, :o3, 9876041, 4 - tz.transition 2048, 3, :o4, 9876657, 4 - tz.transition 2048, 10, :o3, 9877497, 4 - tz.transition 2049, 3, :o4, 9878113, 4 - tz.transition 2049, 10, :o3, 9878981, 4 - tz.transition 2050, 3, :o4, 9879569, 4 - tz.transition 2050, 10, :o3, 9880437, 4 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jakarta.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jakarta.rb deleted file mode 100644 index cc58fa173b..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jakarta.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Jakarta - include TimezoneDefinition - - timezone 'Asia/Jakarta' do |tz| - tz.offset :o0, 25632, 0, :LMT - tz.offset :o1, 25632, 0, :JMT - tz.offset :o2, 26400, 0, :JAVT - tz.offset :o3, 27000, 0, :WIT - tz.offset :o4, 32400, 0, :JST - tz.offset :o5, 28800, 0, :WIT - tz.offset :o6, 25200, 0, :WIT - - tz.transition 1867, 8, :o1, 720956461, 300 - tz.transition 1923, 12, :o2, 87256267, 36 - tz.transition 1932, 10, :o3, 87372439, 36 - tz.transition 1942, 3, :o4, 38887059, 16 - tz.transition 1945, 9, :o3, 19453769, 8 - tz.transition 1948, 4, :o5, 38922755, 16 - tz.transition 1950, 4, :o3, 14600413, 6 - tz.transition 1963, 12, :o6, 39014323, 16 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jerusalem.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jerusalem.rb deleted file mode 100644 index 9b737b899e..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Jerusalem.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Jerusalem - include TimezoneDefinition - - timezone 'Asia/Jerusalem' do |tz| - tz.offset :o0, 8456, 0, :LMT - tz.offset :o1, 8440, 0, :JMT - tz.offset :o2, 7200, 0, :IST - tz.offset :o3, 7200, 3600, :IDT - tz.offset :o4, 7200, 7200, :IDDT - - tz.transition 1879, 12, :o1, 26003326343, 10800 - tz.transition 1917, 12, :o2, 5230643909, 2160 - tz.transition 1940, 5, :o3, 29157377, 12 - tz.transition 1942, 10, :o2, 19445315, 8 - tz.transition 1943, 4, :o3, 4861631, 2 - tz.transition 1943, 10, :o2, 19448235, 8 - tz.transition 1944, 3, :o3, 29174177, 12 - tz.transition 1944, 10, :o2, 19451163, 8 - tz.transition 1945, 4, :o3, 29178737, 12 - tz.transition 1945, 10, :o2, 58362251, 24 - tz.transition 1946, 4, :o3, 4863853, 2 - tz.transition 1946, 10, :o2, 19457003, 8 - tz.transition 1948, 5, :o4, 29192333, 12 - tz.transition 1948, 8, :o3, 7298386, 3 - tz.transition 1948, 10, :o2, 58388555, 24 - tz.transition 1949, 4, :o3, 29196449, 12 - tz.transition 1949, 10, :o2, 58397315, 24 - tz.transition 1950, 4, :o3, 29200649, 12 - tz.transition 1950, 9, :o2, 4867079, 2 - tz.transition 1951, 3, :o3, 29204849, 12 - tz.transition 1951, 11, :o2, 4867923, 2 - tz.transition 1952, 4, :o3, 4868245, 2 - tz.transition 1952, 10, :o2, 4868609, 2 - tz.transition 1953, 4, :o3, 4868959, 2 - tz.transition 1953, 9, :o2, 4869267, 2 - tz.transition 1954, 6, :o3, 29218877, 12 - tz.transition 1954, 9, :o2, 19479979, 8 - tz.transition 1955, 6, :o3, 4870539, 2 - tz.transition 1955, 9, :o2, 19482891, 8 - tz.transition 1956, 6, :o3, 29227529, 12 - tz.transition 1956, 9, :o2, 4871493, 2 - tz.transition 1957, 4, :o3, 4871915, 2 - tz.transition 1957, 9, :o2, 19488827, 8 - tz.transition 1974, 7, :o3, 142380000 - tz.transition 1974, 10, :o2, 150843600 - tz.transition 1975, 4, :o3, 167176800 - tz.transition 1975, 8, :o2, 178664400 - tz.transition 1985, 4, :o3, 482277600 - tz.transition 1985, 9, :o2, 495579600 - tz.transition 1986, 5, :o3, 516751200 - tz.transition 1986, 9, :o2, 526424400 - tz.transition 1987, 4, :o3, 545436000 - tz.transition 1987, 9, :o2, 558478800 - tz.transition 1988, 4, :o3, 576540000 - tz.transition 1988, 9, :o2, 589237200 - tz.transition 1989, 4, :o3, 609890400 - tz.transition 1989, 9, :o2, 620773200 - tz.transition 1990, 3, :o3, 638316000 - tz.transition 1990, 8, :o2, 651618000 - tz.transition 1991, 3, :o3, 669765600 - tz.transition 1991, 8, :o2, 683672400 - tz.transition 1992, 3, :o3, 701820000 - tz.transition 1992, 9, :o2, 715726800 - tz.transition 1993, 4, :o3, 733701600 - tz.transition 1993, 9, :o2, 747176400 - tz.transition 1994, 3, :o3, 765151200 - tz.transition 1994, 8, :o2, 778021200 - tz.transition 1995, 3, :o3, 796600800 - tz.transition 1995, 9, :o2, 810075600 - tz.transition 1996, 3, :o3, 826840800 - tz.transition 1996, 9, :o2, 842821200 - tz.transition 1997, 3, :o3, 858895200 - tz.transition 1997, 9, :o2, 874184400 - tz.transition 1998, 3, :o3, 890344800 - tz.transition 1998, 9, :o2, 905029200 - tz.transition 1999, 4, :o3, 923011200 - tz.transition 1999, 9, :o2, 936313200 - tz.transition 2000, 4, :o3, 955670400 - tz.transition 2000, 10, :o2, 970783200 - tz.transition 2001, 4, :o3, 986770800 - tz.transition 2001, 9, :o2, 1001282400 - tz.transition 2002, 3, :o3, 1017356400 - tz.transition 2002, 10, :o2, 1033941600 - tz.transition 2003, 3, :o3, 1048806000 - tz.transition 2003, 10, :o2, 1065132000 - tz.transition 2004, 4, :o3, 1081292400 - tz.transition 2004, 9, :o2, 1095804000 - tz.transition 2005, 4, :o3, 1112313600 - tz.transition 2005, 10, :o2, 1128812400 - tz.transition 2006, 3, :o3, 1143763200 - tz.transition 2006, 9, :o2, 1159657200 - tz.transition 2007, 3, :o3, 1175212800 - tz.transition 2007, 9, :o2, 1189897200 - tz.transition 2008, 3, :o3, 1206662400 - tz.transition 2008, 10, :o2, 1223161200 - tz.transition 2009, 3, :o3, 1238112000 - tz.transition 2009, 9, :o2, 1254006000 - tz.transition 2010, 3, :o3, 1269561600 - tz.transition 2010, 9, :o2, 1284246000 - tz.transition 2011, 4, :o3, 1301616000 - tz.transition 2011, 10, :o2, 1317510000 - tz.transition 2012, 3, :o3, 1333065600 - tz.transition 2012, 9, :o2, 1348354800 - tz.transition 2013, 3, :o3, 1364515200 - tz.transition 2013, 9, :o2, 1378594800 - tz.transition 2014, 3, :o3, 1395964800 - tz.transition 2014, 9, :o2, 1411858800 - tz.transition 2015, 3, :o3, 1427414400 - tz.transition 2015, 9, :o2, 1442703600 - tz.transition 2016, 4, :o3, 1459468800 - tz.transition 2016, 10, :o2, 1475967600 - tz.transition 2017, 3, :o3, 1490918400 - tz.transition 2017, 9, :o2, 1506207600 - tz.transition 2018, 3, :o3, 1522368000 - tz.transition 2018, 9, :o2, 1537052400 - tz.transition 2019, 3, :o3, 1553817600 - tz.transition 2019, 10, :o2, 1570316400 - tz.transition 2020, 3, :o3, 1585267200 - tz.transition 2020, 9, :o2, 1601161200 - tz.transition 2021, 3, :o3, 1616716800 - tz.transition 2021, 9, :o2, 1631401200 - tz.transition 2022, 4, :o3, 1648771200 - tz.transition 2022, 10, :o2, 1664665200 - tz.transition 2023, 3, :o3, 1680220800 - tz.transition 2023, 9, :o2, 1695510000 - tz.transition 2024, 3, :o3, 1711670400 - tz.transition 2024, 10, :o2, 1728169200 - tz.transition 2025, 3, :o3, 1743120000 - tz.transition 2025, 9, :o2, 1759014000 - tz.transition 2026, 3, :o3, 1774569600 - tz.transition 2026, 9, :o2, 1789858800 - tz.transition 2027, 3, :o3, 1806019200 - tz.transition 2027, 10, :o2, 1823122800 - tz.transition 2028, 3, :o3, 1838073600 - tz.transition 2028, 9, :o2, 1853362800 - tz.transition 2029, 3, :o3, 1869523200 - tz.transition 2029, 9, :o2, 1884207600 - tz.transition 2030, 3, :o3, 1900972800 - tz.transition 2030, 10, :o2, 1917471600 - tz.transition 2031, 3, :o3, 1932422400 - tz.transition 2031, 9, :o2, 1947711600 - tz.transition 2032, 3, :o3, 1963872000 - tz.transition 2032, 9, :o2, 1978556400 - tz.transition 2033, 4, :o3, 1995926400 - tz.transition 2033, 10, :o2, 2011820400 - tz.transition 2034, 3, :o3, 2027376000 - tz.transition 2034, 9, :o2, 2042060400 - tz.transition 2035, 3, :o3, 2058825600 - tz.transition 2035, 10, :o2, 2075324400 - tz.transition 2036, 3, :o3, 2090275200 - tz.transition 2036, 9, :o2, 2106169200 - tz.transition 2037, 3, :o3, 2121724800 - tz.transition 2037, 9, :o2, 2136409200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kabul.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kabul.rb deleted file mode 100644 index 669c09790a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kabul.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kabul - include TimezoneDefinition - - timezone 'Asia/Kabul' do |tz| - tz.offset :o0, 16608, 0, :LMT - tz.offset :o1, 14400, 0, :AFT - tz.offset :o2, 16200, 0, :AFT - - tz.transition 1889, 12, :o1, 2170231477, 900 - tz.transition 1944, 12, :o2, 7294369, 3 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kamchatka.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kamchatka.rb deleted file mode 100644 index 2f1690b3a9..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kamchatka.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kamchatka - include TimezoneDefinition - - timezone 'Asia/Kamchatka' do |tz| - tz.offset :o0, 38076, 0, :LMT - tz.offset :o1, 39600, 0, :PETT - tz.offset :o2, 43200, 0, :PETT - tz.offset :o3, 43200, 3600, :PETST - tz.offset :o4, 39600, 3600, :PETST - - tz.transition 1922, 11, :o1, 17448250027, 7200 - tz.transition 1930, 6, :o2, 58227553, 24 - tz.transition 1981, 3, :o3, 354888000 - tz.transition 1981, 9, :o2, 370695600 - tz.transition 1982, 3, :o3, 386424000 - tz.transition 1982, 9, :o2, 402231600 - tz.transition 1983, 3, :o3, 417960000 - tz.transition 1983, 9, :o2, 433767600 - tz.transition 1984, 3, :o3, 449582400 - tz.transition 1984, 9, :o2, 465314400 - tz.transition 1985, 3, :o3, 481039200 - tz.transition 1985, 9, :o2, 496764000 - tz.transition 1986, 3, :o3, 512488800 - tz.transition 1986, 9, :o2, 528213600 - tz.transition 1987, 3, :o3, 543938400 - tz.transition 1987, 9, :o2, 559663200 - tz.transition 1988, 3, :o3, 575388000 - tz.transition 1988, 9, :o2, 591112800 - tz.transition 1989, 3, :o3, 606837600 - tz.transition 1989, 9, :o2, 622562400 - tz.transition 1990, 3, :o3, 638287200 - tz.transition 1990, 9, :o2, 654616800 - tz.transition 1991, 3, :o4, 670341600 - tz.transition 1991, 9, :o1, 686070000 - tz.transition 1992, 1, :o2, 695746800 - tz.transition 1992, 3, :o3, 701780400 - tz.transition 1992, 9, :o2, 717501600 - tz.transition 1993, 3, :o3, 733240800 - tz.transition 1993, 9, :o2, 748965600 - tz.transition 1994, 3, :o3, 764690400 - tz.transition 1994, 9, :o2, 780415200 - tz.transition 1995, 3, :o3, 796140000 - tz.transition 1995, 9, :o2, 811864800 - tz.transition 1996, 3, :o3, 828194400 - tz.transition 1996, 10, :o2, 846338400 - tz.transition 1997, 3, :o3, 859644000 - tz.transition 1997, 10, :o2, 877788000 - tz.transition 1998, 3, :o3, 891093600 - tz.transition 1998, 10, :o2, 909237600 - tz.transition 1999, 3, :o3, 922543200 - tz.transition 1999, 10, :o2, 941292000 - tz.transition 2000, 3, :o3, 953992800 - tz.transition 2000, 10, :o2, 972741600 - tz.transition 2001, 3, :o3, 985442400 - tz.transition 2001, 10, :o2, 1004191200 - tz.transition 2002, 3, :o3, 1017496800 - tz.transition 2002, 10, :o2, 1035640800 - tz.transition 2003, 3, :o3, 1048946400 - tz.transition 2003, 10, :o2, 1067090400 - tz.transition 2004, 3, :o3, 1080396000 - tz.transition 2004, 10, :o2, 1099144800 - tz.transition 2005, 3, :o3, 1111845600 - tz.transition 2005, 10, :o2, 1130594400 - tz.transition 2006, 3, :o3, 1143295200 - tz.transition 2006, 10, :o2, 1162044000 - tz.transition 2007, 3, :o3, 1174744800 - tz.transition 2007, 10, :o2, 1193493600 - tz.transition 2008, 3, :o3, 1206799200 - tz.transition 2008, 10, :o2, 1224943200 - tz.transition 2009, 3, :o3, 1238248800 - tz.transition 2009, 10, :o2, 1256392800 - tz.transition 2010, 3, :o3, 1269698400 - tz.transition 2010, 10, :o2, 1288447200 - tz.transition 2011, 3, :o3, 1301148000 - tz.transition 2011, 10, :o2, 1319896800 - tz.transition 2012, 3, :o3, 1332597600 - tz.transition 2012, 10, :o2, 1351346400 - tz.transition 2013, 3, :o3, 1364652000 - tz.transition 2013, 10, :o2, 1382796000 - tz.transition 2014, 3, :o3, 1396101600 - tz.transition 2014, 10, :o2, 1414245600 - tz.transition 2015, 3, :o3, 1427551200 - tz.transition 2015, 10, :o2, 1445695200 - tz.transition 2016, 3, :o3, 1459000800 - tz.transition 2016, 10, :o2, 1477749600 - tz.transition 2017, 3, :o3, 1490450400 - tz.transition 2017, 10, :o2, 1509199200 - tz.transition 2018, 3, :o3, 1521900000 - tz.transition 2018, 10, :o2, 1540648800 - tz.transition 2019, 3, :o3, 1553954400 - tz.transition 2019, 10, :o2, 1572098400 - tz.transition 2020, 3, :o3, 1585404000 - tz.transition 2020, 10, :o2, 1603548000 - tz.transition 2021, 3, :o3, 1616853600 - tz.transition 2021, 10, :o2, 1635602400 - tz.transition 2022, 3, :o3, 1648303200 - tz.transition 2022, 10, :o2, 1667052000 - tz.transition 2023, 3, :o3, 1679752800 - tz.transition 2023, 10, :o2, 1698501600 - tz.transition 2024, 3, :o3, 1711807200 - tz.transition 2024, 10, :o2, 1729951200 - tz.transition 2025, 3, :o3, 1743256800 - tz.transition 2025, 10, :o2, 1761400800 - tz.transition 2026, 3, :o3, 1774706400 - tz.transition 2026, 10, :o2, 1792850400 - tz.transition 2027, 3, :o3, 1806156000 - tz.transition 2027, 10, :o2, 1824904800 - tz.transition 2028, 3, :o3, 1837605600 - tz.transition 2028, 10, :o2, 1856354400 - tz.transition 2029, 3, :o3, 1869055200 - tz.transition 2029, 10, :o2, 1887804000 - tz.transition 2030, 3, :o3, 1901109600 - tz.transition 2030, 10, :o2, 1919253600 - tz.transition 2031, 3, :o3, 1932559200 - tz.transition 2031, 10, :o2, 1950703200 - tz.transition 2032, 3, :o3, 1964008800 - tz.transition 2032, 10, :o2, 1982757600 - tz.transition 2033, 3, :o3, 1995458400 - tz.transition 2033, 10, :o2, 2014207200 - tz.transition 2034, 3, :o3, 2026908000 - tz.transition 2034, 10, :o2, 2045656800 - tz.transition 2035, 3, :o3, 2058357600 - tz.transition 2035, 10, :o2, 2077106400 - tz.transition 2036, 3, :o3, 2090412000 - tz.transition 2036, 10, :o2, 2108556000 - tz.transition 2037, 3, :o3, 2121861600 - tz.transition 2037, 10, :o2, 2140005600 - tz.transition 2038, 3, :o3, 29586121, 12 - tz.transition 2038, 10, :o2, 29588725, 12 - tz.transition 2039, 3, :o3, 29590489, 12 - tz.transition 2039, 10, :o2, 29593093, 12 - tz.transition 2040, 3, :o3, 29594857, 12 - tz.transition 2040, 10, :o2, 29597461, 12 - tz.transition 2041, 3, :o3, 29599309, 12 - tz.transition 2041, 10, :o2, 29601829, 12 - tz.transition 2042, 3, :o3, 29603677, 12 - tz.transition 2042, 10, :o2, 29606197, 12 - tz.transition 2043, 3, :o3, 29608045, 12 - tz.transition 2043, 10, :o2, 29610565, 12 - tz.transition 2044, 3, :o3, 29612413, 12 - tz.transition 2044, 10, :o2, 29615017, 12 - tz.transition 2045, 3, :o3, 29616781, 12 - tz.transition 2045, 10, :o2, 29619385, 12 - tz.transition 2046, 3, :o3, 29621149, 12 - tz.transition 2046, 10, :o2, 29623753, 12 - tz.transition 2047, 3, :o3, 29625601, 12 - tz.transition 2047, 10, :o2, 29628121, 12 - tz.transition 2048, 3, :o3, 29629969, 12 - tz.transition 2048, 10, :o2, 29632489, 12 - tz.transition 2049, 3, :o3, 29634337, 12 - tz.transition 2049, 10, :o2, 29636941, 12 - tz.transition 2050, 3, :o3, 29638705, 12 - tz.transition 2050, 10, :o2, 29641309, 12 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Karachi.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Karachi.rb deleted file mode 100644 index dfe02c5cf6..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Karachi.rb +++ /dev/null @@ -1,114 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Karachi - include TimezoneDefinition - - timezone 'Asia/Karachi' do |tz| - tz.offset :o0, 16092, 0, :LMT - tz.offset :o1, 19800, 0, :IST - tz.offset :o2, 19800, 3600, :IST - tz.offset :o3, 18000, 0, :KART - tz.offset :o4, 18000, 0, :PKT - tz.offset :o5, 18000, 3600, :PKST - - tz.transition 1906, 12, :o1, 1934061051, 800 - tz.transition 1942, 8, :o2, 116668957, 48 - tz.transition 1945, 10, :o1, 116723675, 48 - tz.transition 1951, 9, :o3, 116828125, 48 - tz.transition 1971, 3, :o4, 38775600 - tz.transition 2002, 4, :o5, 1018119660 - tz.transition 2002, 10, :o4, 1033840860 - tz.transition 2008, 5, :o5, 1212260400 - tz.transition 2008, 10, :o4, 1225476000 - tz.transition 2009, 4, :o5, 1239735600 - tz.transition 2009, 10, :o4, 1257012000 - tz.transition 2010, 4, :o5, 1271271600 - tz.transition 2010, 10, :o4, 1288548000 - tz.transition 2011, 4, :o5, 1302807600 - tz.transition 2011, 10, :o4, 1320084000 - tz.transition 2012, 4, :o5, 1334430000 - tz.transition 2012, 10, :o4, 1351706400 - tz.transition 2013, 4, :o5, 1365966000 - tz.transition 2013, 10, :o4, 1383242400 - tz.transition 2014, 4, :o5, 1397502000 - tz.transition 2014, 10, :o4, 1414778400 - tz.transition 2015, 4, :o5, 1429038000 - tz.transition 2015, 10, :o4, 1446314400 - tz.transition 2016, 4, :o5, 1460660400 - tz.transition 2016, 10, :o4, 1477936800 - tz.transition 2017, 4, :o5, 1492196400 - tz.transition 2017, 10, :o4, 1509472800 - tz.transition 2018, 4, :o5, 1523732400 - tz.transition 2018, 10, :o4, 1541008800 - tz.transition 2019, 4, :o5, 1555268400 - tz.transition 2019, 10, :o4, 1572544800 - tz.transition 2020, 4, :o5, 1586890800 - tz.transition 2020, 10, :o4, 1604167200 - tz.transition 2021, 4, :o5, 1618426800 - tz.transition 2021, 10, :o4, 1635703200 - tz.transition 2022, 4, :o5, 1649962800 - tz.transition 2022, 10, :o4, 1667239200 - tz.transition 2023, 4, :o5, 1681498800 - tz.transition 2023, 10, :o4, 1698775200 - tz.transition 2024, 4, :o5, 1713121200 - tz.transition 2024, 10, :o4, 1730397600 - tz.transition 2025, 4, :o5, 1744657200 - tz.transition 2025, 10, :o4, 1761933600 - tz.transition 2026, 4, :o5, 1776193200 - tz.transition 2026, 10, :o4, 1793469600 - tz.transition 2027, 4, :o5, 1807729200 - tz.transition 2027, 10, :o4, 1825005600 - tz.transition 2028, 4, :o5, 1839351600 - tz.transition 2028, 10, :o4, 1856628000 - tz.transition 2029, 4, :o5, 1870887600 - tz.transition 2029, 10, :o4, 1888164000 - tz.transition 2030, 4, :o5, 1902423600 - tz.transition 2030, 10, :o4, 1919700000 - tz.transition 2031, 4, :o5, 1933959600 - tz.transition 2031, 10, :o4, 1951236000 - tz.transition 2032, 4, :o5, 1965582000 - tz.transition 2032, 10, :o4, 1982858400 - tz.transition 2033, 4, :o5, 1997118000 - tz.transition 2033, 10, :o4, 2014394400 - tz.transition 2034, 4, :o5, 2028654000 - tz.transition 2034, 10, :o4, 2045930400 - tz.transition 2035, 4, :o5, 2060190000 - tz.transition 2035, 10, :o4, 2077466400 - tz.transition 2036, 4, :o5, 2091812400 - tz.transition 2036, 10, :o4, 2109088800 - tz.transition 2037, 4, :o5, 2123348400 - tz.transition 2037, 10, :o4, 2140624800 - tz.transition 2038, 4, :o5, 59172679, 24 - tz.transition 2038, 10, :o4, 9862913, 4 - tz.transition 2039, 4, :o5, 59181439, 24 - tz.transition 2039, 10, :o4, 9864373, 4 - tz.transition 2040, 4, :o5, 59190223, 24 - tz.transition 2040, 10, :o4, 9865837, 4 - tz.transition 2041, 4, :o5, 59198983, 24 - tz.transition 2041, 10, :o4, 9867297, 4 - tz.transition 2042, 4, :o5, 59207743, 24 - tz.transition 2042, 10, :o4, 9868757, 4 - tz.transition 2043, 4, :o5, 59216503, 24 - tz.transition 2043, 10, :o4, 9870217, 4 - tz.transition 2044, 4, :o5, 59225287, 24 - tz.transition 2044, 10, :o4, 9871681, 4 - tz.transition 2045, 4, :o5, 59234047, 24 - tz.transition 2045, 10, :o4, 9873141, 4 - tz.transition 2046, 4, :o5, 59242807, 24 - tz.transition 2046, 10, :o4, 9874601, 4 - tz.transition 2047, 4, :o5, 59251567, 24 - tz.transition 2047, 10, :o4, 9876061, 4 - tz.transition 2048, 4, :o5, 59260351, 24 - tz.transition 2048, 10, :o4, 9877525, 4 - tz.transition 2049, 4, :o5, 59269111, 24 - tz.transition 2049, 10, :o4, 9878985, 4 - tz.transition 2050, 4, :o5, 59277871, 24 - tz.transition 2050, 10, :o4, 9880445, 4 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kathmandu.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kathmandu.rb deleted file mode 100644 index 37b241612e..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kathmandu.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kathmandu - include TimezoneDefinition - - timezone 'Asia/Kathmandu' do |tz| - tz.offset :o0, 20476, 0, :LMT - tz.offset :o1, 19800, 0, :IST - tz.offset :o2, 20700, 0, :NPT - - tz.transition 1919, 12, :o1, 52322204081, 21600 - tz.transition 1985, 12, :o2, 504901800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kolkata.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kolkata.rb deleted file mode 100644 index 1b6ffbd59d..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kolkata.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kolkata - include TimezoneDefinition - - timezone 'Asia/Kolkata' do |tz| - tz.offset :o0, 21208, 0, :LMT - tz.offset :o1, 21200, 0, :HMT - tz.offset :o2, 23400, 0, :BURT - tz.offset :o3, 19800, 0, :IST - tz.offset :o4, 19800, 3600, :IST - - tz.transition 1879, 12, :o1, 26003324749, 10800 - tz.transition 1941, 9, :o2, 524937943, 216 - tz.transition 1942, 5, :o3, 116663723, 48 - tz.transition 1942, 8, :o4, 116668957, 48 - tz.transition 1945, 10, :o3, 116723675, 48 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Krasnoyarsk.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Krasnoyarsk.rb deleted file mode 100644 index d6c503c155..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Krasnoyarsk.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Krasnoyarsk - include TimezoneDefinition - - timezone 'Asia/Krasnoyarsk' do |tz| - tz.offset :o0, 22280, 0, :LMT - tz.offset :o1, 21600, 0, :KRAT - tz.offset :o2, 25200, 0, :KRAT - tz.offset :o3, 25200, 3600, :KRAST - tz.offset :o4, 21600, 3600, :KRAST - - tz.transition 1920, 1, :o1, 5232231163, 2160 - tz.transition 1930, 6, :o2, 9704593, 4 - tz.transition 1981, 3, :o3, 354906000 - tz.transition 1981, 9, :o2, 370713600 - tz.transition 1982, 3, :o3, 386442000 - tz.transition 1982, 9, :o2, 402249600 - tz.transition 1983, 3, :o3, 417978000 - tz.transition 1983, 9, :o2, 433785600 - tz.transition 1984, 3, :o3, 449600400 - tz.transition 1984, 9, :o2, 465332400 - tz.transition 1985, 3, :o3, 481057200 - tz.transition 1985, 9, :o2, 496782000 - tz.transition 1986, 3, :o3, 512506800 - tz.transition 1986, 9, :o2, 528231600 - tz.transition 1987, 3, :o3, 543956400 - tz.transition 1987, 9, :o2, 559681200 - tz.transition 1988, 3, :o3, 575406000 - tz.transition 1988, 9, :o2, 591130800 - tz.transition 1989, 3, :o3, 606855600 - tz.transition 1989, 9, :o2, 622580400 - tz.transition 1990, 3, :o3, 638305200 - tz.transition 1990, 9, :o2, 654634800 - tz.transition 1991, 3, :o4, 670359600 - tz.transition 1991, 9, :o1, 686088000 - tz.transition 1992, 1, :o2, 695764800 - tz.transition 1992, 3, :o3, 701798400 - tz.transition 1992, 9, :o2, 717519600 - tz.transition 1993, 3, :o3, 733258800 - tz.transition 1993, 9, :o2, 748983600 - tz.transition 1994, 3, :o3, 764708400 - tz.transition 1994, 9, :o2, 780433200 - tz.transition 1995, 3, :o3, 796158000 - tz.transition 1995, 9, :o2, 811882800 - tz.transition 1996, 3, :o3, 828212400 - tz.transition 1996, 10, :o2, 846356400 - tz.transition 1997, 3, :o3, 859662000 - tz.transition 1997, 10, :o2, 877806000 - tz.transition 1998, 3, :o3, 891111600 - tz.transition 1998, 10, :o2, 909255600 - tz.transition 1999, 3, :o3, 922561200 - tz.transition 1999, 10, :o2, 941310000 - tz.transition 2000, 3, :o3, 954010800 - tz.transition 2000, 10, :o2, 972759600 - tz.transition 2001, 3, :o3, 985460400 - tz.transition 2001, 10, :o2, 1004209200 - tz.transition 2002, 3, :o3, 1017514800 - tz.transition 2002, 10, :o2, 1035658800 - tz.transition 2003, 3, :o3, 1048964400 - tz.transition 2003, 10, :o2, 1067108400 - tz.transition 2004, 3, :o3, 1080414000 - tz.transition 2004, 10, :o2, 1099162800 - tz.transition 2005, 3, :o3, 1111863600 - tz.transition 2005, 10, :o2, 1130612400 - tz.transition 2006, 3, :o3, 1143313200 - tz.transition 2006, 10, :o2, 1162062000 - tz.transition 2007, 3, :o3, 1174762800 - tz.transition 2007, 10, :o2, 1193511600 - tz.transition 2008, 3, :o3, 1206817200 - tz.transition 2008, 10, :o2, 1224961200 - tz.transition 2009, 3, :o3, 1238266800 - tz.transition 2009, 10, :o2, 1256410800 - tz.transition 2010, 3, :o3, 1269716400 - tz.transition 2010, 10, :o2, 1288465200 - tz.transition 2011, 3, :o3, 1301166000 - tz.transition 2011, 10, :o2, 1319914800 - tz.transition 2012, 3, :o3, 1332615600 - tz.transition 2012, 10, :o2, 1351364400 - tz.transition 2013, 3, :o3, 1364670000 - tz.transition 2013, 10, :o2, 1382814000 - tz.transition 2014, 3, :o3, 1396119600 - tz.transition 2014, 10, :o2, 1414263600 - tz.transition 2015, 3, :o3, 1427569200 - tz.transition 2015, 10, :o2, 1445713200 - tz.transition 2016, 3, :o3, 1459018800 - tz.transition 2016, 10, :o2, 1477767600 - tz.transition 2017, 3, :o3, 1490468400 - tz.transition 2017, 10, :o2, 1509217200 - tz.transition 2018, 3, :o3, 1521918000 - tz.transition 2018, 10, :o2, 1540666800 - tz.transition 2019, 3, :o3, 1553972400 - tz.transition 2019, 10, :o2, 1572116400 - tz.transition 2020, 3, :o3, 1585422000 - tz.transition 2020, 10, :o2, 1603566000 - tz.transition 2021, 3, :o3, 1616871600 - tz.transition 2021, 10, :o2, 1635620400 - tz.transition 2022, 3, :o3, 1648321200 - tz.transition 2022, 10, :o2, 1667070000 - tz.transition 2023, 3, :o3, 1679770800 - tz.transition 2023, 10, :o2, 1698519600 - tz.transition 2024, 3, :o3, 1711825200 - tz.transition 2024, 10, :o2, 1729969200 - tz.transition 2025, 3, :o3, 1743274800 - tz.transition 2025, 10, :o2, 1761418800 - tz.transition 2026, 3, :o3, 1774724400 - tz.transition 2026, 10, :o2, 1792868400 - tz.transition 2027, 3, :o3, 1806174000 - tz.transition 2027, 10, :o2, 1824922800 - tz.transition 2028, 3, :o3, 1837623600 - tz.transition 2028, 10, :o2, 1856372400 - tz.transition 2029, 3, :o3, 1869073200 - tz.transition 2029, 10, :o2, 1887822000 - tz.transition 2030, 3, :o3, 1901127600 - tz.transition 2030, 10, :o2, 1919271600 - tz.transition 2031, 3, :o3, 1932577200 - tz.transition 2031, 10, :o2, 1950721200 - tz.transition 2032, 3, :o3, 1964026800 - tz.transition 2032, 10, :o2, 1982775600 - tz.transition 2033, 3, :o3, 1995476400 - tz.transition 2033, 10, :o2, 2014225200 - tz.transition 2034, 3, :o3, 2026926000 - tz.transition 2034, 10, :o2, 2045674800 - tz.transition 2035, 3, :o3, 2058375600 - tz.transition 2035, 10, :o2, 2077124400 - tz.transition 2036, 3, :o3, 2090430000 - tz.transition 2036, 10, :o2, 2108574000 - tz.transition 2037, 3, :o3, 2121879600 - tz.transition 2037, 10, :o2, 2140023600 - tz.transition 2038, 3, :o3, 59172247, 24 - tz.transition 2038, 10, :o2, 59177455, 24 - tz.transition 2039, 3, :o3, 59180983, 24 - tz.transition 2039, 10, :o2, 59186191, 24 - tz.transition 2040, 3, :o3, 59189719, 24 - tz.transition 2040, 10, :o2, 59194927, 24 - tz.transition 2041, 3, :o3, 59198623, 24 - tz.transition 2041, 10, :o2, 59203663, 24 - tz.transition 2042, 3, :o3, 59207359, 24 - tz.transition 2042, 10, :o2, 59212399, 24 - tz.transition 2043, 3, :o3, 59216095, 24 - tz.transition 2043, 10, :o2, 59221135, 24 - tz.transition 2044, 3, :o3, 59224831, 24 - tz.transition 2044, 10, :o2, 59230039, 24 - tz.transition 2045, 3, :o3, 59233567, 24 - tz.transition 2045, 10, :o2, 59238775, 24 - tz.transition 2046, 3, :o3, 59242303, 24 - tz.transition 2046, 10, :o2, 59247511, 24 - tz.transition 2047, 3, :o3, 59251207, 24 - tz.transition 2047, 10, :o2, 59256247, 24 - tz.transition 2048, 3, :o3, 59259943, 24 - tz.transition 2048, 10, :o2, 59264983, 24 - tz.transition 2049, 3, :o3, 59268679, 24 - tz.transition 2049, 10, :o2, 59273887, 24 - tz.transition 2050, 3, :o3, 59277415, 24 - tz.transition 2050, 10, :o2, 59282623, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb deleted file mode 100644 index 77a0c206fa..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuala_Lumpur.rb +++ /dev/null @@ -1,31 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kuala_Lumpur - include TimezoneDefinition - - timezone 'Asia/Kuala_Lumpur' do |tz| - tz.offset :o0, 24406, 0, :LMT - tz.offset :o1, 24925, 0, :SMT - tz.offset :o2, 25200, 0, :MALT - tz.offset :o3, 25200, 1200, :MALST - tz.offset :o4, 26400, 0, :MALT - tz.offset :o5, 27000, 0, :MALT - tz.offset :o6, 32400, 0, :JST - tz.offset :o7, 28800, 0, :MYT - - tz.transition 1900, 12, :o1, 104344641397, 43200 - tz.transition 1905, 5, :o2, 8353142363, 3456 - tz.transition 1932, 12, :o3, 58249757, 24 - tz.transition 1935, 12, :o4, 87414055, 36 - tz.transition 1941, 8, :o5, 87488575, 36 - tz.transition 1942, 2, :o6, 38886499, 16 - tz.transition 1945, 9, :o5, 19453681, 8 - tz.transition 1981, 12, :o7, 378664200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuwait.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuwait.rb deleted file mode 100644 index 5bd5283197..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Kuwait.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kuwait - include TimezoneDefinition - - timezone 'Asia/Kuwait' do |tz| - tz.offset :o0, 11516, 0, :LMT - tz.offset :o1, 10800, 0, :AST - - tz.transition 1949, 12, :o1, 52558899121, 21600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Magadan.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Magadan.rb deleted file mode 100644 index 302093693e..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Magadan.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Magadan - include TimezoneDefinition - - timezone 'Asia/Magadan' do |tz| - tz.offset :o0, 36192, 0, :LMT - tz.offset :o1, 36000, 0, :MAGT - tz.offset :o2, 39600, 0, :MAGT - tz.offset :o3, 39600, 3600, :MAGST - tz.offset :o4, 36000, 3600, :MAGST - - tz.transition 1924, 5, :o1, 2181516373, 900 - tz.transition 1930, 6, :o2, 29113777, 12 - tz.transition 1981, 3, :o3, 354891600 - tz.transition 1981, 9, :o2, 370699200 - tz.transition 1982, 3, :o3, 386427600 - tz.transition 1982, 9, :o2, 402235200 - tz.transition 1983, 3, :o3, 417963600 - tz.transition 1983, 9, :o2, 433771200 - tz.transition 1984, 3, :o3, 449586000 - tz.transition 1984, 9, :o2, 465318000 - tz.transition 1985, 3, :o3, 481042800 - tz.transition 1985, 9, :o2, 496767600 - tz.transition 1986, 3, :o3, 512492400 - tz.transition 1986, 9, :o2, 528217200 - tz.transition 1987, 3, :o3, 543942000 - tz.transition 1987, 9, :o2, 559666800 - tz.transition 1988, 3, :o3, 575391600 - tz.transition 1988, 9, :o2, 591116400 - tz.transition 1989, 3, :o3, 606841200 - tz.transition 1989, 9, :o2, 622566000 - tz.transition 1990, 3, :o3, 638290800 - tz.transition 1990, 9, :o2, 654620400 - tz.transition 1991, 3, :o4, 670345200 - tz.transition 1991, 9, :o1, 686073600 - tz.transition 1992, 1, :o2, 695750400 - tz.transition 1992, 3, :o3, 701784000 - tz.transition 1992, 9, :o2, 717505200 - tz.transition 1993, 3, :o3, 733244400 - tz.transition 1993, 9, :o2, 748969200 - tz.transition 1994, 3, :o3, 764694000 - tz.transition 1994, 9, :o2, 780418800 - tz.transition 1995, 3, :o3, 796143600 - tz.transition 1995, 9, :o2, 811868400 - tz.transition 1996, 3, :o3, 828198000 - tz.transition 1996, 10, :o2, 846342000 - tz.transition 1997, 3, :o3, 859647600 - tz.transition 1997, 10, :o2, 877791600 - tz.transition 1998, 3, :o3, 891097200 - tz.transition 1998, 10, :o2, 909241200 - tz.transition 1999, 3, :o3, 922546800 - tz.transition 1999, 10, :o2, 941295600 - tz.transition 2000, 3, :o3, 953996400 - tz.transition 2000, 10, :o2, 972745200 - tz.transition 2001, 3, :o3, 985446000 - tz.transition 2001, 10, :o2, 1004194800 - tz.transition 2002, 3, :o3, 1017500400 - tz.transition 2002, 10, :o2, 1035644400 - tz.transition 2003, 3, :o3, 1048950000 - tz.transition 2003, 10, :o2, 1067094000 - tz.transition 2004, 3, :o3, 1080399600 - tz.transition 2004, 10, :o2, 1099148400 - tz.transition 2005, 3, :o3, 1111849200 - tz.transition 2005, 10, :o2, 1130598000 - tz.transition 2006, 3, :o3, 1143298800 - tz.transition 2006, 10, :o2, 1162047600 - tz.transition 2007, 3, :o3, 1174748400 - tz.transition 2007, 10, :o2, 1193497200 - tz.transition 2008, 3, :o3, 1206802800 - tz.transition 2008, 10, :o2, 1224946800 - tz.transition 2009, 3, :o3, 1238252400 - tz.transition 2009, 10, :o2, 1256396400 - tz.transition 2010, 3, :o3, 1269702000 - tz.transition 2010, 10, :o2, 1288450800 - tz.transition 2011, 3, :o3, 1301151600 - tz.transition 2011, 10, :o2, 1319900400 - tz.transition 2012, 3, :o3, 1332601200 - tz.transition 2012, 10, :o2, 1351350000 - tz.transition 2013, 3, :o3, 1364655600 - tz.transition 2013, 10, :o2, 1382799600 - tz.transition 2014, 3, :o3, 1396105200 - tz.transition 2014, 10, :o2, 1414249200 - tz.transition 2015, 3, :o3, 1427554800 - tz.transition 2015, 10, :o2, 1445698800 - tz.transition 2016, 3, :o3, 1459004400 - tz.transition 2016, 10, :o2, 1477753200 - tz.transition 2017, 3, :o3, 1490454000 - tz.transition 2017, 10, :o2, 1509202800 - tz.transition 2018, 3, :o3, 1521903600 - tz.transition 2018, 10, :o2, 1540652400 - tz.transition 2019, 3, :o3, 1553958000 - tz.transition 2019, 10, :o2, 1572102000 - tz.transition 2020, 3, :o3, 1585407600 - tz.transition 2020, 10, :o2, 1603551600 - tz.transition 2021, 3, :o3, 1616857200 - tz.transition 2021, 10, :o2, 1635606000 - tz.transition 2022, 3, :o3, 1648306800 - tz.transition 2022, 10, :o2, 1667055600 - tz.transition 2023, 3, :o3, 1679756400 - tz.transition 2023, 10, :o2, 1698505200 - tz.transition 2024, 3, :o3, 1711810800 - tz.transition 2024, 10, :o2, 1729954800 - tz.transition 2025, 3, :o3, 1743260400 - tz.transition 2025, 10, :o2, 1761404400 - tz.transition 2026, 3, :o3, 1774710000 - tz.transition 2026, 10, :o2, 1792854000 - tz.transition 2027, 3, :o3, 1806159600 - tz.transition 2027, 10, :o2, 1824908400 - tz.transition 2028, 3, :o3, 1837609200 - tz.transition 2028, 10, :o2, 1856358000 - tz.transition 2029, 3, :o3, 1869058800 - tz.transition 2029, 10, :o2, 1887807600 - tz.transition 2030, 3, :o3, 1901113200 - tz.transition 2030, 10, :o2, 1919257200 - tz.transition 2031, 3, :o3, 1932562800 - tz.transition 2031, 10, :o2, 1950706800 - tz.transition 2032, 3, :o3, 1964012400 - tz.transition 2032, 10, :o2, 1982761200 - tz.transition 2033, 3, :o3, 1995462000 - tz.transition 2033, 10, :o2, 2014210800 - tz.transition 2034, 3, :o3, 2026911600 - tz.transition 2034, 10, :o2, 2045660400 - tz.transition 2035, 3, :o3, 2058361200 - tz.transition 2035, 10, :o2, 2077110000 - tz.transition 2036, 3, :o3, 2090415600 - tz.transition 2036, 10, :o2, 2108559600 - tz.transition 2037, 3, :o3, 2121865200 - tz.transition 2037, 10, :o2, 2140009200 - tz.transition 2038, 3, :o3, 19724081, 8 - tz.transition 2038, 10, :o2, 19725817, 8 - tz.transition 2039, 3, :o3, 19726993, 8 - tz.transition 2039, 10, :o2, 19728729, 8 - tz.transition 2040, 3, :o3, 19729905, 8 - tz.transition 2040, 10, :o2, 19731641, 8 - tz.transition 2041, 3, :o3, 19732873, 8 - tz.transition 2041, 10, :o2, 19734553, 8 - tz.transition 2042, 3, :o3, 19735785, 8 - tz.transition 2042, 10, :o2, 19737465, 8 - tz.transition 2043, 3, :o3, 19738697, 8 - tz.transition 2043, 10, :o2, 19740377, 8 - tz.transition 2044, 3, :o3, 19741609, 8 - tz.transition 2044, 10, :o2, 19743345, 8 - tz.transition 2045, 3, :o3, 19744521, 8 - tz.transition 2045, 10, :o2, 19746257, 8 - tz.transition 2046, 3, :o3, 19747433, 8 - tz.transition 2046, 10, :o2, 19749169, 8 - tz.transition 2047, 3, :o3, 19750401, 8 - tz.transition 2047, 10, :o2, 19752081, 8 - tz.transition 2048, 3, :o3, 19753313, 8 - tz.transition 2048, 10, :o2, 19754993, 8 - tz.transition 2049, 3, :o3, 19756225, 8 - tz.transition 2049, 10, :o2, 19757961, 8 - tz.transition 2050, 3, :o3, 19759137, 8 - tz.transition 2050, 10, :o2, 19760873, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Muscat.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Muscat.rb deleted file mode 100644 index 604f651dfa..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Muscat.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Muscat - include TimezoneDefinition - - timezone 'Asia/Muscat' do |tz| - tz.offset :o0, 14060, 0, :LMT - tz.offset :o1, 14400, 0, :GST - - tz.transition 1919, 12, :o1, 10464441137, 4320 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Novosibirsk.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Novosibirsk.rb deleted file mode 100644 index a4e7796e75..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Novosibirsk.rb +++ /dev/null @@ -1,164 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Novosibirsk - include TimezoneDefinition - - timezone 'Asia/Novosibirsk' do |tz| - tz.offset :o0, 19900, 0, :LMT - tz.offset :o1, 21600, 0, :NOVT - tz.offset :o2, 25200, 0, :NOVT - tz.offset :o3, 25200, 3600, :NOVST - tz.offset :o4, 21600, 3600, :NOVST - - tz.transition 1919, 12, :o1, 2092872833, 864 - tz.transition 1930, 6, :o2, 9704593, 4 - tz.transition 1981, 3, :o3, 354906000 - tz.transition 1981, 9, :o2, 370713600 - tz.transition 1982, 3, :o3, 386442000 - tz.transition 1982, 9, :o2, 402249600 - tz.transition 1983, 3, :o3, 417978000 - tz.transition 1983, 9, :o2, 433785600 - tz.transition 1984, 3, :o3, 449600400 - tz.transition 1984, 9, :o2, 465332400 - tz.transition 1985, 3, :o3, 481057200 - tz.transition 1985, 9, :o2, 496782000 - tz.transition 1986, 3, :o3, 512506800 - tz.transition 1986, 9, :o2, 528231600 - tz.transition 1987, 3, :o3, 543956400 - tz.transition 1987, 9, :o2, 559681200 - tz.transition 1988, 3, :o3, 575406000 - tz.transition 1988, 9, :o2, 591130800 - tz.transition 1989, 3, :o3, 606855600 - tz.transition 1989, 9, :o2, 622580400 - tz.transition 1990, 3, :o3, 638305200 - tz.transition 1990, 9, :o2, 654634800 - tz.transition 1991, 3, :o4, 670359600 - tz.transition 1991, 9, :o1, 686088000 - tz.transition 1992, 1, :o2, 695764800 - tz.transition 1992, 3, :o3, 701798400 - tz.transition 1992, 9, :o2, 717519600 - tz.transition 1993, 3, :o3, 733258800 - tz.transition 1993, 5, :o4, 738086400 - tz.transition 1993, 9, :o1, 748987200 - tz.transition 1994, 3, :o4, 764712000 - tz.transition 1994, 9, :o1, 780436800 - tz.transition 1995, 3, :o4, 796161600 - tz.transition 1995, 9, :o1, 811886400 - tz.transition 1996, 3, :o4, 828216000 - tz.transition 1996, 10, :o1, 846360000 - tz.transition 1997, 3, :o4, 859665600 - tz.transition 1997, 10, :o1, 877809600 - tz.transition 1998, 3, :o4, 891115200 - tz.transition 1998, 10, :o1, 909259200 - tz.transition 1999, 3, :o4, 922564800 - tz.transition 1999, 10, :o1, 941313600 - tz.transition 2000, 3, :o4, 954014400 - tz.transition 2000, 10, :o1, 972763200 - tz.transition 2001, 3, :o4, 985464000 - tz.transition 2001, 10, :o1, 1004212800 - tz.transition 2002, 3, :o4, 1017518400 - tz.transition 2002, 10, :o1, 1035662400 - tz.transition 2003, 3, :o4, 1048968000 - tz.transition 2003, 10, :o1, 1067112000 - tz.transition 2004, 3, :o4, 1080417600 - tz.transition 2004, 10, :o1, 1099166400 - tz.transition 2005, 3, :o4, 1111867200 - tz.transition 2005, 10, :o1, 1130616000 - tz.transition 2006, 3, :o4, 1143316800 - tz.transition 2006, 10, :o1, 1162065600 - tz.transition 2007, 3, :o4, 1174766400 - tz.transition 2007, 10, :o1, 1193515200 - tz.transition 2008, 3, :o4, 1206820800 - tz.transition 2008, 10, :o1, 1224964800 - tz.transition 2009, 3, :o4, 1238270400 - tz.transition 2009, 10, :o1, 1256414400 - tz.transition 2010, 3, :o4, 1269720000 - tz.transition 2010, 10, :o1, 1288468800 - tz.transition 2011, 3, :o4, 1301169600 - tz.transition 2011, 10, :o1, 1319918400 - tz.transition 2012, 3, :o4, 1332619200 - tz.transition 2012, 10, :o1, 1351368000 - tz.transition 2013, 3, :o4, 1364673600 - tz.transition 2013, 10, :o1, 1382817600 - tz.transition 2014, 3, :o4, 1396123200 - tz.transition 2014, 10, :o1, 1414267200 - tz.transition 2015, 3, :o4, 1427572800 - tz.transition 2015, 10, :o1, 1445716800 - tz.transition 2016, 3, :o4, 1459022400 - tz.transition 2016, 10, :o1, 1477771200 - tz.transition 2017, 3, :o4, 1490472000 - tz.transition 2017, 10, :o1, 1509220800 - tz.transition 2018, 3, :o4, 1521921600 - tz.transition 2018, 10, :o1, 1540670400 - tz.transition 2019, 3, :o4, 1553976000 - tz.transition 2019, 10, :o1, 1572120000 - tz.transition 2020, 3, :o4, 1585425600 - tz.transition 2020, 10, :o1, 1603569600 - tz.transition 2021, 3, :o4, 1616875200 - tz.transition 2021, 10, :o1, 1635624000 - tz.transition 2022, 3, :o4, 1648324800 - tz.transition 2022, 10, :o1, 1667073600 - tz.transition 2023, 3, :o4, 1679774400 - tz.transition 2023, 10, :o1, 1698523200 - tz.transition 2024, 3, :o4, 1711828800 - tz.transition 2024, 10, :o1, 1729972800 - tz.transition 2025, 3, :o4, 1743278400 - tz.transition 2025, 10, :o1, 1761422400 - tz.transition 2026, 3, :o4, 1774728000 - tz.transition 2026, 10, :o1, 1792872000 - tz.transition 2027, 3, :o4, 1806177600 - tz.transition 2027, 10, :o1, 1824926400 - tz.transition 2028, 3, :o4, 1837627200 - tz.transition 2028, 10, :o1, 1856376000 - tz.transition 2029, 3, :o4, 1869076800 - tz.transition 2029, 10, :o1, 1887825600 - tz.transition 2030, 3, :o4, 1901131200 - tz.transition 2030, 10, :o1, 1919275200 - tz.transition 2031, 3, :o4, 1932580800 - tz.transition 2031, 10, :o1, 1950724800 - tz.transition 2032, 3, :o4, 1964030400 - tz.transition 2032, 10, :o1, 1982779200 - tz.transition 2033, 3, :o4, 1995480000 - tz.transition 2033, 10, :o1, 2014228800 - tz.transition 2034, 3, :o4, 2026929600 - tz.transition 2034, 10, :o1, 2045678400 - tz.transition 2035, 3, :o4, 2058379200 - tz.transition 2035, 10, :o1, 2077128000 - tz.transition 2036, 3, :o4, 2090433600 - tz.transition 2036, 10, :o1, 2108577600 - tz.transition 2037, 3, :o4, 2121883200 - tz.transition 2037, 10, :o1, 2140027200 - tz.transition 2038, 3, :o4, 7396531, 3 - tz.transition 2038, 10, :o1, 7397182, 3 - tz.transition 2039, 3, :o4, 7397623, 3 - tz.transition 2039, 10, :o1, 7398274, 3 - tz.transition 2040, 3, :o4, 7398715, 3 - tz.transition 2040, 10, :o1, 7399366, 3 - tz.transition 2041, 3, :o4, 7399828, 3 - tz.transition 2041, 10, :o1, 7400458, 3 - tz.transition 2042, 3, :o4, 7400920, 3 - tz.transition 2042, 10, :o1, 7401550, 3 - tz.transition 2043, 3, :o4, 7402012, 3 - tz.transition 2043, 10, :o1, 7402642, 3 - tz.transition 2044, 3, :o4, 7403104, 3 - tz.transition 2044, 10, :o1, 7403755, 3 - tz.transition 2045, 3, :o4, 7404196, 3 - tz.transition 2045, 10, :o1, 7404847, 3 - tz.transition 2046, 3, :o4, 7405288, 3 - tz.transition 2046, 10, :o1, 7405939, 3 - tz.transition 2047, 3, :o4, 7406401, 3 - tz.transition 2047, 10, :o1, 7407031, 3 - tz.transition 2048, 3, :o4, 7407493, 3 - tz.transition 2048, 10, :o1, 7408123, 3 - tz.transition 2049, 3, :o4, 7408585, 3 - tz.transition 2049, 10, :o1, 7409236, 3 - tz.transition 2050, 3, :o4, 7409677, 3 - tz.transition 2050, 10, :o1, 7410328, 3 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Rangoon.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Rangoon.rb deleted file mode 100644 index 759b82d77a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Rangoon.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Rangoon - include TimezoneDefinition - - timezone 'Asia/Rangoon' do |tz| - tz.offset :o0, 23080, 0, :LMT - tz.offset :o1, 23076, 0, :RMT - tz.offset :o2, 23400, 0, :BURT - tz.offset :o3, 32400, 0, :JST - tz.offset :o4, 23400, 0, :MMT - - tz.transition 1879, 12, :o1, 5200664903, 2160 - tz.transition 1919, 12, :o2, 5813578159, 2400 - tz.transition 1942, 4, :o3, 116663051, 48 - tz.transition 1945, 5, :o4, 19452625, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Riyadh.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Riyadh.rb deleted file mode 100644 index 7add410620..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Riyadh.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Riyadh - include TimezoneDefinition - - timezone 'Asia/Riyadh' do |tz| - tz.offset :o0, 11212, 0, :LMT - tz.offset :o1, 10800, 0, :AST - - tz.transition 1949, 12, :o1, 52558899197, 21600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Seoul.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Seoul.rb deleted file mode 100644 index 795d2a75df..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Seoul.rb +++ /dev/null @@ -1,34 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Seoul - include TimezoneDefinition - - timezone 'Asia/Seoul' do |tz| - tz.offset :o0, 30472, 0, :LMT - tz.offset :o1, 30600, 0, :KST - tz.offset :o2, 32400, 0, :KST - tz.offset :o3, 28800, 0, :KST - tz.offset :o4, 28800, 3600, :KDT - tz.offset :o5, 32400, 3600, :KDT - - tz.transition 1889, 12, :o1, 26042775991, 10800 - tz.transition 1904, 11, :o2, 116007127, 48 - tz.transition 1927, 12, :o1, 19401969, 8 - tz.transition 1931, 12, :o2, 116481943, 48 - tz.transition 1954, 3, :o3, 19478577, 8 - tz.transition 1960, 5, :o4, 14622415, 6 - tz.transition 1960, 9, :o3, 19497521, 8 - tz.transition 1961, 8, :o1, 14625127, 6 - tz.transition 1968, 9, :o2, 117126247, 48 - tz.transition 1987, 5, :o5, 547570800 - tz.transition 1987, 10, :o2, 560872800 - tz.transition 1988, 5, :o5, 579020400 - tz.transition 1988, 10, :o2, 592322400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Shanghai.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Shanghai.rb deleted file mode 100644 index 34b13d59ae..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Shanghai.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Shanghai - include TimezoneDefinition - - timezone 'Asia/Shanghai' do |tz| - tz.offset :o0, 29152, 0, :LMT - tz.offset :o1, 28800, 0, :CST - tz.offset :o2, 28800, 3600, :CDT - - tz.transition 1927, 12, :o1, 6548164639, 2700 - tz.transition 1940, 6, :o2, 14578699, 6 - tz.transition 1940, 9, :o1, 19439225, 8 - tz.transition 1941, 3, :o2, 14580415, 6 - tz.transition 1941, 9, :o1, 19442145, 8 - tz.transition 1986, 5, :o2, 515520000 - tz.transition 1986, 9, :o1, 527007600 - tz.transition 1987, 4, :o2, 545155200 - tz.transition 1987, 9, :o1, 558457200 - tz.transition 1988, 4, :o2, 576604800 - tz.transition 1988, 9, :o1, 589906800 - tz.transition 1989, 4, :o2, 608659200 - tz.transition 1989, 9, :o1, 621961200 - tz.transition 1990, 4, :o2, 640108800 - tz.transition 1990, 9, :o1, 653410800 - tz.transition 1991, 4, :o2, 671558400 - tz.transition 1991, 9, :o1, 684860400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Singapore.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Singapore.rb deleted file mode 100644 index b323a78f74..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Singapore.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Singapore - include TimezoneDefinition - - timezone 'Asia/Singapore' do |tz| - tz.offset :o0, 24925, 0, :LMT - tz.offset :o1, 24925, 0, :SMT - tz.offset :o2, 25200, 0, :MALT - tz.offset :o3, 25200, 1200, :MALST - tz.offset :o4, 26400, 0, :MALT - tz.offset :o5, 27000, 0, :MALT - tz.offset :o6, 32400, 0, :JST - tz.offset :o7, 27000, 0, :SGT - tz.offset :o8, 28800, 0, :SGT - - tz.transition 1900, 12, :o1, 8347571291, 3456 - tz.transition 1905, 5, :o2, 8353142363, 3456 - tz.transition 1932, 12, :o3, 58249757, 24 - tz.transition 1935, 12, :o4, 87414055, 36 - tz.transition 1941, 8, :o5, 87488575, 36 - tz.transition 1942, 2, :o6, 38886499, 16 - tz.transition 1945, 9, :o5, 19453681, 8 - tz.transition 1965, 8, :o7, 39023699, 16 - tz.transition 1981, 12, :o8, 378664200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Taipei.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Taipei.rb deleted file mode 100644 index 3ba12108fb..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Taipei.rb +++ /dev/null @@ -1,59 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Taipei - include TimezoneDefinition - - timezone 'Asia/Taipei' do |tz| - tz.offset :o0, 29160, 0, :LMT - tz.offset :o1, 28800, 0, :CST - tz.offset :o2, 28800, 3600, :CDT - - tz.transition 1895, 12, :o1, 193084733, 80 - tz.transition 1945, 4, :o2, 14589457, 6 - tz.transition 1945, 9, :o1, 19453833, 8 - tz.transition 1946, 4, :o2, 14591647, 6 - tz.transition 1946, 9, :o1, 19456753, 8 - tz.transition 1947, 4, :o2, 14593837, 6 - tz.transition 1947, 9, :o1, 19459673, 8 - tz.transition 1948, 4, :o2, 14596033, 6 - tz.transition 1948, 9, :o1, 19462601, 8 - tz.transition 1949, 4, :o2, 14598223, 6 - tz.transition 1949, 9, :o1, 19465521, 8 - tz.transition 1950, 4, :o2, 14600413, 6 - tz.transition 1950, 9, :o1, 19468441, 8 - tz.transition 1951, 4, :o2, 14602603, 6 - tz.transition 1951, 9, :o1, 19471361, 8 - tz.transition 1952, 2, :o2, 14604433, 6 - tz.transition 1952, 10, :o1, 19474537, 8 - tz.transition 1953, 3, :o2, 14606809, 6 - tz.transition 1953, 10, :o1, 19477457, 8 - tz.transition 1954, 3, :o2, 14608999, 6 - tz.transition 1954, 10, :o1, 19480377, 8 - tz.transition 1955, 3, :o2, 14611189, 6 - tz.transition 1955, 9, :o1, 19483049, 8 - tz.transition 1956, 3, :o2, 14613385, 6 - tz.transition 1956, 9, :o1, 19485977, 8 - tz.transition 1957, 3, :o2, 14615575, 6 - tz.transition 1957, 9, :o1, 19488897, 8 - tz.transition 1958, 3, :o2, 14617765, 6 - tz.transition 1958, 9, :o1, 19491817, 8 - tz.transition 1959, 3, :o2, 14619955, 6 - tz.transition 1959, 9, :o1, 19494737, 8 - tz.transition 1960, 5, :o2, 14622517, 6 - tz.transition 1960, 9, :o1, 19497665, 8 - tz.transition 1961, 5, :o2, 14624707, 6 - tz.transition 1961, 9, :o1, 19500585, 8 - tz.transition 1974, 3, :o2, 133977600 - tz.transition 1974, 9, :o1, 149785200 - tz.transition 1975, 3, :o2, 165513600 - tz.transition 1975, 9, :o1, 181321200 - tz.transition 1980, 6, :o2, 331142400 - tz.transition 1980, 9, :o1, 339087600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tashkent.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tashkent.rb deleted file mode 100644 index c205c7934d..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tashkent.rb +++ /dev/null @@ -1,47 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Tashkent - include TimezoneDefinition - - timezone 'Asia/Tashkent' do |tz| - tz.offset :o0, 16632, 0, :LMT - tz.offset :o1, 18000, 0, :TAST - tz.offset :o2, 21600, 0, :TAST - tz.offset :o3, 21600, 3600, :TASST - tz.offset :o4, 18000, 3600, :TASST - tz.offset :o5, 18000, 3600, :UZST - tz.offset :o6, 18000, 0, :UZT - - tz.transition 1924, 5, :o1, 969562923, 400 - tz.transition 1930, 6, :o2, 58227559, 24 - tz.transition 1981, 3, :o3, 354909600 - tz.transition 1981, 9, :o2, 370717200 - tz.transition 1982, 3, :o3, 386445600 - tz.transition 1982, 9, :o2, 402253200 - tz.transition 1983, 3, :o3, 417981600 - tz.transition 1983, 9, :o2, 433789200 - tz.transition 1984, 3, :o3, 449604000 - tz.transition 1984, 9, :o2, 465336000 - tz.transition 1985, 3, :o3, 481060800 - tz.transition 1985, 9, :o2, 496785600 - tz.transition 1986, 3, :o3, 512510400 - tz.transition 1986, 9, :o2, 528235200 - tz.transition 1987, 3, :o3, 543960000 - tz.transition 1987, 9, :o2, 559684800 - tz.transition 1988, 3, :o3, 575409600 - tz.transition 1988, 9, :o2, 591134400 - tz.transition 1989, 3, :o3, 606859200 - tz.transition 1989, 9, :o2, 622584000 - tz.transition 1990, 3, :o3, 638308800 - tz.transition 1990, 9, :o2, 654638400 - tz.transition 1991, 3, :o4, 670363200 - tz.transition 1991, 8, :o5, 683661600 - tz.transition 1991, 9, :o6, 686091600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tbilisi.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tbilisi.rb deleted file mode 100644 index 15792a5651..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tbilisi.rb +++ /dev/null @@ -1,78 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Tbilisi - include TimezoneDefinition - - timezone 'Asia/Tbilisi' do |tz| - tz.offset :o0, 10756, 0, :LMT - tz.offset :o1, 10756, 0, :TBMT - tz.offset :o2, 10800, 0, :TBIT - tz.offset :o3, 14400, 0, :TBIT - tz.offset :o4, 14400, 3600, :TBIST - tz.offset :o5, 10800, 3600, :TBIST - tz.offset :o6, 10800, 3600, :GEST - tz.offset :o7, 10800, 0, :GET - tz.offset :o8, 14400, 0, :GET - tz.offset :o9, 14400, 3600, :GEST - - tz.transition 1879, 12, :o1, 52006652111, 21600 - tz.transition 1924, 5, :o2, 52356399311, 21600 - tz.transition 1957, 2, :o3, 19487187, 8 - tz.transition 1981, 3, :o4, 354916800 - tz.transition 1981, 9, :o3, 370724400 - tz.transition 1982, 3, :o4, 386452800 - tz.transition 1982, 9, :o3, 402260400 - tz.transition 1983, 3, :o4, 417988800 - tz.transition 1983, 9, :o3, 433796400 - tz.transition 1984, 3, :o4, 449611200 - tz.transition 1984, 9, :o3, 465343200 - tz.transition 1985, 3, :o4, 481068000 - tz.transition 1985, 9, :o3, 496792800 - tz.transition 1986, 3, :o4, 512517600 - tz.transition 1986, 9, :o3, 528242400 - tz.transition 1987, 3, :o4, 543967200 - tz.transition 1987, 9, :o3, 559692000 - tz.transition 1988, 3, :o4, 575416800 - tz.transition 1988, 9, :o3, 591141600 - tz.transition 1989, 3, :o4, 606866400 - tz.transition 1989, 9, :o3, 622591200 - tz.transition 1990, 3, :o4, 638316000 - tz.transition 1990, 9, :o3, 654645600 - tz.transition 1991, 3, :o5, 670370400 - tz.transition 1991, 4, :o6, 671140800 - tz.transition 1991, 9, :o7, 686098800 - tz.transition 1992, 3, :o6, 701816400 - tz.transition 1992, 9, :o7, 717537600 - tz.transition 1993, 3, :o6, 733266000 - tz.transition 1993, 9, :o7, 748987200 - tz.transition 1994, 3, :o6, 764715600 - tz.transition 1994, 9, :o8, 780436800 - tz.transition 1995, 3, :o9, 796161600 - tz.transition 1995, 9, :o8, 811882800 - tz.transition 1996, 3, :o9, 828216000 - tz.transition 1997, 3, :o9, 859662000 - tz.transition 1997, 10, :o8, 877806000 - tz.transition 1998, 3, :o9, 891115200 - tz.transition 1998, 10, :o8, 909255600 - tz.transition 1999, 3, :o9, 922564800 - tz.transition 1999, 10, :o8, 941310000 - tz.transition 2000, 3, :o9, 954014400 - tz.transition 2000, 10, :o8, 972759600 - tz.transition 2001, 3, :o9, 985464000 - tz.transition 2001, 10, :o8, 1004209200 - tz.transition 2002, 3, :o9, 1017518400 - tz.transition 2002, 10, :o8, 1035658800 - tz.transition 2003, 3, :o9, 1048968000 - tz.transition 2003, 10, :o8, 1067108400 - tz.transition 2004, 3, :o9, 1080417600 - tz.transition 2004, 6, :o6, 1088276400 - tz.transition 2004, 10, :o7, 1099177200 - tz.transition 2005, 3, :o8, 1111878000 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tehran.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tehran.rb deleted file mode 100644 index d8df964a46..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tehran.rb +++ /dev/null @@ -1,121 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Tehran - include TimezoneDefinition - - timezone 'Asia/Tehran' do |tz| - tz.offset :o0, 12344, 0, :LMT - tz.offset :o1, 12344, 0, :TMT - tz.offset :o2, 12600, 0, :IRST - tz.offset :o3, 14400, 0, :IRST - tz.offset :o4, 14400, 3600, :IRDT - tz.offset :o5, 12600, 3600, :IRDT - - tz.transition 1915, 12, :o1, 26145324257, 10800 - tz.transition 1945, 12, :o2, 26263670657, 10800 - tz.transition 1977, 10, :o3, 247177800 - tz.transition 1978, 3, :o4, 259272000 - tz.transition 1978, 10, :o3, 277758000 - tz.transition 1978, 12, :o2, 283982400 - tz.transition 1979, 3, :o5, 290809800 - tz.transition 1979, 9, :o2, 306531000 - tz.transition 1980, 3, :o5, 322432200 - tz.transition 1980, 9, :o2, 338499000 - tz.transition 1991, 5, :o5, 673216200 - tz.transition 1991, 9, :o2, 685481400 - tz.transition 1992, 3, :o5, 701209800 - tz.transition 1992, 9, :o2, 717103800 - tz.transition 1993, 3, :o5, 732745800 - tz.transition 1993, 9, :o2, 748639800 - tz.transition 1994, 3, :o5, 764281800 - tz.transition 1994, 9, :o2, 780175800 - tz.transition 1995, 3, :o5, 795817800 - tz.transition 1995, 9, :o2, 811711800 - tz.transition 1996, 3, :o5, 827353800 - tz.transition 1996, 9, :o2, 843247800 - tz.transition 1997, 3, :o5, 858976200 - tz.transition 1997, 9, :o2, 874870200 - tz.transition 1998, 3, :o5, 890512200 - tz.transition 1998, 9, :o2, 906406200 - tz.transition 1999, 3, :o5, 922048200 - tz.transition 1999, 9, :o2, 937942200 - tz.transition 2000, 3, :o5, 953584200 - tz.transition 2000, 9, :o2, 969478200 - tz.transition 2001, 3, :o5, 985206600 - tz.transition 2001, 9, :o2, 1001100600 - tz.transition 2002, 3, :o5, 1016742600 - tz.transition 2002, 9, :o2, 1032636600 - tz.transition 2003, 3, :o5, 1048278600 - tz.transition 2003, 9, :o2, 1064172600 - tz.transition 2004, 3, :o5, 1079814600 - tz.transition 2004, 9, :o2, 1095708600 - tz.transition 2005, 3, :o5, 1111437000 - tz.transition 2005, 9, :o2, 1127331000 - tz.transition 2008, 3, :o5, 1206045000 - tz.transition 2008, 9, :o2, 1221939000 - tz.transition 2009, 3, :o5, 1237667400 - tz.transition 2009, 9, :o2, 1253561400 - tz.transition 2010, 3, :o5, 1269203400 - tz.transition 2010, 9, :o2, 1285097400 - tz.transition 2011, 3, :o5, 1300739400 - tz.transition 2011, 9, :o2, 1316633400 - tz.transition 2012, 3, :o5, 1332275400 - tz.transition 2012, 9, :o2, 1348169400 - tz.transition 2013, 3, :o5, 1363897800 - tz.transition 2013, 9, :o2, 1379791800 - tz.transition 2014, 3, :o5, 1395433800 - tz.transition 2014, 9, :o2, 1411327800 - tz.transition 2015, 3, :o5, 1426969800 - tz.transition 2015, 9, :o2, 1442863800 - tz.transition 2016, 3, :o5, 1458505800 - tz.transition 2016, 9, :o2, 1474399800 - tz.transition 2017, 3, :o5, 1490128200 - tz.transition 2017, 9, :o2, 1506022200 - tz.transition 2018, 3, :o5, 1521664200 - tz.transition 2018, 9, :o2, 1537558200 - tz.transition 2019, 3, :o5, 1553200200 - tz.transition 2019, 9, :o2, 1569094200 - tz.transition 2020, 3, :o5, 1584736200 - tz.transition 2020, 9, :o2, 1600630200 - tz.transition 2021, 3, :o5, 1616358600 - tz.transition 2021, 9, :o2, 1632252600 - tz.transition 2022, 3, :o5, 1647894600 - tz.transition 2022, 9, :o2, 1663788600 - tz.transition 2023, 3, :o5, 1679430600 - tz.transition 2023, 9, :o2, 1695324600 - tz.transition 2024, 3, :o5, 1710966600 - tz.transition 2024, 9, :o2, 1726860600 - tz.transition 2025, 3, :o5, 1742589000 - tz.transition 2025, 9, :o2, 1758483000 - tz.transition 2026, 3, :o5, 1774125000 - tz.transition 2026, 9, :o2, 1790019000 - tz.transition 2027, 3, :o5, 1805661000 - tz.transition 2027, 9, :o2, 1821555000 - tz.transition 2028, 3, :o5, 1837197000 - tz.transition 2028, 9, :o2, 1853091000 - tz.transition 2029, 3, :o5, 1868733000 - tz.transition 2029, 9, :o2, 1884627000 - tz.transition 2030, 3, :o5, 1900355400 - tz.transition 2030, 9, :o2, 1916249400 - tz.transition 2031, 3, :o5, 1931891400 - tz.transition 2031, 9, :o2, 1947785400 - tz.transition 2032, 3, :o5, 1963427400 - tz.transition 2032, 9, :o2, 1979321400 - tz.transition 2033, 3, :o5, 1994963400 - tz.transition 2033, 9, :o2, 2010857400 - tz.transition 2034, 3, :o5, 2026585800 - tz.transition 2034, 9, :o2, 2042479800 - tz.transition 2035, 3, :o5, 2058121800 - tz.transition 2035, 9, :o2, 2074015800 - tz.transition 2036, 3, :o5, 2089657800 - tz.transition 2036, 9, :o2, 2105551800 - tz.transition 2037, 3, :o5, 2121193800 - tz.transition 2037, 9, :o2, 2137087800 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tokyo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tokyo.rb deleted file mode 100644 index 51c9e16421..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Tokyo.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Tokyo - include TimezoneDefinition - - timezone 'Asia/Tokyo' do |tz| - tz.offset :o0, 33539, 0, :LMT - tz.offset :o1, 32400, 0, :JST - tz.offset :o2, 32400, 0, :CJT - tz.offset :o3, 32400, 3600, :JDT - - tz.transition 1887, 12, :o1, 19285097, 8 - tz.transition 1895, 12, :o2, 19308473, 8 - tz.transition 1937, 12, :o1, 19431193, 8 - tz.transition 1948, 5, :o3, 58384157, 24 - tz.transition 1948, 9, :o1, 14596831, 6 - tz.transition 1949, 4, :o3, 58392221, 24 - tz.transition 1949, 9, :o1, 14599015, 6 - tz.transition 1950, 5, :o3, 58401797, 24 - tz.transition 1950, 9, :o1, 14601199, 6 - tz.transition 1951, 5, :o3, 58410533, 24 - tz.transition 1951, 9, :o1, 14603383, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Ulaanbaatar.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Ulaanbaatar.rb deleted file mode 100644 index 2854f5c5fd..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Ulaanbaatar.rb +++ /dev/null @@ -1,65 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Ulaanbaatar - include TimezoneDefinition - - timezone 'Asia/Ulaanbaatar' do |tz| - tz.offset :o0, 25652, 0, :LMT - tz.offset :o1, 25200, 0, :ULAT - tz.offset :o2, 28800, 0, :ULAT - tz.offset :o3, 28800, 3600, :ULAST - - tz.transition 1905, 7, :o1, 52208457187, 21600 - tz.transition 1977, 12, :o2, 252435600 - tz.transition 1983, 3, :o3, 417974400 - tz.transition 1983, 9, :o2, 433782000 - tz.transition 1984, 3, :o3, 449596800 - tz.transition 1984, 9, :o2, 465318000 - tz.transition 1985, 3, :o3, 481046400 - tz.transition 1985, 9, :o2, 496767600 - tz.transition 1986, 3, :o3, 512496000 - tz.transition 1986, 9, :o2, 528217200 - tz.transition 1987, 3, :o3, 543945600 - tz.transition 1987, 9, :o2, 559666800 - tz.transition 1988, 3, :o3, 575395200 - tz.transition 1988, 9, :o2, 591116400 - tz.transition 1989, 3, :o3, 606844800 - tz.transition 1989, 9, :o2, 622566000 - tz.transition 1990, 3, :o3, 638294400 - tz.transition 1990, 9, :o2, 654620400 - tz.transition 1991, 3, :o3, 670348800 - tz.transition 1991, 9, :o2, 686070000 - tz.transition 1992, 3, :o3, 701798400 - tz.transition 1992, 9, :o2, 717519600 - tz.transition 1993, 3, :o3, 733248000 - tz.transition 1993, 9, :o2, 748969200 - tz.transition 1994, 3, :o3, 764697600 - tz.transition 1994, 9, :o2, 780418800 - tz.transition 1995, 3, :o3, 796147200 - tz.transition 1995, 9, :o2, 811868400 - tz.transition 1996, 3, :o3, 828201600 - tz.transition 1996, 9, :o2, 843922800 - tz.transition 1997, 3, :o3, 859651200 - tz.transition 1997, 9, :o2, 875372400 - tz.transition 1998, 3, :o3, 891100800 - tz.transition 1998, 9, :o2, 906822000 - tz.transition 2001, 4, :o3, 988394400 - tz.transition 2001, 9, :o2, 1001696400 - tz.transition 2002, 3, :o3, 1017424800 - tz.transition 2002, 9, :o2, 1033146000 - tz.transition 2003, 3, :o3, 1048874400 - tz.transition 2003, 9, :o2, 1064595600 - tz.transition 2004, 3, :o3, 1080324000 - tz.transition 2004, 9, :o2, 1096045200 - tz.transition 2005, 3, :o3, 1111773600 - tz.transition 2005, 9, :o2, 1127494800 - tz.transition 2006, 3, :o3, 1143223200 - tz.transition 2006, 9, :o2, 1159549200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Urumqi.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Urumqi.rb deleted file mode 100644 index d793ff1341..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Urumqi.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Urumqi - include TimezoneDefinition - - timezone 'Asia/Urumqi' do |tz| - tz.offset :o0, 21020, 0, :LMT - tz.offset :o1, 21600, 0, :URUT - tz.offset :o2, 28800, 0, :CST - tz.offset :o3, 28800, 3600, :CDT - - tz.transition 1927, 12, :o1, 10477063829, 4320 - tz.transition 1980, 4, :o2, 325965600 - tz.transition 1986, 5, :o3, 515520000 - tz.transition 1986, 9, :o2, 527007600 - tz.transition 1987, 4, :o3, 545155200 - tz.transition 1987, 9, :o2, 558457200 - tz.transition 1988, 4, :o3, 576604800 - tz.transition 1988, 9, :o2, 589906800 - tz.transition 1989, 4, :o3, 608659200 - tz.transition 1989, 9, :o2, 621961200 - tz.transition 1990, 4, :o3, 640108800 - tz.transition 1990, 9, :o2, 653410800 - tz.transition 1991, 4, :o3, 671558400 - tz.transition 1991, 9, :o2, 684860400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Vladivostok.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Vladivostok.rb deleted file mode 100644 index bd9e3d60ec..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Vladivostok.rb +++ /dev/null @@ -1,164 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Vladivostok - include TimezoneDefinition - - timezone 'Asia/Vladivostok' do |tz| - tz.offset :o0, 31664, 0, :LMT - tz.offset :o1, 32400, 0, :VLAT - tz.offset :o2, 36000, 0, :VLAT - tz.offset :o3, 36000, 3600, :VLAST - tz.offset :o4, 32400, 3600, :VLASST - tz.offset :o5, 32400, 0, :VLAST - - tz.transition 1922, 11, :o1, 13086214921, 5400 - tz.transition 1930, 6, :o2, 19409185, 8 - tz.transition 1981, 3, :o3, 354895200 - tz.transition 1981, 9, :o2, 370702800 - tz.transition 1982, 3, :o3, 386431200 - tz.transition 1982, 9, :o2, 402238800 - tz.transition 1983, 3, :o3, 417967200 - tz.transition 1983, 9, :o2, 433774800 - tz.transition 1984, 3, :o3, 449589600 - tz.transition 1984, 9, :o2, 465321600 - tz.transition 1985, 3, :o3, 481046400 - tz.transition 1985, 9, :o2, 496771200 - tz.transition 1986, 3, :o3, 512496000 - tz.transition 1986, 9, :o2, 528220800 - tz.transition 1987, 3, :o3, 543945600 - tz.transition 1987, 9, :o2, 559670400 - tz.transition 1988, 3, :o3, 575395200 - tz.transition 1988, 9, :o2, 591120000 - tz.transition 1989, 3, :o3, 606844800 - tz.transition 1989, 9, :o2, 622569600 - tz.transition 1990, 3, :o3, 638294400 - tz.transition 1990, 9, :o2, 654624000 - tz.transition 1991, 3, :o4, 670348800 - tz.transition 1991, 9, :o5, 686077200 - tz.transition 1992, 1, :o2, 695754000 - tz.transition 1992, 3, :o3, 701787600 - tz.transition 1992, 9, :o2, 717508800 - tz.transition 1993, 3, :o3, 733248000 - tz.transition 1993, 9, :o2, 748972800 - tz.transition 1994, 3, :o3, 764697600 - tz.transition 1994, 9, :o2, 780422400 - tz.transition 1995, 3, :o3, 796147200 - tz.transition 1995, 9, :o2, 811872000 - tz.transition 1996, 3, :o3, 828201600 - tz.transition 1996, 10, :o2, 846345600 - tz.transition 1997, 3, :o3, 859651200 - tz.transition 1997, 10, :o2, 877795200 - tz.transition 1998, 3, :o3, 891100800 - tz.transition 1998, 10, :o2, 909244800 - tz.transition 1999, 3, :o3, 922550400 - tz.transition 1999, 10, :o2, 941299200 - tz.transition 2000, 3, :o3, 954000000 - tz.transition 2000, 10, :o2, 972748800 - tz.transition 2001, 3, :o3, 985449600 - tz.transition 2001, 10, :o2, 1004198400 - tz.transition 2002, 3, :o3, 1017504000 - tz.transition 2002, 10, :o2, 1035648000 - tz.transition 2003, 3, :o3, 1048953600 - tz.transition 2003, 10, :o2, 1067097600 - tz.transition 2004, 3, :o3, 1080403200 - tz.transition 2004, 10, :o2, 1099152000 - tz.transition 2005, 3, :o3, 1111852800 - tz.transition 2005, 10, :o2, 1130601600 - tz.transition 2006, 3, :o3, 1143302400 - tz.transition 2006, 10, :o2, 1162051200 - tz.transition 2007, 3, :o3, 1174752000 - tz.transition 2007, 10, :o2, 1193500800 - tz.transition 2008, 3, :o3, 1206806400 - tz.transition 2008, 10, :o2, 1224950400 - tz.transition 2009, 3, :o3, 1238256000 - tz.transition 2009, 10, :o2, 1256400000 - tz.transition 2010, 3, :o3, 1269705600 - tz.transition 2010, 10, :o2, 1288454400 - tz.transition 2011, 3, :o3, 1301155200 - tz.transition 2011, 10, :o2, 1319904000 - tz.transition 2012, 3, :o3, 1332604800 - tz.transition 2012, 10, :o2, 1351353600 - tz.transition 2013, 3, :o3, 1364659200 - tz.transition 2013, 10, :o2, 1382803200 - tz.transition 2014, 3, :o3, 1396108800 - tz.transition 2014, 10, :o2, 1414252800 - tz.transition 2015, 3, :o3, 1427558400 - tz.transition 2015, 10, :o2, 1445702400 - tz.transition 2016, 3, :o3, 1459008000 - tz.transition 2016, 10, :o2, 1477756800 - tz.transition 2017, 3, :o3, 1490457600 - tz.transition 2017, 10, :o2, 1509206400 - tz.transition 2018, 3, :o3, 1521907200 - tz.transition 2018, 10, :o2, 1540656000 - tz.transition 2019, 3, :o3, 1553961600 - tz.transition 2019, 10, :o2, 1572105600 - tz.transition 2020, 3, :o3, 1585411200 - tz.transition 2020, 10, :o2, 1603555200 - tz.transition 2021, 3, :o3, 1616860800 - tz.transition 2021, 10, :o2, 1635609600 - tz.transition 2022, 3, :o3, 1648310400 - tz.transition 2022, 10, :o2, 1667059200 - tz.transition 2023, 3, :o3, 1679760000 - tz.transition 2023, 10, :o2, 1698508800 - tz.transition 2024, 3, :o3, 1711814400 - tz.transition 2024, 10, :o2, 1729958400 - tz.transition 2025, 3, :o3, 1743264000 - tz.transition 2025, 10, :o2, 1761408000 - tz.transition 2026, 3, :o3, 1774713600 - tz.transition 2026, 10, :o2, 1792857600 - tz.transition 2027, 3, :o3, 1806163200 - tz.transition 2027, 10, :o2, 1824912000 - tz.transition 2028, 3, :o3, 1837612800 - tz.transition 2028, 10, :o2, 1856361600 - tz.transition 2029, 3, :o3, 1869062400 - tz.transition 2029, 10, :o2, 1887811200 - tz.transition 2030, 3, :o3, 1901116800 - tz.transition 2030, 10, :o2, 1919260800 - tz.transition 2031, 3, :o3, 1932566400 - tz.transition 2031, 10, :o2, 1950710400 - tz.transition 2032, 3, :o3, 1964016000 - tz.transition 2032, 10, :o2, 1982764800 - tz.transition 2033, 3, :o3, 1995465600 - tz.transition 2033, 10, :o2, 2014214400 - tz.transition 2034, 3, :o3, 2026915200 - tz.transition 2034, 10, :o2, 2045664000 - tz.transition 2035, 3, :o3, 2058364800 - tz.transition 2035, 10, :o2, 2077113600 - tz.transition 2036, 3, :o3, 2090419200 - tz.transition 2036, 10, :o2, 2108563200 - tz.transition 2037, 3, :o3, 2121868800 - tz.transition 2037, 10, :o2, 2140012800 - tz.transition 2038, 3, :o3, 14793061, 6 - tz.transition 2038, 10, :o2, 14794363, 6 - tz.transition 2039, 3, :o3, 14795245, 6 - tz.transition 2039, 10, :o2, 14796547, 6 - tz.transition 2040, 3, :o3, 14797429, 6 - tz.transition 2040, 10, :o2, 14798731, 6 - tz.transition 2041, 3, :o3, 14799655, 6 - tz.transition 2041, 10, :o2, 14800915, 6 - tz.transition 2042, 3, :o3, 14801839, 6 - tz.transition 2042, 10, :o2, 14803099, 6 - tz.transition 2043, 3, :o3, 14804023, 6 - tz.transition 2043, 10, :o2, 14805283, 6 - tz.transition 2044, 3, :o3, 14806207, 6 - tz.transition 2044, 10, :o2, 14807509, 6 - tz.transition 2045, 3, :o3, 14808391, 6 - tz.transition 2045, 10, :o2, 14809693, 6 - tz.transition 2046, 3, :o3, 14810575, 6 - tz.transition 2046, 10, :o2, 14811877, 6 - tz.transition 2047, 3, :o3, 14812801, 6 - tz.transition 2047, 10, :o2, 14814061, 6 - tz.transition 2048, 3, :o3, 14814985, 6 - tz.transition 2048, 10, :o2, 14816245, 6 - tz.transition 2049, 3, :o3, 14817169, 6 - tz.transition 2049, 10, :o2, 14818471, 6 - tz.transition 2050, 3, :o3, 14819353, 6 - tz.transition 2050, 10, :o2, 14820655, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yakutsk.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yakutsk.rb deleted file mode 100644 index 56435a788f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yakutsk.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Yakutsk - include TimezoneDefinition - - timezone 'Asia/Yakutsk' do |tz| - tz.offset :o0, 31120, 0, :LMT - tz.offset :o1, 28800, 0, :YAKT - tz.offset :o2, 32400, 0, :YAKT - tz.offset :o3, 32400, 3600, :YAKST - tz.offset :o4, 28800, 3600, :YAKST - - tz.transition 1919, 12, :o1, 2616091711, 1080 - tz.transition 1930, 6, :o2, 14556889, 6 - tz.transition 1981, 3, :o3, 354898800 - tz.transition 1981, 9, :o2, 370706400 - tz.transition 1982, 3, :o3, 386434800 - tz.transition 1982, 9, :o2, 402242400 - tz.transition 1983, 3, :o3, 417970800 - tz.transition 1983, 9, :o2, 433778400 - tz.transition 1984, 3, :o3, 449593200 - tz.transition 1984, 9, :o2, 465325200 - tz.transition 1985, 3, :o3, 481050000 - tz.transition 1985, 9, :o2, 496774800 - tz.transition 1986, 3, :o3, 512499600 - tz.transition 1986, 9, :o2, 528224400 - tz.transition 1987, 3, :o3, 543949200 - tz.transition 1987, 9, :o2, 559674000 - tz.transition 1988, 3, :o3, 575398800 - tz.transition 1988, 9, :o2, 591123600 - tz.transition 1989, 3, :o3, 606848400 - tz.transition 1989, 9, :o2, 622573200 - tz.transition 1990, 3, :o3, 638298000 - tz.transition 1990, 9, :o2, 654627600 - tz.transition 1991, 3, :o4, 670352400 - tz.transition 1991, 9, :o1, 686080800 - tz.transition 1992, 1, :o2, 695757600 - tz.transition 1992, 3, :o3, 701791200 - tz.transition 1992, 9, :o2, 717512400 - tz.transition 1993, 3, :o3, 733251600 - tz.transition 1993, 9, :o2, 748976400 - tz.transition 1994, 3, :o3, 764701200 - tz.transition 1994, 9, :o2, 780426000 - tz.transition 1995, 3, :o3, 796150800 - tz.transition 1995, 9, :o2, 811875600 - tz.transition 1996, 3, :o3, 828205200 - tz.transition 1996, 10, :o2, 846349200 - tz.transition 1997, 3, :o3, 859654800 - tz.transition 1997, 10, :o2, 877798800 - tz.transition 1998, 3, :o3, 891104400 - tz.transition 1998, 10, :o2, 909248400 - tz.transition 1999, 3, :o3, 922554000 - tz.transition 1999, 10, :o2, 941302800 - tz.transition 2000, 3, :o3, 954003600 - tz.transition 2000, 10, :o2, 972752400 - tz.transition 2001, 3, :o3, 985453200 - tz.transition 2001, 10, :o2, 1004202000 - tz.transition 2002, 3, :o3, 1017507600 - tz.transition 2002, 10, :o2, 1035651600 - tz.transition 2003, 3, :o3, 1048957200 - tz.transition 2003, 10, :o2, 1067101200 - tz.transition 2004, 3, :o3, 1080406800 - tz.transition 2004, 10, :o2, 1099155600 - tz.transition 2005, 3, :o3, 1111856400 - tz.transition 2005, 10, :o2, 1130605200 - tz.transition 2006, 3, :o3, 1143306000 - tz.transition 2006, 10, :o2, 1162054800 - tz.transition 2007, 3, :o3, 1174755600 - tz.transition 2007, 10, :o2, 1193504400 - tz.transition 2008, 3, :o3, 1206810000 - tz.transition 2008, 10, :o2, 1224954000 - tz.transition 2009, 3, :o3, 1238259600 - tz.transition 2009, 10, :o2, 1256403600 - tz.transition 2010, 3, :o3, 1269709200 - tz.transition 2010, 10, :o2, 1288458000 - tz.transition 2011, 3, :o3, 1301158800 - tz.transition 2011, 10, :o2, 1319907600 - tz.transition 2012, 3, :o3, 1332608400 - tz.transition 2012, 10, :o2, 1351357200 - tz.transition 2013, 3, :o3, 1364662800 - tz.transition 2013, 10, :o2, 1382806800 - tz.transition 2014, 3, :o3, 1396112400 - tz.transition 2014, 10, :o2, 1414256400 - tz.transition 2015, 3, :o3, 1427562000 - tz.transition 2015, 10, :o2, 1445706000 - tz.transition 2016, 3, :o3, 1459011600 - tz.transition 2016, 10, :o2, 1477760400 - tz.transition 2017, 3, :o3, 1490461200 - tz.transition 2017, 10, :o2, 1509210000 - tz.transition 2018, 3, :o3, 1521910800 - tz.transition 2018, 10, :o2, 1540659600 - tz.transition 2019, 3, :o3, 1553965200 - tz.transition 2019, 10, :o2, 1572109200 - tz.transition 2020, 3, :o3, 1585414800 - tz.transition 2020, 10, :o2, 1603558800 - tz.transition 2021, 3, :o3, 1616864400 - tz.transition 2021, 10, :o2, 1635613200 - tz.transition 2022, 3, :o3, 1648314000 - tz.transition 2022, 10, :o2, 1667062800 - tz.transition 2023, 3, :o3, 1679763600 - tz.transition 2023, 10, :o2, 1698512400 - tz.transition 2024, 3, :o3, 1711818000 - tz.transition 2024, 10, :o2, 1729962000 - tz.transition 2025, 3, :o3, 1743267600 - tz.transition 2025, 10, :o2, 1761411600 - tz.transition 2026, 3, :o3, 1774717200 - tz.transition 2026, 10, :o2, 1792861200 - tz.transition 2027, 3, :o3, 1806166800 - tz.transition 2027, 10, :o2, 1824915600 - tz.transition 2028, 3, :o3, 1837616400 - tz.transition 2028, 10, :o2, 1856365200 - tz.transition 2029, 3, :o3, 1869066000 - tz.transition 2029, 10, :o2, 1887814800 - tz.transition 2030, 3, :o3, 1901120400 - tz.transition 2030, 10, :o2, 1919264400 - tz.transition 2031, 3, :o3, 1932570000 - tz.transition 2031, 10, :o2, 1950714000 - tz.transition 2032, 3, :o3, 1964019600 - tz.transition 2032, 10, :o2, 1982768400 - tz.transition 2033, 3, :o3, 1995469200 - tz.transition 2033, 10, :o2, 2014218000 - tz.transition 2034, 3, :o3, 2026918800 - tz.transition 2034, 10, :o2, 2045667600 - tz.transition 2035, 3, :o3, 2058368400 - tz.transition 2035, 10, :o2, 2077117200 - tz.transition 2036, 3, :o3, 2090422800 - tz.transition 2036, 10, :o2, 2108566800 - tz.transition 2037, 3, :o3, 2121872400 - tz.transition 2037, 10, :o2, 2140016400 - tz.transition 2038, 3, :o3, 59172245, 24 - tz.transition 2038, 10, :o2, 59177453, 24 - tz.transition 2039, 3, :o3, 59180981, 24 - tz.transition 2039, 10, :o2, 59186189, 24 - tz.transition 2040, 3, :o3, 59189717, 24 - tz.transition 2040, 10, :o2, 59194925, 24 - tz.transition 2041, 3, :o3, 59198621, 24 - tz.transition 2041, 10, :o2, 59203661, 24 - tz.transition 2042, 3, :o3, 59207357, 24 - tz.transition 2042, 10, :o2, 59212397, 24 - tz.transition 2043, 3, :o3, 59216093, 24 - tz.transition 2043, 10, :o2, 59221133, 24 - tz.transition 2044, 3, :o3, 59224829, 24 - tz.transition 2044, 10, :o2, 59230037, 24 - tz.transition 2045, 3, :o3, 59233565, 24 - tz.transition 2045, 10, :o2, 59238773, 24 - tz.transition 2046, 3, :o3, 59242301, 24 - tz.transition 2046, 10, :o2, 59247509, 24 - tz.transition 2047, 3, :o3, 59251205, 24 - tz.transition 2047, 10, :o2, 59256245, 24 - tz.transition 2048, 3, :o3, 59259941, 24 - tz.transition 2048, 10, :o2, 59264981, 24 - tz.transition 2049, 3, :o3, 59268677, 24 - tz.transition 2049, 10, :o2, 59273885, 24 - tz.transition 2050, 3, :o3, 59277413, 24 - tz.transition 2050, 10, :o2, 59282621, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yekaterinburg.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yekaterinburg.rb deleted file mode 100644 index 8ef8df4a41..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yekaterinburg.rb +++ /dev/null @@ -1,165 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Yekaterinburg - include TimezoneDefinition - - timezone 'Asia/Yekaterinburg' do |tz| - tz.offset :o0, 14544, 0, :LMT - tz.offset :o1, 14400, 0, :SVET - tz.offset :o2, 18000, 0, :SVET - tz.offset :o3, 18000, 3600, :SVEST - tz.offset :o4, 14400, 3600, :SVEST - tz.offset :o5, 18000, 0, :YEKT - tz.offset :o6, 18000, 3600, :YEKST - - tz.transition 1919, 7, :o1, 1453292699, 600 - tz.transition 1930, 6, :o2, 7278445, 3 - tz.transition 1981, 3, :o3, 354913200 - tz.transition 1981, 9, :o2, 370720800 - tz.transition 1982, 3, :o3, 386449200 - tz.transition 1982, 9, :o2, 402256800 - tz.transition 1983, 3, :o3, 417985200 - tz.transition 1983, 9, :o2, 433792800 - tz.transition 1984, 3, :o3, 449607600 - tz.transition 1984, 9, :o2, 465339600 - tz.transition 1985, 3, :o3, 481064400 - tz.transition 1985, 9, :o2, 496789200 - tz.transition 1986, 3, :o3, 512514000 - tz.transition 1986, 9, :o2, 528238800 - tz.transition 1987, 3, :o3, 543963600 - tz.transition 1987, 9, :o2, 559688400 - tz.transition 1988, 3, :o3, 575413200 - tz.transition 1988, 9, :o2, 591138000 - tz.transition 1989, 3, :o3, 606862800 - tz.transition 1989, 9, :o2, 622587600 - tz.transition 1990, 3, :o3, 638312400 - tz.transition 1990, 9, :o2, 654642000 - tz.transition 1991, 3, :o4, 670366800 - tz.transition 1991, 9, :o1, 686095200 - tz.transition 1992, 1, :o5, 695772000 - tz.transition 1992, 3, :o6, 701805600 - tz.transition 1992, 9, :o5, 717526800 - tz.transition 1993, 3, :o6, 733266000 - tz.transition 1993, 9, :o5, 748990800 - tz.transition 1994, 3, :o6, 764715600 - tz.transition 1994, 9, :o5, 780440400 - tz.transition 1995, 3, :o6, 796165200 - tz.transition 1995, 9, :o5, 811890000 - tz.transition 1996, 3, :o6, 828219600 - tz.transition 1996, 10, :o5, 846363600 - tz.transition 1997, 3, :o6, 859669200 - tz.transition 1997, 10, :o5, 877813200 - tz.transition 1998, 3, :o6, 891118800 - tz.transition 1998, 10, :o5, 909262800 - tz.transition 1999, 3, :o6, 922568400 - tz.transition 1999, 10, :o5, 941317200 - tz.transition 2000, 3, :o6, 954018000 - tz.transition 2000, 10, :o5, 972766800 - tz.transition 2001, 3, :o6, 985467600 - tz.transition 2001, 10, :o5, 1004216400 - tz.transition 2002, 3, :o6, 1017522000 - tz.transition 2002, 10, :o5, 1035666000 - tz.transition 2003, 3, :o6, 1048971600 - tz.transition 2003, 10, :o5, 1067115600 - tz.transition 2004, 3, :o6, 1080421200 - tz.transition 2004, 10, :o5, 1099170000 - tz.transition 2005, 3, :o6, 1111870800 - tz.transition 2005, 10, :o5, 1130619600 - tz.transition 2006, 3, :o6, 1143320400 - tz.transition 2006, 10, :o5, 1162069200 - tz.transition 2007, 3, :o6, 1174770000 - tz.transition 2007, 10, :o5, 1193518800 - tz.transition 2008, 3, :o6, 1206824400 - tz.transition 2008, 10, :o5, 1224968400 - tz.transition 2009, 3, :o6, 1238274000 - tz.transition 2009, 10, :o5, 1256418000 - tz.transition 2010, 3, :o6, 1269723600 - tz.transition 2010, 10, :o5, 1288472400 - tz.transition 2011, 3, :o6, 1301173200 - tz.transition 2011, 10, :o5, 1319922000 - tz.transition 2012, 3, :o6, 1332622800 - tz.transition 2012, 10, :o5, 1351371600 - tz.transition 2013, 3, :o6, 1364677200 - tz.transition 2013, 10, :o5, 1382821200 - tz.transition 2014, 3, :o6, 1396126800 - tz.transition 2014, 10, :o5, 1414270800 - tz.transition 2015, 3, :o6, 1427576400 - tz.transition 2015, 10, :o5, 1445720400 - tz.transition 2016, 3, :o6, 1459026000 - tz.transition 2016, 10, :o5, 1477774800 - tz.transition 2017, 3, :o6, 1490475600 - tz.transition 2017, 10, :o5, 1509224400 - tz.transition 2018, 3, :o6, 1521925200 - tz.transition 2018, 10, :o5, 1540674000 - tz.transition 2019, 3, :o6, 1553979600 - tz.transition 2019, 10, :o5, 1572123600 - tz.transition 2020, 3, :o6, 1585429200 - tz.transition 2020, 10, :o5, 1603573200 - tz.transition 2021, 3, :o6, 1616878800 - tz.transition 2021, 10, :o5, 1635627600 - tz.transition 2022, 3, :o6, 1648328400 - tz.transition 2022, 10, :o5, 1667077200 - tz.transition 2023, 3, :o6, 1679778000 - tz.transition 2023, 10, :o5, 1698526800 - tz.transition 2024, 3, :o6, 1711832400 - tz.transition 2024, 10, :o5, 1729976400 - tz.transition 2025, 3, :o6, 1743282000 - tz.transition 2025, 10, :o5, 1761426000 - tz.transition 2026, 3, :o6, 1774731600 - tz.transition 2026, 10, :o5, 1792875600 - tz.transition 2027, 3, :o6, 1806181200 - tz.transition 2027, 10, :o5, 1824930000 - tz.transition 2028, 3, :o6, 1837630800 - tz.transition 2028, 10, :o5, 1856379600 - tz.transition 2029, 3, :o6, 1869080400 - tz.transition 2029, 10, :o5, 1887829200 - tz.transition 2030, 3, :o6, 1901134800 - tz.transition 2030, 10, :o5, 1919278800 - tz.transition 2031, 3, :o6, 1932584400 - tz.transition 2031, 10, :o5, 1950728400 - tz.transition 2032, 3, :o6, 1964034000 - tz.transition 2032, 10, :o5, 1982782800 - tz.transition 2033, 3, :o6, 1995483600 - tz.transition 2033, 10, :o5, 2014232400 - tz.transition 2034, 3, :o6, 2026933200 - tz.transition 2034, 10, :o5, 2045682000 - tz.transition 2035, 3, :o6, 2058382800 - tz.transition 2035, 10, :o5, 2077131600 - tz.transition 2036, 3, :o6, 2090437200 - tz.transition 2036, 10, :o5, 2108581200 - tz.transition 2037, 3, :o6, 2121886800 - tz.transition 2037, 10, :o5, 2140030800 - tz.transition 2038, 3, :o6, 19724083, 8 - tz.transition 2038, 10, :o5, 19725819, 8 - tz.transition 2039, 3, :o6, 19726995, 8 - tz.transition 2039, 10, :o5, 19728731, 8 - tz.transition 2040, 3, :o6, 19729907, 8 - tz.transition 2040, 10, :o5, 19731643, 8 - tz.transition 2041, 3, :o6, 19732875, 8 - tz.transition 2041, 10, :o5, 19734555, 8 - tz.transition 2042, 3, :o6, 19735787, 8 - tz.transition 2042, 10, :o5, 19737467, 8 - tz.transition 2043, 3, :o6, 19738699, 8 - tz.transition 2043, 10, :o5, 19740379, 8 - tz.transition 2044, 3, :o6, 19741611, 8 - tz.transition 2044, 10, :o5, 19743347, 8 - tz.transition 2045, 3, :o6, 19744523, 8 - tz.transition 2045, 10, :o5, 19746259, 8 - tz.transition 2046, 3, :o6, 19747435, 8 - tz.transition 2046, 10, :o5, 19749171, 8 - tz.transition 2047, 3, :o6, 19750403, 8 - tz.transition 2047, 10, :o5, 19752083, 8 - tz.transition 2048, 3, :o6, 19753315, 8 - tz.transition 2048, 10, :o5, 19754995, 8 - tz.transition 2049, 3, :o6, 19756227, 8 - tz.transition 2049, 10, :o5, 19757963, 8 - tz.transition 2050, 3, :o6, 19759139, 8 - tz.transition 2050, 10, :o5, 19760875, 8 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yerevan.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yerevan.rb deleted file mode 100644 index e7f160861f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Asia/Yerevan.rb +++ /dev/null @@ -1,165 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Yerevan - include TimezoneDefinition - - timezone 'Asia/Yerevan' do |tz| - tz.offset :o0, 10680, 0, :LMT - tz.offset :o1, 10800, 0, :YERT - tz.offset :o2, 14400, 0, :YERT - tz.offset :o3, 14400, 3600, :YERST - tz.offset :o4, 10800, 3600, :YERST - tz.offset :o5, 10800, 3600, :AMST - tz.offset :o6, 10800, 0, :AMT - tz.offset :o7, 14400, 0, :AMT - tz.offset :o8, 14400, 3600, :AMST - - tz.transition 1924, 5, :o1, 1745213311, 720 - tz.transition 1957, 2, :o2, 19487187, 8 - tz.transition 1981, 3, :o3, 354916800 - tz.transition 1981, 9, :o2, 370724400 - tz.transition 1982, 3, :o3, 386452800 - tz.transition 1982, 9, :o2, 402260400 - tz.transition 1983, 3, :o3, 417988800 - tz.transition 1983, 9, :o2, 433796400 - tz.transition 1984, 3, :o3, 449611200 - tz.transition 1984, 9, :o2, 465343200 - tz.transition 1985, 3, :o3, 481068000 - tz.transition 1985, 9, :o2, 496792800 - tz.transition 1986, 3, :o3, 512517600 - tz.transition 1986, 9, :o2, 528242400 - tz.transition 1987, 3, :o3, 543967200 - tz.transition 1987, 9, :o2, 559692000 - tz.transition 1988, 3, :o3, 575416800 - tz.transition 1988, 9, :o2, 591141600 - tz.transition 1989, 3, :o3, 606866400 - tz.transition 1989, 9, :o2, 622591200 - tz.transition 1990, 3, :o3, 638316000 - tz.transition 1990, 9, :o2, 654645600 - tz.transition 1991, 3, :o4, 670370400 - tz.transition 1991, 9, :o5, 685569600 - tz.transition 1991, 9, :o6, 686098800 - tz.transition 1992, 3, :o5, 701812800 - tz.transition 1992, 9, :o6, 717534000 - tz.transition 1993, 3, :o5, 733273200 - tz.transition 1993, 9, :o6, 748998000 - tz.transition 1994, 3, :o5, 764722800 - tz.transition 1994, 9, :o6, 780447600 - tz.transition 1995, 3, :o5, 796172400 - tz.transition 1995, 9, :o7, 811897200 - tz.transition 1997, 3, :o8, 859672800 - tz.transition 1997, 10, :o7, 877816800 - tz.transition 1998, 3, :o8, 891122400 - tz.transition 1998, 10, :o7, 909266400 - tz.transition 1999, 3, :o8, 922572000 - tz.transition 1999, 10, :o7, 941320800 - tz.transition 2000, 3, :o8, 954021600 - tz.transition 2000, 10, :o7, 972770400 - tz.transition 2001, 3, :o8, 985471200 - tz.transition 2001, 10, :o7, 1004220000 - tz.transition 2002, 3, :o8, 1017525600 - tz.transition 2002, 10, :o7, 1035669600 - tz.transition 2003, 3, :o8, 1048975200 - tz.transition 2003, 10, :o7, 1067119200 - tz.transition 2004, 3, :o8, 1080424800 - tz.transition 2004, 10, :o7, 1099173600 - tz.transition 2005, 3, :o8, 1111874400 - tz.transition 2005, 10, :o7, 1130623200 - tz.transition 2006, 3, :o8, 1143324000 - tz.transition 2006, 10, :o7, 1162072800 - tz.transition 2007, 3, :o8, 1174773600 - tz.transition 2007, 10, :o7, 1193522400 - tz.transition 2008, 3, :o8, 1206828000 - tz.transition 2008, 10, :o7, 1224972000 - tz.transition 2009, 3, :o8, 1238277600 - tz.transition 2009, 10, :o7, 1256421600 - tz.transition 2010, 3, :o8, 1269727200 - tz.transition 2010, 10, :o7, 1288476000 - tz.transition 2011, 3, :o8, 1301176800 - tz.transition 2011, 10, :o7, 1319925600 - tz.transition 2012, 3, :o8, 1332626400 - tz.transition 2012, 10, :o7, 1351375200 - tz.transition 2013, 3, :o8, 1364680800 - tz.transition 2013, 10, :o7, 1382824800 - tz.transition 2014, 3, :o8, 1396130400 - tz.transition 2014, 10, :o7, 1414274400 - tz.transition 2015, 3, :o8, 1427580000 - tz.transition 2015, 10, :o7, 1445724000 - tz.transition 2016, 3, :o8, 1459029600 - tz.transition 2016, 10, :o7, 1477778400 - tz.transition 2017, 3, :o8, 1490479200 - tz.transition 2017, 10, :o7, 1509228000 - tz.transition 2018, 3, :o8, 1521928800 - tz.transition 2018, 10, :o7, 1540677600 - tz.transition 2019, 3, :o8, 1553983200 - tz.transition 2019, 10, :o7, 1572127200 - tz.transition 2020, 3, :o8, 1585432800 - tz.transition 2020, 10, :o7, 1603576800 - tz.transition 2021, 3, :o8, 1616882400 - tz.transition 2021, 10, :o7, 1635631200 - tz.transition 2022, 3, :o8, 1648332000 - tz.transition 2022, 10, :o7, 1667080800 - tz.transition 2023, 3, :o8, 1679781600 - tz.transition 2023, 10, :o7, 1698530400 - tz.transition 2024, 3, :o8, 1711836000 - tz.transition 2024, 10, :o7, 1729980000 - tz.transition 2025, 3, :o8, 1743285600 - tz.transition 2025, 10, :o7, 1761429600 - tz.transition 2026, 3, :o8, 1774735200 - tz.transition 2026, 10, :o7, 1792879200 - tz.transition 2027, 3, :o8, 1806184800 - tz.transition 2027, 10, :o7, 1824933600 - tz.transition 2028, 3, :o8, 1837634400 - tz.transition 2028, 10, :o7, 1856383200 - tz.transition 2029, 3, :o8, 1869084000 - tz.transition 2029, 10, :o7, 1887832800 - tz.transition 2030, 3, :o8, 1901138400 - tz.transition 2030, 10, :o7, 1919282400 - tz.transition 2031, 3, :o8, 1932588000 - tz.transition 2031, 10, :o7, 1950732000 - tz.transition 2032, 3, :o8, 1964037600 - tz.transition 2032, 10, :o7, 1982786400 - tz.transition 2033, 3, :o8, 1995487200 - tz.transition 2033, 10, :o7, 2014236000 - tz.transition 2034, 3, :o8, 2026936800 - tz.transition 2034, 10, :o7, 2045685600 - tz.transition 2035, 3, :o8, 2058386400 - tz.transition 2035, 10, :o7, 2077135200 - tz.transition 2036, 3, :o8, 2090440800 - tz.transition 2036, 10, :o7, 2108584800 - tz.transition 2037, 3, :o8, 2121890400 - tz.transition 2037, 10, :o7, 2140034400 - tz.transition 2038, 3, :o8, 29586125, 12 - tz.transition 2038, 10, :o7, 29588729, 12 - tz.transition 2039, 3, :o8, 29590493, 12 - tz.transition 2039, 10, :o7, 29593097, 12 - tz.transition 2040, 3, :o8, 29594861, 12 - tz.transition 2040, 10, :o7, 29597465, 12 - tz.transition 2041, 3, :o8, 29599313, 12 - tz.transition 2041, 10, :o7, 29601833, 12 - tz.transition 2042, 3, :o8, 29603681, 12 - tz.transition 2042, 10, :o7, 29606201, 12 - tz.transition 2043, 3, :o8, 29608049, 12 - tz.transition 2043, 10, :o7, 29610569, 12 - tz.transition 2044, 3, :o8, 29612417, 12 - tz.transition 2044, 10, :o7, 29615021, 12 - tz.transition 2045, 3, :o8, 29616785, 12 - tz.transition 2045, 10, :o7, 29619389, 12 - tz.transition 2046, 3, :o8, 29621153, 12 - tz.transition 2046, 10, :o7, 29623757, 12 - tz.transition 2047, 3, :o8, 29625605, 12 - tz.transition 2047, 10, :o7, 29628125, 12 - tz.transition 2048, 3, :o8, 29629973, 12 - tz.transition 2048, 10, :o7, 29632493, 12 - tz.transition 2049, 3, :o8, 29634341, 12 - tz.transition 2049, 10, :o7, 29636945, 12 - tz.transition 2050, 3, :o8, 29638709, 12 - tz.transition 2050, 10, :o7, 29641313, 12 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Azores.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Azores.rb deleted file mode 100644 index 1bd16a75ac..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Azores.rb +++ /dev/null @@ -1,270 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Atlantic - module Azores - include TimezoneDefinition - - timezone 'Atlantic/Azores' do |tz| - tz.offset :o0, -6160, 0, :LMT - tz.offset :o1, -6872, 0, :HMT - tz.offset :o2, -7200, 0, :AZOT - tz.offset :o3, -7200, 3600, :AZOST - tz.offset :o4, -7200, 7200, :AZOMT - tz.offset :o5, -3600, 0, :AZOT - tz.offset :o6, -3600, 3600, :AZOST - tz.offset :o7, 0, 0, :WET - - tz.transition 1884, 1, :o1, 2601910697, 1080 - tz.transition 1911, 5, :o2, 26127150259, 10800 - tz.transition 1916, 6, :o3, 58104781, 24 - tz.transition 1916, 11, :o2, 29054023, 12 - tz.transition 1917, 3, :o3, 58110925, 24 - tz.transition 1917, 10, :o2, 58116397, 24 - tz.transition 1918, 3, :o3, 58119709, 24 - tz.transition 1918, 10, :o2, 58125157, 24 - tz.transition 1919, 3, :o3, 58128445, 24 - tz.transition 1919, 10, :o2, 58133917, 24 - tz.transition 1920, 3, :o3, 58137229, 24 - tz.transition 1920, 10, :o2, 58142701, 24 - tz.transition 1921, 3, :o3, 58145989, 24 - tz.transition 1921, 10, :o2, 58151461, 24 - tz.transition 1924, 4, :o3, 58173421, 24 - tz.transition 1924, 10, :o2, 58177765, 24 - tz.transition 1926, 4, :o3, 58190965, 24 - tz.transition 1926, 10, :o2, 58194997, 24 - tz.transition 1927, 4, :o3, 58199533, 24 - tz.transition 1927, 10, :o2, 58203733, 24 - tz.transition 1928, 4, :o3, 58208437, 24 - tz.transition 1928, 10, :o2, 58212637, 24 - tz.transition 1929, 4, :o3, 58217341, 24 - tz.transition 1929, 10, :o2, 58221373, 24 - tz.transition 1931, 4, :o3, 58234813, 24 - tz.transition 1931, 10, :o2, 58238845, 24 - tz.transition 1932, 4, :o3, 58243213, 24 - tz.transition 1932, 10, :o2, 58247581, 24 - tz.transition 1934, 4, :o3, 58260853, 24 - tz.transition 1934, 10, :o2, 58265221, 24 - tz.transition 1935, 3, :o3, 58269421, 24 - tz.transition 1935, 10, :o2, 58273957, 24 - tz.transition 1936, 4, :o3, 58278661, 24 - tz.transition 1936, 10, :o2, 58282693, 24 - tz.transition 1937, 4, :o3, 58287061, 24 - tz.transition 1937, 10, :o2, 58291429, 24 - tz.transition 1938, 3, :o3, 58295629, 24 - tz.transition 1938, 10, :o2, 58300165, 24 - tz.transition 1939, 4, :o3, 58304869, 24 - tz.transition 1939, 11, :o2, 58310077, 24 - tz.transition 1940, 2, :o3, 58312429, 24 - tz.transition 1940, 10, :o2, 58317805, 24 - tz.transition 1941, 4, :o3, 58322173, 24 - tz.transition 1941, 10, :o2, 58326565, 24 - tz.transition 1942, 3, :o3, 58330405, 24 - tz.transition 1942, 4, :o4, 4860951, 2 - tz.transition 1942, 8, :o3, 4861175, 2 - tz.transition 1942, 10, :o2, 58335781, 24 - tz.transition 1943, 3, :o3, 58339141, 24 - tz.transition 1943, 4, :o4, 4861665, 2 - tz.transition 1943, 8, :o3, 4861931, 2 - tz.transition 1943, 10, :o2, 58344685, 24 - tz.transition 1944, 3, :o3, 58347877, 24 - tz.transition 1944, 4, :o4, 4862407, 2 - tz.transition 1944, 8, :o3, 4862659, 2 - tz.transition 1944, 10, :o2, 58353421, 24 - tz.transition 1945, 3, :o3, 58356613, 24 - tz.transition 1945, 4, :o4, 4863135, 2 - tz.transition 1945, 8, :o3, 4863387, 2 - tz.transition 1945, 10, :o2, 58362157, 24 - tz.transition 1946, 4, :o3, 58366021, 24 - tz.transition 1946, 10, :o2, 58370389, 24 - tz.transition 1947, 4, :o3, 7296845, 3 - tz.transition 1947, 10, :o2, 7297391, 3 - tz.transition 1948, 4, :o3, 7297937, 3 - tz.transition 1948, 10, :o2, 7298483, 3 - tz.transition 1949, 4, :o3, 7299029, 3 - tz.transition 1949, 10, :o2, 7299575, 3 - tz.transition 1951, 4, :o3, 7301213, 3 - tz.transition 1951, 10, :o2, 7301780, 3 - tz.transition 1952, 4, :o3, 7302326, 3 - tz.transition 1952, 10, :o2, 7302872, 3 - tz.transition 1953, 4, :o3, 7303418, 3 - tz.transition 1953, 10, :o2, 7303964, 3 - tz.transition 1954, 4, :o3, 7304510, 3 - tz.transition 1954, 10, :o2, 7305056, 3 - tz.transition 1955, 4, :o3, 7305602, 3 - tz.transition 1955, 10, :o2, 7306148, 3 - tz.transition 1956, 4, :o3, 7306694, 3 - tz.transition 1956, 10, :o2, 7307261, 3 - tz.transition 1957, 4, :o3, 7307807, 3 - tz.transition 1957, 10, :o2, 7308353, 3 - tz.transition 1958, 4, :o3, 7308899, 3 - tz.transition 1958, 10, :o2, 7309445, 3 - tz.transition 1959, 4, :o3, 7309991, 3 - tz.transition 1959, 10, :o2, 7310537, 3 - tz.transition 1960, 4, :o3, 7311083, 3 - tz.transition 1960, 10, :o2, 7311629, 3 - tz.transition 1961, 4, :o3, 7312175, 3 - tz.transition 1961, 10, :o2, 7312721, 3 - tz.transition 1962, 4, :o3, 7313267, 3 - tz.transition 1962, 10, :o2, 7313834, 3 - tz.transition 1963, 4, :o3, 7314380, 3 - tz.transition 1963, 10, :o2, 7314926, 3 - tz.transition 1964, 4, :o3, 7315472, 3 - tz.transition 1964, 10, :o2, 7316018, 3 - tz.transition 1965, 4, :o3, 7316564, 3 - tz.transition 1965, 10, :o2, 7317110, 3 - tz.transition 1966, 4, :o5, 7317656, 3 - tz.transition 1977, 3, :o6, 228272400 - tz.transition 1977, 9, :o5, 243997200 - tz.transition 1978, 4, :o6, 260326800 - tz.transition 1978, 10, :o5, 276051600 - tz.transition 1979, 4, :o6, 291776400 - tz.transition 1979, 9, :o5, 307504800 - tz.transition 1980, 3, :o6, 323226000 - tz.transition 1980, 9, :o5, 338954400 - tz.transition 1981, 3, :o6, 354679200 - tz.transition 1981, 9, :o5, 370404000 - tz.transition 1982, 3, :o6, 386128800 - tz.transition 1982, 9, :o5, 401853600 - tz.transition 1983, 3, :o6, 417582000 - tz.transition 1983, 9, :o5, 433303200 - tz.transition 1984, 3, :o6, 449028000 - tz.transition 1984, 9, :o5, 465357600 - tz.transition 1985, 3, :o6, 481082400 - tz.transition 1985, 9, :o5, 496807200 - tz.transition 1986, 3, :o6, 512532000 - tz.transition 1986, 9, :o5, 528256800 - tz.transition 1987, 3, :o6, 543981600 - tz.transition 1987, 9, :o5, 559706400 - tz.transition 1988, 3, :o6, 575431200 - tz.transition 1988, 9, :o5, 591156000 - tz.transition 1989, 3, :o6, 606880800 - tz.transition 1989, 9, :o5, 622605600 - tz.transition 1990, 3, :o6, 638330400 - tz.transition 1990, 9, :o5, 654660000 - tz.transition 1991, 3, :o6, 670384800 - tz.transition 1991, 9, :o5, 686109600 - tz.transition 1992, 3, :o6, 701834400 - tz.transition 1992, 9, :o7, 717559200 - tz.transition 1993, 3, :o6, 733280400 - tz.transition 1993, 9, :o5, 749005200 - tz.transition 1994, 3, :o6, 764730000 - tz.transition 1994, 9, :o5, 780454800 - tz.transition 1995, 3, :o6, 796179600 - tz.transition 1995, 9, :o5, 811904400 - tz.transition 1996, 3, :o6, 828234000 - tz.transition 1996, 10, :o5, 846378000 - tz.transition 1997, 3, :o6, 859683600 - tz.transition 1997, 10, :o5, 877827600 - tz.transition 1998, 3, :o6, 891133200 - tz.transition 1998, 10, :o5, 909277200 - tz.transition 1999, 3, :o6, 922582800 - tz.transition 1999, 10, :o5, 941331600 - tz.transition 2000, 3, :o6, 954032400 - tz.transition 2000, 10, :o5, 972781200 - tz.transition 2001, 3, :o6, 985482000 - tz.transition 2001, 10, :o5, 1004230800 - tz.transition 2002, 3, :o6, 1017536400 - tz.transition 2002, 10, :o5, 1035680400 - tz.transition 2003, 3, :o6, 1048986000 - tz.transition 2003, 10, :o5, 1067130000 - tz.transition 2004, 3, :o6, 1080435600 - tz.transition 2004, 10, :o5, 1099184400 - tz.transition 2005, 3, :o6, 1111885200 - tz.transition 2005, 10, :o5, 1130634000 - tz.transition 2006, 3, :o6, 1143334800 - tz.transition 2006, 10, :o5, 1162083600 - tz.transition 2007, 3, :o6, 1174784400 - tz.transition 2007, 10, :o5, 1193533200 - tz.transition 2008, 3, :o6, 1206838800 - tz.transition 2008, 10, :o5, 1224982800 - tz.transition 2009, 3, :o6, 1238288400 - tz.transition 2009, 10, :o5, 1256432400 - tz.transition 2010, 3, :o6, 1269738000 - tz.transition 2010, 10, :o5, 1288486800 - tz.transition 2011, 3, :o6, 1301187600 - tz.transition 2011, 10, :o5, 1319936400 - tz.transition 2012, 3, :o6, 1332637200 - tz.transition 2012, 10, :o5, 1351386000 - tz.transition 2013, 3, :o6, 1364691600 - tz.transition 2013, 10, :o5, 1382835600 - tz.transition 2014, 3, :o6, 1396141200 - tz.transition 2014, 10, :o5, 1414285200 - tz.transition 2015, 3, :o6, 1427590800 - tz.transition 2015, 10, :o5, 1445734800 - tz.transition 2016, 3, :o6, 1459040400 - tz.transition 2016, 10, :o5, 1477789200 - tz.transition 2017, 3, :o6, 1490490000 - tz.transition 2017, 10, :o5, 1509238800 - tz.transition 2018, 3, :o6, 1521939600 - tz.transition 2018, 10, :o5, 1540688400 - tz.transition 2019, 3, :o6, 1553994000 - tz.transition 2019, 10, :o5, 1572138000 - tz.transition 2020, 3, :o6, 1585443600 - tz.transition 2020, 10, :o5, 1603587600 - tz.transition 2021, 3, :o6, 1616893200 - tz.transition 2021, 10, :o5, 1635642000 - tz.transition 2022, 3, :o6, 1648342800 - tz.transition 2022, 10, :o5, 1667091600 - tz.transition 2023, 3, :o6, 1679792400 - tz.transition 2023, 10, :o5, 1698541200 - tz.transition 2024, 3, :o6, 1711846800 - tz.transition 2024, 10, :o5, 1729990800 - tz.transition 2025, 3, :o6, 1743296400 - tz.transition 2025, 10, :o5, 1761440400 - tz.transition 2026, 3, :o6, 1774746000 - tz.transition 2026, 10, :o5, 1792890000 - tz.transition 2027, 3, :o6, 1806195600 - tz.transition 2027, 10, :o5, 1824944400 - tz.transition 2028, 3, :o6, 1837645200 - tz.transition 2028, 10, :o5, 1856394000 - tz.transition 2029, 3, :o6, 1869094800 - tz.transition 2029, 10, :o5, 1887843600 - tz.transition 2030, 3, :o6, 1901149200 - tz.transition 2030, 10, :o5, 1919293200 - tz.transition 2031, 3, :o6, 1932598800 - tz.transition 2031, 10, :o5, 1950742800 - tz.transition 2032, 3, :o6, 1964048400 - tz.transition 2032, 10, :o5, 1982797200 - tz.transition 2033, 3, :o6, 1995498000 - tz.transition 2033, 10, :o5, 2014246800 - tz.transition 2034, 3, :o6, 2026947600 - tz.transition 2034, 10, :o5, 2045696400 - tz.transition 2035, 3, :o6, 2058397200 - tz.transition 2035, 10, :o5, 2077146000 - tz.transition 2036, 3, :o6, 2090451600 - tz.transition 2036, 10, :o5, 2108595600 - tz.transition 2037, 3, :o6, 2121901200 - tz.transition 2037, 10, :o5, 2140045200 - tz.transition 2038, 3, :o6, 59172253, 24 - tz.transition 2038, 10, :o5, 59177461, 24 - tz.transition 2039, 3, :o6, 59180989, 24 - tz.transition 2039, 10, :o5, 59186197, 24 - tz.transition 2040, 3, :o6, 59189725, 24 - tz.transition 2040, 10, :o5, 59194933, 24 - tz.transition 2041, 3, :o6, 59198629, 24 - tz.transition 2041, 10, :o5, 59203669, 24 - tz.transition 2042, 3, :o6, 59207365, 24 - tz.transition 2042, 10, :o5, 59212405, 24 - tz.transition 2043, 3, :o6, 59216101, 24 - tz.transition 2043, 10, :o5, 59221141, 24 - tz.transition 2044, 3, :o6, 59224837, 24 - tz.transition 2044, 10, :o5, 59230045, 24 - tz.transition 2045, 3, :o6, 59233573, 24 - tz.transition 2045, 10, :o5, 59238781, 24 - tz.transition 2046, 3, :o6, 59242309, 24 - tz.transition 2046, 10, :o5, 59247517, 24 - tz.transition 2047, 3, :o6, 59251213, 24 - tz.transition 2047, 10, :o5, 59256253, 24 - tz.transition 2048, 3, :o6, 59259949, 24 - tz.transition 2048, 10, :o5, 59264989, 24 - tz.transition 2049, 3, :o6, 59268685, 24 - tz.transition 2049, 10, :o5, 59273893, 24 - tz.transition 2050, 3, :o6, 59277421, 24 - tz.transition 2050, 10, :o5, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Cape_Verde.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Cape_Verde.rb deleted file mode 100644 index 61c8c15043..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/Cape_Verde.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Atlantic - module Cape_Verde - include TimezoneDefinition - - timezone 'Atlantic/Cape_Verde' do |tz| - tz.offset :o0, -5644, 0, :LMT - tz.offset :o1, -7200, 0, :CVT - tz.offset :o2, -7200, 3600, :CVST - tz.offset :o3, -3600, 0, :CVT - - tz.transition 1907, 1, :o1, 52219653811, 21600 - tz.transition 1942, 9, :o2, 29167243, 12 - tz.transition 1945, 10, :o1, 58361845, 24 - tz.transition 1975, 11, :o3, 186120000 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/South_Georgia.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/South_Georgia.rb deleted file mode 100644 index 6a4cbafb9f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Atlantic/South_Georgia.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Atlantic - module South_Georgia - include TimezoneDefinition - - timezone 'Atlantic/South_Georgia' do |tz| - tz.offset :o0, -8768, 0, :LMT - tz.offset :o1, -7200, 0, :GST - - tz.transition 1890, 1, :o1, 1627673806, 675 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Adelaide.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Adelaide.rb deleted file mode 100644 index c5d561cc1e..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Adelaide.rb +++ /dev/null @@ -1,187 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Adelaide - include TimezoneDefinition - - timezone 'Australia/Adelaide' do |tz| - tz.offset :o0, 33260, 0, :LMT - tz.offset :o1, 32400, 0, :CST - tz.offset :o2, 34200, 0, :CST - tz.offset :o3, 34200, 3600, :CST - - tz.transition 1895, 1, :o1, 10425132497, 4320 - tz.transition 1899, 4, :o2, 19318201, 8 - tz.transition 1916, 12, :o3, 3486569911, 1440 - tz.transition 1917, 3, :o2, 116222983, 48 - tz.transition 1941, 12, :o3, 38885763, 16 - tz.transition 1942, 3, :o2, 116661463, 48 - tz.transition 1942, 9, :o3, 38890067, 16 - tz.transition 1943, 3, :o2, 116678935, 48 - tz.transition 1943, 10, :o3, 38896003, 16 - tz.transition 1944, 3, :o2, 116696407, 48 - tz.transition 1971, 10, :o3, 57688200 - tz.transition 1972, 2, :o2, 67969800 - tz.transition 1972, 10, :o3, 89137800 - tz.transition 1973, 3, :o2, 100024200 - tz.transition 1973, 10, :o3, 120587400 - tz.transition 1974, 3, :o2, 131473800 - tz.transition 1974, 10, :o3, 152037000 - tz.transition 1975, 3, :o2, 162923400 - tz.transition 1975, 10, :o3, 183486600 - tz.transition 1976, 3, :o2, 194977800 - tz.transition 1976, 10, :o3, 215541000 - tz.transition 1977, 3, :o2, 226427400 - tz.transition 1977, 10, :o3, 246990600 - tz.transition 1978, 3, :o2, 257877000 - tz.transition 1978, 10, :o3, 278440200 - tz.transition 1979, 3, :o2, 289326600 - tz.transition 1979, 10, :o3, 309889800 - tz.transition 1980, 3, :o2, 320776200 - tz.transition 1980, 10, :o3, 341339400 - tz.transition 1981, 2, :o2, 352225800 - tz.transition 1981, 10, :o3, 372789000 - tz.transition 1982, 3, :o2, 384280200 - tz.transition 1982, 10, :o3, 404843400 - tz.transition 1983, 3, :o2, 415729800 - tz.transition 1983, 10, :o3, 436293000 - tz.transition 1984, 3, :o2, 447179400 - tz.transition 1984, 10, :o3, 467742600 - tz.transition 1985, 3, :o2, 478629000 - tz.transition 1985, 10, :o3, 499192200 - tz.transition 1986, 3, :o2, 511288200 - tz.transition 1986, 10, :o3, 530037000 - tz.transition 1987, 3, :o2, 542737800 - tz.transition 1987, 10, :o3, 562091400 - tz.transition 1988, 3, :o2, 574792200 - tz.transition 1988, 10, :o3, 594145800 - tz.transition 1989, 3, :o2, 606241800 - tz.transition 1989, 10, :o3, 625595400 - tz.transition 1990, 3, :o2, 637691400 - tz.transition 1990, 10, :o3, 657045000 - tz.transition 1991, 3, :o2, 667931400 - tz.transition 1991, 10, :o3, 688494600 - tz.transition 1992, 3, :o2, 701195400 - tz.transition 1992, 10, :o3, 719944200 - tz.transition 1993, 3, :o2, 731435400 - tz.transition 1993, 10, :o3, 751998600 - tz.transition 1994, 3, :o2, 764094600 - tz.transition 1994, 10, :o3, 783448200 - tz.transition 1995, 3, :o2, 796149000 - tz.transition 1995, 10, :o3, 814897800 - tz.transition 1996, 3, :o2, 828203400 - tz.transition 1996, 10, :o3, 846347400 - tz.transition 1997, 3, :o2, 859653000 - tz.transition 1997, 10, :o3, 877797000 - tz.transition 1998, 3, :o2, 891102600 - tz.transition 1998, 10, :o3, 909246600 - tz.transition 1999, 3, :o2, 922552200 - tz.transition 1999, 10, :o3, 941301000 - tz.transition 2000, 3, :o2, 954001800 - tz.transition 2000, 10, :o3, 972750600 - tz.transition 2001, 3, :o2, 985451400 - tz.transition 2001, 10, :o3, 1004200200 - tz.transition 2002, 3, :o2, 1017505800 - tz.transition 2002, 10, :o3, 1035649800 - tz.transition 2003, 3, :o2, 1048955400 - tz.transition 2003, 10, :o3, 1067099400 - tz.transition 2004, 3, :o2, 1080405000 - tz.transition 2004, 10, :o3, 1099153800 - tz.transition 2005, 3, :o2, 1111854600 - tz.transition 2005, 10, :o3, 1130603400 - tz.transition 2006, 4, :o2, 1143909000 - tz.transition 2006, 10, :o3, 1162053000 - tz.transition 2007, 3, :o2, 1174753800 - tz.transition 2007, 10, :o3, 1193502600 - tz.transition 2008, 4, :o2, 1207413000 - tz.transition 2008, 10, :o3, 1223137800 - tz.transition 2009, 4, :o2, 1238862600 - tz.transition 2009, 10, :o3, 1254587400 - tz.transition 2010, 4, :o2, 1270312200 - tz.transition 2010, 10, :o3, 1286037000 - tz.transition 2011, 4, :o2, 1301761800 - tz.transition 2011, 10, :o3, 1317486600 - tz.transition 2012, 3, :o2, 1333211400 - tz.transition 2012, 10, :o3, 1349541000 - tz.transition 2013, 4, :o2, 1365265800 - tz.transition 2013, 10, :o3, 1380990600 - tz.transition 2014, 4, :o2, 1396715400 - tz.transition 2014, 10, :o3, 1412440200 - tz.transition 2015, 4, :o2, 1428165000 - tz.transition 2015, 10, :o3, 1443889800 - tz.transition 2016, 4, :o2, 1459614600 - tz.transition 2016, 10, :o3, 1475339400 - tz.transition 2017, 4, :o2, 1491064200 - tz.transition 2017, 9, :o3, 1506789000 - tz.transition 2018, 3, :o2, 1522513800 - tz.transition 2018, 10, :o3, 1538843400 - tz.transition 2019, 4, :o2, 1554568200 - tz.transition 2019, 10, :o3, 1570293000 - tz.transition 2020, 4, :o2, 1586017800 - tz.transition 2020, 10, :o3, 1601742600 - tz.transition 2021, 4, :o2, 1617467400 - tz.transition 2021, 10, :o3, 1633192200 - tz.transition 2022, 4, :o2, 1648917000 - tz.transition 2022, 10, :o3, 1664641800 - tz.transition 2023, 4, :o2, 1680366600 - tz.transition 2023, 9, :o3, 1696091400 - tz.transition 2024, 4, :o2, 1712421000 - tz.transition 2024, 10, :o3, 1728145800 - tz.transition 2025, 4, :o2, 1743870600 - tz.transition 2025, 10, :o3, 1759595400 - tz.transition 2026, 4, :o2, 1775320200 - tz.transition 2026, 10, :o3, 1791045000 - tz.transition 2027, 4, :o2, 1806769800 - tz.transition 2027, 10, :o3, 1822494600 - tz.transition 2028, 4, :o2, 1838219400 - tz.transition 2028, 9, :o3, 1853944200 - tz.transition 2029, 3, :o2, 1869669000 - tz.transition 2029, 10, :o3, 1885998600 - tz.transition 2030, 4, :o2, 1901723400 - tz.transition 2030, 10, :o3, 1917448200 - tz.transition 2031, 4, :o2, 1933173000 - tz.transition 2031, 10, :o3, 1948897800 - tz.transition 2032, 4, :o2, 1964622600 - tz.transition 2032, 10, :o3, 1980347400 - tz.transition 2033, 4, :o2, 1996072200 - tz.transition 2033, 10, :o3, 2011797000 - tz.transition 2034, 4, :o2, 2027521800 - tz.transition 2034, 9, :o3, 2043246600 - tz.transition 2035, 3, :o2, 2058971400 - tz.transition 2035, 10, :o3, 2075301000 - tz.transition 2036, 4, :o2, 2091025800 - tz.transition 2036, 10, :o3, 2106750600 - tz.transition 2037, 4, :o2, 2122475400 - tz.transition 2037, 10, :o3, 2138200200 - tz.transition 2038, 4, :o2, 39448275, 16 - tz.transition 2038, 10, :o3, 39451187, 16 - tz.transition 2039, 4, :o2, 39454099, 16 - tz.transition 2039, 10, :o3, 39457011, 16 - tz.transition 2040, 3, :o2, 39459923, 16 - tz.transition 2040, 10, :o3, 39462947, 16 - tz.transition 2041, 4, :o2, 39465859, 16 - tz.transition 2041, 10, :o3, 39468771, 16 - tz.transition 2042, 4, :o2, 39471683, 16 - tz.transition 2042, 10, :o3, 39474595, 16 - tz.transition 2043, 4, :o2, 39477507, 16 - tz.transition 2043, 10, :o3, 39480419, 16 - tz.transition 2044, 4, :o2, 39483331, 16 - tz.transition 2044, 10, :o3, 39486243, 16 - tz.transition 2045, 4, :o2, 39489155, 16 - tz.transition 2045, 9, :o3, 39492067, 16 - tz.transition 2046, 3, :o2, 39494979, 16 - tz.transition 2046, 10, :o3, 39498003, 16 - tz.transition 2047, 4, :o2, 39500915, 16 - tz.transition 2047, 10, :o3, 39503827, 16 - tz.transition 2048, 4, :o2, 39506739, 16 - tz.transition 2048, 10, :o3, 39509651, 16 - tz.transition 2049, 4, :o2, 39512563, 16 - tz.transition 2049, 10, :o3, 39515475, 16 - tz.transition 2050, 4, :o2, 39518387, 16 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Brisbane.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Brisbane.rb deleted file mode 100644 index dd85ddae94..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Brisbane.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Brisbane - include TimezoneDefinition - - timezone 'Australia/Brisbane' do |tz| - tz.offset :o0, 36728, 0, :LMT - tz.offset :o1, 36000, 0, :EST - tz.offset :o2, 36000, 3600, :EST - - tz.transition 1894, 12, :o1, 26062496009, 10800 - tz.transition 1916, 12, :o2, 3486569881, 1440 - tz.transition 1917, 3, :o1, 19370497, 8 - tz.transition 1941, 12, :o2, 14582161, 6 - tz.transition 1942, 3, :o1, 19443577, 8 - tz.transition 1942, 9, :o2, 14583775, 6 - tz.transition 1943, 3, :o1, 19446489, 8 - tz.transition 1943, 10, :o2, 14586001, 6 - tz.transition 1944, 3, :o1, 19449401, 8 - tz.transition 1971, 10, :o2, 57686400 - tz.transition 1972, 2, :o1, 67968000 - tz.transition 1989, 10, :o2, 625593600 - tz.transition 1990, 3, :o1, 636480000 - tz.transition 1990, 10, :o2, 657043200 - tz.transition 1991, 3, :o1, 667929600 - tz.transition 1991, 10, :o2, 688492800 - tz.transition 1992, 2, :o1, 699379200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Darwin.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Darwin.rb deleted file mode 100644 index 17de88124d..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Darwin.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Darwin - include TimezoneDefinition - - timezone 'Australia/Darwin' do |tz| - tz.offset :o0, 31400, 0, :LMT - tz.offset :o1, 32400, 0, :CST - tz.offset :o2, 34200, 0, :CST - tz.offset :o3, 34200, 3600, :CST - - tz.transition 1895, 1, :o1, 1042513259, 432 - tz.transition 1899, 4, :o2, 19318201, 8 - tz.transition 1916, 12, :o3, 3486569911, 1440 - tz.transition 1917, 3, :o2, 116222983, 48 - tz.transition 1941, 12, :o3, 38885763, 16 - tz.transition 1942, 3, :o2, 116661463, 48 - tz.transition 1942, 9, :o3, 38890067, 16 - tz.transition 1943, 3, :o2, 116678935, 48 - tz.transition 1943, 10, :o3, 38896003, 16 - tz.transition 1944, 3, :o2, 116696407, 48 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Hobart.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Hobart.rb deleted file mode 100644 index 11384b9840..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Hobart.rb +++ /dev/null @@ -1,193 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Hobart - include TimezoneDefinition - - timezone 'Australia/Hobart' do |tz| - tz.offset :o0, 35356, 0, :LMT - tz.offset :o1, 36000, 0, :EST - tz.offset :o2, 36000, 3600, :EST - - tz.transition 1895, 8, :o1, 52130241161, 21600 - tz.transition 1916, 9, :o2, 14526823, 6 - tz.transition 1917, 3, :o1, 19370497, 8 - tz.transition 1941, 12, :o2, 14582161, 6 - tz.transition 1942, 3, :o1, 19443577, 8 - tz.transition 1942, 9, :o2, 14583775, 6 - tz.transition 1943, 3, :o1, 19446489, 8 - tz.transition 1943, 10, :o2, 14586001, 6 - tz.transition 1944, 3, :o1, 19449401, 8 - tz.transition 1967, 9, :o2, 14638585, 6 - tz.transition 1968, 3, :o1, 14639677, 6 - tz.transition 1968, 10, :o2, 14640937, 6 - tz.transition 1969, 3, :o1, 14641735, 6 - tz.transition 1969, 10, :o2, 14643121, 6 - tz.transition 1970, 3, :o1, 5673600 - tz.transition 1970, 10, :o2, 25632000 - tz.transition 1971, 3, :o1, 37728000 - tz.transition 1971, 10, :o2, 57686400 - tz.transition 1972, 2, :o1, 67968000 - tz.transition 1972, 10, :o2, 89136000 - tz.transition 1973, 3, :o1, 100022400 - tz.transition 1973, 10, :o2, 120585600 - tz.transition 1974, 3, :o1, 131472000 - tz.transition 1974, 10, :o2, 152035200 - tz.transition 1975, 3, :o1, 162921600 - tz.transition 1975, 10, :o2, 183484800 - tz.transition 1976, 3, :o1, 194976000 - tz.transition 1976, 10, :o2, 215539200 - tz.transition 1977, 3, :o1, 226425600 - tz.transition 1977, 10, :o2, 246988800 - tz.transition 1978, 3, :o1, 257875200 - tz.transition 1978, 10, :o2, 278438400 - tz.transition 1979, 3, :o1, 289324800 - tz.transition 1979, 10, :o2, 309888000 - tz.transition 1980, 3, :o1, 320774400 - tz.transition 1980, 10, :o2, 341337600 - tz.transition 1981, 2, :o1, 352224000 - tz.transition 1981, 10, :o2, 372787200 - tz.transition 1982, 3, :o1, 386092800 - tz.transition 1982, 10, :o2, 404841600 - tz.transition 1983, 3, :o1, 417542400 - tz.transition 1983, 10, :o2, 436291200 - tz.transition 1984, 3, :o1, 447177600 - tz.transition 1984, 10, :o2, 467740800 - tz.transition 1985, 3, :o1, 478627200 - tz.transition 1985, 10, :o2, 499190400 - tz.transition 1986, 3, :o1, 510076800 - tz.transition 1986, 10, :o2, 530035200 - tz.transition 1987, 3, :o1, 542736000 - tz.transition 1987, 10, :o2, 562089600 - tz.transition 1988, 3, :o1, 574790400 - tz.transition 1988, 10, :o2, 594144000 - tz.transition 1989, 3, :o1, 606240000 - tz.transition 1989, 10, :o2, 625593600 - tz.transition 1990, 3, :o1, 637689600 - tz.transition 1990, 10, :o2, 657043200 - tz.transition 1991, 3, :o1, 670348800 - tz.transition 1991, 10, :o2, 686678400 - tz.transition 1992, 3, :o1, 701798400 - tz.transition 1992, 10, :o2, 718128000 - tz.transition 1993, 3, :o1, 733248000 - tz.transition 1993, 10, :o2, 749577600 - tz.transition 1994, 3, :o1, 764697600 - tz.transition 1994, 10, :o2, 781027200 - tz.transition 1995, 3, :o1, 796147200 - tz.transition 1995, 9, :o2, 812476800 - tz.transition 1996, 3, :o1, 828201600 - tz.transition 1996, 10, :o2, 844531200 - tz.transition 1997, 3, :o1, 859651200 - tz.transition 1997, 10, :o2, 875980800 - tz.transition 1998, 3, :o1, 891100800 - tz.transition 1998, 10, :o2, 907430400 - tz.transition 1999, 3, :o1, 922550400 - tz.transition 1999, 10, :o2, 938880000 - tz.transition 2000, 3, :o1, 954000000 - tz.transition 2000, 8, :o2, 967305600 - tz.transition 2001, 3, :o1, 985449600 - tz.transition 2001, 10, :o2, 1002384000 - tz.transition 2002, 3, :o1, 1017504000 - tz.transition 2002, 10, :o2, 1033833600 - tz.transition 2003, 3, :o1, 1048953600 - tz.transition 2003, 10, :o2, 1065283200 - tz.transition 2004, 3, :o1, 1080403200 - tz.transition 2004, 10, :o2, 1096732800 - tz.transition 2005, 3, :o1, 1111852800 - tz.transition 2005, 10, :o2, 1128182400 - tz.transition 2006, 4, :o1, 1143907200 - tz.transition 2006, 9, :o2, 1159632000 - tz.transition 2007, 3, :o1, 1174752000 - tz.transition 2007, 10, :o2, 1191686400 - tz.transition 2008, 4, :o1, 1207411200 - tz.transition 2008, 10, :o2, 1223136000 - tz.transition 2009, 4, :o1, 1238860800 - tz.transition 2009, 10, :o2, 1254585600 - tz.transition 2010, 4, :o1, 1270310400 - tz.transition 2010, 10, :o2, 1286035200 - tz.transition 2011, 4, :o1, 1301760000 - tz.transition 2011, 10, :o2, 1317484800 - tz.transition 2012, 3, :o1, 1333209600 - tz.transition 2012, 10, :o2, 1349539200 - tz.transition 2013, 4, :o1, 1365264000 - tz.transition 2013, 10, :o2, 1380988800 - tz.transition 2014, 4, :o1, 1396713600 - tz.transition 2014, 10, :o2, 1412438400 - tz.transition 2015, 4, :o1, 1428163200 - tz.transition 2015, 10, :o2, 1443888000 - tz.transition 2016, 4, :o1, 1459612800 - tz.transition 2016, 10, :o2, 1475337600 - tz.transition 2017, 4, :o1, 1491062400 - tz.transition 2017, 9, :o2, 1506787200 - tz.transition 2018, 3, :o1, 1522512000 - tz.transition 2018, 10, :o2, 1538841600 - tz.transition 2019, 4, :o1, 1554566400 - tz.transition 2019, 10, :o2, 1570291200 - tz.transition 2020, 4, :o1, 1586016000 - tz.transition 2020, 10, :o2, 1601740800 - tz.transition 2021, 4, :o1, 1617465600 - tz.transition 2021, 10, :o2, 1633190400 - tz.transition 2022, 4, :o1, 1648915200 - tz.transition 2022, 10, :o2, 1664640000 - tz.transition 2023, 4, :o1, 1680364800 - tz.transition 2023, 9, :o2, 1696089600 - tz.transition 2024, 4, :o1, 1712419200 - tz.transition 2024, 10, :o2, 1728144000 - tz.transition 2025, 4, :o1, 1743868800 - tz.transition 2025, 10, :o2, 1759593600 - tz.transition 2026, 4, :o1, 1775318400 - tz.transition 2026, 10, :o2, 1791043200 - tz.transition 2027, 4, :o1, 1806768000 - tz.transition 2027, 10, :o2, 1822492800 - tz.transition 2028, 4, :o1, 1838217600 - tz.transition 2028, 9, :o2, 1853942400 - tz.transition 2029, 3, :o1, 1869667200 - tz.transition 2029, 10, :o2, 1885996800 - tz.transition 2030, 4, :o1, 1901721600 - tz.transition 2030, 10, :o2, 1917446400 - tz.transition 2031, 4, :o1, 1933171200 - tz.transition 2031, 10, :o2, 1948896000 - tz.transition 2032, 4, :o1, 1964620800 - tz.transition 2032, 10, :o2, 1980345600 - tz.transition 2033, 4, :o1, 1996070400 - tz.transition 2033, 10, :o2, 2011795200 - tz.transition 2034, 4, :o1, 2027520000 - tz.transition 2034, 9, :o2, 2043244800 - tz.transition 2035, 3, :o1, 2058969600 - tz.transition 2035, 10, :o2, 2075299200 - tz.transition 2036, 4, :o1, 2091024000 - tz.transition 2036, 10, :o2, 2106748800 - tz.transition 2037, 4, :o1, 2122473600 - tz.transition 2037, 10, :o2, 2138198400 - tz.transition 2038, 4, :o1, 14793103, 6 - tz.transition 2038, 10, :o2, 14794195, 6 - tz.transition 2039, 4, :o1, 14795287, 6 - tz.transition 2039, 10, :o2, 14796379, 6 - tz.transition 2040, 3, :o1, 14797471, 6 - tz.transition 2040, 10, :o2, 14798605, 6 - tz.transition 2041, 4, :o1, 14799697, 6 - tz.transition 2041, 10, :o2, 14800789, 6 - tz.transition 2042, 4, :o1, 14801881, 6 - tz.transition 2042, 10, :o2, 14802973, 6 - tz.transition 2043, 4, :o1, 14804065, 6 - tz.transition 2043, 10, :o2, 14805157, 6 - tz.transition 2044, 4, :o1, 14806249, 6 - tz.transition 2044, 10, :o2, 14807341, 6 - tz.transition 2045, 4, :o1, 14808433, 6 - tz.transition 2045, 9, :o2, 14809525, 6 - tz.transition 2046, 3, :o1, 14810617, 6 - tz.transition 2046, 10, :o2, 14811751, 6 - tz.transition 2047, 4, :o1, 14812843, 6 - tz.transition 2047, 10, :o2, 14813935, 6 - tz.transition 2048, 4, :o1, 14815027, 6 - tz.transition 2048, 10, :o2, 14816119, 6 - tz.transition 2049, 4, :o1, 14817211, 6 - tz.transition 2049, 10, :o2, 14818303, 6 - tz.transition 2050, 4, :o1, 14819395, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Melbourne.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Melbourne.rb deleted file mode 100644 index c1304488ea..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Melbourne.rb +++ /dev/null @@ -1,185 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Melbourne - include TimezoneDefinition - - timezone 'Australia/Melbourne' do |tz| - tz.offset :o0, 34792, 0, :LMT - tz.offset :o1, 36000, 0, :EST - tz.offset :o2, 36000, 3600, :EST - - tz.transition 1895, 1, :o1, 26062831051, 10800 - tz.transition 1916, 12, :o2, 3486569881, 1440 - tz.transition 1917, 3, :o1, 19370497, 8 - tz.transition 1941, 12, :o2, 14582161, 6 - tz.transition 1942, 3, :o1, 19443577, 8 - tz.transition 1942, 9, :o2, 14583775, 6 - tz.transition 1943, 3, :o1, 19446489, 8 - tz.transition 1943, 10, :o2, 14586001, 6 - tz.transition 1944, 3, :o1, 19449401, 8 - tz.transition 1971, 10, :o2, 57686400 - tz.transition 1972, 2, :o1, 67968000 - tz.transition 1972, 10, :o2, 89136000 - tz.transition 1973, 3, :o1, 100022400 - tz.transition 1973, 10, :o2, 120585600 - tz.transition 1974, 3, :o1, 131472000 - tz.transition 1974, 10, :o2, 152035200 - tz.transition 1975, 3, :o1, 162921600 - tz.transition 1975, 10, :o2, 183484800 - tz.transition 1976, 3, :o1, 194976000 - tz.transition 1976, 10, :o2, 215539200 - tz.transition 1977, 3, :o1, 226425600 - tz.transition 1977, 10, :o2, 246988800 - tz.transition 1978, 3, :o1, 257875200 - tz.transition 1978, 10, :o2, 278438400 - tz.transition 1979, 3, :o1, 289324800 - tz.transition 1979, 10, :o2, 309888000 - tz.transition 1980, 3, :o1, 320774400 - tz.transition 1980, 10, :o2, 341337600 - tz.transition 1981, 2, :o1, 352224000 - tz.transition 1981, 10, :o2, 372787200 - tz.transition 1982, 3, :o1, 384278400 - tz.transition 1982, 10, :o2, 404841600 - tz.transition 1983, 3, :o1, 415728000 - tz.transition 1983, 10, :o2, 436291200 - tz.transition 1984, 3, :o1, 447177600 - tz.transition 1984, 10, :o2, 467740800 - tz.transition 1985, 3, :o1, 478627200 - tz.transition 1985, 10, :o2, 499190400 - tz.transition 1986, 3, :o1, 511286400 - tz.transition 1986, 10, :o2, 530035200 - tz.transition 1987, 3, :o1, 542736000 - tz.transition 1987, 10, :o2, 561484800 - tz.transition 1988, 3, :o1, 574790400 - tz.transition 1988, 10, :o2, 594144000 - tz.transition 1989, 3, :o1, 606240000 - tz.transition 1989, 10, :o2, 625593600 - tz.transition 1990, 3, :o1, 637689600 - tz.transition 1990, 10, :o2, 657043200 - tz.transition 1991, 3, :o1, 667929600 - tz.transition 1991, 10, :o2, 688492800 - tz.transition 1992, 2, :o1, 699379200 - tz.transition 1992, 10, :o2, 719942400 - tz.transition 1993, 3, :o1, 731433600 - tz.transition 1993, 10, :o2, 751996800 - tz.transition 1994, 3, :o1, 762883200 - tz.transition 1994, 10, :o2, 783446400 - tz.transition 1995, 3, :o1, 796147200 - tz.transition 1995, 10, :o2, 814896000 - tz.transition 1996, 3, :o1, 828201600 - tz.transition 1996, 10, :o2, 846345600 - tz.transition 1997, 3, :o1, 859651200 - tz.transition 1997, 10, :o2, 877795200 - tz.transition 1998, 3, :o1, 891100800 - tz.transition 1998, 10, :o2, 909244800 - tz.transition 1999, 3, :o1, 922550400 - tz.transition 1999, 10, :o2, 941299200 - tz.transition 2000, 3, :o1, 954000000 - tz.transition 2000, 8, :o2, 967305600 - tz.transition 2001, 3, :o1, 985449600 - tz.transition 2001, 10, :o2, 1004198400 - tz.transition 2002, 3, :o1, 1017504000 - tz.transition 2002, 10, :o2, 1035648000 - tz.transition 2003, 3, :o1, 1048953600 - tz.transition 2003, 10, :o2, 1067097600 - tz.transition 2004, 3, :o1, 1080403200 - tz.transition 2004, 10, :o2, 1099152000 - tz.transition 2005, 3, :o1, 1111852800 - tz.transition 2005, 10, :o2, 1130601600 - tz.transition 2006, 4, :o1, 1143907200 - tz.transition 2006, 10, :o2, 1162051200 - tz.transition 2007, 3, :o1, 1174752000 - tz.transition 2007, 10, :o2, 1193500800 - tz.transition 2008, 4, :o1, 1207411200 - tz.transition 2008, 10, :o2, 1223136000 - tz.transition 2009, 4, :o1, 1238860800 - tz.transition 2009, 10, :o2, 1254585600 - tz.transition 2010, 4, :o1, 1270310400 - tz.transition 2010, 10, :o2, 1286035200 - tz.transition 2011, 4, :o1, 1301760000 - tz.transition 2011, 10, :o2, 1317484800 - tz.transition 2012, 3, :o1, 1333209600 - tz.transition 2012, 10, :o2, 1349539200 - tz.transition 2013, 4, :o1, 1365264000 - tz.transition 2013, 10, :o2, 1380988800 - tz.transition 2014, 4, :o1, 1396713600 - tz.transition 2014, 10, :o2, 1412438400 - tz.transition 2015, 4, :o1, 1428163200 - tz.transition 2015, 10, :o2, 1443888000 - tz.transition 2016, 4, :o1, 1459612800 - tz.transition 2016, 10, :o2, 1475337600 - tz.transition 2017, 4, :o1, 1491062400 - tz.transition 2017, 9, :o2, 1506787200 - tz.transition 2018, 3, :o1, 1522512000 - tz.transition 2018, 10, :o2, 1538841600 - tz.transition 2019, 4, :o1, 1554566400 - tz.transition 2019, 10, :o2, 1570291200 - tz.transition 2020, 4, :o1, 1586016000 - tz.transition 2020, 10, :o2, 1601740800 - tz.transition 2021, 4, :o1, 1617465600 - tz.transition 2021, 10, :o2, 1633190400 - tz.transition 2022, 4, :o1, 1648915200 - tz.transition 2022, 10, :o2, 1664640000 - tz.transition 2023, 4, :o1, 1680364800 - tz.transition 2023, 9, :o2, 1696089600 - tz.transition 2024, 4, :o1, 1712419200 - tz.transition 2024, 10, :o2, 1728144000 - tz.transition 2025, 4, :o1, 1743868800 - tz.transition 2025, 10, :o2, 1759593600 - tz.transition 2026, 4, :o1, 1775318400 - tz.transition 2026, 10, :o2, 1791043200 - tz.transition 2027, 4, :o1, 1806768000 - tz.transition 2027, 10, :o2, 1822492800 - tz.transition 2028, 4, :o1, 1838217600 - tz.transition 2028, 9, :o2, 1853942400 - tz.transition 2029, 3, :o1, 1869667200 - tz.transition 2029, 10, :o2, 1885996800 - tz.transition 2030, 4, :o1, 1901721600 - tz.transition 2030, 10, :o2, 1917446400 - tz.transition 2031, 4, :o1, 1933171200 - tz.transition 2031, 10, :o2, 1948896000 - tz.transition 2032, 4, :o1, 1964620800 - tz.transition 2032, 10, :o2, 1980345600 - tz.transition 2033, 4, :o1, 1996070400 - tz.transition 2033, 10, :o2, 2011795200 - tz.transition 2034, 4, :o1, 2027520000 - tz.transition 2034, 9, :o2, 2043244800 - tz.transition 2035, 3, :o1, 2058969600 - tz.transition 2035, 10, :o2, 2075299200 - tz.transition 2036, 4, :o1, 2091024000 - tz.transition 2036, 10, :o2, 2106748800 - tz.transition 2037, 4, :o1, 2122473600 - tz.transition 2037, 10, :o2, 2138198400 - tz.transition 2038, 4, :o1, 14793103, 6 - tz.transition 2038, 10, :o2, 14794195, 6 - tz.transition 2039, 4, :o1, 14795287, 6 - tz.transition 2039, 10, :o2, 14796379, 6 - tz.transition 2040, 3, :o1, 14797471, 6 - tz.transition 2040, 10, :o2, 14798605, 6 - tz.transition 2041, 4, :o1, 14799697, 6 - tz.transition 2041, 10, :o2, 14800789, 6 - tz.transition 2042, 4, :o1, 14801881, 6 - tz.transition 2042, 10, :o2, 14802973, 6 - tz.transition 2043, 4, :o1, 14804065, 6 - tz.transition 2043, 10, :o2, 14805157, 6 - tz.transition 2044, 4, :o1, 14806249, 6 - tz.transition 2044, 10, :o2, 14807341, 6 - tz.transition 2045, 4, :o1, 14808433, 6 - tz.transition 2045, 9, :o2, 14809525, 6 - tz.transition 2046, 3, :o1, 14810617, 6 - tz.transition 2046, 10, :o2, 14811751, 6 - tz.transition 2047, 4, :o1, 14812843, 6 - tz.transition 2047, 10, :o2, 14813935, 6 - tz.transition 2048, 4, :o1, 14815027, 6 - tz.transition 2048, 10, :o2, 14816119, 6 - tz.transition 2049, 4, :o1, 14817211, 6 - tz.transition 2049, 10, :o2, 14818303, 6 - tz.transition 2050, 4, :o1, 14819395, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Perth.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Perth.rb deleted file mode 100644 index d9e66f14a8..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Perth.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Perth - include TimezoneDefinition - - timezone 'Australia/Perth' do |tz| - tz.offset :o0, 27804, 0, :LMT - tz.offset :o1, 28800, 0, :WST - tz.offset :o2, 28800, 3600, :WST - - tz.transition 1895, 11, :o1, 17377402883, 7200 - tz.transition 1916, 12, :o2, 3486570001, 1440 - tz.transition 1917, 3, :o1, 58111493, 24 - tz.transition 1941, 12, :o2, 9721441, 4 - tz.transition 1942, 3, :o1, 58330733, 24 - tz.transition 1942, 9, :o2, 9722517, 4 - tz.transition 1943, 3, :o1, 58339469, 24 - tz.transition 1974, 10, :o2, 152042400 - tz.transition 1975, 3, :o1, 162928800 - tz.transition 1983, 10, :o2, 436298400 - tz.transition 1984, 3, :o1, 447184800 - tz.transition 1991, 11, :o2, 690314400 - tz.transition 1992, 2, :o1, 699386400 - tz.transition 2006, 12, :o2, 1165082400 - tz.transition 2007, 3, :o1, 1174759200 - tz.transition 2007, 10, :o2, 1193508000 - tz.transition 2008, 3, :o1, 1206813600 - tz.transition 2008, 10, :o2, 1224957600 - tz.transition 2009, 3, :o1, 1238263200 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Sydney.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Sydney.rb deleted file mode 100644 index 9062bd7c3c..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Australia/Sydney.rb +++ /dev/null @@ -1,185 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Sydney - include TimezoneDefinition - - timezone 'Australia/Sydney' do |tz| - tz.offset :o0, 36292, 0, :LMT - tz.offset :o1, 36000, 0, :EST - tz.offset :o2, 36000, 3600, :EST - - tz.transition 1895, 1, :o1, 52125661727, 21600 - tz.transition 1916, 12, :o2, 3486569881, 1440 - tz.transition 1917, 3, :o1, 19370497, 8 - tz.transition 1941, 12, :o2, 14582161, 6 - tz.transition 1942, 3, :o1, 19443577, 8 - tz.transition 1942, 9, :o2, 14583775, 6 - tz.transition 1943, 3, :o1, 19446489, 8 - tz.transition 1943, 10, :o2, 14586001, 6 - tz.transition 1944, 3, :o1, 19449401, 8 - tz.transition 1971, 10, :o2, 57686400 - tz.transition 1972, 2, :o1, 67968000 - tz.transition 1972, 10, :o2, 89136000 - tz.transition 1973, 3, :o1, 100022400 - tz.transition 1973, 10, :o2, 120585600 - tz.transition 1974, 3, :o1, 131472000 - tz.transition 1974, 10, :o2, 152035200 - tz.transition 1975, 3, :o1, 162921600 - tz.transition 1975, 10, :o2, 183484800 - tz.transition 1976, 3, :o1, 194976000 - tz.transition 1976, 10, :o2, 215539200 - tz.transition 1977, 3, :o1, 226425600 - tz.transition 1977, 10, :o2, 246988800 - tz.transition 1978, 3, :o1, 257875200 - tz.transition 1978, 10, :o2, 278438400 - tz.transition 1979, 3, :o1, 289324800 - tz.transition 1979, 10, :o2, 309888000 - tz.transition 1980, 3, :o1, 320774400 - tz.transition 1980, 10, :o2, 341337600 - tz.transition 1981, 2, :o1, 352224000 - tz.transition 1981, 10, :o2, 372787200 - tz.transition 1982, 4, :o1, 386697600 - tz.transition 1982, 10, :o2, 404841600 - tz.transition 1983, 3, :o1, 415728000 - tz.transition 1983, 10, :o2, 436291200 - tz.transition 1984, 3, :o1, 447177600 - tz.transition 1984, 10, :o2, 467740800 - tz.transition 1985, 3, :o1, 478627200 - tz.transition 1985, 10, :o2, 499190400 - tz.transition 1986, 3, :o1, 511286400 - tz.transition 1986, 10, :o2, 530035200 - tz.transition 1987, 3, :o1, 542736000 - tz.transition 1987, 10, :o2, 562089600 - tz.transition 1988, 3, :o1, 574790400 - tz.transition 1988, 10, :o2, 594144000 - tz.transition 1989, 3, :o1, 606240000 - tz.transition 1989, 10, :o2, 625593600 - tz.transition 1990, 3, :o1, 636480000 - tz.transition 1990, 10, :o2, 657043200 - tz.transition 1991, 3, :o1, 667929600 - tz.transition 1991, 10, :o2, 688492800 - tz.transition 1992, 2, :o1, 699379200 - tz.transition 1992, 10, :o2, 719942400 - tz.transition 1993, 3, :o1, 731433600 - tz.transition 1993, 10, :o2, 751996800 - tz.transition 1994, 3, :o1, 762883200 - tz.transition 1994, 10, :o2, 783446400 - tz.transition 1995, 3, :o1, 794332800 - tz.transition 1995, 10, :o2, 814896000 - tz.transition 1996, 3, :o1, 828201600 - tz.transition 1996, 10, :o2, 846345600 - tz.transition 1997, 3, :o1, 859651200 - tz.transition 1997, 10, :o2, 877795200 - tz.transition 1998, 3, :o1, 891100800 - tz.transition 1998, 10, :o2, 909244800 - tz.transition 1999, 3, :o1, 922550400 - tz.transition 1999, 10, :o2, 941299200 - tz.transition 2000, 3, :o1, 954000000 - tz.transition 2000, 8, :o2, 967305600 - tz.transition 2001, 3, :o1, 985449600 - tz.transition 2001, 10, :o2, 1004198400 - tz.transition 2002, 3, :o1, 1017504000 - tz.transition 2002, 10, :o2, 1035648000 - tz.transition 2003, 3, :o1, 1048953600 - tz.transition 2003, 10, :o2, 1067097600 - tz.transition 2004, 3, :o1, 1080403200 - tz.transition 2004, 10, :o2, 1099152000 - tz.transition 2005, 3, :o1, 1111852800 - tz.transition 2005, 10, :o2, 1130601600 - tz.transition 2006, 4, :o1, 1143907200 - tz.transition 2006, 10, :o2, 1162051200 - tz.transition 2007, 3, :o1, 1174752000 - tz.transition 2007, 10, :o2, 1193500800 - tz.transition 2008, 4, :o1, 1207411200 - tz.transition 2008, 10, :o2, 1223136000 - tz.transition 2009, 4, :o1, 1238860800 - tz.transition 2009, 10, :o2, 1254585600 - tz.transition 2010, 4, :o1, 1270310400 - tz.transition 2010, 10, :o2, 1286035200 - tz.transition 2011, 4, :o1, 1301760000 - tz.transition 2011, 10, :o2, 1317484800 - tz.transition 2012, 3, :o1, 1333209600 - tz.transition 2012, 10, :o2, 1349539200 - tz.transition 2013, 4, :o1, 1365264000 - tz.transition 2013, 10, :o2, 1380988800 - tz.transition 2014, 4, :o1, 1396713600 - tz.transition 2014, 10, :o2, 1412438400 - tz.transition 2015, 4, :o1, 1428163200 - tz.transition 2015, 10, :o2, 1443888000 - tz.transition 2016, 4, :o1, 1459612800 - tz.transition 2016, 10, :o2, 1475337600 - tz.transition 2017, 4, :o1, 1491062400 - tz.transition 2017, 9, :o2, 1506787200 - tz.transition 2018, 3, :o1, 1522512000 - tz.transition 2018, 10, :o2, 1538841600 - tz.transition 2019, 4, :o1, 1554566400 - tz.transition 2019, 10, :o2, 1570291200 - tz.transition 2020, 4, :o1, 1586016000 - tz.transition 2020, 10, :o2, 1601740800 - tz.transition 2021, 4, :o1, 1617465600 - tz.transition 2021, 10, :o2, 1633190400 - tz.transition 2022, 4, :o1, 1648915200 - tz.transition 2022, 10, :o2, 1664640000 - tz.transition 2023, 4, :o1, 1680364800 - tz.transition 2023, 9, :o2, 1696089600 - tz.transition 2024, 4, :o1, 1712419200 - tz.transition 2024, 10, :o2, 1728144000 - tz.transition 2025, 4, :o1, 1743868800 - tz.transition 2025, 10, :o2, 1759593600 - tz.transition 2026, 4, :o1, 1775318400 - tz.transition 2026, 10, :o2, 1791043200 - tz.transition 2027, 4, :o1, 1806768000 - tz.transition 2027, 10, :o2, 1822492800 - tz.transition 2028, 4, :o1, 1838217600 - tz.transition 2028, 9, :o2, 1853942400 - tz.transition 2029, 3, :o1, 1869667200 - tz.transition 2029, 10, :o2, 1885996800 - tz.transition 2030, 4, :o1, 1901721600 - tz.transition 2030, 10, :o2, 1917446400 - tz.transition 2031, 4, :o1, 1933171200 - tz.transition 2031, 10, :o2, 1948896000 - tz.transition 2032, 4, :o1, 1964620800 - tz.transition 2032, 10, :o2, 1980345600 - tz.transition 2033, 4, :o1, 1996070400 - tz.transition 2033, 10, :o2, 2011795200 - tz.transition 2034, 4, :o1, 2027520000 - tz.transition 2034, 9, :o2, 2043244800 - tz.transition 2035, 3, :o1, 2058969600 - tz.transition 2035, 10, :o2, 2075299200 - tz.transition 2036, 4, :o1, 2091024000 - tz.transition 2036, 10, :o2, 2106748800 - tz.transition 2037, 4, :o1, 2122473600 - tz.transition 2037, 10, :o2, 2138198400 - tz.transition 2038, 4, :o1, 14793103, 6 - tz.transition 2038, 10, :o2, 14794195, 6 - tz.transition 2039, 4, :o1, 14795287, 6 - tz.transition 2039, 10, :o2, 14796379, 6 - tz.transition 2040, 3, :o1, 14797471, 6 - tz.transition 2040, 10, :o2, 14798605, 6 - tz.transition 2041, 4, :o1, 14799697, 6 - tz.transition 2041, 10, :o2, 14800789, 6 - tz.transition 2042, 4, :o1, 14801881, 6 - tz.transition 2042, 10, :o2, 14802973, 6 - tz.transition 2043, 4, :o1, 14804065, 6 - tz.transition 2043, 10, :o2, 14805157, 6 - tz.transition 2044, 4, :o1, 14806249, 6 - tz.transition 2044, 10, :o2, 14807341, 6 - tz.transition 2045, 4, :o1, 14808433, 6 - tz.transition 2045, 9, :o2, 14809525, 6 - tz.transition 2046, 3, :o1, 14810617, 6 - tz.transition 2046, 10, :o2, 14811751, 6 - tz.transition 2047, 4, :o1, 14812843, 6 - tz.transition 2047, 10, :o2, 14813935, 6 - tz.transition 2048, 4, :o1, 14815027, 6 - tz.transition 2048, 10, :o2, 14816119, 6 - tz.transition 2049, 4, :o1, 14817211, 6 - tz.transition 2049, 10, :o2, 14818303, 6 - tz.transition 2050, 4, :o1, 14819395, 6 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Etc/UTC.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Etc/UTC.rb deleted file mode 100644 index 28b2c6a04c..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Etc/UTC.rb +++ /dev/null @@ -1,16 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Etc - module UTC - include TimezoneDefinition - - timezone 'Etc/UTC' do |tz| - tz.offset :o0, 0, 0, :UTC - - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Amsterdam.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Amsterdam.rb deleted file mode 100644 index 2d0c95c4bc..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Amsterdam.rb +++ /dev/null @@ -1,228 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Amsterdam - include TimezoneDefinition - - timezone 'Europe/Amsterdam' do |tz| - tz.offset :o0, 1172, 0, :LMT - tz.offset :o1, 1172, 0, :AMT - tz.offset :o2, 1172, 3600, :NST - tz.offset :o3, 1200, 3600, :NEST - tz.offset :o4, 1200, 0, :NET - tz.offset :o5, 3600, 3600, :CEST - tz.offset :o6, 3600, 0, :CET - - tz.transition 1834, 12, :o1, 51651636907, 21600 - tz.transition 1916, 4, :o2, 52293264907, 21600 - tz.transition 1916, 9, :o1, 52296568807, 21600 - tz.transition 1917, 4, :o2, 52300826707, 21600 - tz.transition 1917, 9, :o1, 52304153107, 21600 - tz.transition 1918, 4, :o2, 52308386707, 21600 - tz.transition 1918, 9, :o1, 52312317907, 21600 - tz.transition 1919, 4, :o2, 52316400307, 21600 - tz.transition 1919, 9, :o1, 52320180307, 21600 - tz.transition 1920, 4, :o2, 52324262707, 21600 - tz.transition 1920, 9, :o1, 52328042707, 21600 - tz.transition 1921, 4, :o2, 52332125107, 21600 - tz.transition 1921, 9, :o1, 52335905107, 21600 - tz.transition 1922, 3, :o2, 52339814707, 21600 - tz.transition 1922, 10, :o1, 52344048307, 21600 - tz.transition 1923, 6, :o2, 52349145907, 21600 - tz.transition 1923, 10, :o1, 52351910707, 21600 - tz.transition 1924, 3, :o2, 52355690707, 21600 - tz.transition 1924, 10, :o1, 52359773107, 21600 - tz.transition 1925, 6, :o2, 52365021907, 21600 - tz.transition 1925, 10, :o1, 52367635507, 21600 - tz.transition 1926, 5, :o2, 52372452307, 21600 - tz.transition 1926, 10, :o1, 52375497907, 21600 - tz.transition 1927, 5, :o2, 52380336307, 21600 - tz.transition 1927, 10, :o1, 52383360307, 21600 - tz.transition 1928, 5, :o2, 52388241907, 21600 - tz.transition 1928, 10, :o1, 52391373907, 21600 - tz.transition 1929, 5, :o2, 52396125907, 21600 - tz.transition 1929, 10, :o1, 52399236307, 21600 - tz.transition 1930, 5, :o2, 52404009907, 21600 - tz.transition 1930, 10, :o1, 52407098707, 21600 - tz.transition 1931, 5, :o2, 52411893907, 21600 - tz.transition 1931, 10, :o1, 52414961107, 21600 - tz.transition 1932, 5, :o2, 52419950707, 21600 - tz.transition 1932, 10, :o1, 52422823507, 21600 - tz.transition 1933, 5, :o2, 52427683507, 21600 - tz.transition 1933, 10, :o1, 52430837107, 21600 - tz.transition 1934, 5, :o2, 52435567507, 21600 - tz.transition 1934, 10, :o1, 52438699507, 21600 - tz.transition 1935, 5, :o2, 52443451507, 21600 - tz.transition 1935, 10, :o1, 52446561907, 21600 - tz.transition 1936, 5, :o2, 52451357107, 21600 - tz.transition 1936, 10, :o1, 52454424307, 21600 - tz.transition 1937, 5, :o2, 52459392307, 21600 - tz.transition 1937, 6, :o3, 52460253607, 21600 - tz.transition 1937, 10, :o4, 174874289, 72 - tz.transition 1938, 5, :o3, 174890417, 72 - tz.transition 1938, 10, :o4, 174900497, 72 - tz.transition 1939, 5, :o3, 174916697, 72 - tz.transition 1939, 10, :o4, 174927209, 72 - tz.transition 1940, 5, :o5, 174943115, 72 - tz.transition 1942, 11, :o6, 58335973, 24 - tz.transition 1943, 3, :o5, 58339501, 24 - tz.transition 1943, 10, :o6, 58344037, 24 - tz.transition 1944, 4, :o5, 58348405, 24 - tz.transition 1944, 10, :o6, 58352773, 24 - tz.transition 1945, 4, :o5, 58357141, 24 - tz.transition 1945, 9, :o6, 58361149, 24 - tz.transition 1977, 4, :o5, 228877200 - tz.transition 1977, 9, :o6, 243997200 - tz.transition 1978, 4, :o5, 260326800 - tz.transition 1978, 10, :o6, 276051600 - tz.transition 1979, 4, :o5, 291776400 - tz.transition 1979, 9, :o6, 307501200 - tz.transition 1980, 4, :o5, 323830800 - tz.transition 1980, 9, :o6, 338950800 - tz.transition 1981, 3, :o5, 354675600 - tz.transition 1981, 9, :o6, 370400400 - tz.transition 1982, 3, :o5, 386125200 - tz.transition 1982, 9, :o6, 401850000 - tz.transition 1983, 3, :o5, 417574800 - tz.transition 1983, 9, :o6, 433299600 - tz.transition 1984, 3, :o5, 449024400 - tz.transition 1984, 9, :o6, 465354000 - tz.transition 1985, 3, :o5, 481078800 - tz.transition 1985, 9, :o6, 496803600 - tz.transition 1986, 3, :o5, 512528400 - tz.transition 1986, 9, :o6, 528253200 - tz.transition 1987, 3, :o5, 543978000 - tz.transition 1987, 9, :o6, 559702800 - tz.transition 1988, 3, :o5, 575427600 - tz.transition 1988, 9, :o6, 591152400 - tz.transition 1989, 3, :o5, 606877200 - tz.transition 1989, 9, :o6, 622602000 - tz.transition 1990, 3, :o5, 638326800 - tz.transition 1990, 9, :o6, 654656400 - tz.transition 1991, 3, :o5, 670381200 - tz.transition 1991, 9, :o6, 686106000 - tz.transition 1992, 3, :o5, 701830800 - tz.transition 1992, 9, :o6, 717555600 - tz.transition 1993, 3, :o5, 733280400 - tz.transition 1993, 9, :o6, 749005200 - tz.transition 1994, 3, :o5, 764730000 - tz.transition 1994, 9, :o6, 780454800 - tz.transition 1995, 3, :o5, 796179600 - tz.transition 1995, 9, :o6, 811904400 - tz.transition 1996, 3, :o5, 828234000 - tz.transition 1996, 10, :o6, 846378000 - tz.transition 1997, 3, :o5, 859683600 - tz.transition 1997, 10, :o6, 877827600 - tz.transition 1998, 3, :o5, 891133200 - tz.transition 1998, 10, :o6, 909277200 - tz.transition 1999, 3, :o5, 922582800 - tz.transition 1999, 10, :o6, 941331600 - tz.transition 2000, 3, :o5, 954032400 - tz.transition 2000, 10, :o6, 972781200 - tz.transition 2001, 3, :o5, 985482000 - tz.transition 2001, 10, :o6, 1004230800 - tz.transition 2002, 3, :o5, 1017536400 - tz.transition 2002, 10, :o6, 1035680400 - tz.transition 2003, 3, :o5, 1048986000 - tz.transition 2003, 10, :o6, 1067130000 - tz.transition 2004, 3, :o5, 1080435600 - tz.transition 2004, 10, :o6, 1099184400 - tz.transition 2005, 3, :o5, 1111885200 - tz.transition 2005, 10, :o6, 1130634000 - tz.transition 2006, 3, :o5, 1143334800 - tz.transition 2006, 10, :o6, 1162083600 - tz.transition 2007, 3, :o5, 1174784400 - tz.transition 2007, 10, :o6, 1193533200 - tz.transition 2008, 3, :o5, 1206838800 - tz.transition 2008, 10, :o6, 1224982800 - tz.transition 2009, 3, :o5, 1238288400 - tz.transition 2009, 10, :o6, 1256432400 - tz.transition 2010, 3, :o5, 1269738000 - tz.transition 2010, 10, :o6, 1288486800 - tz.transition 2011, 3, :o5, 1301187600 - tz.transition 2011, 10, :o6, 1319936400 - tz.transition 2012, 3, :o5, 1332637200 - tz.transition 2012, 10, :o6, 1351386000 - tz.transition 2013, 3, :o5, 1364691600 - tz.transition 2013, 10, :o6, 1382835600 - tz.transition 2014, 3, :o5, 1396141200 - tz.transition 2014, 10, :o6, 1414285200 - tz.transition 2015, 3, :o5, 1427590800 - tz.transition 2015, 10, :o6, 1445734800 - tz.transition 2016, 3, :o5, 1459040400 - tz.transition 2016, 10, :o6, 1477789200 - tz.transition 2017, 3, :o5, 1490490000 - tz.transition 2017, 10, :o6, 1509238800 - tz.transition 2018, 3, :o5, 1521939600 - tz.transition 2018, 10, :o6, 1540688400 - tz.transition 2019, 3, :o5, 1553994000 - tz.transition 2019, 10, :o6, 1572138000 - tz.transition 2020, 3, :o5, 1585443600 - tz.transition 2020, 10, :o6, 1603587600 - tz.transition 2021, 3, :o5, 1616893200 - tz.transition 2021, 10, :o6, 1635642000 - tz.transition 2022, 3, :o5, 1648342800 - tz.transition 2022, 10, :o6, 1667091600 - tz.transition 2023, 3, :o5, 1679792400 - tz.transition 2023, 10, :o6, 1698541200 - tz.transition 2024, 3, :o5, 1711846800 - tz.transition 2024, 10, :o6, 1729990800 - tz.transition 2025, 3, :o5, 1743296400 - tz.transition 2025, 10, :o6, 1761440400 - tz.transition 2026, 3, :o5, 1774746000 - tz.transition 2026, 10, :o6, 1792890000 - tz.transition 2027, 3, :o5, 1806195600 - tz.transition 2027, 10, :o6, 1824944400 - tz.transition 2028, 3, :o5, 1837645200 - tz.transition 2028, 10, :o6, 1856394000 - tz.transition 2029, 3, :o5, 1869094800 - tz.transition 2029, 10, :o6, 1887843600 - tz.transition 2030, 3, :o5, 1901149200 - tz.transition 2030, 10, :o6, 1919293200 - tz.transition 2031, 3, :o5, 1932598800 - tz.transition 2031, 10, :o6, 1950742800 - tz.transition 2032, 3, :o5, 1964048400 - tz.transition 2032, 10, :o6, 1982797200 - tz.transition 2033, 3, :o5, 1995498000 - tz.transition 2033, 10, :o6, 2014246800 - tz.transition 2034, 3, :o5, 2026947600 - tz.transition 2034, 10, :o6, 2045696400 - tz.transition 2035, 3, :o5, 2058397200 - tz.transition 2035, 10, :o6, 2077146000 - tz.transition 2036, 3, :o5, 2090451600 - tz.transition 2036, 10, :o6, 2108595600 - tz.transition 2037, 3, :o5, 2121901200 - tz.transition 2037, 10, :o6, 2140045200 - tz.transition 2038, 3, :o5, 59172253, 24 - tz.transition 2038, 10, :o6, 59177461, 24 - tz.transition 2039, 3, :o5, 59180989, 24 - tz.transition 2039, 10, :o6, 59186197, 24 - tz.transition 2040, 3, :o5, 59189725, 24 - tz.transition 2040, 10, :o6, 59194933, 24 - tz.transition 2041, 3, :o5, 59198629, 24 - tz.transition 2041, 10, :o6, 59203669, 24 - tz.transition 2042, 3, :o5, 59207365, 24 - tz.transition 2042, 10, :o6, 59212405, 24 - tz.transition 2043, 3, :o5, 59216101, 24 - tz.transition 2043, 10, :o6, 59221141, 24 - tz.transition 2044, 3, :o5, 59224837, 24 - tz.transition 2044, 10, :o6, 59230045, 24 - tz.transition 2045, 3, :o5, 59233573, 24 - tz.transition 2045, 10, :o6, 59238781, 24 - tz.transition 2046, 3, :o5, 59242309, 24 - tz.transition 2046, 10, :o6, 59247517, 24 - tz.transition 2047, 3, :o5, 59251213, 24 - tz.transition 2047, 10, :o6, 59256253, 24 - tz.transition 2048, 3, :o5, 59259949, 24 - tz.transition 2048, 10, :o6, 59264989, 24 - tz.transition 2049, 3, :o5, 59268685, 24 - tz.transition 2049, 10, :o6, 59273893, 24 - tz.transition 2050, 3, :o5, 59277421, 24 - tz.transition 2050, 10, :o6, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Athens.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Athens.rb deleted file mode 100644 index 4e21e535ca..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Athens.rb +++ /dev/null @@ -1,185 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Athens - include TimezoneDefinition - - timezone 'Europe/Athens' do |tz| - tz.offset :o0, 5692, 0, :LMT - tz.offset :o1, 5692, 0, :AMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 7200, 3600, :EEST - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 3600, 0, :CET - - tz.transition 1895, 9, :o1, 52130529377, 21600 - tz.transition 1916, 7, :o2, 3268447787, 1350 - tz.transition 1932, 7, :o3, 29122745, 12 - tz.transition 1932, 8, :o2, 19415611, 8 - tz.transition 1941, 4, :o3, 29161097, 12 - tz.transition 1941, 4, :o4, 19440915, 8 - tz.transition 1942, 11, :o5, 58335973, 24 - tz.transition 1943, 3, :o4, 58339523, 24 - tz.transition 1943, 10, :o5, 29172017, 12 - tz.transition 1944, 4, :o2, 58348427, 24 - tz.transition 1952, 6, :o3, 29210333, 12 - tz.transition 1952, 11, :o2, 19474547, 8 - tz.transition 1975, 4, :o3, 166485600 - tz.transition 1975, 11, :o2, 186184800 - tz.transition 1976, 4, :o3, 198028800 - tz.transition 1976, 10, :o2, 213753600 - tz.transition 1977, 4, :o3, 228873600 - tz.transition 1977, 9, :o2, 244080000 - tz.transition 1978, 4, :o3, 260323200 - tz.transition 1978, 9, :o2, 275446800 - tz.transition 1979, 4, :o3, 291798000 - tz.transition 1979, 9, :o2, 307407600 - tz.transition 1980, 3, :o3, 323388000 - tz.transition 1980, 9, :o2, 338936400 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Belgrade.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Belgrade.rb deleted file mode 100644 index 4dbd893d75..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Belgrade.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Belgrade - include TimezoneDefinition - - timezone 'Europe/Belgrade' do |tz| - tz.offset :o0, 4920, 0, :LMT - tz.offset :o1, 3600, 0, :CET - tz.offset :o2, 3600, 3600, :CEST - - tz.transition 1883, 12, :o1, 1734607039, 720 - tz.transition 1941, 4, :o2, 29161241, 12 - tz.transition 1942, 11, :o1, 58335973, 24 - tz.transition 1943, 3, :o2, 58339501, 24 - tz.transition 1943, 10, :o1, 58344037, 24 - tz.transition 1944, 4, :o2, 58348405, 24 - tz.transition 1944, 10, :o1, 58352773, 24 - tz.transition 1945, 5, :o2, 58358005, 24 - tz.transition 1945, 9, :o1, 58361149, 24 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o1, 717555600 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 9, :o1, 749005200 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 9, :o1, 780454800 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 9, :o1, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Berlin.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Berlin.rb deleted file mode 100644 index 721054236c..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Berlin.rb +++ /dev/null @@ -1,188 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Berlin - include TimezoneDefinition - - timezone 'Europe/Berlin' do |tz| - tz.offset :o0, 3208, 0, :LMT - tz.offset :o1, 3600, 0, :CET - tz.offset :o2, 3600, 3600, :CEST - tz.offset :o3, 3600, 7200, :CEMT - - tz.transition 1893, 3, :o1, 26055588199, 10800 - tz.transition 1916, 4, :o2, 29051813, 12 - tz.transition 1916, 9, :o1, 58107299, 24 - tz.transition 1917, 4, :o2, 58112029, 24 - tz.transition 1917, 9, :o1, 58115725, 24 - tz.transition 1918, 4, :o2, 58120765, 24 - tz.transition 1918, 9, :o1, 58124461, 24 - tz.transition 1940, 4, :o2, 58313293, 24 - tz.transition 1942, 11, :o1, 58335973, 24 - tz.transition 1943, 3, :o2, 58339501, 24 - tz.transition 1943, 10, :o1, 58344037, 24 - tz.transition 1944, 4, :o2, 58348405, 24 - tz.transition 1944, 10, :o1, 58352773, 24 - tz.transition 1945, 4, :o2, 58357141, 24 - tz.transition 1945, 5, :o3, 4863199, 2 - tz.transition 1945, 9, :o2, 4863445, 2 - tz.transition 1945, 11, :o1, 58362661, 24 - tz.transition 1946, 4, :o2, 58366189, 24 - tz.transition 1946, 10, :o1, 58370413, 24 - tz.transition 1947, 4, :o2, 29187379, 12 - tz.transition 1947, 5, :o3, 58375597, 24 - tz.transition 1947, 6, :o2, 4864731, 2 - tz.transition 1947, 10, :o1, 58379125, 24 - tz.transition 1948, 4, :o2, 58383829, 24 - tz.transition 1948, 10, :o1, 58387861, 24 - tz.transition 1949, 4, :o2, 58392397, 24 - tz.transition 1949, 10, :o1, 58396597, 24 - tz.transition 1980, 4, :o2, 323830800 - tz.transition 1980, 9, :o1, 338950800 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 9, :o1, 370400400 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 9, :o1, 401850000 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o1, 717555600 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 9, :o1, 749005200 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 9, :o1, 780454800 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 9, :o1, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bratislava.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bratislava.rb deleted file mode 100644 index 7a731a0b6a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bratislava.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Bratislava - include TimezoneDefinition - - linked_timezone 'Europe/Bratislava', 'Europe/Prague' - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Brussels.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Brussels.rb deleted file mode 100644 index 6b0a242944..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Brussels.rb +++ /dev/null @@ -1,232 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Brussels - include TimezoneDefinition - - timezone 'Europe/Brussels' do |tz| - tz.offset :o0, 1050, 0, :LMT - tz.offset :o1, 1050, 0, :BMT - tz.offset :o2, 0, 0, :WET - tz.offset :o3, 3600, 0, :CET - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 0, 3600, :WEST - - tz.transition 1879, 12, :o1, 1386844121, 576 - tz.transition 1892, 5, :o2, 1389438713, 576 - tz.transition 1914, 11, :o3, 4840889, 2 - tz.transition 1916, 4, :o4, 58103627, 24 - tz.transition 1916, 9, :o3, 58107299, 24 - tz.transition 1917, 4, :o4, 58112029, 24 - tz.transition 1917, 9, :o3, 58115725, 24 - tz.transition 1918, 4, :o4, 58120765, 24 - tz.transition 1918, 9, :o3, 58124461, 24 - tz.transition 1918, 11, :o2, 58125815, 24 - tz.transition 1919, 3, :o5, 58128467, 24 - tz.transition 1919, 10, :o2, 58133675, 24 - tz.transition 1920, 2, :o5, 58136867, 24 - tz.transition 1920, 10, :o2, 58142915, 24 - tz.transition 1921, 3, :o5, 58146323, 24 - tz.transition 1921, 10, :o2, 58151723, 24 - tz.transition 1922, 3, :o5, 58155347, 24 - tz.transition 1922, 10, :o2, 58160051, 24 - tz.transition 1923, 4, :o5, 58164755, 24 - tz.transition 1923, 10, :o2, 58168787, 24 - tz.transition 1924, 3, :o5, 58172987, 24 - tz.transition 1924, 10, :o2, 58177523, 24 - tz.transition 1925, 4, :o5, 58181891, 24 - tz.transition 1925, 10, :o2, 58186259, 24 - tz.transition 1926, 4, :o5, 58190963, 24 - tz.transition 1926, 10, :o2, 58194995, 24 - tz.transition 1927, 4, :o5, 58199531, 24 - tz.transition 1927, 10, :o2, 58203731, 24 - tz.transition 1928, 4, :o5, 58208435, 24 - tz.transition 1928, 10, :o2, 29106319, 12 - tz.transition 1929, 4, :o5, 29108671, 12 - tz.transition 1929, 10, :o2, 29110687, 12 - tz.transition 1930, 4, :o5, 29112955, 12 - tz.transition 1930, 10, :o2, 29115055, 12 - tz.transition 1931, 4, :o5, 29117407, 12 - tz.transition 1931, 10, :o2, 29119423, 12 - tz.transition 1932, 4, :o5, 29121607, 12 - tz.transition 1932, 10, :o2, 29123791, 12 - tz.transition 1933, 3, :o5, 29125891, 12 - tz.transition 1933, 10, :o2, 29128243, 12 - tz.transition 1934, 4, :o5, 29130427, 12 - tz.transition 1934, 10, :o2, 29132611, 12 - tz.transition 1935, 3, :o5, 29134711, 12 - tz.transition 1935, 10, :o2, 29136979, 12 - tz.transition 1936, 4, :o5, 29139331, 12 - tz.transition 1936, 10, :o2, 29141347, 12 - tz.transition 1937, 4, :o5, 29143531, 12 - tz.transition 1937, 10, :o2, 29145715, 12 - tz.transition 1938, 3, :o5, 29147815, 12 - tz.transition 1938, 10, :o2, 29150083, 12 - tz.transition 1939, 4, :o5, 29152435, 12 - tz.transition 1939, 11, :o2, 29155039, 12 - tz.transition 1940, 2, :o5, 29156215, 12 - tz.transition 1940, 5, :o4, 29157235, 12 - tz.transition 1942, 11, :o3, 58335973, 24 - tz.transition 1943, 3, :o4, 58339501, 24 - tz.transition 1943, 10, :o3, 58344037, 24 - tz.transition 1944, 4, :o4, 58348405, 24 - tz.transition 1944, 9, :o3, 58352413, 24 - tz.transition 1945, 4, :o4, 58357141, 24 - tz.transition 1945, 9, :o3, 58361149, 24 - tz.transition 1946, 5, :o4, 58367029, 24 - tz.transition 1946, 10, :o3, 58370413, 24 - tz.transition 1977, 4, :o4, 228877200 - tz.transition 1977, 9, :o3, 243997200 - tz.transition 1978, 4, :o4, 260326800 - tz.transition 1978, 10, :o3, 276051600 - tz.transition 1979, 4, :o4, 291776400 - tz.transition 1979, 9, :o3, 307501200 - tz.transition 1980, 4, :o4, 323830800 - tz.transition 1980, 9, :o3, 338950800 - tz.transition 1981, 3, :o4, 354675600 - tz.transition 1981, 9, :o3, 370400400 - tz.transition 1982, 3, :o4, 386125200 - tz.transition 1982, 9, :o3, 401850000 - tz.transition 1983, 3, :o4, 417574800 - tz.transition 1983, 9, :o3, 433299600 - tz.transition 1984, 3, :o4, 449024400 - tz.transition 1984, 9, :o3, 465354000 - tz.transition 1985, 3, :o4, 481078800 - tz.transition 1985, 9, :o3, 496803600 - tz.transition 1986, 3, :o4, 512528400 - tz.transition 1986, 9, :o3, 528253200 - tz.transition 1987, 3, :o4, 543978000 - tz.transition 1987, 9, :o3, 559702800 - tz.transition 1988, 3, :o4, 575427600 - tz.transition 1988, 9, :o3, 591152400 - tz.transition 1989, 3, :o4, 606877200 - tz.transition 1989, 9, :o3, 622602000 - tz.transition 1990, 3, :o4, 638326800 - tz.transition 1990, 9, :o3, 654656400 - tz.transition 1991, 3, :o4, 670381200 - tz.transition 1991, 9, :o3, 686106000 - tz.transition 1992, 3, :o4, 701830800 - tz.transition 1992, 9, :o3, 717555600 - tz.transition 1993, 3, :o4, 733280400 - tz.transition 1993, 9, :o3, 749005200 - tz.transition 1994, 3, :o4, 764730000 - tz.transition 1994, 9, :o3, 780454800 - tz.transition 1995, 3, :o4, 796179600 - tz.transition 1995, 9, :o3, 811904400 - tz.transition 1996, 3, :o4, 828234000 - tz.transition 1996, 10, :o3, 846378000 - tz.transition 1997, 3, :o4, 859683600 - tz.transition 1997, 10, :o3, 877827600 - tz.transition 1998, 3, :o4, 891133200 - tz.transition 1998, 10, :o3, 909277200 - tz.transition 1999, 3, :o4, 922582800 - tz.transition 1999, 10, :o3, 941331600 - tz.transition 2000, 3, :o4, 954032400 - tz.transition 2000, 10, :o3, 972781200 - tz.transition 2001, 3, :o4, 985482000 - tz.transition 2001, 10, :o3, 1004230800 - tz.transition 2002, 3, :o4, 1017536400 - tz.transition 2002, 10, :o3, 1035680400 - tz.transition 2003, 3, :o4, 1048986000 - tz.transition 2003, 10, :o3, 1067130000 - tz.transition 2004, 3, :o4, 1080435600 - tz.transition 2004, 10, :o3, 1099184400 - tz.transition 2005, 3, :o4, 1111885200 - tz.transition 2005, 10, :o3, 1130634000 - tz.transition 2006, 3, :o4, 1143334800 - tz.transition 2006, 10, :o3, 1162083600 - tz.transition 2007, 3, :o4, 1174784400 - tz.transition 2007, 10, :o3, 1193533200 - tz.transition 2008, 3, :o4, 1206838800 - tz.transition 2008, 10, :o3, 1224982800 - tz.transition 2009, 3, :o4, 1238288400 - tz.transition 2009, 10, :o3, 1256432400 - tz.transition 2010, 3, :o4, 1269738000 - tz.transition 2010, 10, :o3, 1288486800 - tz.transition 2011, 3, :o4, 1301187600 - tz.transition 2011, 10, :o3, 1319936400 - tz.transition 2012, 3, :o4, 1332637200 - tz.transition 2012, 10, :o3, 1351386000 - tz.transition 2013, 3, :o4, 1364691600 - tz.transition 2013, 10, :o3, 1382835600 - tz.transition 2014, 3, :o4, 1396141200 - tz.transition 2014, 10, :o3, 1414285200 - tz.transition 2015, 3, :o4, 1427590800 - tz.transition 2015, 10, :o3, 1445734800 - tz.transition 2016, 3, :o4, 1459040400 - tz.transition 2016, 10, :o3, 1477789200 - tz.transition 2017, 3, :o4, 1490490000 - tz.transition 2017, 10, :o3, 1509238800 - tz.transition 2018, 3, :o4, 1521939600 - tz.transition 2018, 10, :o3, 1540688400 - tz.transition 2019, 3, :o4, 1553994000 - tz.transition 2019, 10, :o3, 1572138000 - tz.transition 2020, 3, :o4, 1585443600 - tz.transition 2020, 10, :o3, 1603587600 - tz.transition 2021, 3, :o4, 1616893200 - tz.transition 2021, 10, :o3, 1635642000 - tz.transition 2022, 3, :o4, 1648342800 - tz.transition 2022, 10, :o3, 1667091600 - tz.transition 2023, 3, :o4, 1679792400 - tz.transition 2023, 10, :o3, 1698541200 - tz.transition 2024, 3, :o4, 1711846800 - tz.transition 2024, 10, :o3, 1729990800 - tz.transition 2025, 3, :o4, 1743296400 - tz.transition 2025, 10, :o3, 1761440400 - tz.transition 2026, 3, :o4, 1774746000 - tz.transition 2026, 10, :o3, 1792890000 - tz.transition 2027, 3, :o4, 1806195600 - tz.transition 2027, 10, :o3, 1824944400 - tz.transition 2028, 3, :o4, 1837645200 - tz.transition 2028, 10, :o3, 1856394000 - tz.transition 2029, 3, :o4, 1869094800 - tz.transition 2029, 10, :o3, 1887843600 - tz.transition 2030, 3, :o4, 1901149200 - tz.transition 2030, 10, :o3, 1919293200 - tz.transition 2031, 3, :o4, 1932598800 - tz.transition 2031, 10, :o3, 1950742800 - tz.transition 2032, 3, :o4, 1964048400 - tz.transition 2032, 10, :o3, 1982797200 - tz.transition 2033, 3, :o4, 1995498000 - tz.transition 2033, 10, :o3, 2014246800 - tz.transition 2034, 3, :o4, 2026947600 - tz.transition 2034, 10, :o3, 2045696400 - tz.transition 2035, 3, :o4, 2058397200 - tz.transition 2035, 10, :o3, 2077146000 - tz.transition 2036, 3, :o4, 2090451600 - tz.transition 2036, 10, :o3, 2108595600 - tz.transition 2037, 3, :o4, 2121901200 - tz.transition 2037, 10, :o3, 2140045200 - tz.transition 2038, 3, :o4, 59172253, 24 - tz.transition 2038, 10, :o3, 59177461, 24 - tz.transition 2039, 3, :o4, 59180989, 24 - tz.transition 2039, 10, :o3, 59186197, 24 - tz.transition 2040, 3, :o4, 59189725, 24 - tz.transition 2040, 10, :o3, 59194933, 24 - tz.transition 2041, 3, :o4, 59198629, 24 - tz.transition 2041, 10, :o3, 59203669, 24 - tz.transition 2042, 3, :o4, 59207365, 24 - tz.transition 2042, 10, :o3, 59212405, 24 - tz.transition 2043, 3, :o4, 59216101, 24 - tz.transition 2043, 10, :o3, 59221141, 24 - tz.transition 2044, 3, :o4, 59224837, 24 - tz.transition 2044, 10, :o3, 59230045, 24 - tz.transition 2045, 3, :o4, 59233573, 24 - tz.transition 2045, 10, :o3, 59238781, 24 - tz.transition 2046, 3, :o4, 59242309, 24 - tz.transition 2046, 10, :o3, 59247517, 24 - tz.transition 2047, 3, :o4, 59251213, 24 - tz.transition 2047, 10, :o3, 59256253, 24 - tz.transition 2048, 3, :o4, 59259949, 24 - tz.transition 2048, 10, :o3, 59264989, 24 - tz.transition 2049, 3, :o4, 59268685, 24 - tz.transition 2049, 10, :o3, 59273893, 24 - tz.transition 2050, 3, :o4, 59277421, 24 - tz.transition 2050, 10, :o3, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bucharest.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bucharest.rb deleted file mode 100644 index 521c3c932e..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Bucharest.rb +++ /dev/null @@ -1,181 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Bucharest - include TimezoneDefinition - - timezone 'Europe/Bucharest' do |tz| - tz.offset :o0, 6264, 0, :LMT - tz.offset :o1, 6264, 0, :BMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 7200, 3600, :EEST - - tz.transition 1891, 9, :o1, 964802571, 400 - tz.transition 1931, 7, :o2, 970618571, 400 - tz.transition 1932, 5, :o3, 29122181, 12 - tz.transition 1932, 10, :o2, 29123789, 12 - tz.transition 1933, 4, :o3, 29125973, 12 - tz.transition 1933, 9, :o2, 29128157, 12 - tz.transition 1934, 4, :o3, 29130425, 12 - tz.transition 1934, 10, :o2, 29132609, 12 - tz.transition 1935, 4, :o3, 29134793, 12 - tz.transition 1935, 10, :o2, 29136977, 12 - tz.transition 1936, 4, :o3, 29139161, 12 - tz.transition 1936, 10, :o2, 29141345, 12 - tz.transition 1937, 4, :o3, 29143529, 12 - tz.transition 1937, 10, :o2, 29145713, 12 - tz.transition 1938, 4, :o3, 29147897, 12 - tz.transition 1938, 10, :o2, 29150081, 12 - tz.transition 1939, 4, :o3, 29152265, 12 - tz.transition 1939, 9, :o2, 29154449, 12 - tz.transition 1979, 5, :o3, 296604000 - tz.transition 1979, 9, :o2, 307486800 - tz.transition 1980, 4, :o3, 323816400 - tz.transition 1980, 9, :o2, 338940000 - tz.transition 1981, 3, :o3, 354672000 - tz.transition 1981, 9, :o2, 370396800 - tz.transition 1982, 3, :o3, 386121600 - tz.transition 1982, 9, :o2, 401846400 - tz.transition 1983, 3, :o3, 417571200 - tz.transition 1983, 9, :o2, 433296000 - tz.transition 1984, 3, :o3, 449020800 - tz.transition 1984, 9, :o2, 465350400 - tz.transition 1985, 3, :o3, 481075200 - tz.transition 1985, 9, :o2, 496800000 - tz.transition 1986, 3, :o3, 512524800 - tz.transition 1986, 9, :o2, 528249600 - tz.transition 1987, 3, :o3, 543974400 - tz.transition 1987, 9, :o2, 559699200 - tz.transition 1988, 3, :o3, 575424000 - tz.transition 1988, 9, :o2, 591148800 - tz.transition 1989, 3, :o3, 606873600 - tz.transition 1989, 9, :o2, 622598400 - tz.transition 1990, 3, :o3, 638323200 - tz.transition 1990, 9, :o2, 654652800 - tz.transition 1991, 3, :o3, 670370400 - tz.transition 1991, 9, :o2, 686095200 - tz.transition 1992, 3, :o3, 701820000 - tz.transition 1992, 9, :o2, 717544800 - tz.transition 1993, 3, :o3, 733269600 - tz.transition 1993, 9, :o2, 748994400 - tz.transition 1994, 3, :o3, 764719200 - tz.transition 1994, 9, :o2, 780440400 - tz.transition 1995, 3, :o3, 796168800 - tz.transition 1995, 9, :o2, 811890000 - tz.transition 1996, 3, :o3, 828223200 - tz.transition 1996, 10, :o2, 846363600 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Budapest.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Budapest.rb deleted file mode 100644 index 1f3a9738b7..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Budapest.rb +++ /dev/null @@ -1,197 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Budapest - include TimezoneDefinition - - timezone 'Europe/Budapest' do |tz| - tz.offset :o0, 4580, 0, :LMT - tz.offset :o1, 3600, 0, :CET - tz.offset :o2, 3600, 3600, :CEST - - tz.transition 1890, 9, :o1, 10418291051, 4320 - tz.transition 1916, 4, :o2, 29051813, 12 - tz.transition 1916, 9, :o1, 58107299, 24 - tz.transition 1917, 4, :o2, 58112029, 24 - tz.transition 1917, 9, :o1, 58115725, 24 - tz.transition 1918, 4, :o2, 29060215, 12 - tz.transition 1918, 9, :o1, 58124773, 24 - tz.transition 1919, 4, :o2, 29064763, 12 - tz.transition 1919, 9, :o1, 58133197, 24 - tz.transition 1920, 4, :o2, 29069035, 12 - tz.transition 1920, 9, :o1, 58142341, 24 - tz.transition 1941, 4, :o2, 58322173, 24 - tz.transition 1942, 11, :o1, 58335973, 24 - tz.transition 1943, 3, :o2, 58339501, 24 - tz.transition 1943, 10, :o1, 58344037, 24 - tz.transition 1944, 4, :o2, 58348405, 24 - tz.transition 1944, 10, :o1, 58352773, 24 - tz.transition 1945, 5, :o2, 29178929, 12 - tz.transition 1945, 11, :o1, 29181149, 12 - tz.transition 1946, 3, :o2, 58365853, 24 - tz.transition 1946, 10, :o1, 58370389, 24 - tz.transition 1947, 4, :o2, 58374757, 24 - tz.transition 1947, 10, :o1, 58379125, 24 - tz.transition 1948, 4, :o2, 58383493, 24 - tz.transition 1948, 10, :o1, 58387861, 24 - tz.transition 1949, 4, :o2, 58392397, 24 - tz.transition 1949, 10, :o1, 58396597, 24 - tz.transition 1950, 4, :o2, 58401325, 24 - tz.transition 1950, 10, :o1, 58405861, 24 - tz.transition 1954, 5, :o2, 58437251, 24 - tz.transition 1954, 10, :o1, 29220221, 12 - tz.transition 1955, 5, :o2, 58446011, 24 - tz.transition 1955, 10, :o1, 29224601, 12 - tz.transition 1956, 6, :o2, 58455059, 24 - tz.transition 1956, 9, :o1, 29228957, 12 - tz.transition 1957, 6, :o2, 4871983, 2 - tz.transition 1957, 9, :o1, 58466653, 24 - tz.transition 1980, 4, :o2, 323827200 - tz.transition 1980, 9, :o1, 338950800 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 9, :o1, 370400400 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 9, :o1, 401850000 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o1, 717555600 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 9, :o1, 749005200 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 9, :o1, 780454800 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 9, :o1, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Copenhagen.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Copenhagen.rb deleted file mode 100644 index 47cbaf14a7..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Copenhagen.rb +++ /dev/null @@ -1,179 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Copenhagen - include TimezoneDefinition - - timezone 'Europe/Copenhagen' do |tz| - tz.offset :o0, 3020, 0, :LMT - tz.offset :o1, 3020, 0, :CMT - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - - tz.transition 1889, 12, :o1, 10417111769, 4320 - tz.transition 1893, 12, :o2, 10423423289, 4320 - tz.transition 1916, 5, :o3, 29051981, 12 - tz.transition 1916, 9, :o2, 19369099, 8 - tz.transition 1940, 5, :o3, 58314347, 24 - tz.transition 1942, 11, :o2, 58335973, 24 - tz.transition 1943, 3, :o3, 58339501, 24 - tz.transition 1943, 10, :o2, 58344037, 24 - tz.transition 1944, 4, :o3, 58348405, 24 - tz.transition 1944, 10, :o2, 58352773, 24 - tz.transition 1945, 4, :o3, 58357141, 24 - tz.transition 1945, 8, :o2, 58360381, 24 - tz.transition 1946, 5, :o3, 58366597, 24 - tz.transition 1946, 9, :o2, 58369549, 24 - tz.transition 1947, 5, :o3, 58375429, 24 - tz.transition 1947, 8, :o2, 58377781, 24 - tz.transition 1948, 5, :o3, 58384333, 24 - tz.transition 1948, 8, :o2, 58386517, 24 - tz.transition 1980, 4, :o3, 323830800 - tz.transition 1980, 9, :o2, 338950800 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Dublin.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Dublin.rb deleted file mode 100644 index 0560bb5436..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Dublin.rb +++ /dev/null @@ -1,276 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Dublin - include TimezoneDefinition - - timezone 'Europe/Dublin' do |tz| - tz.offset :o0, -1500, 0, :LMT - tz.offset :o1, -1521, 0, :DMT - tz.offset :o2, -1521, 3600, :IST - tz.offset :o3, 0, 0, :GMT - tz.offset :o4, 0, 3600, :BST - tz.offset :o5, 0, 3600, :IST - tz.offset :o6, 3600, 0, :IST - - tz.transition 1880, 8, :o1, 693483701, 288 - tz.transition 1916, 5, :o2, 7747214723, 3200 - tz.transition 1916, 10, :o3, 7747640323, 3200 - tz.transition 1917, 4, :o4, 29055919, 12 - tz.transition 1917, 9, :o3, 29057863, 12 - tz.transition 1918, 3, :o4, 29060119, 12 - tz.transition 1918, 9, :o3, 29062399, 12 - tz.transition 1919, 3, :o4, 29064571, 12 - tz.transition 1919, 9, :o3, 29066767, 12 - tz.transition 1920, 3, :o4, 29068939, 12 - tz.transition 1920, 10, :o3, 29071471, 12 - tz.transition 1921, 4, :o4, 29073391, 12 - tz.transition 1921, 10, :o3, 29075587, 12 - tz.transition 1922, 3, :o5, 29077675, 12 - tz.transition 1922, 10, :o3, 29080027, 12 - tz.transition 1923, 4, :o5, 29082379, 12 - tz.transition 1923, 9, :o3, 29084143, 12 - tz.transition 1924, 4, :o5, 29086663, 12 - tz.transition 1924, 9, :o3, 29088595, 12 - tz.transition 1925, 4, :o5, 29091115, 12 - tz.transition 1925, 10, :o3, 29093131, 12 - tz.transition 1926, 4, :o5, 29095483, 12 - tz.transition 1926, 10, :o3, 29097499, 12 - tz.transition 1927, 4, :o5, 29099767, 12 - tz.transition 1927, 10, :o3, 29101867, 12 - tz.transition 1928, 4, :o5, 29104303, 12 - tz.transition 1928, 10, :o3, 29106319, 12 - tz.transition 1929, 4, :o5, 29108671, 12 - tz.transition 1929, 10, :o3, 29110687, 12 - tz.transition 1930, 4, :o5, 29112955, 12 - tz.transition 1930, 10, :o3, 29115055, 12 - tz.transition 1931, 4, :o5, 29117407, 12 - tz.transition 1931, 10, :o3, 29119423, 12 - tz.transition 1932, 4, :o5, 29121775, 12 - tz.transition 1932, 10, :o3, 29123791, 12 - tz.transition 1933, 4, :o5, 29126059, 12 - tz.transition 1933, 10, :o3, 29128243, 12 - tz.transition 1934, 4, :o5, 29130595, 12 - tz.transition 1934, 10, :o3, 29132611, 12 - tz.transition 1935, 4, :o5, 29134879, 12 - tz.transition 1935, 10, :o3, 29136979, 12 - tz.transition 1936, 4, :o5, 29139331, 12 - tz.transition 1936, 10, :o3, 29141347, 12 - tz.transition 1937, 4, :o5, 29143699, 12 - tz.transition 1937, 10, :o3, 29145715, 12 - tz.transition 1938, 4, :o5, 29147983, 12 - tz.transition 1938, 10, :o3, 29150083, 12 - tz.transition 1939, 4, :o5, 29152435, 12 - tz.transition 1939, 11, :o3, 29155039, 12 - tz.transition 1940, 2, :o5, 29156215, 12 - tz.transition 1946, 10, :o3, 58370389, 24 - tz.transition 1947, 3, :o5, 29187127, 12 - tz.transition 1947, 11, :o3, 58379797, 24 - tz.transition 1948, 4, :o5, 29191915, 12 - tz.transition 1948, 10, :o3, 29194267, 12 - tz.transition 1949, 4, :o5, 29196115, 12 - tz.transition 1949, 10, :o3, 29198635, 12 - tz.transition 1950, 4, :o5, 29200651, 12 - tz.transition 1950, 10, :o3, 29202919, 12 - tz.transition 1951, 4, :o5, 29205019, 12 - tz.transition 1951, 10, :o3, 29207287, 12 - tz.transition 1952, 4, :o5, 29209471, 12 - tz.transition 1952, 10, :o3, 29211739, 12 - tz.transition 1953, 4, :o5, 29213839, 12 - tz.transition 1953, 10, :o3, 29215855, 12 - tz.transition 1954, 4, :o5, 29218123, 12 - tz.transition 1954, 10, :o3, 29220223, 12 - tz.transition 1955, 4, :o5, 29222575, 12 - tz.transition 1955, 10, :o3, 29224591, 12 - tz.transition 1956, 4, :o5, 29227027, 12 - tz.transition 1956, 10, :o3, 29229043, 12 - tz.transition 1957, 4, :o5, 29231311, 12 - tz.transition 1957, 10, :o3, 29233411, 12 - tz.transition 1958, 4, :o5, 29235763, 12 - tz.transition 1958, 10, :o3, 29237779, 12 - tz.transition 1959, 4, :o5, 29240131, 12 - tz.transition 1959, 10, :o3, 29242147, 12 - tz.transition 1960, 4, :o5, 29244415, 12 - tz.transition 1960, 10, :o3, 29246515, 12 - tz.transition 1961, 3, :o5, 29248615, 12 - tz.transition 1961, 10, :o3, 29251219, 12 - tz.transition 1962, 3, :o5, 29252983, 12 - tz.transition 1962, 10, :o3, 29255587, 12 - tz.transition 1963, 3, :o5, 29257435, 12 - tz.transition 1963, 10, :o3, 29259955, 12 - tz.transition 1964, 3, :o5, 29261719, 12 - tz.transition 1964, 10, :o3, 29264323, 12 - tz.transition 1965, 3, :o5, 29266087, 12 - tz.transition 1965, 10, :o3, 29268691, 12 - tz.transition 1966, 3, :o5, 29270455, 12 - tz.transition 1966, 10, :o3, 29273059, 12 - tz.transition 1967, 3, :o5, 29274823, 12 - tz.transition 1967, 10, :o3, 29277511, 12 - tz.transition 1968, 2, :o5, 29278855, 12 - tz.transition 1968, 10, :o6, 58563755, 24 - tz.transition 1971, 10, :o3, 57722400 - tz.transition 1972, 3, :o5, 69818400 - tz.transition 1972, 10, :o3, 89172000 - tz.transition 1973, 3, :o5, 101268000 - tz.transition 1973, 10, :o3, 120621600 - tz.transition 1974, 3, :o5, 132717600 - tz.transition 1974, 10, :o3, 152071200 - tz.transition 1975, 3, :o5, 164167200 - tz.transition 1975, 10, :o3, 183520800 - tz.transition 1976, 3, :o5, 196221600 - tz.transition 1976, 10, :o3, 214970400 - tz.transition 1977, 3, :o5, 227671200 - tz.transition 1977, 10, :o3, 246420000 - tz.transition 1978, 3, :o5, 259120800 - tz.transition 1978, 10, :o3, 278474400 - tz.transition 1979, 3, :o5, 290570400 - tz.transition 1979, 10, :o3, 309924000 - tz.transition 1980, 3, :o5, 322020000 - tz.transition 1980, 10, :o3, 341373600 - tz.transition 1981, 3, :o5, 354675600 - tz.transition 1981, 10, :o3, 372819600 - tz.transition 1982, 3, :o5, 386125200 - tz.transition 1982, 10, :o3, 404269200 - tz.transition 1983, 3, :o5, 417574800 - tz.transition 1983, 10, :o3, 435718800 - tz.transition 1984, 3, :o5, 449024400 - tz.transition 1984, 10, :o3, 467773200 - tz.transition 1985, 3, :o5, 481078800 - tz.transition 1985, 10, :o3, 499222800 - tz.transition 1986, 3, :o5, 512528400 - tz.transition 1986, 10, :o3, 530672400 - tz.transition 1987, 3, :o5, 543978000 - tz.transition 1987, 10, :o3, 562122000 - tz.transition 1988, 3, :o5, 575427600 - tz.transition 1988, 10, :o3, 593571600 - tz.transition 1989, 3, :o5, 606877200 - tz.transition 1989, 10, :o3, 625626000 - tz.transition 1990, 3, :o5, 638326800 - tz.transition 1990, 10, :o3, 657075600 - tz.transition 1991, 3, :o5, 670381200 - tz.transition 1991, 10, :o3, 688525200 - tz.transition 1992, 3, :o5, 701830800 - tz.transition 1992, 10, :o3, 719974800 - tz.transition 1993, 3, :o5, 733280400 - tz.transition 1993, 10, :o3, 751424400 - tz.transition 1994, 3, :o5, 764730000 - tz.transition 1994, 10, :o3, 782874000 - tz.transition 1995, 3, :o5, 796179600 - tz.transition 1995, 10, :o3, 814323600 - tz.transition 1996, 3, :o5, 828234000 - tz.transition 1996, 10, :o3, 846378000 - tz.transition 1997, 3, :o5, 859683600 - tz.transition 1997, 10, :o3, 877827600 - tz.transition 1998, 3, :o5, 891133200 - tz.transition 1998, 10, :o3, 909277200 - tz.transition 1999, 3, :o5, 922582800 - tz.transition 1999, 10, :o3, 941331600 - tz.transition 2000, 3, :o5, 954032400 - tz.transition 2000, 10, :o3, 972781200 - tz.transition 2001, 3, :o5, 985482000 - tz.transition 2001, 10, :o3, 1004230800 - tz.transition 2002, 3, :o5, 1017536400 - tz.transition 2002, 10, :o3, 1035680400 - tz.transition 2003, 3, :o5, 1048986000 - tz.transition 2003, 10, :o3, 1067130000 - tz.transition 2004, 3, :o5, 1080435600 - tz.transition 2004, 10, :o3, 1099184400 - tz.transition 2005, 3, :o5, 1111885200 - tz.transition 2005, 10, :o3, 1130634000 - tz.transition 2006, 3, :o5, 1143334800 - tz.transition 2006, 10, :o3, 1162083600 - tz.transition 2007, 3, :o5, 1174784400 - tz.transition 2007, 10, :o3, 1193533200 - tz.transition 2008, 3, :o5, 1206838800 - tz.transition 2008, 10, :o3, 1224982800 - tz.transition 2009, 3, :o5, 1238288400 - tz.transition 2009, 10, :o3, 1256432400 - tz.transition 2010, 3, :o5, 1269738000 - tz.transition 2010, 10, :o3, 1288486800 - tz.transition 2011, 3, :o5, 1301187600 - tz.transition 2011, 10, :o3, 1319936400 - tz.transition 2012, 3, :o5, 1332637200 - tz.transition 2012, 10, :o3, 1351386000 - tz.transition 2013, 3, :o5, 1364691600 - tz.transition 2013, 10, :o3, 1382835600 - tz.transition 2014, 3, :o5, 1396141200 - tz.transition 2014, 10, :o3, 1414285200 - tz.transition 2015, 3, :o5, 1427590800 - tz.transition 2015, 10, :o3, 1445734800 - tz.transition 2016, 3, :o5, 1459040400 - tz.transition 2016, 10, :o3, 1477789200 - tz.transition 2017, 3, :o5, 1490490000 - tz.transition 2017, 10, :o3, 1509238800 - tz.transition 2018, 3, :o5, 1521939600 - tz.transition 2018, 10, :o3, 1540688400 - tz.transition 2019, 3, :o5, 1553994000 - tz.transition 2019, 10, :o3, 1572138000 - tz.transition 2020, 3, :o5, 1585443600 - tz.transition 2020, 10, :o3, 1603587600 - tz.transition 2021, 3, :o5, 1616893200 - tz.transition 2021, 10, :o3, 1635642000 - tz.transition 2022, 3, :o5, 1648342800 - tz.transition 2022, 10, :o3, 1667091600 - tz.transition 2023, 3, :o5, 1679792400 - tz.transition 2023, 10, :o3, 1698541200 - tz.transition 2024, 3, :o5, 1711846800 - tz.transition 2024, 10, :o3, 1729990800 - tz.transition 2025, 3, :o5, 1743296400 - tz.transition 2025, 10, :o3, 1761440400 - tz.transition 2026, 3, :o5, 1774746000 - tz.transition 2026, 10, :o3, 1792890000 - tz.transition 2027, 3, :o5, 1806195600 - tz.transition 2027, 10, :o3, 1824944400 - tz.transition 2028, 3, :o5, 1837645200 - tz.transition 2028, 10, :o3, 1856394000 - tz.transition 2029, 3, :o5, 1869094800 - tz.transition 2029, 10, :o3, 1887843600 - tz.transition 2030, 3, :o5, 1901149200 - tz.transition 2030, 10, :o3, 1919293200 - tz.transition 2031, 3, :o5, 1932598800 - tz.transition 2031, 10, :o3, 1950742800 - tz.transition 2032, 3, :o5, 1964048400 - tz.transition 2032, 10, :o3, 1982797200 - tz.transition 2033, 3, :o5, 1995498000 - tz.transition 2033, 10, :o3, 2014246800 - tz.transition 2034, 3, :o5, 2026947600 - tz.transition 2034, 10, :o3, 2045696400 - tz.transition 2035, 3, :o5, 2058397200 - tz.transition 2035, 10, :o3, 2077146000 - tz.transition 2036, 3, :o5, 2090451600 - tz.transition 2036, 10, :o3, 2108595600 - tz.transition 2037, 3, :o5, 2121901200 - tz.transition 2037, 10, :o3, 2140045200 - tz.transition 2038, 3, :o5, 59172253, 24 - tz.transition 2038, 10, :o3, 59177461, 24 - tz.transition 2039, 3, :o5, 59180989, 24 - tz.transition 2039, 10, :o3, 59186197, 24 - tz.transition 2040, 3, :o5, 59189725, 24 - tz.transition 2040, 10, :o3, 59194933, 24 - tz.transition 2041, 3, :o5, 59198629, 24 - tz.transition 2041, 10, :o3, 59203669, 24 - tz.transition 2042, 3, :o5, 59207365, 24 - tz.transition 2042, 10, :o3, 59212405, 24 - tz.transition 2043, 3, :o5, 59216101, 24 - tz.transition 2043, 10, :o3, 59221141, 24 - tz.transition 2044, 3, :o5, 59224837, 24 - tz.transition 2044, 10, :o3, 59230045, 24 - tz.transition 2045, 3, :o5, 59233573, 24 - tz.transition 2045, 10, :o3, 59238781, 24 - tz.transition 2046, 3, :o5, 59242309, 24 - tz.transition 2046, 10, :o3, 59247517, 24 - tz.transition 2047, 3, :o5, 59251213, 24 - tz.transition 2047, 10, :o3, 59256253, 24 - tz.transition 2048, 3, :o5, 59259949, 24 - tz.transition 2048, 10, :o3, 59264989, 24 - tz.transition 2049, 3, :o5, 59268685, 24 - tz.transition 2049, 10, :o3, 59273893, 24 - tz.transition 2050, 3, :o5, 59277421, 24 - tz.transition 2050, 10, :o3, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Helsinki.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Helsinki.rb deleted file mode 100644 index 13a806bcc7..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Helsinki.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Helsinki - include TimezoneDefinition - - timezone 'Europe/Helsinki' do |tz| - tz.offset :o0, 5992, 0, :LMT - tz.offset :o1, 5992, 0, :HMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 7200, 3600, :EEST - - tz.transition 1878, 5, :o1, 25997062651, 10800 - tz.transition 1921, 4, :o2, 26166352651, 10800 - tz.transition 1942, 4, :o3, 29165429, 12 - tz.transition 1942, 10, :o2, 19445083, 8 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Istanbul.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Istanbul.rb deleted file mode 100644 index 8306c47536..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Istanbul.rb +++ /dev/null @@ -1,218 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Istanbul - include TimezoneDefinition - - timezone 'Europe/Istanbul' do |tz| - tz.offset :o0, 6952, 0, :LMT - tz.offset :o1, 7016, 0, :IMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 7200, 3600, :EEST - tz.offset :o4, 10800, 3600, :TRST - tz.offset :o5, 10800, 0, :TRT - - tz.transition 1879, 12, :o1, 26003326531, 10800 - tz.transition 1910, 9, :o2, 26124610523, 10800 - tz.transition 1916, 4, :o3, 29051813, 12 - tz.transition 1916, 9, :o2, 19369099, 8 - tz.transition 1920, 3, :o3, 29068937, 12 - tz.transition 1920, 10, :o2, 19380979, 8 - tz.transition 1921, 4, :o3, 29073389, 12 - tz.transition 1921, 10, :o2, 19383723, 8 - tz.transition 1922, 3, :o3, 29077673, 12 - tz.transition 1922, 10, :o2, 19386683, 8 - tz.transition 1924, 5, :o3, 29087021, 12 - tz.transition 1924, 9, :o2, 19392475, 8 - tz.transition 1925, 4, :o3, 29091257, 12 - tz.transition 1925, 9, :o2, 19395395, 8 - tz.transition 1940, 6, :o3, 29157725, 12 - tz.transition 1940, 10, :o2, 19439259, 8 - tz.transition 1940, 11, :o3, 29159573, 12 - tz.transition 1941, 9, :o2, 19442067, 8 - tz.transition 1942, 3, :o3, 29165405, 12 - tz.transition 1942, 10, :o2, 19445315, 8 - tz.transition 1945, 4, :o3, 29178569, 12 - tz.transition 1945, 10, :o2, 19453891, 8 - tz.transition 1946, 5, :o3, 29183669, 12 - tz.transition 1946, 9, :o2, 19456755, 8 - tz.transition 1947, 4, :o3, 29187545, 12 - tz.transition 1947, 10, :o2, 19459707, 8 - tz.transition 1948, 4, :o3, 29191913, 12 - tz.transition 1948, 10, :o2, 19462619, 8 - tz.transition 1949, 4, :o3, 29196197, 12 - tz.transition 1949, 10, :o2, 19465531, 8 - tz.transition 1950, 4, :o3, 29200685, 12 - tz.transition 1950, 10, :o2, 19468499, 8 - tz.transition 1951, 4, :o3, 29205101, 12 - tz.transition 1951, 10, :o2, 19471419, 8 - tz.transition 1962, 7, :o3, 29254325, 12 - tz.transition 1962, 10, :o2, 19503563, 8 - tz.transition 1964, 5, :o3, 29262365, 12 - tz.transition 1964, 9, :o2, 19509355, 8 - tz.transition 1970, 5, :o3, 10533600 - tz.transition 1970, 10, :o2, 23835600 - tz.transition 1971, 5, :o3, 41983200 - tz.transition 1971, 10, :o2, 55285200 - tz.transition 1972, 5, :o3, 74037600 - tz.transition 1972, 10, :o2, 87339600 - tz.transition 1973, 6, :o3, 107910000 - tz.transition 1973, 11, :o2, 121219200 - tz.transition 1974, 3, :o3, 133920000 - tz.transition 1974, 11, :o2, 152676000 - tz.transition 1975, 3, :o3, 165362400 - tz.transition 1975, 10, :o2, 183502800 - tz.transition 1976, 5, :o3, 202428000 - tz.transition 1976, 10, :o2, 215557200 - tz.transition 1977, 4, :o3, 228866400 - tz.transition 1977, 10, :o2, 245797200 - tz.transition 1978, 4, :o3, 260316000 - tz.transition 1978, 10, :o4, 277246800 - tz.transition 1979, 10, :o5, 308779200 - tz.transition 1980, 4, :o4, 323827200 - tz.transition 1980, 10, :o5, 340228800 - tz.transition 1981, 3, :o4, 354672000 - tz.transition 1981, 10, :o5, 371678400 - tz.transition 1982, 3, :o4, 386121600 - tz.transition 1982, 10, :o5, 403128000 - tz.transition 1983, 7, :o4, 428446800 - tz.transition 1983, 10, :o5, 433886400 - tz.transition 1985, 4, :o3, 482792400 - tz.transition 1985, 9, :o2, 496702800 - tz.transition 1986, 3, :o3, 512524800 - tz.transition 1986, 9, :o2, 528249600 - tz.transition 1987, 3, :o3, 543974400 - tz.transition 1987, 9, :o2, 559699200 - tz.transition 1988, 3, :o3, 575424000 - tz.transition 1988, 9, :o2, 591148800 - tz.transition 1989, 3, :o3, 606873600 - tz.transition 1989, 9, :o2, 622598400 - tz.transition 1990, 3, :o3, 638323200 - tz.transition 1990, 9, :o2, 654652800 - tz.transition 1991, 3, :o3, 670374000 - tz.transition 1991, 9, :o2, 686098800 - tz.transition 1992, 3, :o3, 701823600 - tz.transition 1992, 9, :o2, 717548400 - tz.transition 1993, 3, :o3, 733273200 - tz.transition 1993, 9, :o2, 748998000 - tz.transition 1994, 3, :o3, 764722800 - tz.transition 1994, 9, :o2, 780447600 - tz.transition 1995, 3, :o3, 796172400 - tz.transition 1995, 9, :o2, 811897200 - tz.transition 1996, 3, :o3, 828226800 - tz.transition 1996, 10, :o2, 846370800 - tz.transition 1997, 3, :o3, 859676400 - tz.transition 1997, 10, :o2, 877820400 - tz.transition 1998, 3, :o3, 891126000 - tz.transition 1998, 10, :o2, 909270000 - tz.transition 1999, 3, :o3, 922575600 - tz.transition 1999, 10, :o2, 941324400 - tz.transition 2000, 3, :o3, 954025200 - tz.transition 2000, 10, :o2, 972774000 - tz.transition 2001, 3, :o3, 985474800 - tz.transition 2001, 10, :o2, 1004223600 - tz.transition 2002, 3, :o3, 1017529200 - tz.transition 2002, 10, :o2, 1035673200 - tz.transition 2003, 3, :o3, 1048978800 - tz.transition 2003, 10, :o2, 1067122800 - tz.transition 2004, 3, :o3, 1080428400 - tz.transition 2004, 10, :o2, 1099177200 - tz.transition 2005, 3, :o3, 1111878000 - tz.transition 2005, 10, :o2, 1130626800 - tz.transition 2006, 3, :o3, 1143327600 - tz.transition 2006, 10, :o2, 1162076400 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Kiev.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Kiev.rb deleted file mode 100644 index 513d3308be..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Kiev.rb +++ /dev/null @@ -1,168 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Kiev - include TimezoneDefinition - - timezone 'Europe/Kiev' do |tz| - tz.offset :o0, 7324, 0, :LMT - tz.offset :o1, 7324, 0, :KMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 10800, 0, :MSK - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 3600, 0, :CET - tz.offset :o6, 10800, 3600, :MSD - tz.offset :o7, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 52006652969, 21600 - tz.transition 1924, 5, :o2, 52356400169, 21600 - tz.transition 1930, 6, :o3, 29113781, 12 - tz.transition 1941, 9, :o4, 19442059, 8 - tz.transition 1942, 11, :o5, 58335973, 24 - tz.transition 1943, 3, :o4, 58339501, 24 - tz.transition 1943, 10, :o5, 58344037, 24 - tz.transition 1943, 11, :o3, 58344827, 24 - tz.transition 1981, 3, :o6, 354920400 - tz.transition 1981, 9, :o3, 370728000 - tz.transition 1982, 3, :o6, 386456400 - tz.transition 1982, 9, :o3, 402264000 - tz.transition 1983, 3, :o6, 417992400 - tz.transition 1983, 9, :o3, 433800000 - tz.transition 1984, 3, :o6, 449614800 - tz.transition 1984, 9, :o3, 465346800 - tz.transition 1985, 3, :o6, 481071600 - tz.transition 1985, 9, :o3, 496796400 - tz.transition 1986, 3, :o6, 512521200 - tz.transition 1986, 9, :o3, 528246000 - tz.transition 1987, 3, :o6, 543970800 - tz.transition 1987, 9, :o3, 559695600 - tz.transition 1988, 3, :o6, 575420400 - tz.transition 1988, 9, :o3, 591145200 - tz.transition 1989, 3, :o6, 606870000 - tz.transition 1989, 9, :o3, 622594800 - tz.transition 1990, 6, :o2, 646786800 - tz.transition 1992, 3, :o7, 701820000 - tz.transition 1992, 9, :o2, 717541200 - tz.transition 1993, 3, :o7, 733269600 - tz.transition 1993, 9, :o2, 748990800 - tz.transition 1994, 3, :o7, 764719200 - tz.transition 1994, 9, :o2, 780440400 - tz.transition 1995, 3, :o7, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o7, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o7, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o7, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o7, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o7, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o7, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o7, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o7, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o7, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o7, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o7, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o7, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o7, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o7, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o7, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o7, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o7, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o7, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o7, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o7, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o7, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o7, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o7, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o7, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o7, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o7, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o7, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o7, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o7, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o7, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o7, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o7, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o7, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o7, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o7, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o7, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o7, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o7, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o7, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o7, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o7, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o7, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o7, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o7, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o7, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o7, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o7, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o7, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o7, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o7, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o7, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o7, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o7, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o7, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o7, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Lisbon.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Lisbon.rb deleted file mode 100644 index 1c6d2a3d30..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Lisbon.rb +++ /dev/null @@ -1,268 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Lisbon - include TimezoneDefinition - - timezone 'Europe/Lisbon' do |tz| - tz.offset :o0, -2192, 0, :LMT - tz.offset :o1, 0, 0, :WET - tz.offset :o2, 0, 3600, :WEST - tz.offset :o3, 0, 7200, :WEMT - tz.offset :o4, 3600, 0, :CET - tz.offset :o5, 3600, 3600, :CEST - - tz.transition 1912, 1, :o1, 13064773637, 5400 - tz.transition 1916, 6, :o2, 58104779, 24 - tz.transition 1916, 11, :o1, 4842337, 2 - tz.transition 1917, 2, :o2, 58110923, 24 - tz.transition 1917, 10, :o1, 58116395, 24 - tz.transition 1918, 3, :o2, 58119707, 24 - tz.transition 1918, 10, :o1, 58125155, 24 - tz.transition 1919, 2, :o2, 58128443, 24 - tz.transition 1919, 10, :o1, 58133915, 24 - tz.transition 1920, 2, :o2, 58137227, 24 - tz.transition 1920, 10, :o1, 58142699, 24 - tz.transition 1921, 2, :o2, 58145987, 24 - tz.transition 1921, 10, :o1, 58151459, 24 - tz.transition 1924, 4, :o2, 58173419, 24 - tz.transition 1924, 10, :o1, 58177763, 24 - tz.transition 1926, 4, :o2, 58190963, 24 - tz.transition 1926, 10, :o1, 58194995, 24 - tz.transition 1927, 4, :o2, 58199531, 24 - tz.transition 1927, 10, :o1, 58203731, 24 - tz.transition 1928, 4, :o2, 58208435, 24 - tz.transition 1928, 10, :o1, 58212635, 24 - tz.transition 1929, 4, :o2, 58217339, 24 - tz.transition 1929, 10, :o1, 58221371, 24 - tz.transition 1931, 4, :o2, 58234811, 24 - tz.transition 1931, 10, :o1, 58238843, 24 - tz.transition 1932, 4, :o2, 58243211, 24 - tz.transition 1932, 10, :o1, 58247579, 24 - tz.transition 1934, 4, :o2, 58260851, 24 - tz.transition 1934, 10, :o1, 58265219, 24 - tz.transition 1935, 3, :o2, 58269419, 24 - tz.transition 1935, 10, :o1, 58273955, 24 - tz.transition 1936, 4, :o2, 58278659, 24 - tz.transition 1936, 10, :o1, 58282691, 24 - tz.transition 1937, 4, :o2, 58287059, 24 - tz.transition 1937, 10, :o1, 58291427, 24 - tz.transition 1938, 3, :o2, 58295627, 24 - tz.transition 1938, 10, :o1, 58300163, 24 - tz.transition 1939, 4, :o2, 58304867, 24 - tz.transition 1939, 11, :o1, 58310075, 24 - tz.transition 1940, 2, :o2, 58312427, 24 - tz.transition 1940, 10, :o1, 58317803, 24 - tz.transition 1941, 4, :o2, 58322171, 24 - tz.transition 1941, 10, :o1, 58326563, 24 - tz.transition 1942, 3, :o2, 58330403, 24 - tz.transition 1942, 4, :o3, 29165705, 12 - tz.transition 1942, 8, :o2, 29167049, 12 - tz.transition 1942, 10, :o1, 58335779, 24 - tz.transition 1943, 3, :o2, 58339139, 24 - tz.transition 1943, 4, :o3, 29169989, 12 - tz.transition 1943, 8, :o2, 29171585, 12 - tz.transition 1943, 10, :o1, 58344683, 24 - tz.transition 1944, 3, :o2, 58347875, 24 - tz.transition 1944, 4, :o3, 29174441, 12 - tz.transition 1944, 8, :o2, 29175953, 12 - tz.transition 1944, 10, :o1, 58353419, 24 - tz.transition 1945, 3, :o2, 58356611, 24 - tz.transition 1945, 4, :o3, 29178809, 12 - tz.transition 1945, 8, :o2, 29180321, 12 - tz.transition 1945, 10, :o1, 58362155, 24 - tz.transition 1946, 4, :o2, 58366019, 24 - tz.transition 1946, 10, :o1, 58370387, 24 - tz.transition 1947, 4, :o2, 29187379, 12 - tz.transition 1947, 10, :o1, 29189563, 12 - tz.transition 1948, 4, :o2, 29191747, 12 - tz.transition 1948, 10, :o1, 29193931, 12 - tz.transition 1949, 4, :o2, 29196115, 12 - tz.transition 1949, 10, :o1, 29198299, 12 - tz.transition 1951, 4, :o2, 29204851, 12 - tz.transition 1951, 10, :o1, 29207119, 12 - tz.transition 1952, 4, :o2, 29209303, 12 - tz.transition 1952, 10, :o1, 29211487, 12 - tz.transition 1953, 4, :o2, 29213671, 12 - tz.transition 1953, 10, :o1, 29215855, 12 - tz.transition 1954, 4, :o2, 29218039, 12 - tz.transition 1954, 10, :o1, 29220223, 12 - tz.transition 1955, 4, :o2, 29222407, 12 - tz.transition 1955, 10, :o1, 29224591, 12 - tz.transition 1956, 4, :o2, 29226775, 12 - tz.transition 1956, 10, :o1, 29229043, 12 - tz.transition 1957, 4, :o2, 29231227, 12 - tz.transition 1957, 10, :o1, 29233411, 12 - tz.transition 1958, 4, :o2, 29235595, 12 - tz.transition 1958, 10, :o1, 29237779, 12 - tz.transition 1959, 4, :o2, 29239963, 12 - tz.transition 1959, 10, :o1, 29242147, 12 - tz.transition 1960, 4, :o2, 29244331, 12 - tz.transition 1960, 10, :o1, 29246515, 12 - tz.transition 1961, 4, :o2, 29248699, 12 - tz.transition 1961, 10, :o1, 29250883, 12 - tz.transition 1962, 4, :o2, 29253067, 12 - tz.transition 1962, 10, :o1, 29255335, 12 - tz.transition 1963, 4, :o2, 29257519, 12 - tz.transition 1963, 10, :o1, 29259703, 12 - tz.transition 1964, 4, :o2, 29261887, 12 - tz.transition 1964, 10, :o1, 29264071, 12 - tz.transition 1965, 4, :o2, 29266255, 12 - tz.transition 1965, 10, :o1, 29268439, 12 - tz.transition 1966, 4, :o4, 29270623, 12 - tz.transition 1976, 9, :o1, 212544000 - tz.transition 1977, 3, :o2, 228268800 - tz.transition 1977, 9, :o1, 243993600 - tz.transition 1978, 4, :o2, 260323200 - tz.transition 1978, 10, :o1, 276048000 - tz.transition 1979, 4, :o2, 291772800 - tz.transition 1979, 9, :o1, 307501200 - tz.transition 1980, 3, :o2, 323222400 - tz.transition 1980, 9, :o1, 338950800 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 9, :o1, 370400400 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 9, :o1, 401850000 - tz.transition 1983, 3, :o2, 417578400 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o4, 717555600 - tz.transition 1993, 3, :o5, 733280400 - tz.transition 1993, 9, :o4, 749005200 - tz.transition 1994, 3, :o5, 764730000 - tz.transition 1994, 9, :o4, 780454800 - tz.transition 1995, 3, :o5, 796179600 - tz.transition 1995, 9, :o4, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Ljubljana.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Ljubljana.rb deleted file mode 100644 index a9828e6ef8..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Ljubljana.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Ljubljana - include TimezoneDefinition - - linked_timezone 'Europe/Ljubljana', 'Europe/Belgrade' - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/London.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/London.rb deleted file mode 100644 index 64ce41e900..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/London.rb +++ /dev/null @@ -1,288 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module London - include TimezoneDefinition - - timezone 'Europe/London' do |tz| - tz.offset :o0, -75, 0, :LMT - tz.offset :o1, 0, 0, :GMT - tz.offset :o2, 0, 3600, :BST - tz.offset :o3, 0, 7200, :BDST - tz.offset :o4, 3600, 0, :BST - - tz.transition 1847, 12, :o1, 2760187969, 1152 - tz.transition 1916, 5, :o2, 29052055, 12 - tz.transition 1916, 10, :o1, 29053651, 12 - tz.transition 1917, 4, :o2, 29055919, 12 - tz.transition 1917, 9, :o1, 29057863, 12 - tz.transition 1918, 3, :o2, 29060119, 12 - tz.transition 1918, 9, :o1, 29062399, 12 - tz.transition 1919, 3, :o2, 29064571, 12 - tz.transition 1919, 9, :o1, 29066767, 12 - tz.transition 1920, 3, :o2, 29068939, 12 - tz.transition 1920, 10, :o1, 29071471, 12 - tz.transition 1921, 4, :o2, 29073391, 12 - tz.transition 1921, 10, :o1, 29075587, 12 - tz.transition 1922, 3, :o2, 29077675, 12 - tz.transition 1922, 10, :o1, 29080027, 12 - tz.transition 1923, 4, :o2, 29082379, 12 - tz.transition 1923, 9, :o1, 29084143, 12 - tz.transition 1924, 4, :o2, 29086663, 12 - tz.transition 1924, 9, :o1, 29088595, 12 - tz.transition 1925, 4, :o2, 29091115, 12 - tz.transition 1925, 10, :o1, 29093131, 12 - tz.transition 1926, 4, :o2, 29095483, 12 - tz.transition 1926, 10, :o1, 29097499, 12 - tz.transition 1927, 4, :o2, 29099767, 12 - tz.transition 1927, 10, :o1, 29101867, 12 - tz.transition 1928, 4, :o2, 29104303, 12 - tz.transition 1928, 10, :o1, 29106319, 12 - tz.transition 1929, 4, :o2, 29108671, 12 - tz.transition 1929, 10, :o1, 29110687, 12 - tz.transition 1930, 4, :o2, 29112955, 12 - tz.transition 1930, 10, :o1, 29115055, 12 - tz.transition 1931, 4, :o2, 29117407, 12 - tz.transition 1931, 10, :o1, 29119423, 12 - tz.transition 1932, 4, :o2, 29121775, 12 - tz.transition 1932, 10, :o1, 29123791, 12 - tz.transition 1933, 4, :o2, 29126059, 12 - tz.transition 1933, 10, :o1, 29128243, 12 - tz.transition 1934, 4, :o2, 29130595, 12 - tz.transition 1934, 10, :o1, 29132611, 12 - tz.transition 1935, 4, :o2, 29134879, 12 - tz.transition 1935, 10, :o1, 29136979, 12 - tz.transition 1936, 4, :o2, 29139331, 12 - tz.transition 1936, 10, :o1, 29141347, 12 - tz.transition 1937, 4, :o2, 29143699, 12 - tz.transition 1937, 10, :o1, 29145715, 12 - tz.transition 1938, 4, :o2, 29147983, 12 - tz.transition 1938, 10, :o1, 29150083, 12 - tz.transition 1939, 4, :o2, 29152435, 12 - tz.transition 1939, 11, :o1, 29155039, 12 - tz.transition 1940, 2, :o2, 29156215, 12 - tz.transition 1941, 5, :o3, 58322845, 24 - tz.transition 1941, 8, :o2, 58325197, 24 - tz.transition 1942, 4, :o3, 58330909, 24 - tz.transition 1942, 8, :o2, 58333933, 24 - tz.transition 1943, 4, :o3, 58339645, 24 - tz.transition 1943, 8, :o2, 58342837, 24 - tz.transition 1944, 4, :o3, 58348381, 24 - tz.transition 1944, 9, :o2, 58352413, 24 - tz.transition 1945, 4, :o3, 58357141, 24 - tz.transition 1945, 7, :o2, 58359637, 24 - tz.transition 1945, 10, :o1, 29180827, 12 - tz.transition 1946, 4, :o2, 29183095, 12 - tz.transition 1946, 10, :o1, 29185195, 12 - tz.transition 1947, 3, :o2, 29187127, 12 - tz.transition 1947, 4, :o3, 58374925, 24 - tz.transition 1947, 8, :o2, 58377781, 24 - tz.transition 1947, 11, :o1, 29189899, 12 - tz.transition 1948, 3, :o2, 29191495, 12 - tz.transition 1948, 10, :o1, 29194267, 12 - tz.transition 1949, 4, :o2, 29196115, 12 - tz.transition 1949, 10, :o1, 29198635, 12 - tz.transition 1950, 4, :o2, 29200651, 12 - tz.transition 1950, 10, :o1, 29202919, 12 - tz.transition 1951, 4, :o2, 29205019, 12 - tz.transition 1951, 10, :o1, 29207287, 12 - tz.transition 1952, 4, :o2, 29209471, 12 - tz.transition 1952, 10, :o1, 29211739, 12 - tz.transition 1953, 4, :o2, 29213839, 12 - tz.transition 1953, 10, :o1, 29215855, 12 - tz.transition 1954, 4, :o2, 29218123, 12 - tz.transition 1954, 10, :o1, 29220223, 12 - tz.transition 1955, 4, :o2, 29222575, 12 - tz.transition 1955, 10, :o1, 29224591, 12 - tz.transition 1956, 4, :o2, 29227027, 12 - tz.transition 1956, 10, :o1, 29229043, 12 - tz.transition 1957, 4, :o2, 29231311, 12 - tz.transition 1957, 10, :o1, 29233411, 12 - tz.transition 1958, 4, :o2, 29235763, 12 - tz.transition 1958, 10, :o1, 29237779, 12 - tz.transition 1959, 4, :o2, 29240131, 12 - tz.transition 1959, 10, :o1, 29242147, 12 - tz.transition 1960, 4, :o2, 29244415, 12 - tz.transition 1960, 10, :o1, 29246515, 12 - tz.transition 1961, 3, :o2, 29248615, 12 - tz.transition 1961, 10, :o1, 29251219, 12 - tz.transition 1962, 3, :o2, 29252983, 12 - tz.transition 1962, 10, :o1, 29255587, 12 - tz.transition 1963, 3, :o2, 29257435, 12 - tz.transition 1963, 10, :o1, 29259955, 12 - tz.transition 1964, 3, :o2, 29261719, 12 - tz.transition 1964, 10, :o1, 29264323, 12 - tz.transition 1965, 3, :o2, 29266087, 12 - tz.transition 1965, 10, :o1, 29268691, 12 - tz.transition 1966, 3, :o2, 29270455, 12 - tz.transition 1966, 10, :o1, 29273059, 12 - tz.transition 1967, 3, :o2, 29274823, 12 - tz.transition 1967, 10, :o1, 29277511, 12 - tz.transition 1968, 2, :o2, 29278855, 12 - tz.transition 1968, 10, :o4, 58563755, 24 - tz.transition 1971, 10, :o1, 57722400 - tz.transition 1972, 3, :o2, 69818400 - tz.transition 1972, 10, :o1, 89172000 - tz.transition 1973, 3, :o2, 101268000 - tz.transition 1973, 10, :o1, 120621600 - tz.transition 1974, 3, :o2, 132717600 - tz.transition 1974, 10, :o1, 152071200 - tz.transition 1975, 3, :o2, 164167200 - tz.transition 1975, 10, :o1, 183520800 - tz.transition 1976, 3, :o2, 196221600 - tz.transition 1976, 10, :o1, 214970400 - tz.transition 1977, 3, :o2, 227671200 - tz.transition 1977, 10, :o1, 246420000 - tz.transition 1978, 3, :o2, 259120800 - tz.transition 1978, 10, :o1, 278474400 - tz.transition 1979, 3, :o2, 290570400 - tz.transition 1979, 10, :o1, 309924000 - tz.transition 1980, 3, :o2, 322020000 - tz.transition 1980, 10, :o1, 341373600 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 10, :o1, 372819600 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 10, :o1, 404269200 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 10, :o1, 435718800 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 10, :o1, 467773200 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 10, :o1, 499222800 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 10, :o1, 530672400 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 10, :o1, 562122000 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 10, :o1, 593571600 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 10, :o1, 625626000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 10, :o1, 657075600 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 10, :o1, 688525200 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 10, :o1, 719974800 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 10, :o1, 751424400 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 10, :o1, 782874000 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 10, :o1, 814323600 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Madrid.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Madrid.rb deleted file mode 100644 index 1fb568239a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Madrid.rb +++ /dev/null @@ -1,211 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Madrid - include TimezoneDefinition - - timezone 'Europe/Madrid' do |tz| - tz.offset :o0, -884, 0, :LMT - tz.offset :o1, 0, 0, :WET - tz.offset :o2, 0, 3600, :WEST - tz.offset :o3, 0, 7200, :WEMT - tz.offset :o4, 3600, 0, :CET - tz.offset :o5, 3600, 3600, :CEST - - tz.transition 1901, 1, :o1, 52172327021, 21600 - tz.transition 1917, 5, :o2, 58112507, 24 - tz.transition 1917, 10, :o1, 58116203, 24 - tz.transition 1918, 4, :o2, 58120787, 24 - tz.transition 1918, 10, :o1, 58124963, 24 - tz.transition 1919, 4, :o2, 58129307, 24 - tz.transition 1919, 10, :o1, 58133723, 24 - tz.transition 1924, 4, :o2, 58173419, 24 - tz.transition 1924, 10, :o1, 58177523, 24 - tz.transition 1926, 4, :o2, 58190963, 24 - tz.transition 1926, 10, :o1, 58194995, 24 - tz.transition 1927, 4, :o2, 58199531, 24 - tz.transition 1927, 10, :o1, 58203731, 24 - tz.transition 1928, 4, :o2, 58208435, 24 - tz.transition 1928, 10, :o1, 58212635, 24 - tz.transition 1929, 4, :o2, 58217339, 24 - tz.transition 1929, 10, :o1, 58221371, 24 - tz.transition 1937, 5, :o2, 58288235, 24 - tz.transition 1937, 10, :o1, 58291427, 24 - tz.transition 1938, 3, :o2, 58295531, 24 - tz.transition 1938, 10, :o1, 58300163, 24 - tz.transition 1939, 4, :o2, 58304867, 24 - tz.transition 1939, 10, :o1, 58309067, 24 - tz.transition 1940, 3, :o2, 58312931, 24 - tz.transition 1942, 5, :o3, 29165789, 12 - tz.transition 1942, 9, :o2, 29167253, 12 - tz.transition 1943, 4, :o3, 29169989, 12 - tz.transition 1943, 10, :o2, 29172017, 12 - tz.transition 1944, 4, :o3, 29174357, 12 - tz.transition 1944, 10, :o2, 29176493, 12 - tz.transition 1945, 4, :o3, 29178725, 12 - tz.transition 1945, 9, :o2, 58361483, 24 - tz.transition 1946, 4, :o3, 29183093, 12 - tz.transition 1946, 9, :o4, 29185121, 12 - tz.transition 1949, 4, :o5, 29196449, 12 - tz.transition 1949, 9, :o4, 58396547, 24 - tz.transition 1974, 4, :o5, 135122400 - tz.transition 1974, 10, :o4, 150246000 - tz.transition 1975, 4, :o5, 167176800 - tz.transition 1975, 10, :o4, 181695600 - tz.transition 1976, 3, :o5, 196812000 - tz.transition 1976, 9, :o4, 212540400 - tz.transition 1977, 4, :o5, 228866400 - tz.transition 1977, 9, :o4, 243990000 - tz.transition 1978, 4, :o5, 260402400 - tz.transition 1978, 9, :o4, 276044400 - tz.transition 1979, 4, :o5, 291776400 - tz.transition 1979, 9, :o4, 307501200 - tz.transition 1980, 4, :o5, 323830800 - tz.transition 1980, 9, :o4, 338950800 - tz.transition 1981, 3, :o5, 354675600 - tz.transition 1981, 9, :o4, 370400400 - tz.transition 1982, 3, :o5, 386125200 - tz.transition 1982, 9, :o4, 401850000 - tz.transition 1983, 3, :o5, 417574800 - tz.transition 1983, 9, :o4, 433299600 - tz.transition 1984, 3, :o5, 449024400 - tz.transition 1984, 9, :o4, 465354000 - tz.transition 1985, 3, :o5, 481078800 - tz.transition 1985, 9, :o4, 496803600 - tz.transition 1986, 3, :o5, 512528400 - tz.transition 1986, 9, :o4, 528253200 - tz.transition 1987, 3, :o5, 543978000 - tz.transition 1987, 9, :o4, 559702800 - tz.transition 1988, 3, :o5, 575427600 - tz.transition 1988, 9, :o4, 591152400 - tz.transition 1989, 3, :o5, 606877200 - tz.transition 1989, 9, :o4, 622602000 - tz.transition 1990, 3, :o5, 638326800 - tz.transition 1990, 9, :o4, 654656400 - tz.transition 1991, 3, :o5, 670381200 - tz.transition 1991, 9, :o4, 686106000 - tz.transition 1992, 3, :o5, 701830800 - tz.transition 1992, 9, :o4, 717555600 - tz.transition 1993, 3, :o5, 733280400 - tz.transition 1993, 9, :o4, 749005200 - tz.transition 1994, 3, :o5, 764730000 - tz.transition 1994, 9, :o4, 780454800 - tz.transition 1995, 3, :o5, 796179600 - tz.transition 1995, 9, :o4, 811904400 - tz.transition 1996, 3, :o5, 828234000 - tz.transition 1996, 10, :o4, 846378000 - tz.transition 1997, 3, :o5, 859683600 - tz.transition 1997, 10, :o4, 877827600 - tz.transition 1998, 3, :o5, 891133200 - tz.transition 1998, 10, :o4, 909277200 - tz.transition 1999, 3, :o5, 922582800 - tz.transition 1999, 10, :o4, 941331600 - tz.transition 2000, 3, :o5, 954032400 - tz.transition 2000, 10, :o4, 972781200 - tz.transition 2001, 3, :o5, 985482000 - tz.transition 2001, 10, :o4, 1004230800 - tz.transition 2002, 3, :o5, 1017536400 - tz.transition 2002, 10, :o4, 1035680400 - tz.transition 2003, 3, :o5, 1048986000 - tz.transition 2003, 10, :o4, 1067130000 - tz.transition 2004, 3, :o5, 1080435600 - tz.transition 2004, 10, :o4, 1099184400 - tz.transition 2005, 3, :o5, 1111885200 - tz.transition 2005, 10, :o4, 1130634000 - tz.transition 2006, 3, :o5, 1143334800 - tz.transition 2006, 10, :o4, 1162083600 - tz.transition 2007, 3, :o5, 1174784400 - tz.transition 2007, 10, :o4, 1193533200 - tz.transition 2008, 3, :o5, 1206838800 - tz.transition 2008, 10, :o4, 1224982800 - tz.transition 2009, 3, :o5, 1238288400 - tz.transition 2009, 10, :o4, 1256432400 - tz.transition 2010, 3, :o5, 1269738000 - tz.transition 2010, 10, :o4, 1288486800 - tz.transition 2011, 3, :o5, 1301187600 - tz.transition 2011, 10, :o4, 1319936400 - tz.transition 2012, 3, :o5, 1332637200 - tz.transition 2012, 10, :o4, 1351386000 - tz.transition 2013, 3, :o5, 1364691600 - tz.transition 2013, 10, :o4, 1382835600 - tz.transition 2014, 3, :o5, 1396141200 - tz.transition 2014, 10, :o4, 1414285200 - tz.transition 2015, 3, :o5, 1427590800 - tz.transition 2015, 10, :o4, 1445734800 - tz.transition 2016, 3, :o5, 1459040400 - tz.transition 2016, 10, :o4, 1477789200 - tz.transition 2017, 3, :o5, 1490490000 - tz.transition 2017, 10, :o4, 1509238800 - tz.transition 2018, 3, :o5, 1521939600 - tz.transition 2018, 10, :o4, 1540688400 - tz.transition 2019, 3, :o5, 1553994000 - tz.transition 2019, 10, :o4, 1572138000 - tz.transition 2020, 3, :o5, 1585443600 - tz.transition 2020, 10, :o4, 1603587600 - tz.transition 2021, 3, :o5, 1616893200 - tz.transition 2021, 10, :o4, 1635642000 - tz.transition 2022, 3, :o5, 1648342800 - tz.transition 2022, 10, :o4, 1667091600 - tz.transition 2023, 3, :o5, 1679792400 - tz.transition 2023, 10, :o4, 1698541200 - tz.transition 2024, 3, :o5, 1711846800 - tz.transition 2024, 10, :o4, 1729990800 - tz.transition 2025, 3, :o5, 1743296400 - tz.transition 2025, 10, :o4, 1761440400 - tz.transition 2026, 3, :o5, 1774746000 - tz.transition 2026, 10, :o4, 1792890000 - tz.transition 2027, 3, :o5, 1806195600 - tz.transition 2027, 10, :o4, 1824944400 - tz.transition 2028, 3, :o5, 1837645200 - tz.transition 2028, 10, :o4, 1856394000 - tz.transition 2029, 3, :o5, 1869094800 - tz.transition 2029, 10, :o4, 1887843600 - tz.transition 2030, 3, :o5, 1901149200 - tz.transition 2030, 10, :o4, 1919293200 - tz.transition 2031, 3, :o5, 1932598800 - tz.transition 2031, 10, :o4, 1950742800 - tz.transition 2032, 3, :o5, 1964048400 - tz.transition 2032, 10, :o4, 1982797200 - tz.transition 2033, 3, :o5, 1995498000 - tz.transition 2033, 10, :o4, 2014246800 - tz.transition 2034, 3, :o5, 2026947600 - tz.transition 2034, 10, :o4, 2045696400 - tz.transition 2035, 3, :o5, 2058397200 - tz.transition 2035, 10, :o4, 2077146000 - tz.transition 2036, 3, :o5, 2090451600 - tz.transition 2036, 10, :o4, 2108595600 - tz.transition 2037, 3, :o5, 2121901200 - tz.transition 2037, 10, :o4, 2140045200 - tz.transition 2038, 3, :o5, 59172253, 24 - tz.transition 2038, 10, :o4, 59177461, 24 - tz.transition 2039, 3, :o5, 59180989, 24 - tz.transition 2039, 10, :o4, 59186197, 24 - tz.transition 2040, 3, :o5, 59189725, 24 - tz.transition 2040, 10, :o4, 59194933, 24 - tz.transition 2041, 3, :o5, 59198629, 24 - tz.transition 2041, 10, :o4, 59203669, 24 - tz.transition 2042, 3, :o5, 59207365, 24 - tz.transition 2042, 10, :o4, 59212405, 24 - tz.transition 2043, 3, :o5, 59216101, 24 - tz.transition 2043, 10, :o4, 59221141, 24 - tz.transition 2044, 3, :o5, 59224837, 24 - tz.transition 2044, 10, :o4, 59230045, 24 - tz.transition 2045, 3, :o5, 59233573, 24 - tz.transition 2045, 10, :o4, 59238781, 24 - tz.transition 2046, 3, :o5, 59242309, 24 - tz.transition 2046, 10, :o4, 59247517, 24 - tz.transition 2047, 3, :o5, 59251213, 24 - tz.transition 2047, 10, :o4, 59256253, 24 - tz.transition 2048, 3, :o5, 59259949, 24 - tz.transition 2048, 10, :o4, 59264989, 24 - tz.transition 2049, 3, :o5, 59268685, 24 - tz.transition 2049, 10, :o4, 59273893, 24 - tz.transition 2050, 3, :o5, 59277421, 24 - tz.transition 2050, 10, :o4, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Minsk.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Minsk.rb deleted file mode 100644 index fa15816cc8..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Minsk.rb +++ /dev/null @@ -1,170 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Minsk - include TimezoneDefinition - - timezone 'Europe/Minsk' do |tz| - tz.offset :o0, 6616, 0, :LMT - tz.offset :o1, 6600, 0, :MMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 10800, 0, :MSK - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 3600, 0, :CET - tz.offset :o6, 10800, 3600, :MSD - tz.offset :o7, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 26003326573, 10800 - tz.transition 1924, 5, :o2, 349042669, 144 - tz.transition 1930, 6, :o3, 29113781, 12 - tz.transition 1941, 6, :o4, 19441387, 8 - tz.transition 1942, 11, :o5, 58335973, 24 - tz.transition 1943, 3, :o4, 58339501, 24 - tz.transition 1943, 10, :o5, 58344037, 24 - tz.transition 1944, 4, :o4, 58348405, 24 - tz.transition 1944, 7, :o3, 29175293, 12 - tz.transition 1981, 3, :o6, 354920400 - tz.transition 1981, 9, :o3, 370728000 - tz.transition 1982, 3, :o6, 386456400 - tz.transition 1982, 9, :o3, 402264000 - tz.transition 1983, 3, :o6, 417992400 - tz.transition 1983, 9, :o3, 433800000 - tz.transition 1984, 3, :o6, 449614800 - tz.transition 1984, 9, :o3, 465346800 - tz.transition 1985, 3, :o6, 481071600 - tz.transition 1985, 9, :o3, 496796400 - tz.transition 1986, 3, :o6, 512521200 - tz.transition 1986, 9, :o3, 528246000 - tz.transition 1987, 3, :o6, 543970800 - tz.transition 1987, 9, :o3, 559695600 - tz.transition 1988, 3, :o6, 575420400 - tz.transition 1988, 9, :o3, 591145200 - tz.transition 1989, 3, :o6, 606870000 - tz.transition 1989, 9, :o3, 622594800 - tz.transition 1991, 3, :o7, 670374000 - tz.transition 1991, 9, :o2, 686102400 - tz.transition 1992, 3, :o7, 701820000 - tz.transition 1992, 9, :o2, 717544800 - tz.transition 1993, 3, :o7, 733276800 - tz.transition 1993, 9, :o2, 749001600 - tz.transition 1994, 3, :o7, 764726400 - tz.transition 1994, 9, :o2, 780451200 - tz.transition 1995, 3, :o7, 796176000 - tz.transition 1995, 9, :o2, 811900800 - tz.transition 1996, 3, :o7, 828230400 - tz.transition 1996, 10, :o2, 846374400 - tz.transition 1997, 3, :o7, 859680000 - tz.transition 1997, 10, :o2, 877824000 - tz.transition 1998, 3, :o7, 891129600 - tz.transition 1998, 10, :o2, 909273600 - tz.transition 1999, 3, :o7, 922579200 - tz.transition 1999, 10, :o2, 941328000 - tz.transition 2000, 3, :o7, 954028800 - tz.transition 2000, 10, :o2, 972777600 - tz.transition 2001, 3, :o7, 985478400 - tz.transition 2001, 10, :o2, 1004227200 - tz.transition 2002, 3, :o7, 1017532800 - tz.transition 2002, 10, :o2, 1035676800 - tz.transition 2003, 3, :o7, 1048982400 - tz.transition 2003, 10, :o2, 1067126400 - tz.transition 2004, 3, :o7, 1080432000 - tz.transition 2004, 10, :o2, 1099180800 - tz.transition 2005, 3, :o7, 1111881600 - tz.transition 2005, 10, :o2, 1130630400 - tz.transition 2006, 3, :o7, 1143331200 - tz.transition 2006, 10, :o2, 1162080000 - tz.transition 2007, 3, :o7, 1174780800 - tz.transition 2007, 10, :o2, 1193529600 - tz.transition 2008, 3, :o7, 1206835200 - tz.transition 2008, 10, :o2, 1224979200 - tz.transition 2009, 3, :o7, 1238284800 - tz.transition 2009, 10, :o2, 1256428800 - tz.transition 2010, 3, :o7, 1269734400 - tz.transition 2010, 10, :o2, 1288483200 - tz.transition 2011, 3, :o7, 1301184000 - tz.transition 2011, 10, :o2, 1319932800 - tz.transition 2012, 3, :o7, 1332633600 - tz.transition 2012, 10, :o2, 1351382400 - tz.transition 2013, 3, :o7, 1364688000 - tz.transition 2013, 10, :o2, 1382832000 - tz.transition 2014, 3, :o7, 1396137600 - tz.transition 2014, 10, :o2, 1414281600 - tz.transition 2015, 3, :o7, 1427587200 - tz.transition 2015, 10, :o2, 1445731200 - tz.transition 2016, 3, :o7, 1459036800 - tz.transition 2016, 10, :o2, 1477785600 - tz.transition 2017, 3, :o7, 1490486400 - tz.transition 2017, 10, :o2, 1509235200 - tz.transition 2018, 3, :o7, 1521936000 - tz.transition 2018, 10, :o2, 1540684800 - tz.transition 2019, 3, :o7, 1553990400 - tz.transition 2019, 10, :o2, 1572134400 - tz.transition 2020, 3, :o7, 1585440000 - tz.transition 2020, 10, :o2, 1603584000 - tz.transition 2021, 3, :o7, 1616889600 - tz.transition 2021, 10, :o2, 1635638400 - tz.transition 2022, 3, :o7, 1648339200 - tz.transition 2022, 10, :o2, 1667088000 - tz.transition 2023, 3, :o7, 1679788800 - tz.transition 2023, 10, :o2, 1698537600 - tz.transition 2024, 3, :o7, 1711843200 - tz.transition 2024, 10, :o2, 1729987200 - tz.transition 2025, 3, :o7, 1743292800 - tz.transition 2025, 10, :o2, 1761436800 - tz.transition 2026, 3, :o7, 1774742400 - tz.transition 2026, 10, :o2, 1792886400 - tz.transition 2027, 3, :o7, 1806192000 - tz.transition 2027, 10, :o2, 1824940800 - tz.transition 2028, 3, :o7, 1837641600 - tz.transition 2028, 10, :o2, 1856390400 - tz.transition 2029, 3, :o7, 1869091200 - tz.transition 2029, 10, :o2, 1887840000 - tz.transition 2030, 3, :o7, 1901145600 - tz.transition 2030, 10, :o2, 1919289600 - tz.transition 2031, 3, :o7, 1932595200 - tz.transition 2031, 10, :o2, 1950739200 - tz.transition 2032, 3, :o7, 1964044800 - tz.transition 2032, 10, :o2, 1982793600 - tz.transition 2033, 3, :o7, 1995494400 - tz.transition 2033, 10, :o2, 2014243200 - tz.transition 2034, 3, :o7, 2026944000 - tz.transition 2034, 10, :o2, 2045692800 - tz.transition 2035, 3, :o7, 2058393600 - tz.transition 2035, 10, :o2, 2077142400 - tz.transition 2036, 3, :o7, 2090448000 - tz.transition 2036, 10, :o2, 2108592000 - tz.transition 2037, 3, :o7, 2121897600 - tz.transition 2037, 10, :o2, 2140041600 - tz.transition 2038, 3, :o7, 4931021, 2 - tz.transition 2038, 10, :o2, 4931455, 2 - tz.transition 2039, 3, :o7, 4931749, 2 - tz.transition 2039, 10, :o2, 4932183, 2 - tz.transition 2040, 3, :o7, 4932477, 2 - tz.transition 2040, 10, :o2, 4932911, 2 - tz.transition 2041, 3, :o7, 4933219, 2 - tz.transition 2041, 10, :o2, 4933639, 2 - tz.transition 2042, 3, :o7, 4933947, 2 - tz.transition 2042, 10, :o2, 4934367, 2 - tz.transition 2043, 3, :o7, 4934675, 2 - tz.transition 2043, 10, :o2, 4935095, 2 - tz.transition 2044, 3, :o7, 4935403, 2 - tz.transition 2044, 10, :o2, 4935837, 2 - tz.transition 2045, 3, :o7, 4936131, 2 - tz.transition 2045, 10, :o2, 4936565, 2 - tz.transition 2046, 3, :o7, 4936859, 2 - tz.transition 2046, 10, :o2, 4937293, 2 - tz.transition 2047, 3, :o7, 4937601, 2 - tz.transition 2047, 10, :o2, 4938021, 2 - tz.transition 2048, 3, :o7, 4938329, 2 - tz.transition 2048, 10, :o2, 4938749, 2 - tz.transition 2049, 3, :o7, 4939057, 2 - tz.transition 2049, 10, :o2, 4939491, 2 - tz.transition 2050, 3, :o7, 4939785, 2 - tz.transition 2050, 10, :o2, 4940219, 2 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Moscow.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Moscow.rb deleted file mode 100644 index ef269b675b..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Moscow.rb +++ /dev/null @@ -1,181 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Moscow - include TimezoneDefinition - - timezone 'Europe/Moscow' do |tz| - tz.offset :o0, 9020, 0, :LMT - tz.offset :o1, 9000, 0, :MMT - tz.offset :o2, 9048, 0, :MMT - tz.offset :o3, 9048, 3600, :MST - tz.offset :o4, 9048, 7200, :MDST - tz.offset :o5, 10800, 3600, :MSD - tz.offset :o6, 10800, 0, :MSK - tz.offset :o7, 10800, 7200, :MSD - tz.offset :o8, 7200, 0, :EET - tz.offset :o9, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 10401330509, 4320 - tz.transition 1916, 7, :o2, 116210275, 48 - tz.transition 1917, 7, :o3, 8717080873, 3600 - tz.transition 1917, 12, :o2, 8717725273, 3600 - tz.transition 1918, 5, :o4, 8718283123, 3600 - tz.transition 1918, 9, :o3, 8718668473, 3600 - tz.transition 1919, 5, :o4, 8719597123, 3600 - tz.transition 1919, 6, :o5, 8719705423, 3600 - tz.transition 1919, 8, :o6, 7266559, 3 - tz.transition 1921, 2, :o5, 7268206, 3 - tz.transition 1921, 3, :o7, 58146463, 24 - tz.transition 1921, 8, :o5, 58150399, 24 - tz.transition 1921, 9, :o6, 7268890, 3 - tz.transition 1922, 9, :o8, 19386627, 8 - tz.transition 1930, 6, :o6, 29113781, 12 - tz.transition 1981, 3, :o5, 354920400 - tz.transition 1981, 9, :o6, 370728000 - tz.transition 1982, 3, :o5, 386456400 - tz.transition 1982, 9, :o6, 402264000 - tz.transition 1983, 3, :o5, 417992400 - tz.transition 1983, 9, :o6, 433800000 - tz.transition 1984, 3, :o5, 449614800 - tz.transition 1984, 9, :o6, 465346800 - tz.transition 1985, 3, :o5, 481071600 - tz.transition 1985, 9, :o6, 496796400 - tz.transition 1986, 3, :o5, 512521200 - tz.transition 1986, 9, :o6, 528246000 - tz.transition 1987, 3, :o5, 543970800 - tz.transition 1987, 9, :o6, 559695600 - tz.transition 1988, 3, :o5, 575420400 - tz.transition 1988, 9, :o6, 591145200 - tz.transition 1989, 3, :o5, 606870000 - tz.transition 1989, 9, :o6, 622594800 - tz.transition 1990, 3, :o5, 638319600 - tz.transition 1990, 9, :o6, 654649200 - tz.transition 1991, 3, :o9, 670374000 - tz.transition 1991, 9, :o8, 686102400 - tz.transition 1992, 1, :o6, 695779200 - tz.transition 1992, 3, :o5, 701812800 - tz.transition 1992, 9, :o6, 717534000 - tz.transition 1993, 3, :o5, 733273200 - tz.transition 1993, 9, :o6, 748998000 - tz.transition 1994, 3, :o5, 764722800 - tz.transition 1994, 9, :o6, 780447600 - tz.transition 1995, 3, :o5, 796172400 - tz.transition 1995, 9, :o6, 811897200 - tz.transition 1996, 3, :o5, 828226800 - tz.transition 1996, 10, :o6, 846370800 - tz.transition 1997, 3, :o5, 859676400 - tz.transition 1997, 10, :o6, 877820400 - tz.transition 1998, 3, :o5, 891126000 - tz.transition 1998, 10, :o6, 909270000 - tz.transition 1999, 3, :o5, 922575600 - tz.transition 1999, 10, :o6, 941324400 - tz.transition 2000, 3, :o5, 954025200 - tz.transition 2000, 10, :o6, 972774000 - tz.transition 2001, 3, :o5, 985474800 - tz.transition 2001, 10, :o6, 1004223600 - tz.transition 2002, 3, :o5, 1017529200 - tz.transition 2002, 10, :o6, 1035673200 - tz.transition 2003, 3, :o5, 1048978800 - tz.transition 2003, 10, :o6, 1067122800 - tz.transition 2004, 3, :o5, 1080428400 - tz.transition 2004, 10, :o6, 1099177200 - tz.transition 2005, 3, :o5, 1111878000 - tz.transition 2005, 10, :o6, 1130626800 - tz.transition 2006, 3, :o5, 1143327600 - tz.transition 2006, 10, :o6, 1162076400 - tz.transition 2007, 3, :o5, 1174777200 - tz.transition 2007, 10, :o6, 1193526000 - tz.transition 2008, 3, :o5, 1206831600 - tz.transition 2008, 10, :o6, 1224975600 - tz.transition 2009, 3, :o5, 1238281200 - tz.transition 2009, 10, :o6, 1256425200 - tz.transition 2010, 3, :o5, 1269730800 - tz.transition 2010, 10, :o6, 1288479600 - tz.transition 2011, 3, :o5, 1301180400 - tz.transition 2011, 10, :o6, 1319929200 - tz.transition 2012, 3, :o5, 1332630000 - tz.transition 2012, 10, :o6, 1351378800 - tz.transition 2013, 3, :o5, 1364684400 - tz.transition 2013, 10, :o6, 1382828400 - tz.transition 2014, 3, :o5, 1396134000 - tz.transition 2014, 10, :o6, 1414278000 - tz.transition 2015, 3, :o5, 1427583600 - tz.transition 2015, 10, :o6, 1445727600 - tz.transition 2016, 3, :o5, 1459033200 - tz.transition 2016, 10, :o6, 1477782000 - tz.transition 2017, 3, :o5, 1490482800 - tz.transition 2017, 10, :o6, 1509231600 - tz.transition 2018, 3, :o5, 1521932400 - tz.transition 2018, 10, :o6, 1540681200 - tz.transition 2019, 3, :o5, 1553986800 - tz.transition 2019, 10, :o6, 1572130800 - tz.transition 2020, 3, :o5, 1585436400 - tz.transition 2020, 10, :o6, 1603580400 - tz.transition 2021, 3, :o5, 1616886000 - tz.transition 2021, 10, :o6, 1635634800 - tz.transition 2022, 3, :o5, 1648335600 - tz.transition 2022, 10, :o6, 1667084400 - tz.transition 2023, 3, :o5, 1679785200 - tz.transition 2023, 10, :o6, 1698534000 - tz.transition 2024, 3, :o5, 1711839600 - tz.transition 2024, 10, :o6, 1729983600 - tz.transition 2025, 3, :o5, 1743289200 - tz.transition 2025, 10, :o6, 1761433200 - tz.transition 2026, 3, :o5, 1774738800 - tz.transition 2026, 10, :o6, 1792882800 - tz.transition 2027, 3, :o5, 1806188400 - tz.transition 2027, 10, :o6, 1824937200 - tz.transition 2028, 3, :o5, 1837638000 - tz.transition 2028, 10, :o6, 1856386800 - tz.transition 2029, 3, :o5, 1869087600 - tz.transition 2029, 10, :o6, 1887836400 - tz.transition 2030, 3, :o5, 1901142000 - tz.transition 2030, 10, :o6, 1919286000 - tz.transition 2031, 3, :o5, 1932591600 - tz.transition 2031, 10, :o6, 1950735600 - tz.transition 2032, 3, :o5, 1964041200 - tz.transition 2032, 10, :o6, 1982790000 - tz.transition 2033, 3, :o5, 1995490800 - tz.transition 2033, 10, :o6, 2014239600 - tz.transition 2034, 3, :o5, 2026940400 - tz.transition 2034, 10, :o6, 2045689200 - tz.transition 2035, 3, :o5, 2058390000 - tz.transition 2035, 10, :o6, 2077138800 - tz.transition 2036, 3, :o5, 2090444400 - tz.transition 2036, 10, :o6, 2108588400 - tz.transition 2037, 3, :o5, 2121894000 - tz.transition 2037, 10, :o6, 2140038000 - tz.transition 2038, 3, :o5, 59172251, 24 - tz.transition 2038, 10, :o6, 59177459, 24 - tz.transition 2039, 3, :o5, 59180987, 24 - tz.transition 2039, 10, :o6, 59186195, 24 - tz.transition 2040, 3, :o5, 59189723, 24 - tz.transition 2040, 10, :o6, 59194931, 24 - tz.transition 2041, 3, :o5, 59198627, 24 - tz.transition 2041, 10, :o6, 59203667, 24 - tz.transition 2042, 3, :o5, 59207363, 24 - tz.transition 2042, 10, :o6, 59212403, 24 - tz.transition 2043, 3, :o5, 59216099, 24 - tz.transition 2043, 10, :o6, 59221139, 24 - tz.transition 2044, 3, :o5, 59224835, 24 - tz.transition 2044, 10, :o6, 59230043, 24 - tz.transition 2045, 3, :o5, 59233571, 24 - tz.transition 2045, 10, :o6, 59238779, 24 - tz.transition 2046, 3, :o5, 59242307, 24 - tz.transition 2046, 10, :o6, 59247515, 24 - tz.transition 2047, 3, :o5, 59251211, 24 - tz.transition 2047, 10, :o6, 59256251, 24 - tz.transition 2048, 3, :o5, 59259947, 24 - tz.transition 2048, 10, :o6, 59264987, 24 - tz.transition 2049, 3, :o5, 59268683, 24 - tz.transition 2049, 10, :o6, 59273891, 24 - tz.transition 2050, 3, :o5, 59277419, 24 - tz.transition 2050, 10, :o6, 59282627, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Paris.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Paris.rb deleted file mode 100644 index e3236c0ba1..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Paris.rb +++ /dev/null @@ -1,232 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Paris - include TimezoneDefinition - - timezone 'Europe/Paris' do |tz| - tz.offset :o0, 561, 0, :LMT - tz.offset :o1, 561, 0, :PMT - tz.offset :o2, 0, 0, :WET - tz.offset :o3, 0, 3600, :WEST - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 3600, 0, :CET - tz.offset :o6, 0, 7200, :WEMT - - tz.transition 1891, 3, :o1, 69460027033, 28800 - tz.transition 1911, 3, :o2, 69670267033, 28800 - tz.transition 1916, 6, :o3, 58104707, 24 - tz.transition 1916, 10, :o2, 58107323, 24 - tz.transition 1917, 3, :o3, 58111499, 24 - tz.transition 1917, 10, :o2, 58116227, 24 - tz.transition 1918, 3, :o3, 58119899, 24 - tz.transition 1918, 10, :o2, 58124963, 24 - tz.transition 1919, 3, :o3, 58128467, 24 - tz.transition 1919, 10, :o2, 58133699, 24 - tz.transition 1920, 2, :o3, 58136867, 24 - tz.transition 1920, 10, :o2, 58142915, 24 - tz.transition 1921, 3, :o3, 58146323, 24 - tz.transition 1921, 10, :o2, 58151723, 24 - tz.transition 1922, 3, :o3, 58155347, 24 - tz.transition 1922, 10, :o2, 58160051, 24 - tz.transition 1923, 5, :o3, 58165595, 24 - tz.transition 1923, 10, :o2, 58168787, 24 - tz.transition 1924, 3, :o3, 58172987, 24 - tz.transition 1924, 10, :o2, 58177523, 24 - tz.transition 1925, 4, :o3, 58181891, 24 - tz.transition 1925, 10, :o2, 58186259, 24 - tz.transition 1926, 4, :o3, 58190963, 24 - tz.transition 1926, 10, :o2, 58194995, 24 - tz.transition 1927, 4, :o3, 58199531, 24 - tz.transition 1927, 10, :o2, 58203731, 24 - tz.transition 1928, 4, :o3, 58208435, 24 - tz.transition 1928, 10, :o2, 58212635, 24 - tz.transition 1929, 4, :o3, 58217339, 24 - tz.transition 1929, 10, :o2, 58221371, 24 - tz.transition 1930, 4, :o3, 58225907, 24 - tz.transition 1930, 10, :o2, 58230107, 24 - tz.transition 1931, 4, :o3, 58234811, 24 - tz.transition 1931, 10, :o2, 58238843, 24 - tz.transition 1932, 4, :o3, 58243211, 24 - tz.transition 1932, 10, :o2, 58247579, 24 - tz.transition 1933, 3, :o3, 58251779, 24 - tz.transition 1933, 10, :o2, 58256483, 24 - tz.transition 1934, 4, :o3, 58260851, 24 - tz.transition 1934, 10, :o2, 58265219, 24 - tz.transition 1935, 3, :o3, 58269419, 24 - tz.transition 1935, 10, :o2, 58273955, 24 - tz.transition 1936, 4, :o3, 58278659, 24 - tz.transition 1936, 10, :o2, 58282691, 24 - tz.transition 1937, 4, :o3, 58287059, 24 - tz.transition 1937, 10, :o2, 58291427, 24 - tz.transition 1938, 3, :o3, 58295627, 24 - tz.transition 1938, 10, :o2, 58300163, 24 - tz.transition 1939, 4, :o3, 58304867, 24 - tz.transition 1939, 11, :o2, 58310075, 24 - tz.transition 1940, 2, :o3, 29156215, 12 - tz.transition 1940, 6, :o4, 29157545, 12 - tz.transition 1942, 11, :o5, 58335973, 24 - tz.transition 1943, 3, :o4, 58339501, 24 - tz.transition 1943, 10, :o5, 58344037, 24 - tz.transition 1944, 4, :o4, 58348405, 24 - tz.transition 1944, 8, :o6, 29175929, 12 - tz.transition 1944, 10, :o3, 58352915, 24 - tz.transition 1945, 4, :o6, 58357141, 24 - tz.transition 1945, 9, :o5, 58361149, 24 - tz.transition 1976, 3, :o4, 196819200 - tz.transition 1976, 9, :o5, 212540400 - tz.transition 1977, 4, :o4, 228877200 - tz.transition 1977, 9, :o5, 243997200 - tz.transition 1978, 4, :o4, 260326800 - tz.transition 1978, 10, :o5, 276051600 - tz.transition 1979, 4, :o4, 291776400 - tz.transition 1979, 9, :o5, 307501200 - tz.transition 1980, 4, :o4, 323830800 - tz.transition 1980, 9, :o5, 338950800 - tz.transition 1981, 3, :o4, 354675600 - tz.transition 1981, 9, :o5, 370400400 - tz.transition 1982, 3, :o4, 386125200 - tz.transition 1982, 9, :o5, 401850000 - tz.transition 1983, 3, :o4, 417574800 - tz.transition 1983, 9, :o5, 433299600 - tz.transition 1984, 3, :o4, 449024400 - tz.transition 1984, 9, :o5, 465354000 - tz.transition 1985, 3, :o4, 481078800 - tz.transition 1985, 9, :o5, 496803600 - tz.transition 1986, 3, :o4, 512528400 - tz.transition 1986, 9, :o5, 528253200 - tz.transition 1987, 3, :o4, 543978000 - tz.transition 1987, 9, :o5, 559702800 - tz.transition 1988, 3, :o4, 575427600 - tz.transition 1988, 9, :o5, 591152400 - tz.transition 1989, 3, :o4, 606877200 - tz.transition 1989, 9, :o5, 622602000 - tz.transition 1990, 3, :o4, 638326800 - tz.transition 1990, 9, :o5, 654656400 - tz.transition 1991, 3, :o4, 670381200 - tz.transition 1991, 9, :o5, 686106000 - tz.transition 1992, 3, :o4, 701830800 - tz.transition 1992, 9, :o5, 717555600 - tz.transition 1993, 3, :o4, 733280400 - tz.transition 1993, 9, :o5, 749005200 - tz.transition 1994, 3, :o4, 764730000 - tz.transition 1994, 9, :o5, 780454800 - tz.transition 1995, 3, :o4, 796179600 - tz.transition 1995, 9, :o5, 811904400 - tz.transition 1996, 3, :o4, 828234000 - tz.transition 1996, 10, :o5, 846378000 - tz.transition 1997, 3, :o4, 859683600 - tz.transition 1997, 10, :o5, 877827600 - tz.transition 1998, 3, :o4, 891133200 - tz.transition 1998, 10, :o5, 909277200 - tz.transition 1999, 3, :o4, 922582800 - tz.transition 1999, 10, :o5, 941331600 - tz.transition 2000, 3, :o4, 954032400 - tz.transition 2000, 10, :o5, 972781200 - tz.transition 2001, 3, :o4, 985482000 - tz.transition 2001, 10, :o5, 1004230800 - tz.transition 2002, 3, :o4, 1017536400 - tz.transition 2002, 10, :o5, 1035680400 - tz.transition 2003, 3, :o4, 1048986000 - tz.transition 2003, 10, :o5, 1067130000 - tz.transition 2004, 3, :o4, 1080435600 - tz.transition 2004, 10, :o5, 1099184400 - tz.transition 2005, 3, :o4, 1111885200 - tz.transition 2005, 10, :o5, 1130634000 - tz.transition 2006, 3, :o4, 1143334800 - tz.transition 2006, 10, :o5, 1162083600 - tz.transition 2007, 3, :o4, 1174784400 - tz.transition 2007, 10, :o5, 1193533200 - tz.transition 2008, 3, :o4, 1206838800 - tz.transition 2008, 10, :o5, 1224982800 - tz.transition 2009, 3, :o4, 1238288400 - tz.transition 2009, 10, :o5, 1256432400 - tz.transition 2010, 3, :o4, 1269738000 - tz.transition 2010, 10, :o5, 1288486800 - tz.transition 2011, 3, :o4, 1301187600 - tz.transition 2011, 10, :o5, 1319936400 - tz.transition 2012, 3, :o4, 1332637200 - tz.transition 2012, 10, :o5, 1351386000 - tz.transition 2013, 3, :o4, 1364691600 - tz.transition 2013, 10, :o5, 1382835600 - tz.transition 2014, 3, :o4, 1396141200 - tz.transition 2014, 10, :o5, 1414285200 - tz.transition 2015, 3, :o4, 1427590800 - tz.transition 2015, 10, :o5, 1445734800 - tz.transition 2016, 3, :o4, 1459040400 - tz.transition 2016, 10, :o5, 1477789200 - tz.transition 2017, 3, :o4, 1490490000 - tz.transition 2017, 10, :o5, 1509238800 - tz.transition 2018, 3, :o4, 1521939600 - tz.transition 2018, 10, :o5, 1540688400 - tz.transition 2019, 3, :o4, 1553994000 - tz.transition 2019, 10, :o5, 1572138000 - tz.transition 2020, 3, :o4, 1585443600 - tz.transition 2020, 10, :o5, 1603587600 - tz.transition 2021, 3, :o4, 1616893200 - tz.transition 2021, 10, :o5, 1635642000 - tz.transition 2022, 3, :o4, 1648342800 - tz.transition 2022, 10, :o5, 1667091600 - tz.transition 2023, 3, :o4, 1679792400 - tz.transition 2023, 10, :o5, 1698541200 - tz.transition 2024, 3, :o4, 1711846800 - tz.transition 2024, 10, :o5, 1729990800 - tz.transition 2025, 3, :o4, 1743296400 - tz.transition 2025, 10, :o5, 1761440400 - tz.transition 2026, 3, :o4, 1774746000 - tz.transition 2026, 10, :o5, 1792890000 - tz.transition 2027, 3, :o4, 1806195600 - tz.transition 2027, 10, :o5, 1824944400 - tz.transition 2028, 3, :o4, 1837645200 - tz.transition 2028, 10, :o5, 1856394000 - tz.transition 2029, 3, :o4, 1869094800 - tz.transition 2029, 10, :o5, 1887843600 - tz.transition 2030, 3, :o4, 1901149200 - tz.transition 2030, 10, :o5, 1919293200 - tz.transition 2031, 3, :o4, 1932598800 - tz.transition 2031, 10, :o5, 1950742800 - tz.transition 2032, 3, :o4, 1964048400 - tz.transition 2032, 10, :o5, 1982797200 - tz.transition 2033, 3, :o4, 1995498000 - tz.transition 2033, 10, :o5, 2014246800 - tz.transition 2034, 3, :o4, 2026947600 - tz.transition 2034, 10, :o5, 2045696400 - tz.transition 2035, 3, :o4, 2058397200 - tz.transition 2035, 10, :o5, 2077146000 - tz.transition 2036, 3, :o4, 2090451600 - tz.transition 2036, 10, :o5, 2108595600 - tz.transition 2037, 3, :o4, 2121901200 - tz.transition 2037, 10, :o5, 2140045200 - tz.transition 2038, 3, :o4, 59172253, 24 - tz.transition 2038, 10, :o5, 59177461, 24 - tz.transition 2039, 3, :o4, 59180989, 24 - tz.transition 2039, 10, :o5, 59186197, 24 - tz.transition 2040, 3, :o4, 59189725, 24 - tz.transition 2040, 10, :o5, 59194933, 24 - tz.transition 2041, 3, :o4, 59198629, 24 - tz.transition 2041, 10, :o5, 59203669, 24 - tz.transition 2042, 3, :o4, 59207365, 24 - tz.transition 2042, 10, :o5, 59212405, 24 - tz.transition 2043, 3, :o4, 59216101, 24 - tz.transition 2043, 10, :o5, 59221141, 24 - tz.transition 2044, 3, :o4, 59224837, 24 - tz.transition 2044, 10, :o5, 59230045, 24 - tz.transition 2045, 3, :o4, 59233573, 24 - tz.transition 2045, 10, :o5, 59238781, 24 - tz.transition 2046, 3, :o4, 59242309, 24 - tz.transition 2046, 10, :o5, 59247517, 24 - tz.transition 2047, 3, :o4, 59251213, 24 - tz.transition 2047, 10, :o5, 59256253, 24 - tz.transition 2048, 3, :o4, 59259949, 24 - tz.transition 2048, 10, :o5, 59264989, 24 - tz.transition 2049, 3, :o4, 59268685, 24 - tz.transition 2049, 10, :o5, 59273893, 24 - tz.transition 2050, 3, :o4, 59277421, 24 - tz.transition 2050, 10, :o5, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Prague.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Prague.rb deleted file mode 100644 index bcabee96c1..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Prague.rb +++ /dev/null @@ -1,187 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Prague - include TimezoneDefinition - - timezone 'Europe/Prague' do |tz| - tz.offset :o0, 3464, 0, :LMT - tz.offset :o1, 3464, 0, :PMT - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - - tz.transition 1849, 12, :o1, 25884991367, 10800 - tz.transition 1891, 9, :o2, 26049669767, 10800 - tz.transition 1916, 4, :o3, 29051813, 12 - tz.transition 1916, 9, :o2, 58107299, 24 - tz.transition 1917, 4, :o3, 58112029, 24 - tz.transition 1917, 9, :o2, 58115725, 24 - tz.transition 1918, 4, :o3, 58120765, 24 - tz.transition 1918, 9, :o2, 58124461, 24 - tz.transition 1940, 4, :o3, 58313293, 24 - tz.transition 1942, 11, :o2, 58335973, 24 - tz.transition 1943, 3, :o3, 58339501, 24 - tz.transition 1943, 10, :o2, 58344037, 24 - tz.transition 1944, 4, :o3, 58348405, 24 - tz.transition 1944, 9, :o2, 58352413, 24 - tz.transition 1945, 4, :o3, 58357285, 24 - tz.transition 1945, 11, :o2, 58362661, 24 - tz.transition 1946, 5, :o3, 58366717, 24 - tz.transition 1946, 10, :o2, 58370389, 24 - tz.transition 1947, 4, :o3, 58375093, 24 - tz.transition 1947, 10, :o2, 58379125, 24 - tz.transition 1948, 4, :o3, 58383829, 24 - tz.transition 1948, 10, :o2, 58387861, 24 - tz.transition 1949, 4, :o3, 58392373, 24 - tz.transition 1949, 10, :o2, 58396597, 24 - tz.transition 1979, 4, :o3, 291776400 - tz.transition 1979, 9, :o2, 307501200 - tz.transition 1980, 4, :o3, 323830800 - tz.transition 1980, 9, :o2, 338950800 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Riga.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Riga.rb deleted file mode 100644 index 784837f758..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Riga.rb +++ /dev/null @@ -1,176 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Riga - include TimezoneDefinition - - timezone 'Europe/Riga' do |tz| - tz.offset :o0, 5784, 0, :LMT - tz.offset :o1, 5784, 0, :RMT - tz.offset :o2, 5784, 3600, :LST - tz.offset :o3, 7200, 0, :EET - tz.offset :o4, 10800, 0, :MSK - tz.offset :o5, 3600, 3600, :CEST - tz.offset :o6, 3600, 0, :CET - tz.offset :o7, 10800, 3600, :MSD - tz.offset :o8, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 8667775559, 3600 - tz.transition 1918, 4, :o2, 8718114659, 3600 - tz.transition 1918, 9, :o1, 8718669059, 3600 - tz.transition 1919, 4, :o2, 8719378259, 3600 - tz.transition 1919, 5, :o1, 8719561859, 3600 - tz.transition 1926, 5, :o3, 8728727159, 3600 - tz.transition 1940, 8, :o4, 29158157, 12 - tz.transition 1941, 6, :o5, 19441411, 8 - tz.transition 1942, 11, :o6, 58335973, 24 - tz.transition 1943, 3, :o5, 58339501, 24 - tz.transition 1943, 10, :o6, 58344037, 24 - tz.transition 1944, 4, :o5, 58348405, 24 - tz.transition 1944, 10, :o6, 58352773, 24 - tz.transition 1944, 10, :o4, 58353035, 24 - tz.transition 1981, 3, :o7, 354920400 - tz.transition 1981, 9, :o4, 370728000 - tz.transition 1982, 3, :o7, 386456400 - tz.transition 1982, 9, :o4, 402264000 - tz.transition 1983, 3, :o7, 417992400 - tz.transition 1983, 9, :o4, 433800000 - tz.transition 1984, 3, :o7, 449614800 - tz.transition 1984, 9, :o4, 465346800 - tz.transition 1985, 3, :o7, 481071600 - tz.transition 1985, 9, :o4, 496796400 - tz.transition 1986, 3, :o7, 512521200 - tz.transition 1986, 9, :o4, 528246000 - tz.transition 1987, 3, :o7, 543970800 - tz.transition 1987, 9, :o4, 559695600 - tz.transition 1988, 3, :o7, 575420400 - tz.transition 1988, 9, :o4, 591145200 - tz.transition 1989, 3, :o8, 606870000 - tz.transition 1989, 9, :o3, 622598400 - tz.transition 1990, 3, :o8, 638323200 - tz.transition 1990, 9, :o3, 654652800 - tz.transition 1991, 3, :o8, 670377600 - tz.transition 1991, 9, :o3, 686102400 - tz.transition 1992, 3, :o8, 701827200 - tz.transition 1992, 9, :o3, 717552000 - tz.transition 1993, 3, :o8, 733276800 - tz.transition 1993, 9, :o3, 749001600 - tz.transition 1994, 3, :o8, 764726400 - tz.transition 1994, 9, :o3, 780451200 - tz.transition 1995, 3, :o8, 796176000 - tz.transition 1995, 9, :o3, 811900800 - tz.transition 1996, 3, :o8, 828230400 - tz.transition 1996, 9, :o3, 843955200 - tz.transition 1997, 3, :o8, 859683600 - tz.transition 1997, 10, :o3, 877827600 - tz.transition 1998, 3, :o8, 891133200 - tz.transition 1998, 10, :o3, 909277200 - tz.transition 1999, 3, :o8, 922582800 - tz.transition 1999, 10, :o3, 941331600 - tz.transition 2001, 3, :o8, 985482000 - tz.transition 2001, 10, :o3, 1004230800 - tz.transition 2002, 3, :o8, 1017536400 - tz.transition 2002, 10, :o3, 1035680400 - tz.transition 2003, 3, :o8, 1048986000 - tz.transition 2003, 10, :o3, 1067130000 - tz.transition 2004, 3, :o8, 1080435600 - tz.transition 2004, 10, :o3, 1099184400 - tz.transition 2005, 3, :o8, 1111885200 - tz.transition 2005, 10, :o3, 1130634000 - tz.transition 2006, 3, :o8, 1143334800 - tz.transition 2006, 10, :o3, 1162083600 - tz.transition 2007, 3, :o8, 1174784400 - tz.transition 2007, 10, :o3, 1193533200 - tz.transition 2008, 3, :o8, 1206838800 - tz.transition 2008, 10, :o3, 1224982800 - tz.transition 2009, 3, :o8, 1238288400 - tz.transition 2009, 10, :o3, 1256432400 - tz.transition 2010, 3, :o8, 1269738000 - tz.transition 2010, 10, :o3, 1288486800 - tz.transition 2011, 3, :o8, 1301187600 - tz.transition 2011, 10, :o3, 1319936400 - tz.transition 2012, 3, :o8, 1332637200 - tz.transition 2012, 10, :o3, 1351386000 - tz.transition 2013, 3, :o8, 1364691600 - tz.transition 2013, 10, :o3, 1382835600 - tz.transition 2014, 3, :o8, 1396141200 - tz.transition 2014, 10, :o3, 1414285200 - tz.transition 2015, 3, :o8, 1427590800 - tz.transition 2015, 10, :o3, 1445734800 - tz.transition 2016, 3, :o8, 1459040400 - tz.transition 2016, 10, :o3, 1477789200 - tz.transition 2017, 3, :o8, 1490490000 - tz.transition 2017, 10, :o3, 1509238800 - tz.transition 2018, 3, :o8, 1521939600 - tz.transition 2018, 10, :o3, 1540688400 - tz.transition 2019, 3, :o8, 1553994000 - tz.transition 2019, 10, :o3, 1572138000 - tz.transition 2020, 3, :o8, 1585443600 - tz.transition 2020, 10, :o3, 1603587600 - tz.transition 2021, 3, :o8, 1616893200 - tz.transition 2021, 10, :o3, 1635642000 - tz.transition 2022, 3, :o8, 1648342800 - tz.transition 2022, 10, :o3, 1667091600 - tz.transition 2023, 3, :o8, 1679792400 - tz.transition 2023, 10, :o3, 1698541200 - tz.transition 2024, 3, :o8, 1711846800 - tz.transition 2024, 10, :o3, 1729990800 - tz.transition 2025, 3, :o8, 1743296400 - tz.transition 2025, 10, :o3, 1761440400 - tz.transition 2026, 3, :o8, 1774746000 - tz.transition 2026, 10, :o3, 1792890000 - tz.transition 2027, 3, :o8, 1806195600 - tz.transition 2027, 10, :o3, 1824944400 - tz.transition 2028, 3, :o8, 1837645200 - tz.transition 2028, 10, :o3, 1856394000 - tz.transition 2029, 3, :o8, 1869094800 - tz.transition 2029, 10, :o3, 1887843600 - tz.transition 2030, 3, :o8, 1901149200 - tz.transition 2030, 10, :o3, 1919293200 - tz.transition 2031, 3, :o8, 1932598800 - tz.transition 2031, 10, :o3, 1950742800 - tz.transition 2032, 3, :o8, 1964048400 - tz.transition 2032, 10, :o3, 1982797200 - tz.transition 2033, 3, :o8, 1995498000 - tz.transition 2033, 10, :o3, 2014246800 - tz.transition 2034, 3, :o8, 2026947600 - tz.transition 2034, 10, :o3, 2045696400 - tz.transition 2035, 3, :o8, 2058397200 - tz.transition 2035, 10, :o3, 2077146000 - tz.transition 2036, 3, :o8, 2090451600 - tz.transition 2036, 10, :o3, 2108595600 - tz.transition 2037, 3, :o8, 2121901200 - tz.transition 2037, 10, :o3, 2140045200 - tz.transition 2038, 3, :o8, 59172253, 24 - tz.transition 2038, 10, :o3, 59177461, 24 - tz.transition 2039, 3, :o8, 59180989, 24 - tz.transition 2039, 10, :o3, 59186197, 24 - tz.transition 2040, 3, :o8, 59189725, 24 - tz.transition 2040, 10, :o3, 59194933, 24 - tz.transition 2041, 3, :o8, 59198629, 24 - tz.transition 2041, 10, :o3, 59203669, 24 - tz.transition 2042, 3, :o8, 59207365, 24 - tz.transition 2042, 10, :o3, 59212405, 24 - tz.transition 2043, 3, :o8, 59216101, 24 - tz.transition 2043, 10, :o3, 59221141, 24 - tz.transition 2044, 3, :o8, 59224837, 24 - tz.transition 2044, 10, :o3, 59230045, 24 - tz.transition 2045, 3, :o8, 59233573, 24 - tz.transition 2045, 10, :o3, 59238781, 24 - tz.transition 2046, 3, :o8, 59242309, 24 - tz.transition 2046, 10, :o3, 59247517, 24 - tz.transition 2047, 3, :o8, 59251213, 24 - tz.transition 2047, 10, :o3, 59256253, 24 - tz.transition 2048, 3, :o8, 59259949, 24 - tz.transition 2048, 10, :o3, 59264989, 24 - tz.transition 2049, 3, :o8, 59268685, 24 - tz.transition 2049, 10, :o3, 59273893, 24 - tz.transition 2050, 3, :o8, 59277421, 24 - tz.transition 2050, 10, :o3, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Rome.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Rome.rb deleted file mode 100644 index aa7b43d9d2..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Rome.rb +++ /dev/null @@ -1,215 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Rome - include TimezoneDefinition - - timezone 'Europe/Rome' do |tz| - tz.offset :o0, 2996, 0, :LMT - tz.offset :o1, 2996, 0, :RMT - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - - tz.transition 1866, 9, :o1, 51901915651, 21600 - tz.transition 1893, 10, :o2, 52115798851, 21600 - tz.transition 1916, 6, :o3, 58104419, 24 - tz.transition 1916, 9, :o2, 58107299, 24 - tz.transition 1917, 3, :o3, 58111667, 24 - tz.transition 1917, 9, :o2, 58116035, 24 - tz.transition 1918, 3, :o3, 58119899, 24 - tz.transition 1918, 10, :o2, 58124939, 24 - tz.transition 1919, 3, :o3, 58128467, 24 - tz.transition 1919, 10, :o2, 58133675, 24 - tz.transition 1920, 3, :o3, 58137707, 24 - tz.transition 1920, 9, :o2, 58142075, 24 - tz.transition 1940, 6, :o3, 58315091, 24 - tz.transition 1942, 11, :o2, 58335973, 24 - tz.transition 1943, 3, :o3, 58339501, 24 - tz.transition 1943, 10, :o2, 58344037, 24 - tz.transition 1944, 4, :o3, 58348405, 24 - tz.transition 1944, 9, :o2, 58352411, 24 - tz.transition 1945, 4, :o3, 58357141, 24 - tz.transition 1945, 9, :o2, 58361123, 24 - tz.transition 1946, 3, :o3, 58365517, 24 - tz.transition 1946, 10, :o2, 58370389, 24 - tz.transition 1947, 3, :o3, 58374251, 24 - tz.transition 1947, 10, :o2, 58379123, 24 - tz.transition 1948, 2, :o3, 58382653, 24 - tz.transition 1948, 10, :o2, 58387861, 24 - tz.transition 1966, 5, :o3, 58542419, 24 - tz.transition 1966, 9, :o2, 29272721, 12 - tz.transition 1967, 5, :o3, 58551323, 24 - tz.transition 1967, 9, :o2, 29277089, 12 - tz.transition 1968, 5, :o3, 58560059, 24 - tz.transition 1968, 9, :o2, 29281457, 12 - tz.transition 1969, 5, :o3, 58568963, 24 - tz.transition 1969, 9, :o2, 29285909, 12 - tz.transition 1970, 5, :o3, 12956400 - tz.transition 1970, 9, :o2, 23234400 - tz.transition 1971, 5, :o3, 43801200 - tz.transition 1971, 9, :o2, 54687600 - tz.transition 1972, 5, :o3, 75855600 - tz.transition 1972, 9, :o2, 86738400 - tz.transition 1973, 6, :o3, 107910000 - tz.transition 1973, 9, :o2, 118188000 - tz.transition 1974, 5, :o3, 138754800 - tz.transition 1974, 9, :o2, 149637600 - tz.transition 1975, 5, :o3, 170809200 - tz.transition 1975, 9, :o2, 181090800 - tz.transition 1976, 5, :o3, 202258800 - tz.transition 1976, 9, :o2, 212540400 - tz.transition 1977, 5, :o3, 233103600 - tz.transition 1977, 9, :o2, 243990000 - tz.transition 1978, 5, :o3, 265158000 - tz.transition 1978, 9, :o2, 276044400 - tz.transition 1979, 5, :o3, 296607600 - tz.transition 1979, 9, :o2, 307494000 - tz.transition 1980, 4, :o3, 323830800 - tz.transition 1980, 9, :o2, 338950800 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sarajevo.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sarajevo.rb deleted file mode 100644 index 068c5fe6ad..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sarajevo.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Sarajevo - include TimezoneDefinition - - linked_timezone 'Europe/Sarajevo', 'Europe/Belgrade' - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Skopje.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Skopje.rb deleted file mode 100644 index 10b71f285e..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Skopje.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Skopje - include TimezoneDefinition - - linked_timezone 'Europe/Skopje', 'Europe/Belgrade' - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sofia.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sofia.rb deleted file mode 100644 index 38a70eceb9..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Sofia.rb +++ /dev/null @@ -1,173 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Sofia - include TimezoneDefinition - - timezone 'Europe/Sofia' do |tz| - tz.offset :o0, 5596, 0, :LMT - tz.offset :o1, 7016, 0, :IMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 3600, 0, :CET - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 52006653401, 21600 - tz.transition 1894, 11, :o2, 26062154123, 10800 - tz.transition 1942, 11, :o3, 58335973, 24 - tz.transition 1943, 3, :o4, 58339501, 24 - tz.transition 1943, 10, :o3, 58344037, 24 - tz.transition 1944, 4, :o4, 58348405, 24 - tz.transition 1944, 10, :o3, 58352773, 24 - tz.transition 1945, 4, :o2, 29178571, 12 - tz.transition 1979, 3, :o5, 291762000 - tz.transition 1979, 9, :o2, 307576800 - tz.transition 1980, 4, :o5, 323816400 - tz.transition 1980, 9, :o2, 339026400 - tz.transition 1981, 4, :o5, 355266000 - tz.transition 1981, 9, :o2, 370393200 - tz.transition 1982, 4, :o5, 386715600 - tz.transition 1982, 9, :o2, 401846400 - tz.transition 1983, 3, :o5, 417571200 - tz.transition 1983, 9, :o2, 433296000 - tz.transition 1984, 3, :o5, 449020800 - tz.transition 1984, 9, :o2, 465350400 - tz.transition 1985, 3, :o5, 481075200 - tz.transition 1985, 9, :o2, 496800000 - tz.transition 1986, 3, :o5, 512524800 - tz.transition 1986, 9, :o2, 528249600 - tz.transition 1987, 3, :o5, 543974400 - tz.transition 1987, 9, :o2, 559699200 - tz.transition 1988, 3, :o5, 575424000 - tz.transition 1988, 9, :o2, 591148800 - tz.transition 1989, 3, :o5, 606873600 - tz.transition 1989, 9, :o2, 622598400 - tz.transition 1990, 3, :o5, 638323200 - tz.transition 1990, 9, :o2, 654652800 - tz.transition 1991, 3, :o5, 670370400 - tz.transition 1991, 9, :o2, 686091600 - tz.transition 1992, 3, :o5, 701820000 - tz.transition 1992, 9, :o2, 717541200 - tz.transition 1993, 3, :o5, 733269600 - tz.transition 1993, 9, :o2, 748990800 - tz.transition 1994, 3, :o5, 764719200 - tz.transition 1994, 9, :o2, 780440400 - tz.transition 1995, 3, :o5, 796168800 - tz.transition 1995, 9, :o2, 811890000 - tz.transition 1996, 3, :o5, 828223200 - tz.transition 1996, 10, :o2, 846363600 - tz.transition 1997, 3, :o5, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o5, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o5, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o5, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o5, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o5, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o5, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o5, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o5, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o5, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o5, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o5, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o5, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o5, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o5, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o5, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o5, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o5, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o5, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o5, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o5, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o5, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o5, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o5, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o5, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o5, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o5, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o5, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o5, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o5, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o5, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o5, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o5, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o5, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o5, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o5, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o5, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o5, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o5, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o5, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o5, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o5, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o5, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o5, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o5, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o5, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o5, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o5, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o5, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o5, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o5, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o5, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o5, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o5, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Stockholm.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Stockholm.rb deleted file mode 100644 index 43db70fa61..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Stockholm.rb +++ /dev/null @@ -1,165 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Stockholm - include TimezoneDefinition - - timezone 'Europe/Stockholm' do |tz| - tz.offset :o0, 4332, 0, :LMT - tz.offset :o1, 3614, 0, :SET - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - - tz.transition 1878, 12, :o1, 17332923239, 7200 - tz.transition 1899, 12, :o2, 104328883793, 43200 - tz.transition 1916, 5, :o3, 29051981, 12 - tz.transition 1916, 9, :o2, 58107299, 24 - tz.transition 1980, 4, :o3, 323830800 - tz.transition 1980, 9, :o2, 338950800 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Tallinn.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Tallinn.rb deleted file mode 100644 index de5a8569f3..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Tallinn.rb +++ /dev/null @@ -1,172 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Tallinn - include TimezoneDefinition - - timezone 'Europe/Tallinn' do |tz| - tz.offset :o0, 5940, 0, :LMT - tz.offset :o1, 5940, 0, :TMT - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - tz.offset :o4, 7200, 0, :EET - tz.offset :o5, 10800, 0, :MSK - tz.offset :o6, 10800, 3600, :MSD - tz.offset :o7, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 385234469, 160 - tz.transition 1918, 1, :o2, 387460069, 160 - tz.transition 1918, 4, :o3, 58120765, 24 - tz.transition 1918, 9, :o2, 58124461, 24 - tz.transition 1919, 6, :o1, 58131371, 24 - tz.transition 1921, 4, :o4, 387649669, 160 - tz.transition 1940, 8, :o5, 29158169, 12 - tz.transition 1941, 9, :o3, 19442019, 8 - tz.transition 1942, 11, :o2, 58335973, 24 - tz.transition 1943, 3, :o3, 58339501, 24 - tz.transition 1943, 10, :o2, 58344037, 24 - tz.transition 1944, 4, :o3, 58348405, 24 - tz.transition 1944, 9, :o5, 29176265, 12 - tz.transition 1981, 3, :o6, 354920400 - tz.transition 1981, 9, :o5, 370728000 - tz.transition 1982, 3, :o6, 386456400 - tz.transition 1982, 9, :o5, 402264000 - tz.transition 1983, 3, :o6, 417992400 - tz.transition 1983, 9, :o5, 433800000 - tz.transition 1984, 3, :o6, 449614800 - tz.transition 1984, 9, :o5, 465346800 - tz.transition 1985, 3, :o6, 481071600 - tz.transition 1985, 9, :o5, 496796400 - tz.transition 1986, 3, :o6, 512521200 - tz.transition 1986, 9, :o5, 528246000 - tz.transition 1987, 3, :o6, 543970800 - tz.transition 1987, 9, :o5, 559695600 - tz.transition 1988, 3, :o6, 575420400 - tz.transition 1988, 9, :o5, 591145200 - tz.transition 1989, 3, :o7, 606870000 - tz.transition 1989, 9, :o4, 622598400 - tz.transition 1990, 3, :o7, 638323200 - tz.transition 1990, 9, :o4, 654652800 - tz.transition 1991, 3, :o7, 670377600 - tz.transition 1991, 9, :o4, 686102400 - tz.transition 1992, 3, :o7, 701827200 - tz.transition 1992, 9, :o4, 717552000 - tz.transition 1993, 3, :o7, 733276800 - tz.transition 1993, 9, :o4, 749001600 - tz.transition 1994, 3, :o7, 764726400 - tz.transition 1994, 9, :o4, 780451200 - tz.transition 1995, 3, :o7, 796176000 - tz.transition 1995, 9, :o4, 811900800 - tz.transition 1996, 3, :o7, 828230400 - tz.transition 1996, 10, :o4, 846374400 - tz.transition 1997, 3, :o7, 859680000 - tz.transition 1997, 10, :o4, 877824000 - tz.transition 1998, 3, :o7, 891129600 - tz.transition 1998, 10, :o4, 909277200 - tz.transition 1999, 3, :o7, 922582800 - tz.transition 1999, 10, :o4, 941331600 - tz.transition 2002, 3, :o7, 1017536400 - tz.transition 2002, 10, :o4, 1035680400 - tz.transition 2003, 3, :o7, 1048986000 - tz.transition 2003, 10, :o4, 1067130000 - tz.transition 2004, 3, :o7, 1080435600 - tz.transition 2004, 10, :o4, 1099184400 - tz.transition 2005, 3, :o7, 1111885200 - tz.transition 2005, 10, :o4, 1130634000 - tz.transition 2006, 3, :o7, 1143334800 - tz.transition 2006, 10, :o4, 1162083600 - tz.transition 2007, 3, :o7, 1174784400 - tz.transition 2007, 10, :o4, 1193533200 - tz.transition 2008, 3, :o7, 1206838800 - tz.transition 2008, 10, :o4, 1224982800 - tz.transition 2009, 3, :o7, 1238288400 - tz.transition 2009, 10, :o4, 1256432400 - tz.transition 2010, 3, :o7, 1269738000 - tz.transition 2010, 10, :o4, 1288486800 - tz.transition 2011, 3, :o7, 1301187600 - tz.transition 2011, 10, :o4, 1319936400 - tz.transition 2012, 3, :o7, 1332637200 - tz.transition 2012, 10, :o4, 1351386000 - tz.transition 2013, 3, :o7, 1364691600 - tz.transition 2013, 10, :o4, 1382835600 - tz.transition 2014, 3, :o7, 1396141200 - tz.transition 2014, 10, :o4, 1414285200 - tz.transition 2015, 3, :o7, 1427590800 - tz.transition 2015, 10, :o4, 1445734800 - tz.transition 2016, 3, :o7, 1459040400 - tz.transition 2016, 10, :o4, 1477789200 - tz.transition 2017, 3, :o7, 1490490000 - tz.transition 2017, 10, :o4, 1509238800 - tz.transition 2018, 3, :o7, 1521939600 - tz.transition 2018, 10, :o4, 1540688400 - tz.transition 2019, 3, :o7, 1553994000 - tz.transition 2019, 10, :o4, 1572138000 - tz.transition 2020, 3, :o7, 1585443600 - tz.transition 2020, 10, :o4, 1603587600 - tz.transition 2021, 3, :o7, 1616893200 - tz.transition 2021, 10, :o4, 1635642000 - tz.transition 2022, 3, :o7, 1648342800 - tz.transition 2022, 10, :o4, 1667091600 - tz.transition 2023, 3, :o7, 1679792400 - tz.transition 2023, 10, :o4, 1698541200 - tz.transition 2024, 3, :o7, 1711846800 - tz.transition 2024, 10, :o4, 1729990800 - tz.transition 2025, 3, :o7, 1743296400 - tz.transition 2025, 10, :o4, 1761440400 - tz.transition 2026, 3, :o7, 1774746000 - tz.transition 2026, 10, :o4, 1792890000 - tz.transition 2027, 3, :o7, 1806195600 - tz.transition 2027, 10, :o4, 1824944400 - tz.transition 2028, 3, :o7, 1837645200 - tz.transition 2028, 10, :o4, 1856394000 - tz.transition 2029, 3, :o7, 1869094800 - tz.transition 2029, 10, :o4, 1887843600 - tz.transition 2030, 3, :o7, 1901149200 - tz.transition 2030, 10, :o4, 1919293200 - tz.transition 2031, 3, :o7, 1932598800 - tz.transition 2031, 10, :o4, 1950742800 - tz.transition 2032, 3, :o7, 1964048400 - tz.transition 2032, 10, :o4, 1982797200 - tz.transition 2033, 3, :o7, 1995498000 - tz.transition 2033, 10, :o4, 2014246800 - tz.transition 2034, 3, :o7, 2026947600 - tz.transition 2034, 10, :o4, 2045696400 - tz.transition 2035, 3, :o7, 2058397200 - tz.transition 2035, 10, :o4, 2077146000 - tz.transition 2036, 3, :o7, 2090451600 - tz.transition 2036, 10, :o4, 2108595600 - tz.transition 2037, 3, :o7, 2121901200 - tz.transition 2037, 10, :o4, 2140045200 - tz.transition 2038, 3, :o7, 59172253, 24 - tz.transition 2038, 10, :o4, 59177461, 24 - tz.transition 2039, 3, :o7, 59180989, 24 - tz.transition 2039, 10, :o4, 59186197, 24 - tz.transition 2040, 3, :o7, 59189725, 24 - tz.transition 2040, 10, :o4, 59194933, 24 - tz.transition 2041, 3, :o7, 59198629, 24 - tz.transition 2041, 10, :o4, 59203669, 24 - tz.transition 2042, 3, :o7, 59207365, 24 - tz.transition 2042, 10, :o4, 59212405, 24 - tz.transition 2043, 3, :o7, 59216101, 24 - tz.transition 2043, 10, :o4, 59221141, 24 - tz.transition 2044, 3, :o7, 59224837, 24 - tz.transition 2044, 10, :o4, 59230045, 24 - tz.transition 2045, 3, :o7, 59233573, 24 - tz.transition 2045, 10, :o4, 59238781, 24 - tz.transition 2046, 3, :o7, 59242309, 24 - tz.transition 2046, 10, :o4, 59247517, 24 - tz.transition 2047, 3, :o7, 59251213, 24 - tz.transition 2047, 10, :o4, 59256253, 24 - tz.transition 2048, 3, :o7, 59259949, 24 - tz.transition 2048, 10, :o4, 59264989, 24 - tz.transition 2049, 3, :o7, 59268685, 24 - tz.transition 2049, 10, :o4, 59273893, 24 - tz.transition 2050, 3, :o7, 59277421, 24 - tz.transition 2050, 10, :o4, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vienna.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vienna.rb deleted file mode 100644 index 990aabab66..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vienna.rb +++ /dev/null @@ -1,183 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Vienna - include TimezoneDefinition - - timezone 'Europe/Vienna' do |tz| - tz.offset :o0, 3920, 0, :LMT - tz.offset :o1, 3600, 0, :CET - tz.offset :o2, 3600, 3600, :CEST - - tz.transition 1893, 3, :o1, 2605558811, 1080 - tz.transition 1916, 4, :o2, 29051813, 12 - tz.transition 1916, 9, :o1, 58107299, 24 - tz.transition 1917, 4, :o2, 58112029, 24 - tz.transition 1917, 9, :o1, 58115725, 24 - tz.transition 1918, 4, :o2, 58120765, 24 - tz.transition 1918, 9, :o1, 58124461, 24 - tz.transition 1920, 4, :o2, 58138069, 24 - tz.transition 1920, 9, :o1, 58141933, 24 - tz.transition 1940, 4, :o2, 58313293, 24 - tz.transition 1942, 11, :o1, 58335973, 24 - tz.transition 1943, 3, :o2, 58339501, 24 - tz.transition 1943, 10, :o1, 58344037, 24 - tz.transition 1944, 4, :o2, 58348405, 24 - tz.transition 1944, 10, :o1, 58352773, 24 - tz.transition 1945, 4, :o2, 58357141, 24 - tz.transition 1945, 4, :o1, 58357381, 24 - tz.transition 1946, 4, :o2, 58366189, 24 - tz.transition 1946, 10, :o1, 58370389, 24 - tz.transition 1947, 4, :o2, 58374757, 24 - tz.transition 1947, 10, :o1, 58379125, 24 - tz.transition 1948, 4, :o2, 58383829, 24 - tz.transition 1948, 10, :o1, 58387861, 24 - tz.transition 1980, 4, :o2, 323823600 - tz.transition 1980, 9, :o1, 338940000 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 9, :o1, 370400400 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 9, :o1, 401850000 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o1, 717555600 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 9, :o1, 749005200 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 9, :o1, 780454800 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 9, :o1, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vilnius.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vilnius.rb deleted file mode 100644 index d89d095a75..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Vilnius.rb +++ /dev/null @@ -1,170 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Vilnius - include TimezoneDefinition - - timezone 'Europe/Vilnius' do |tz| - tz.offset :o0, 6076, 0, :LMT - tz.offset :o1, 5040, 0, :WMT - tz.offset :o2, 5736, 0, :KMT - tz.offset :o3, 3600, 0, :CET - tz.offset :o4, 7200, 0, :EET - tz.offset :o5, 10800, 0, :MSK - tz.offset :o6, 3600, 3600, :CEST - tz.offset :o7, 10800, 3600, :MSD - tz.offset :o8, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 52006653281, 21600 - tz.transition 1916, 12, :o2, 290547533, 120 - tz.transition 1919, 10, :o3, 8720069161, 3600 - tz.transition 1920, 7, :o4, 58140419, 24 - tz.transition 1920, 10, :o3, 29071277, 12 - tz.transition 1940, 8, :o5, 58316267, 24 - tz.transition 1941, 6, :o6, 19441355, 8 - tz.transition 1942, 11, :o3, 58335973, 24 - tz.transition 1943, 3, :o6, 58339501, 24 - tz.transition 1943, 10, :o3, 58344037, 24 - tz.transition 1944, 4, :o6, 58348405, 24 - tz.transition 1944, 7, :o5, 29175641, 12 - tz.transition 1981, 3, :o7, 354920400 - tz.transition 1981, 9, :o5, 370728000 - tz.transition 1982, 3, :o7, 386456400 - tz.transition 1982, 9, :o5, 402264000 - tz.transition 1983, 3, :o7, 417992400 - tz.transition 1983, 9, :o5, 433800000 - tz.transition 1984, 3, :o7, 449614800 - tz.transition 1984, 9, :o5, 465346800 - tz.transition 1985, 3, :o7, 481071600 - tz.transition 1985, 9, :o5, 496796400 - tz.transition 1986, 3, :o7, 512521200 - tz.transition 1986, 9, :o5, 528246000 - tz.transition 1987, 3, :o7, 543970800 - tz.transition 1987, 9, :o5, 559695600 - tz.transition 1988, 3, :o7, 575420400 - tz.transition 1988, 9, :o5, 591145200 - tz.transition 1989, 3, :o7, 606870000 - tz.transition 1989, 9, :o5, 622594800 - tz.transition 1990, 3, :o7, 638319600 - tz.transition 1990, 9, :o5, 654649200 - tz.transition 1991, 3, :o8, 670374000 - tz.transition 1991, 9, :o4, 686102400 - tz.transition 1992, 3, :o8, 701827200 - tz.transition 1992, 9, :o4, 717552000 - tz.transition 1993, 3, :o8, 733276800 - tz.transition 1993, 9, :o4, 749001600 - tz.transition 1994, 3, :o8, 764726400 - tz.transition 1994, 9, :o4, 780451200 - tz.transition 1995, 3, :o8, 796176000 - tz.transition 1995, 9, :o4, 811900800 - tz.transition 1996, 3, :o8, 828230400 - tz.transition 1996, 10, :o4, 846374400 - tz.transition 1997, 3, :o8, 859680000 - tz.transition 1997, 10, :o4, 877824000 - tz.transition 1998, 3, :o6, 891133200 - tz.transition 1998, 10, :o3, 909277200 - tz.transition 1999, 3, :o6, 922582800 - tz.transition 1999, 10, :o4, 941331600 - tz.transition 2003, 3, :o8, 1048986000 - tz.transition 2003, 10, :o4, 1067130000 - tz.transition 2004, 3, :o8, 1080435600 - tz.transition 2004, 10, :o4, 1099184400 - tz.transition 2005, 3, :o8, 1111885200 - tz.transition 2005, 10, :o4, 1130634000 - tz.transition 2006, 3, :o8, 1143334800 - tz.transition 2006, 10, :o4, 1162083600 - tz.transition 2007, 3, :o8, 1174784400 - tz.transition 2007, 10, :o4, 1193533200 - tz.transition 2008, 3, :o8, 1206838800 - tz.transition 2008, 10, :o4, 1224982800 - tz.transition 2009, 3, :o8, 1238288400 - tz.transition 2009, 10, :o4, 1256432400 - tz.transition 2010, 3, :o8, 1269738000 - tz.transition 2010, 10, :o4, 1288486800 - tz.transition 2011, 3, :o8, 1301187600 - tz.transition 2011, 10, :o4, 1319936400 - tz.transition 2012, 3, :o8, 1332637200 - tz.transition 2012, 10, :o4, 1351386000 - tz.transition 2013, 3, :o8, 1364691600 - tz.transition 2013, 10, :o4, 1382835600 - tz.transition 2014, 3, :o8, 1396141200 - tz.transition 2014, 10, :o4, 1414285200 - tz.transition 2015, 3, :o8, 1427590800 - tz.transition 2015, 10, :o4, 1445734800 - tz.transition 2016, 3, :o8, 1459040400 - tz.transition 2016, 10, :o4, 1477789200 - tz.transition 2017, 3, :o8, 1490490000 - tz.transition 2017, 10, :o4, 1509238800 - tz.transition 2018, 3, :o8, 1521939600 - tz.transition 2018, 10, :o4, 1540688400 - tz.transition 2019, 3, :o8, 1553994000 - tz.transition 2019, 10, :o4, 1572138000 - tz.transition 2020, 3, :o8, 1585443600 - tz.transition 2020, 10, :o4, 1603587600 - tz.transition 2021, 3, :o8, 1616893200 - tz.transition 2021, 10, :o4, 1635642000 - tz.transition 2022, 3, :o8, 1648342800 - tz.transition 2022, 10, :o4, 1667091600 - tz.transition 2023, 3, :o8, 1679792400 - tz.transition 2023, 10, :o4, 1698541200 - tz.transition 2024, 3, :o8, 1711846800 - tz.transition 2024, 10, :o4, 1729990800 - tz.transition 2025, 3, :o8, 1743296400 - tz.transition 2025, 10, :o4, 1761440400 - tz.transition 2026, 3, :o8, 1774746000 - tz.transition 2026, 10, :o4, 1792890000 - tz.transition 2027, 3, :o8, 1806195600 - tz.transition 2027, 10, :o4, 1824944400 - tz.transition 2028, 3, :o8, 1837645200 - tz.transition 2028, 10, :o4, 1856394000 - tz.transition 2029, 3, :o8, 1869094800 - tz.transition 2029, 10, :o4, 1887843600 - tz.transition 2030, 3, :o8, 1901149200 - tz.transition 2030, 10, :o4, 1919293200 - tz.transition 2031, 3, :o8, 1932598800 - tz.transition 2031, 10, :o4, 1950742800 - tz.transition 2032, 3, :o8, 1964048400 - tz.transition 2032, 10, :o4, 1982797200 - tz.transition 2033, 3, :o8, 1995498000 - tz.transition 2033, 10, :o4, 2014246800 - tz.transition 2034, 3, :o8, 2026947600 - tz.transition 2034, 10, :o4, 2045696400 - tz.transition 2035, 3, :o8, 2058397200 - tz.transition 2035, 10, :o4, 2077146000 - tz.transition 2036, 3, :o8, 2090451600 - tz.transition 2036, 10, :o4, 2108595600 - tz.transition 2037, 3, :o8, 2121901200 - tz.transition 2037, 10, :o4, 2140045200 - tz.transition 2038, 3, :o8, 59172253, 24 - tz.transition 2038, 10, :o4, 59177461, 24 - tz.transition 2039, 3, :o8, 59180989, 24 - tz.transition 2039, 10, :o4, 59186197, 24 - tz.transition 2040, 3, :o8, 59189725, 24 - tz.transition 2040, 10, :o4, 59194933, 24 - tz.transition 2041, 3, :o8, 59198629, 24 - tz.transition 2041, 10, :o4, 59203669, 24 - tz.transition 2042, 3, :o8, 59207365, 24 - tz.transition 2042, 10, :o4, 59212405, 24 - tz.transition 2043, 3, :o8, 59216101, 24 - tz.transition 2043, 10, :o4, 59221141, 24 - tz.transition 2044, 3, :o8, 59224837, 24 - tz.transition 2044, 10, :o4, 59230045, 24 - tz.transition 2045, 3, :o8, 59233573, 24 - tz.transition 2045, 10, :o4, 59238781, 24 - tz.transition 2046, 3, :o8, 59242309, 24 - tz.transition 2046, 10, :o4, 59247517, 24 - tz.transition 2047, 3, :o8, 59251213, 24 - tz.transition 2047, 10, :o4, 59256253, 24 - tz.transition 2048, 3, :o8, 59259949, 24 - tz.transition 2048, 10, :o4, 59264989, 24 - tz.transition 2049, 3, :o8, 59268685, 24 - tz.transition 2049, 10, :o4, 59273893, 24 - tz.transition 2050, 3, :o8, 59277421, 24 - tz.transition 2050, 10, :o4, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Warsaw.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Warsaw.rb deleted file mode 100644 index 7fa51c2691..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Warsaw.rb +++ /dev/null @@ -1,212 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Warsaw - include TimezoneDefinition - - timezone 'Europe/Warsaw' do |tz| - tz.offset :o0, 5040, 0, :LMT - tz.offset :o1, 5040, 0, :WMT - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - tz.offset :o4, 7200, 0, :EET - tz.offset :o5, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 288925853, 120 - tz.transition 1915, 8, :o2, 290485733, 120 - tz.transition 1916, 4, :o3, 29051813, 12 - tz.transition 1916, 9, :o2, 58107299, 24 - tz.transition 1917, 4, :o3, 58112029, 24 - tz.transition 1917, 9, :o2, 58115725, 24 - tz.transition 1918, 4, :o3, 58120765, 24 - tz.transition 1918, 9, :o4, 58124461, 24 - tz.transition 1919, 4, :o5, 4844127, 2 - tz.transition 1919, 9, :o4, 4844435, 2 - tz.transition 1922, 5, :o2, 29078477, 12 - tz.transition 1940, 6, :o3, 58315285, 24 - tz.transition 1942, 11, :o2, 58335973, 24 - tz.transition 1943, 3, :o3, 58339501, 24 - tz.transition 1943, 10, :o2, 58344037, 24 - tz.transition 1944, 4, :o3, 58348405, 24 - tz.transition 1944, 10, :o2, 4862735, 2 - tz.transition 1945, 4, :o3, 58357787, 24 - tz.transition 1945, 10, :o2, 29181125, 12 - tz.transition 1946, 4, :o3, 58366187, 24 - tz.transition 1946, 10, :o2, 58370413, 24 - tz.transition 1947, 5, :o3, 58375429, 24 - tz.transition 1947, 10, :o2, 58379125, 24 - tz.transition 1948, 4, :o3, 58383829, 24 - tz.transition 1948, 10, :o2, 58387861, 24 - tz.transition 1949, 4, :o3, 58392397, 24 - tz.transition 1949, 10, :o2, 58396597, 24 - tz.transition 1957, 6, :o3, 4871983, 2 - tz.transition 1957, 9, :o2, 4872221, 2 - tz.transition 1958, 3, :o3, 4872585, 2 - tz.transition 1958, 9, :o2, 4872949, 2 - tz.transition 1959, 5, :o3, 4873439, 2 - tz.transition 1959, 10, :o2, 4873691, 2 - tz.transition 1960, 4, :o3, 4874055, 2 - tz.transition 1960, 10, :o2, 4874419, 2 - tz.transition 1961, 5, :o3, 4874895, 2 - tz.transition 1961, 10, :o2, 4875147, 2 - tz.transition 1962, 5, :o3, 4875623, 2 - tz.transition 1962, 9, :o2, 4875875, 2 - tz.transition 1963, 5, :o3, 4876351, 2 - tz.transition 1963, 9, :o2, 4876603, 2 - tz.transition 1964, 5, :o3, 4877093, 2 - tz.transition 1964, 9, :o2, 4877331, 2 - tz.transition 1977, 4, :o3, 228873600 - tz.transition 1977, 9, :o2, 243993600 - tz.transition 1978, 4, :o3, 260323200 - tz.transition 1978, 10, :o2, 276048000 - tz.transition 1979, 4, :o3, 291772800 - tz.transition 1979, 9, :o2, 307497600 - tz.transition 1980, 4, :o3, 323827200 - tz.transition 1980, 9, :o2, 338947200 - tz.transition 1981, 3, :o3, 354672000 - tz.transition 1981, 9, :o2, 370396800 - tz.transition 1982, 3, :o3, 386121600 - tz.transition 1982, 9, :o2, 401846400 - tz.transition 1983, 3, :o3, 417571200 - tz.transition 1983, 9, :o2, 433296000 - tz.transition 1984, 3, :o3, 449020800 - tz.transition 1984, 9, :o2, 465350400 - tz.transition 1985, 3, :o3, 481075200 - tz.transition 1985, 9, :o2, 496800000 - tz.transition 1986, 3, :o3, 512524800 - tz.transition 1986, 9, :o2, 528249600 - tz.transition 1987, 3, :o3, 543974400 - tz.transition 1987, 9, :o2, 559699200 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Zagreb.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Zagreb.rb deleted file mode 100644 index ecdd903d28..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Europe/Zagreb.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Zagreb - include TimezoneDefinition - - linked_timezone 'Europe/Zagreb', 'Europe/Belgrade' - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Auckland.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Auckland.rb deleted file mode 100644 index a524fd6b6b..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Auckland.rb +++ /dev/null @@ -1,202 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Auckland - include TimezoneDefinition - - timezone 'Pacific/Auckland' do |tz| - tz.offset :o0, 41944, 0, :LMT - tz.offset :o1, 41400, 0, :NZMT - tz.offset :o2, 41400, 3600, :NZST - tz.offset :o3, 41400, 1800, :NZST - tz.offset :o4, 43200, 0, :NZST - tz.offset :o5, 43200, 3600, :NZDT - - tz.transition 1868, 11, :o1, 25959290557, 10800 - tz.transition 1927, 11, :o2, 116409125, 48 - tz.transition 1928, 3, :o1, 38804945, 16 - tz.transition 1928, 10, :o3, 116425589, 48 - tz.transition 1929, 3, :o1, 29108245, 12 - tz.transition 1929, 10, :o3, 116443061, 48 - tz.transition 1930, 3, :o1, 29112613, 12 - tz.transition 1930, 10, :o3, 116460533, 48 - tz.transition 1931, 3, :o1, 29116981, 12 - tz.transition 1931, 10, :o3, 116478005, 48 - tz.transition 1932, 3, :o1, 29121433, 12 - tz.transition 1932, 10, :o3, 116495477, 48 - tz.transition 1933, 3, :o1, 29125801, 12 - tz.transition 1933, 10, :o3, 116512949, 48 - tz.transition 1934, 4, :o1, 29130673, 12 - tz.transition 1934, 9, :o3, 116530085, 48 - tz.transition 1935, 4, :o1, 29135041, 12 - tz.transition 1935, 9, :o3, 116547557, 48 - tz.transition 1936, 4, :o1, 29139409, 12 - tz.transition 1936, 9, :o3, 116565029, 48 - tz.transition 1937, 4, :o1, 29143777, 12 - tz.transition 1937, 9, :o3, 116582501, 48 - tz.transition 1938, 4, :o1, 29148145, 12 - tz.transition 1938, 9, :o3, 116599973, 48 - tz.transition 1939, 4, :o1, 29152597, 12 - tz.transition 1939, 9, :o3, 116617445, 48 - tz.transition 1940, 4, :o1, 29156965, 12 - tz.transition 1940, 9, :o3, 116635253, 48 - tz.transition 1945, 12, :o4, 2431821, 1 - tz.transition 1974, 11, :o5, 152632800 - tz.transition 1975, 2, :o4, 162309600 - tz.transition 1975, 10, :o5, 183477600 - tz.transition 1976, 3, :o4, 194968800 - tz.transition 1976, 10, :o5, 215532000 - tz.transition 1977, 3, :o4, 226418400 - tz.transition 1977, 10, :o5, 246981600 - tz.transition 1978, 3, :o4, 257868000 - tz.transition 1978, 10, :o5, 278431200 - tz.transition 1979, 3, :o4, 289317600 - tz.transition 1979, 10, :o5, 309880800 - tz.transition 1980, 3, :o4, 320767200 - tz.transition 1980, 10, :o5, 341330400 - tz.transition 1981, 2, :o4, 352216800 - tz.transition 1981, 10, :o5, 372780000 - tz.transition 1982, 3, :o4, 384271200 - tz.transition 1982, 10, :o5, 404834400 - tz.transition 1983, 3, :o4, 415720800 - tz.transition 1983, 10, :o5, 436284000 - tz.transition 1984, 3, :o4, 447170400 - tz.transition 1984, 10, :o5, 467733600 - tz.transition 1985, 3, :o4, 478620000 - tz.transition 1985, 10, :o5, 499183200 - tz.transition 1986, 3, :o4, 510069600 - tz.transition 1986, 10, :o5, 530632800 - tz.transition 1987, 2, :o4, 541519200 - tz.transition 1987, 10, :o5, 562082400 - tz.transition 1988, 3, :o4, 573573600 - tz.transition 1988, 10, :o5, 594136800 - tz.transition 1989, 3, :o4, 605023200 - tz.transition 1989, 10, :o5, 623772000 - tz.transition 1990, 3, :o4, 637682400 - tz.transition 1990, 10, :o5, 655221600 - tz.transition 1991, 3, :o4, 669132000 - tz.transition 1991, 10, :o5, 686671200 - tz.transition 1992, 3, :o4, 700581600 - tz.transition 1992, 10, :o5, 718120800 - tz.transition 1993, 3, :o4, 732636000 - tz.transition 1993, 10, :o5, 749570400 - tz.transition 1994, 3, :o4, 764085600 - tz.transition 1994, 10, :o5, 781020000 - tz.transition 1995, 3, :o4, 795535200 - tz.transition 1995, 9, :o5, 812469600 - tz.transition 1996, 3, :o4, 826984800 - tz.transition 1996, 10, :o5, 844524000 - tz.transition 1997, 3, :o4, 858434400 - tz.transition 1997, 10, :o5, 875973600 - tz.transition 1998, 3, :o4, 889884000 - tz.transition 1998, 10, :o5, 907423200 - tz.transition 1999, 3, :o4, 921938400 - tz.transition 1999, 10, :o5, 938872800 - tz.transition 2000, 3, :o4, 953388000 - tz.transition 2000, 9, :o5, 970322400 - tz.transition 2001, 3, :o4, 984837600 - tz.transition 2001, 10, :o5, 1002376800 - tz.transition 2002, 3, :o4, 1016287200 - tz.transition 2002, 10, :o5, 1033826400 - tz.transition 2003, 3, :o4, 1047736800 - tz.transition 2003, 10, :o5, 1065276000 - tz.transition 2004, 3, :o4, 1079791200 - tz.transition 2004, 10, :o5, 1096725600 - tz.transition 2005, 3, :o4, 1111240800 - tz.transition 2005, 10, :o5, 1128175200 - tz.transition 2006, 3, :o4, 1142690400 - tz.transition 2006, 9, :o5, 1159624800 - tz.transition 2007, 3, :o4, 1174140000 - tz.transition 2007, 9, :o5, 1191074400 - tz.transition 2008, 4, :o4, 1207404000 - tz.transition 2008, 9, :o5, 1222524000 - tz.transition 2009, 4, :o4, 1238853600 - tz.transition 2009, 9, :o5, 1253973600 - tz.transition 2010, 4, :o4, 1270303200 - tz.transition 2010, 9, :o5, 1285423200 - tz.transition 2011, 4, :o4, 1301752800 - tz.transition 2011, 9, :o5, 1316872800 - tz.transition 2012, 3, :o4, 1333202400 - tz.transition 2012, 9, :o5, 1348927200 - tz.transition 2013, 4, :o4, 1365256800 - tz.transition 2013, 9, :o5, 1380376800 - tz.transition 2014, 4, :o4, 1396706400 - tz.transition 2014, 9, :o5, 1411826400 - tz.transition 2015, 4, :o4, 1428156000 - tz.transition 2015, 9, :o5, 1443276000 - tz.transition 2016, 4, :o4, 1459605600 - tz.transition 2016, 9, :o5, 1474725600 - tz.transition 2017, 4, :o4, 1491055200 - tz.transition 2017, 9, :o5, 1506175200 - tz.transition 2018, 3, :o4, 1522504800 - tz.transition 2018, 9, :o5, 1538229600 - tz.transition 2019, 4, :o4, 1554559200 - tz.transition 2019, 9, :o5, 1569679200 - tz.transition 2020, 4, :o4, 1586008800 - tz.transition 2020, 9, :o5, 1601128800 - tz.transition 2021, 4, :o4, 1617458400 - tz.transition 2021, 9, :o5, 1632578400 - tz.transition 2022, 4, :o4, 1648908000 - tz.transition 2022, 9, :o5, 1664028000 - tz.transition 2023, 4, :o4, 1680357600 - tz.transition 2023, 9, :o5, 1695477600 - tz.transition 2024, 4, :o4, 1712412000 - tz.transition 2024, 9, :o5, 1727532000 - tz.transition 2025, 4, :o4, 1743861600 - tz.transition 2025, 9, :o5, 1758981600 - tz.transition 2026, 4, :o4, 1775311200 - tz.transition 2026, 9, :o5, 1790431200 - tz.transition 2027, 4, :o4, 1806760800 - tz.transition 2027, 9, :o5, 1821880800 - tz.transition 2028, 4, :o4, 1838210400 - tz.transition 2028, 9, :o5, 1853330400 - tz.transition 2029, 3, :o4, 1869660000 - tz.transition 2029, 9, :o5, 1885384800 - tz.transition 2030, 4, :o4, 1901714400 - tz.transition 2030, 9, :o5, 1916834400 - tz.transition 2031, 4, :o4, 1933164000 - tz.transition 2031, 9, :o5, 1948284000 - tz.transition 2032, 4, :o4, 1964613600 - tz.transition 2032, 9, :o5, 1979733600 - tz.transition 2033, 4, :o4, 1996063200 - tz.transition 2033, 9, :o5, 2011183200 - tz.transition 2034, 4, :o4, 2027512800 - tz.transition 2034, 9, :o5, 2042632800 - tz.transition 2035, 3, :o4, 2058962400 - tz.transition 2035, 9, :o5, 2074687200 - tz.transition 2036, 4, :o4, 2091016800 - tz.transition 2036, 9, :o5, 2106136800 - tz.transition 2037, 4, :o4, 2122466400 - tz.transition 2037, 9, :o5, 2137586400 - tz.transition 2038, 4, :o4, 29586205, 12 - tz.transition 2038, 9, :o5, 29588305, 12 - tz.transition 2039, 4, :o4, 29590573, 12 - tz.transition 2039, 9, :o5, 29592673, 12 - tz.transition 2040, 3, :o4, 29594941, 12 - tz.transition 2040, 9, :o5, 29597125, 12 - tz.transition 2041, 4, :o4, 29599393, 12 - tz.transition 2041, 9, :o5, 29601493, 12 - tz.transition 2042, 4, :o4, 29603761, 12 - tz.transition 2042, 9, :o5, 29605861, 12 - tz.transition 2043, 4, :o4, 29608129, 12 - tz.transition 2043, 9, :o5, 29610229, 12 - tz.transition 2044, 4, :o4, 29612497, 12 - tz.transition 2044, 9, :o5, 29614597, 12 - tz.transition 2045, 4, :o4, 29616865, 12 - tz.transition 2045, 9, :o5, 29618965, 12 - tz.transition 2046, 3, :o4, 29621233, 12 - tz.transition 2046, 9, :o5, 29623417, 12 - tz.transition 2047, 4, :o4, 29625685, 12 - tz.transition 2047, 9, :o5, 29627785, 12 - tz.transition 2048, 4, :o4, 29630053, 12 - tz.transition 2048, 9, :o5, 29632153, 12 - tz.transition 2049, 4, :o4, 29634421, 12 - tz.transition 2049, 9, :o5, 29636521, 12 - tz.transition 2050, 4, :o4, 29638789, 12 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Fiji.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Fiji.rb deleted file mode 100644 index f0255658f8..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Fiji.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Fiji - include TimezoneDefinition - - timezone 'Pacific/Fiji' do |tz| - tz.offset :o0, 42820, 0, :LMT - tz.offset :o1, 43200, 0, :FJT - tz.offset :o2, 43200, 3600, :FJST - - tz.transition 1915, 10, :o1, 10457838739, 4320 - tz.transition 1998, 10, :o2, 909842400 - tz.transition 1999, 2, :o1, 920124000 - tz.transition 1999, 11, :o2, 941896800 - tz.transition 2000, 2, :o1, 951573600 - tz.transition 2009, 11, :o2, 1259416800 - tz.transition 2010, 4, :o1, 1272117600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Guam.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Guam.rb deleted file mode 100644 index d4c1a0a682..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Guam.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Guam - include TimezoneDefinition - - timezone 'Pacific/Guam' do |tz| - tz.offset :o0, -51660, 0, :LMT - tz.offset :o1, 34740, 0, :LMT - tz.offset :o2, 36000, 0, :GST - tz.offset :o3, 36000, 0, :ChST - - tz.transition 1844, 12, :o1, 1149567407, 480 - tz.transition 1900, 12, :o2, 1159384847, 480 - tz.transition 2000, 12, :o3, 977493600 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Honolulu.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Honolulu.rb deleted file mode 100644 index 204b226537..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Honolulu.rb +++ /dev/null @@ -1,28 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Honolulu - include TimezoneDefinition - - timezone 'Pacific/Honolulu' do |tz| - tz.offset :o0, -37886, 0, :LMT - tz.offset :o1, -37800, 0, :HST - tz.offset :o2, -37800, 3600, :HDT - tz.offset :o3, -37800, 3600, :HWT - tz.offset :o4, -37800, 3600, :HPT - tz.offset :o5, -36000, 0, :HST - - tz.transition 1900, 1, :o1, 104328926143, 43200 - tz.transition 1933, 4, :o2, 116505265, 48 - tz.transition 1933, 5, :o1, 116506271, 48 - tz.transition 1942, 2, :o3, 116659201, 48 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 116722991, 48 - tz.transition 1947, 6, :o5, 116752561, 48 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Majuro.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Majuro.rb deleted file mode 100644 index 32adad92c1..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Majuro.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Majuro - include TimezoneDefinition - - timezone 'Pacific/Majuro' do |tz| - tz.offset :o0, 41088, 0, :LMT - tz.offset :o1, 39600, 0, :MHT - tz.offset :o2, 43200, 0, :MHT - - tz.transition 1900, 12, :o1, 1086923261, 450 - tz.transition 1969, 9, :o2, 58571881, 24 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Midway.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Midway.rb deleted file mode 100644 index 97784fcc10..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Midway.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Midway - include TimezoneDefinition - - timezone 'Pacific/Midway' do |tz| - tz.offset :o0, -42568, 0, :LMT - tz.offset :o1, -39600, 0, :NST - tz.offset :o2, -39600, 3600, :NDT - tz.offset :o3, -39600, 0, :BST - tz.offset :o4, -39600, 0, :SST - - tz.transition 1901, 1, :o1, 26086168721, 10800 - tz.transition 1956, 6, :o2, 58455071, 24 - tz.transition 1956, 9, :o1, 29228627, 12 - tz.transition 1967, 4, :o3, 58549967, 24 - tz.transition 1983, 11, :o4, 439038000 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Noumea.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Noumea.rb deleted file mode 100644 index 70173db8ab..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Noumea.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Noumea - include TimezoneDefinition - - timezone 'Pacific/Noumea' do |tz| - tz.offset :o0, 39948, 0, :LMT - tz.offset :o1, 39600, 0, :NCT - tz.offset :o2, 39600, 3600, :NCST - - tz.transition 1912, 1, :o1, 17419781071, 7200 - tz.transition 1977, 12, :o2, 250002000 - tz.transition 1978, 2, :o1, 257342400 - tz.transition 1978, 12, :o2, 281451600 - tz.transition 1979, 2, :o1, 288878400 - tz.transition 1996, 11, :o2, 849366000 - tz.transition 1997, 3, :o1, 857228400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Pago_Pago.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Pago_Pago.rb deleted file mode 100644 index c8fcd7d527..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Pago_Pago.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Pago_Pago - include TimezoneDefinition - - timezone 'Pacific/Pago_Pago' do |tz| - tz.offset :o0, 45432, 0, :LMT - tz.offset :o1, -40968, 0, :LMT - tz.offset :o2, -41400, 0, :SAMT - tz.offset :o3, -39600, 0, :NST - tz.offset :o4, -39600, 0, :BST - tz.offset :o5, -39600, 0, :SST - - tz.transition 1879, 7, :o1, 2889041969, 1200 - tz.transition 1911, 1, :o2, 2902845569, 1200 - tz.transition 1950, 1, :o3, 116797583, 48 - tz.transition 1967, 4, :o4, 58549967, 24 - tz.transition 1983, 11, :o5, 439038000 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Port_Moresby.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Port_Moresby.rb deleted file mode 100644 index f06cf6d54f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Port_Moresby.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Port_Moresby - include TimezoneDefinition - - timezone 'Pacific/Port_Moresby' do |tz| - tz.offset :o0, 35320, 0, :LMT - tz.offset :o1, 35312, 0, :PMMT - tz.offset :o2, 36000, 0, :PGT - - tz.transition 1879, 12, :o1, 5200664597, 2160 - tz.transition 1894, 12, :o2, 13031248093, 5400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Tongatapu.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Tongatapu.rb deleted file mode 100644 index 7578d92f38..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/definitions/Pacific/Tongatapu.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Tongatapu - include TimezoneDefinition - - timezone 'Pacific/Tongatapu' do |tz| - tz.offset :o0, 44360, 0, :LMT - tz.offset :o1, 44400, 0, :TOT - tz.offset :o2, 46800, 0, :TOT - tz.offset :o3, 46800, 3600, :TOST - - tz.transition 1900, 12, :o1, 5217231571, 2160 - tz.transition 1940, 12, :o2, 174959639, 72 - tz.transition 1999, 10, :o3, 939214800 - tz.transition 2000, 3, :o2, 953384400 - tz.transition 2000, 11, :o3, 973342800 - tz.transition 2001, 1, :o2, 980596800 - tz.transition 2001, 11, :o3, 1004792400 - tz.transition 2002, 1, :o2, 1012046400 - end - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/info_timezone.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/info_timezone.rb deleted file mode 100644 index 001303c594..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/info_timezone.rb +++ /dev/null @@ -1,52 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/timezone' - -module TZInfo - - # A Timezone based on a TimezoneInfo. - class InfoTimezone < Timezone #:nodoc: - - # Constructs a new InfoTimezone with a TimezoneInfo instance. - def self.new(info) - tz = super() - tz.send(:setup, info) - tz - end - - # The identifier of the timezone, e.g. "Europe/Paris". - def identifier - @info.identifier - end - - protected - # The TimezoneInfo for this Timezone. - def info - @info - end - - def setup(info) - @info = info - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone.rb deleted file mode 100644 index f8ec4fca87..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone.rb +++ /dev/null @@ -1,51 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/info_timezone' - -module TZInfo - - class LinkedTimezone < InfoTimezone #:nodoc: - # Returns the TimezonePeriod for the given UTC time. utc can either be - # a DateTime, Time or integer timestamp (Time.to_i). Any timezone - # information in utc is ignored (it is treated as a UTC time). - # - # If no TimezonePeriod could be found, PeriodNotFound is raised. - def period_for_utc(utc) - @linked_timezone.period_for_utc(utc) - end - - # Returns the set of TimezonePeriod instances that are valid for the given - # local time as an array. If you just want a single period, use - # period_for_local instead and specify how abiguities should be resolved. - # Raises PeriodNotFound if no periods are found for the given time. - def periods_for_local(local) - @linked_timezone.periods_for_local(local) - end - - protected - def setup(info) - super(info) - @linked_timezone = Timezone.get(info.link_to_identifier) - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone_info.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone_info.rb deleted file mode 100644 index 8197ff3e81..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/linked_timezone_info.rb +++ /dev/null @@ -1,44 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/timezone_info' - -module TZInfo - # Represents a linked timezone defined in a data module. - class LinkedTimezoneInfo < TimezoneInfo #:nodoc: - - # The zone that provides the data (that this zone is an alias for). - attr_reader :link_to_identifier - - # Constructs a new TimezoneInfo with an identifier and the identifier - # of the zone linked to. - def initialize(identifier, link_to_identifier) - super(identifier) - @link_to_identifier = link_to_identifier - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #@identifier,#@link_to_identifier>" - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/offset_rationals.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/offset_rationals.rb deleted file mode 100644 index b1f10b2b63..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/offset_rationals.rb +++ /dev/null @@ -1,98 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'rational' -require 'tzinfo/ruby_core_support' - -module TZInfo - - # Provides a method for getting Rationals for a timezone offset in seconds. - # Pre-reduced rationals are returned for all the half-hour intervals between - # -14 and +14 hours to avoid having to call gcd at runtime. - module OffsetRationals #:nodoc: - @@rational_cache = { - -50400 => RubyCoreSupport.rational_new!(-7,12), - -48600 => RubyCoreSupport.rational_new!(-9,16), - -46800 => RubyCoreSupport.rational_new!(-13,24), - -45000 => RubyCoreSupport.rational_new!(-25,48), - -43200 => RubyCoreSupport.rational_new!(-1,2), - -41400 => RubyCoreSupport.rational_new!(-23,48), - -39600 => RubyCoreSupport.rational_new!(-11,24), - -37800 => RubyCoreSupport.rational_new!(-7,16), - -36000 => RubyCoreSupport.rational_new!(-5,12), - -34200 => RubyCoreSupport.rational_new!(-19,48), - -32400 => RubyCoreSupport.rational_new!(-3,8), - -30600 => RubyCoreSupport.rational_new!(-17,48), - -28800 => RubyCoreSupport.rational_new!(-1,3), - -27000 => RubyCoreSupport.rational_new!(-5,16), - -25200 => RubyCoreSupport.rational_new!(-7,24), - -23400 => RubyCoreSupport.rational_new!(-13,48), - -21600 => RubyCoreSupport.rational_new!(-1,4), - -19800 => RubyCoreSupport.rational_new!(-11,48), - -18000 => RubyCoreSupport.rational_new!(-5,24), - -16200 => RubyCoreSupport.rational_new!(-3,16), - -14400 => RubyCoreSupport.rational_new!(-1,6), - -12600 => RubyCoreSupport.rational_new!(-7,48), - -10800 => RubyCoreSupport.rational_new!(-1,8), - -9000 => RubyCoreSupport.rational_new!(-5,48), - -7200 => RubyCoreSupport.rational_new!(-1,12), - -5400 => RubyCoreSupport.rational_new!(-1,16), - -3600 => RubyCoreSupport.rational_new!(-1,24), - -1800 => RubyCoreSupport.rational_new!(-1,48), - 0 => RubyCoreSupport.rational_new!(0,1), - 1800 => RubyCoreSupport.rational_new!(1,48), - 3600 => RubyCoreSupport.rational_new!(1,24), - 5400 => RubyCoreSupport.rational_new!(1,16), - 7200 => RubyCoreSupport.rational_new!(1,12), - 9000 => RubyCoreSupport.rational_new!(5,48), - 10800 => RubyCoreSupport.rational_new!(1,8), - 12600 => RubyCoreSupport.rational_new!(7,48), - 14400 => RubyCoreSupport.rational_new!(1,6), - 16200 => RubyCoreSupport.rational_new!(3,16), - 18000 => RubyCoreSupport.rational_new!(5,24), - 19800 => RubyCoreSupport.rational_new!(11,48), - 21600 => RubyCoreSupport.rational_new!(1,4), - 23400 => RubyCoreSupport.rational_new!(13,48), - 25200 => RubyCoreSupport.rational_new!(7,24), - 27000 => RubyCoreSupport.rational_new!(5,16), - 28800 => RubyCoreSupport.rational_new!(1,3), - 30600 => RubyCoreSupport.rational_new!(17,48), - 32400 => RubyCoreSupport.rational_new!(3,8), - 34200 => RubyCoreSupport.rational_new!(19,48), - 36000 => RubyCoreSupport.rational_new!(5,12), - 37800 => RubyCoreSupport.rational_new!(7,16), - 39600 => RubyCoreSupport.rational_new!(11,24), - 41400 => RubyCoreSupport.rational_new!(23,48), - 43200 => RubyCoreSupport.rational_new!(1,2), - 45000 => RubyCoreSupport.rational_new!(25,48), - 46800 => RubyCoreSupport.rational_new!(13,24), - 48600 => RubyCoreSupport.rational_new!(9,16), - 50400 => RubyCoreSupport.rational_new!(7,12)} - - # Returns a Rational expressing the fraction of a day that offset in - # seconds represents (i.e. equivalent to Rational(offset, 86400)). - def rational_for_offset(offset) - @@rational_cache[offset] || Rational(offset, 86400) - end - module_function :rational_for_offset - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/ruby_core_support.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/ruby_core_support.rb deleted file mode 100644 index 9a0441206b..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/ruby_core_support.rb +++ /dev/null @@ -1,56 +0,0 @@ -#-- -# Copyright (c) 2008 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'date' -require 'rational' - -module TZInfo - - # Methods to support different versions of Ruby. - module RubyCoreSupport #:nodoc: - - # Use Rational.new! for performance reasons in Ruby 1.8. - # This has been removed from 1.9, but Rational performs better. - if Rational.respond_to? :new! - def self.rational_new!(numerator, denominator = 1) - Rational.new!(numerator, denominator) - end - else - def self.rational_new!(numerator, denominator = 1) - Rational(numerator, denominator) - end - end - - # Ruby 1.8.6 introduced new! and deprecated new0. - # Ruby 1.9.0 removed new0. - # We still need to support new0 for older versions of Ruby. - if DateTime.respond_to? :new! - def self.datetime_new!(ajd = 0, of = 0, sg = Date::ITALY) - DateTime.new!(ajd, of, sg) - end - else - def self.datetime_new!(ajd = 0, of = 0, sg = Date::ITALY) - DateTime.new0(ajd, of, sg) - end - end - end -end \ No newline at end of file diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/time_or_datetime.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/time_or_datetime.rb deleted file mode 100644 index 264517f3ee..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/time_or_datetime.rb +++ /dev/null @@ -1,292 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'date' -require 'time' -require 'tzinfo/offset_rationals' - -module TZInfo - # Used by TZInfo internally to represent either a Time, DateTime or integer - # timestamp (seconds since 1970-01-01 00:00:00). - class TimeOrDateTime #:nodoc: - include Comparable - - # Constructs a new TimeOrDateTime. timeOrDateTime can be a Time, DateTime - # or an integer. If using a Time or DateTime, any time zone information is - # ignored. - def initialize(timeOrDateTime) - @time = nil - @datetime = nil - @timestamp = nil - - if timeOrDateTime.is_a?(Time) - @time = timeOrDateTime - @time = Time.utc(@time.year, @time.mon, @time.mday, @time.hour, @time.min, @time.sec) unless @time.zone == 'UTC' - @orig = @time - elsif timeOrDateTime.is_a?(DateTime) - @datetime = timeOrDateTime - @datetime = @datetime.new_offset(0) unless @datetime.offset == 0 - @orig = @datetime - else - @timestamp = timeOrDateTime.to_i - @orig = @timestamp - end - end - - # Returns the time as a Time. - def to_time - unless @time - if @timestamp - @time = Time.at(@timestamp).utc - else - @time = Time.utc(year, mon, mday, hour, min, sec) - end - end - - @time - end - - # Returns the time as a DateTime. - def to_datetime - unless @datetime - @datetime = DateTime.new(year, mon, mday, hour, min, sec) - end - - @datetime - end - - # Returns the time as an integer timestamp. - def to_i - unless @timestamp - @timestamp = to_time.to_i - end - - @timestamp - end - - # Returns the time as the original time passed to new. - def to_orig - @orig - end - - # Returns a string representation of the TimeOrDateTime. - def to_s - if @orig.is_a?(Time) - "Time: #{@orig.to_s}" - elsif @orig.is_a?(DateTime) - "DateTime: #{@orig.to_s}" - else - "Timestamp: #{@orig.to_s}" - end - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #{@orig.inspect}>" - end - - # Returns the year. - def year - if @time - @time.year - elsif @datetime - @datetime.year - else - to_time.year - end - end - - # Returns the month of the year (1..12). - def mon - if @time - @time.mon - elsif @datetime - @datetime.mon - else - to_time.mon - end - end - alias :month :mon - - # Returns the day of the month (1..n). - def mday - if @time - @time.mday - elsif @datetime - @datetime.mday - else - to_time.mday - end - end - alias :day :mday - - # Returns the hour of the day (0..23). - def hour - if @time - @time.hour - elsif @datetime - @datetime.hour - else - to_time.hour - end - end - - # Returns the minute of the hour (0..59). - def min - if @time - @time.min - elsif @datetime - @datetime.min - else - to_time.min - end - end - - # Returns the second of the minute (0..60). (60 for a leap second). - def sec - if @time - @time.sec - elsif @datetime - @datetime.sec - else - to_time.sec - end - end - - # Compares this TimeOrDateTime with another Time, DateTime, integer - # timestamp or TimeOrDateTime. Returns -1, 0 or +1 depending whether the - # receiver is less than, equal to, or greater than timeOrDateTime. - # - # Milliseconds and smaller units are ignored in the comparison. - def <=>(timeOrDateTime) - if timeOrDateTime.is_a?(TimeOrDateTime) - orig = timeOrDateTime.to_orig - - if @orig.is_a?(DateTime) || orig.is_a?(DateTime) - # If either is a DateTime, assume it is there for a reason - # (i.e. for range). - to_datetime <=> timeOrDateTime.to_datetime - elsif orig.is_a?(Time) - to_time <=> timeOrDateTime.to_time - else - to_i <=> timeOrDateTime.to_i - end - elsif @orig.is_a?(DateTime) || timeOrDateTime.is_a?(DateTime) - # If either is a DateTime, assume it is there for a reason - # (i.e. for range). - to_datetime <=> TimeOrDateTime.wrap(timeOrDateTime).to_datetime - elsif timeOrDateTime.is_a?(Time) - to_time <=> timeOrDateTime - else - to_i <=> timeOrDateTime.to_i - end - end - - # Adds a number of seconds to the TimeOrDateTime. Returns a new - # TimeOrDateTime, preserving what the original constructed type was. - # If the original type is a Time and the resulting calculation goes out of - # range for Times, then an exception will be raised by the Time class. - def +(seconds) - if seconds == 0 - self - else - if @orig.is_a?(DateTime) - TimeOrDateTime.new(@orig + OffsetRationals.rational_for_offset(seconds)) - else - # + defined for Time and integer timestamps - TimeOrDateTime.new(@orig + seconds) - end - end - end - - # Subtracts a number of seconds from the TimeOrDateTime. Returns a new - # TimeOrDateTime, preserving what the original constructed type was. - # If the original type is a Time and the resulting calculation goes out of - # range for Times, then an exception will be raised by the Time class. - def -(seconds) - self + (-seconds) - end - - # Similar to the + operator, but for cases where adding would cause a - # timestamp or time to go out of the allowed range, converts to a DateTime - # based TimeOrDateTime. - def add_with_convert(seconds) - if seconds == 0 - self - else - if @orig.is_a?(DateTime) - TimeOrDateTime.new(@orig + OffsetRationals.rational_for_offset(seconds)) - else - # A Time or timestamp. - result = to_i + seconds - - if result < 0 || result > 2147483647 - result = TimeOrDateTime.new(to_datetime + OffsetRationals.rational_for_offset(seconds)) - else - result = TimeOrDateTime.new(@orig + seconds) - end - end - end - end - - # Returns true if todt represents the same time and was originally - # constructed with the same type (DateTime, Time or timestamp) as this - # TimeOrDateTime. - def eql?(todt) - todt.respond_to?(:to_orig) && to_orig.eql?(todt.to_orig) - end - - # Returns a hash of this TimeOrDateTime. - def hash - @orig.hash - end - - # If no block is given, returns a TimeOrDateTime wrapping the given - # timeOrDateTime. If a block is specified, a TimeOrDateTime is constructed - # and passed to the block. The result of the block must be a TimeOrDateTime. - # to_orig will be called on the result and the result of to_orig will be - # returned. - # - # timeOrDateTime can be a Time, DateTime, integer timestamp or TimeOrDateTime. - # If a TimeOrDateTime is passed in, no new TimeOrDateTime will be constructed, - # the passed in value will be used. - def self.wrap(timeOrDateTime) - t = timeOrDateTime.is_a?(TimeOrDateTime) ? timeOrDateTime : TimeOrDateTime.new(timeOrDateTime) - - if block_given? - t = yield t - - if timeOrDateTime.is_a?(TimeOrDateTime) - t - elsif timeOrDateTime.is_a?(Time) - t.to_time - elsif timeOrDateTime.is_a?(DateTime) - t.to_datetime - else - t.to_i - end - else - t - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone.rb deleted file mode 100644 index ef4ecd8ae1..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone.rb +++ /dev/null @@ -1,508 +0,0 @@ -#-- -# Copyright (c) 2005-2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'date' -# require 'tzinfo/country' -require 'tzinfo/time_or_datetime' -require 'tzinfo/timezone_period' - -module TZInfo - # Indicate a specified time in a local timezone has more than one - # possible time in UTC. This happens when switching from daylight savings time - # to normal time where the clocks are rolled back. Thrown by period_for_local - # and local_to_utc when using an ambiguous time and not specifying any - # means to resolve the ambiguity. - class AmbiguousTime < StandardError - end - - # Thrown to indicate that no TimezonePeriod matching a given time could be found. - class PeriodNotFound < StandardError - end - - # Thrown by Timezone#get if the identifier given is not valid. - class InvalidTimezoneIdentifier < StandardError - end - - # Thrown if an attempt is made to use a timezone created with Timezone.new(nil). - class UnknownTimezone < StandardError - end - - # Timezone is the base class of all timezones. It provides a factory method - # get to access timezones by identifier. Once a specific Timezone has been - # retrieved, DateTimes, Times and timestamps can be converted between the UTC - # and the local time for the zone. For example: - # - # tz = TZInfo::Timezone.get('America/New_York') - # puts tz.utc_to_local(DateTime.new(2005,8,29,15,35,0)).to_s - # puts tz.local_to_utc(Time.utc(2005,8,29,11,35,0)).to_s - # puts tz.utc_to_local(1125315300).to_s - # - # Each time conversion method returns an object of the same type it was - # passed. - # - # The timezone information all comes from the tz database - # (see http://www.twinsun.com/tz/tz-link.htm) - class Timezone - include Comparable - - # Cache of loaded zones by identifier to avoid using require if a zone - # has already been loaded. - @@loaded_zones = {} - - # Whether the timezones index has been loaded yet. - @@index_loaded = false - - # Returns a timezone by its identifier (e.g. "Europe/London", - # "America/Chicago" or "UTC"). - # - # Raises InvalidTimezoneIdentifier if the timezone couldn't be found. - def self.get(identifier) - instance = @@loaded_zones[identifier] - unless instance - raise InvalidTimezoneIdentifier, 'Invalid identifier' if identifier !~ /^[A-z0-9\+\-_]+(\/[A-z0-9\+\-_]+)*$/ - identifier = identifier.gsub(/-/, '__m__').gsub(/\+/, '__p__') - begin - # Use a temporary variable to avoid an rdoc warning - file = "tzinfo/definitions/#{identifier}".untaint - require file - - m = Definitions - identifier.split(/\//).each {|part| - m = m.const_get(part) - } - - info = m.get - - # Could make Timezone subclasses register an interest in an info - # type. Since there are currently only two however, there isn't - # much point. - if info.kind_of?(DataTimezoneInfo) - instance = DataTimezone.new(info) - elsif info.kind_of?(LinkedTimezoneInfo) - instance = LinkedTimezone.new(info) - else - raise InvalidTimezoneIdentifier, "No handler for info type #{info.class}" - end - - @@loaded_zones[instance.identifier] = instance - rescue LoadError, NameError => e - raise InvalidTimezoneIdentifier, e.message - end - end - - instance - end - - # Returns a proxy for the Timezone with the given identifier. The proxy - # will cause the real timezone to be loaded when an attempt is made to - # find a period or convert a time. get_proxy will not validate the - # identifier. If an invalid identifier is specified, no exception will be - # raised until the proxy is used. - def self.get_proxy(identifier) - TimezoneProxy.new(identifier) - end - - # If identifier is nil calls super(), otherwise calls get. An identfier - # should always be passed in when called externally. - def self.new(identifier = nil) - if identifier - get(identifier) - else - super() - end - end - - # Returns an array containing all the available Timezones. - # - # Returns TimezoneProxy objects to avoid the overhead of loading Timezone - # definitions until a conversion is actually required. - def self.all - get_proxies(all_identifiers) - end - - # Returns an array containing the identifiers of all the available - # Timezones. - def self.all_identifiers - load_index - Indexes::Timezones.timezones - end - - # Returns an array containing all the available Timezones that are based - # on data (are not links to other Timezones). - # - # Returns TimezoneProxy objects to avoid the overhead of loading Timezone - # definitions until a conversion is actually required. - def self.all_data_zones - get_proxies(all_data_zone_identifiers) - end - - # Returns an array containing the identifiers of all the available - # Timezones that are based on data (are not links to other Timezones).. - def self.all_data_zone_identifiers - load_index - Indexes::Timezones.data_timezones - end - - # Returns an array containing all the available Timezones that are links - # to other Timezones. - # - # Returns TimezoneProxy objects to avoid the overhead of loading Timezone - # definitions until a conversion is actually required. - def self.all_linked_zones - get_proxies(all_linked_zone_identifiers) - end - - # Returns an array containing the identifiers of all the available - # Timezones that are links to other Timezones. - def self.all_linked_zone_identifiers - load_index - Indexes::Timezones.linked_timezones - end - - # Returns all the Timezones defined for all Countries. This is not the - # complete set of Timezones as some are not country specific (e.g. - # 'Etc/GMT'). - # - # Returns TimezoneProxy objects to avoid the overhead of loading Timezone - # definitions until a conversion is actually required. - def self.all_country_zones - Country.all_codes.inject([]) {|zones,country| - zones += Country.get(country).zones - } - end - - # Returns all the zone identifiers defined for all Countries. This is not the - # complete set of zone identifiers as some are not country specific (e.g. - # 'Etc/GMT'). You can obtain a Timezone instance for a given identifier - # with the get method. - def self.all_country_zone_identifiers - Country.all_codes.inject([]) {|zones,country| - zones += Country.get(country).zone_identifiers - } - end - - # Returns all US Timezone instances. A shortcut for - # TZInfo::Country.get('US').zones. - # - # Returns TimezoneProxy objects to avoid the overhead of loading Timezone - # definitions until a conversion is actually required. - def self.us_zones - Country.get('US').zones - end - - # Returns all US zone identifiers. A shortcut for - # TZInfo::Country.get('US').zone_identifiers. - def self.us_zone_identifiers - Country.get('US').zone_identifiers - end - - # The identifier of the timezone, e.g. "Europe/Paris". - def identifier - raise UnknownTimezone, 'TZInfo::Timezone constructed directly' - end - - # An alias for identifier. - def name - # Don't use alias, as identifier gets overridden. - identifier - end - - # Returns a friendlier version of the identifier. - def to_s - friendly_identifier - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #{identifier}>" - end - - # Returns a friendlier version of the identifier. Set skip_first_part to - # omit the first part of the identifier (typically a region name) where - # there is more than one part. - # - # For example: - # - # Timezone.get('Europe/Paris').friendly_identifier(false) #=> "Europe - Paris" - # Timezone.get('Europe/Paris').friendly_identifier(true) #=> "Paris" - # Timezone.get('America/Indiana/Knox').friendly_identifier(false) #=> "America - Knox, Indiana" - # Timezone.get('America/Indiana/Knox').friendly_identifier(true) #=> "Knox, Indiana" - def friendly_identifier(skip_first_part = false) - parts = identifier.split('/') - if parts.empty? - # shouldn't happen - identifier - elsif parts.length == 1 - parts[0] - else - if skip_first_part - result = '' - else - result = parts[0] + ' - ' - end - - parts[1, parts.length - 1].reverse_each {|part| - part.gsub!(/_/, ' ') - - if part.index(/[a-z]/) - # Missing a space if a lower case followed by an upper case and the - # name isn't McXxxx. - part.gsub!(/([^M][a-z])([A-Z])/, '\1 \2') - part.gsub!(/([M][a-bd-z])([A-Z])/, '\1 \2') - - # Missing an apostrophe if two consecutive upper case characters. - part.gsub!(/([A-Z])([A-Z])/, '\1\'\2') - end - - result << part - result << ', ' - } - - result.slice!(result.length - 2, 2) - result - end - end - - # Returns the TimezonePeriod for the given UTC time. utc can either be - # a DateTime, Time or integer timestamp (Time.to_i). Any timezone - # information in utc is ignored (it is treated as a UTC time). - def period_for_utc(utc) - raise UnknownTimezone, 'TZInfo::Timezone constructed directly' - end - - # Returns the set of TimezonePeriod instances that are valid for the given - # local time as an array. If you just want a single period, use - # period_for_local instead and specify how ambiguities should be resolved. - # Returns an empty array if no periods are found for the given time. - def periods_for_local(local) - raise UnknownTimezone, 'TZInfo::Timezone constructed directly' - end - - # Returns the TimezonePeriod for the given local time. local can either be - # a DateTime, Time or integer timestamp (Time.to_i). Any timezone - # information in local is ignored (it is treated as a time in the current - # timezone). - # - # Warning: There are local times that have no equivalent UTC times (e.g. - # in the transition from standard time to daylight savings time). There are - # also local times that have more than one UTC equivalent (e.g. in the - # transition from daylight savings time to standard time). - # - # In the first case (no equivalent UTC time), a PeriodNotFound exception - # will be raised. - # - # In the second case (more than one equivalent UTC time), an AmbiguousTime - # exception will be raised unless the optional dst parameter or block - # handles the ambiguity. - # - # If the ambiguity is due to a transition from daylight savings time to - # standard time, the dst parameter can be used to select whether the - # daylight savings time or local time is used. For example, - # - # Timezone.get('America/New_York').period_for_local(DateTime.new(2004,10,31,1,30,0)) - # - # would raise an AmbiguousTime exception. - # - # Specifying dst=true would the daylight savings period from April to - # October 2004. Specifying dst=false would return the standard period - # from October 2004 to April 2005. - # - # If the dst parameter does not resolve the ambiguity, and a block is - # specified, it is called. The block must take a single parameter - an - # array of the periods that need to be resolved. The block can select and - # return a single period or return nil or an empty array - # to cause an AmbiguousTime exception to be raised. - def period_for_local(local, dst = nil) - results = periods_for_local(local) - - if results.empty? - raise PeriodNotFound - elsif results.size < 2 - results.first - else - # ambiguous result try to resolve - - if !dst.nil? - matches = results.find_all {|period| period.dst? == dst} - results = matches if !matches.empty? - end - - if results.size < 2 - results.first - else - # still ambiguous, try the block - - if block_given? - results = yield results - end - - if results.is_a?(TimezonePeriod) - results - elsif results && results.size == 1 - results.first - else - raise AmbiguousTime, "#{local} is an ambiguous local time." - end - end - end - end - - # Converts a time in UTC to the local timezone. utc can either be - # a DateTime, Time or timestamp (Time.to_i). The returned time has the same - # type as utc. Any timezone information in utc is ignored (it is treated as - # a UTC time). - def utc_to_local(utc) - TimeOrDateTime.wrap(utc) {|wrapped| - period_for_utc(wrapped).to_local(wrapped) - } - end - - # Converts a time in the local timezone to UTC. local can either be - # a DateTime, Time or timestamp (Time.to_i). The returned time has the same - # type as local. Any timezone information in local is ignored (it is treated - # as a local time). - # - # Warning: There are local times that have no equivalent UTC times (e.g. - # in the transition from standard time to daylight savings time). There are - # also local times that have more than one UTC equivalent (e.g. in the - # transition from daylight savings time to standard time). - # - # In the first case (no equivalent UTC time), a PeriodNotFound exception - # will be raised. - # - # In the second case (more than one equivalent UTC time), an AmbiguousTime - # exception will be raised unless the optional dst parameter or block - # handles the ambiguity. - # - # If the ambiguity is due to a transition from daylight savings time to - # standard time, the dst parameter can be used to select whether the - # daylight savings time or local time is used. For example, - # - # Timezone.get('America/New_York').local_to_utc(DateTime.new(2004,10,31,1,30,0)) - # - # would raise an AmbiguousTime exception. - # - # Specifying dst=true would return 2004-10-31 5:30:00. Specifying dst=false - # would return 2004-10-31 6:30:00. - # - # If the dst parameter does not resolve the ambiguity, and a block is - # specified, it is called. The block must take a single parameter - an - # array of the periods that need to be resolved. The block can return a - # single period to use to convert the time or return nil or an empty array - # to cause an AmbiguousTime exception to be raised. - def local_to_utc(local, dst = nil) - TimeOrDateTime.wrap(local) {|wrapped| - if block_given? - period = period_for_local(wrapped, dst) {|periods| yield periods } - else - period = period_for_local(wrapped, dst) - end - - period.to_utc(wrapped) - } - end - - # Returns the current time in the timezone as a Time. - def now - utc_to_local(Time.now.utc) - end - - # Returns the TimezonePeriod for the current time. - def current_period - period_for_utc(Time.now.utc) - end - - # Returns the current Time and TimezonePeriod as an array. The first element - # is the time, the second element is the period. - def current_period_and_time - utc = Time.now.utc - period = period_for_utc(utc) - [period.to_local(utc), period] - end - - alias :current_time_and_period :current_period_and_time - - # Converts a time in UTC to local time and returns it as a string - # according to the given format. The formatting is identical to - # Time.strftime and DateTime.strftime, except %Z is replaced with the - # timezone abbreviation for the specified time (for example, EST or EDT). - def strftime(format, utc = Time.now.utc) - period = period_for_utc(utc) - local = period.to_local(utc) - local = Time.at(local).utc unless local.kind_of?(Time) || local.kind_of?(DateTime) - abbreviation = period.abbreviation.to_s.gsub(/%/, '%%') - - format = format.gsub(/(.?)%Z/) do - if $1 == '%' - # return %%Z so the real strftime treats it as a literal %Z too - '%%Z' - else - "#$1#{abbreviation}" - end - end - - local.strftime(format) - end - - # Compares two Timezones based on their identifier. Returns -1 if tz is less - # than self, 0 if tz is equal to self and +1 if tz is greater than self. - def <=>(tz) - identifier <=> tz.identifier - end - - # Returns true if and only if the identifier of tz is equal to the - # identifier of this Timezone. - def eql?(tz) - self == tz - end - - # Returns a hash of this Timezone. - def hash - identifier.hash - end - - # Dumps this Timezone for marshalling. - def _dump(limit) - identifier - end - - # Loads a marshalled Timezone. - def self._load(data) - Timezone.get(data) - end - - private - # Loads in the index of timezones if it hasn't already been loaded. - def self.load_index - unless @@index_loaded - require 'tzinfo/indexes/timezones' - @@index_loaded = true - end - end - - # Returns an array of proxies corresponding to the given array of - # identifiers. - def self.get_proxies(identifiers) - identifiers.collect {|identifier| get_proxy(identifier)} - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_definition.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_definition.rb deleted file mode 100644 index 39ca8bfa53..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_definition.rb +++ /dev/null @@ -1,56 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/data_timezone_info' -require 'tzinfo/linked_timezone_info' - -module TZInfo - - # TimezoneDefinition is included into Timezone definition modules. - # TimezoneDefinition provides the methods for defining timezones. - module TimezoneDefinition #:nodoc: - # Add class methods to the includee. - def self.append_features(base) - super - base.extend(ClassMethods) - end - - # Class methods for inclusion. - module ClassMethods #:nodoc: - # Returns and yields a DataTimezoneInfo object to define a timezone. - def timezone(identifier) - yield @timezone = DataTimezoneInfo.new(identifier) - end - - # Defines a linked timezone. - def linked_timezone(identifier, link_to_identifier) - @timezone = LinkedTimezoneInfo.new(identifier, link_to_identifier) - end - - # Returns the last TimezoneInfo to be defined with timezone or - # linked_timezone. - def get - @timezone - end - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_info.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_info.rb deleted file mode 100644 index 68e38c35fb..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_info.rb +++ /dev/null @@ -1,40 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -module TZInfo - # Represents a timezone defined in a data module. - class TimezoneInfo #:nodoc: - - # The timezone identifier. - attr_reader :identifier - - # Constructs a new TimezoneInfo with an identifier. - def initialize(identifier) - @identifier = identifier - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #@identifier>" - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_offset_info.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_offset_info.rb deleted file mode 100644 index 6a0bbca46f..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_offset_info.rb +++ /dev/null @@ -1,94 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -module TZInfo - # Represents an offset defined in a Timezone data file. - class TimezoneOffsetInfo #:nodoc: - # The base offset of the timezone from UTC in seconds. - attr_reader :utc_offset - - # The offset from standard time for the zone in seconds (i.e. non-zero if - # daylight savings is being observed). - attr_reader :std_offset - - # The total offset of this observance from UTC in seconds - # (utc_offset + std_offset). - attr_reader :utc_total_offset - - # The abbreviation that identifies this observance, e.g. "GMT" - # (Greenwich Mean Time) or "BST" (British Summer Time) for "Europe/London". The returned identifier is a - # symbol. - attr_reader :abbreviation - - # Constructs a new TimezoneOffsetInfo. utc_offset and std_offset are - # specified in seconds. - def initialize(utc_offset, std_offset, abbreviation) - @utc_offset = utc_offset - @std_offset = std_offset - @abbreviation = abbreviation - - @utc_total_offset = @utc_offset + @std_offset - end - - # True if std_offset is non-zero. - def dst? - @std_offset != 0 - end - - # Converts a UTC DateTime to local time based on the offset of this period. - def to_local(utc) - TimeOrDateTime.wrap(utc) {|wrapped| - wrapped + @utc_total_offset - } - end - - # Converts a local DateTime to UTC based on the offset of this period. - def to_utc(local) - TimeOrDateTime.wrap(local) {|wrapped| - wrapped - @utc_total_offset - } - end - - # Returns true if and only if toi has the same utc_offset, std_offset - # and abbreviation as this TimezoneOffsetInfo. - def ==(toi) - toi.respond_to?(:utc_offset) && toi.respond_to?(:std_offset) && toi.respond_to?(:abbreviation) && - utc_offset == toi.utc_offset && std_offset == toi.std_offset && abbreviation == toi.abbreviation - end - - # Returns true if and only if toi has the same utc_offset, std_offset - # and abbreviation as this TimezoneOffsetInfo. - def eql?(toi) - self == toi - end - - # Returns a hash of this TimezoneOffsetInfo. - def hash - utc_offset.hash ^ std_offset.hash ^ abbreviation.hash - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #@utc_offset,#@std_offset,#@abbreviation>" - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_period.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_period.rb deleted file mode 100644 index 00888fcfdc..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_period.rb +++ /dev/null @@ -1,198 +0,0 @@ -#-- -# Copyright (c) 2005-2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/offset_rationals' -require 'tzinfo/time_or_datetime' - -module TZInfo - # A period of time in a timezone where the same offset from UTC applies. - # - # All the methods that take times accept instances of Time, DateTime or - # integer timestamps. - class TimezonePeriod - # The TimezoneTransitionInfo that defines the start of this TimezonePeriod - # (may be nil if unbounded). - attr_reader :start_transition - - # The TimezoneTransitionInfo that defines the end of this TimezonePeriod - # (may be nil if unbounded). - attr_reader :end_transition - - # The TimezoneOffsetInfo for this period. - attr_reader :offset - - # Initializes a new TimezonePeriod. - def initialize(start_transition, end_transition, offset = nil) - @start_transition = start_transition - @end_transition = end_transition - - if offset - raise ArgumentError, 'Offset specified with transitions' if @start_transition || @end_transition - @offset = offset - else - if @start_transition - @offset = @start_transition.offset - elsif @end_transition - @offset = @end_transition.previous_offset - else - raise ArgumentError, 'No offset specified and no transitions to determine it from' - end - end - - @utc_total_offset_rational = nil - end - - # Base offset of the timezone from UTC (seconds). - def utc_offset - @offset.utc_offset - end - - # Offset from the local time where daylight savings is in effect (seconds). - # E.g.: utc_offset could be -5 hours. Normally, std_offset would be 0. - # During daylight savings, std_offset would typically become +1 hours. - def std_offset - @offset.std_offset - end - - # The identifier of this period, e.g. "GMT" (Greenwich Mean Time) or "BST" - # (British Summer Time) for "Europe/London". The returned identifier is a - # symbol. - def abbreviation - @offset.abbreviation - end - alias :zone_identifier :abbreviation - - # Total offset from UTC (seconds). Equal to utc_offset + std_offset. - def utc_total_offset - @offset.utc_total_offset - end - - # Total offset from UTC (days). Result is a Rational. - def utc_total_offset_rational - unless @utc_total_offset_rational - @utc_total_offset_rational = OffsetRationals.rational_for_offset(utc_total_offset) - end - @utc_total_offset_rational - end - - # The start time of the period in UTC as a DateTime. May be nil if unbounded. - def utc_start - @start_transition ? @start_transition.at.to_datetime : nil - end - - # The end time of the period in UTC as a DateTime. May be nil if unbounded. - def utc_end - @end_transition ? @end_transition.at.to_datetime : nil - end - - # The start time of the period in local time as a DateTime. May be nil if - # unbounded. - def local_start - @start_transition ? @start_transition.local_start.to_datetime : nil - end - - # The end time of the period in local time as a DateTime. May be nil if - # unbounded. - def local_end - @end_transition ? @end_transition.local_end.to_datetime : nil - end - - # true if daylight savings is in effect for this period; otherwise false. - def dst? - @offset.dst? - end - - # true if this period is valid for the given UTC DateTime; otherwise false. - def valid_for_utc?(utc) - utc_after_start?(utc) && utc_before_end?(utc) - end - - # true if the given UTC DateTime is after the start of the period - # (inclusive); otherwise false. - def utc_after_start?(utc) - !@start_transition || @start_transition.at <= utc - end - - # true if the given UTC DateTime is before the end of the period - # (exclusive); otherwise false. - def utc_before_end?(utc) - !@end_transition || @end_transition.at > utc - end - - # true if this period is valid for the given local DateTime; otherwise false. - def valid_for_local?(local) - local_after_start?(local) && local_before_end?(local) - end - - # true if the given local DateTime is after the start of the period - # (inclusive); otherwise false. - def local_after_start?(local) - !@start_transition || @start_transition.local_start <= local - end - - # true if the given local DateTime is before the end of the period - # (exclusive); otherwise false. - def local_before_end?(local) - !@end_transition || @end_transition.local_end > local - end - - # Converts a UTC DateTime to local time based on the offset of this period. - def to_local(utc) - @offset.to_local(utc) - end - - # Converts a local DateTime to UTC based on the offset of this period. - def to_utc(local) - @offset.to_utc(local) - end - - # Returns true if this TimezonePeriod is equal to p. This compares the - # start_transition, end_transition and offset using ==. - def ==(p) - p.respond_to?(:start_transition) && p.respond_to?(:end_transition) && - p.respond_to?(:offset) && start_transition == p.start_transition && - end_transition == p.end_transition && offset == p.offset - end - - # Returns true if this TimezonePeriods is equal to p. This compares the - # start_transition, end_transition and offset using eql? - def eql?(p) - p.respond_to?(:start_transition) && p.respond_to?(:end_transition) && - p.respond_to?(:offset) && start_transition.eql?(p.start_transition) && - end_transition.eql?(p.end_transition) && offset.eql?(p.offset) - end - - # Returns a hash of this TimezonePeriod. - def hash - result = @start_transition.hash ^ @end_transition.hash - result ^= @offset.hash unless @start_transition || @end_transition - result - end - - # Returns internal object state as a programmer-readable string. - def inspect - result = "#<#{self.class}: #{@start_transition.inspect},#{@end_transition.inspect}" - result << ",#{@offset.inspect}>" unless @start_transition || @end_transition - result + '>' - end - end -end diff --git a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_transition_info.rb b/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_transition_info.rb deleted file mode 100644 index 6b0669cc4a..0000000000 --- a/activesupport/lib/active_support/vendor/tzinfo-0.3.16/lib/tzinfo/timezone_transition_info.rb +++ /dev/null @@ -1,129 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'date' -require 'tzinfo/time_or_datetime' - -module TZInfo - # Represents an offset defined in a Timezone data file. - class TimezoneTransitionInfo #:nodoc: - # The offset this transition changes to (a TimezoneOffsetInfo instance). - attr_reader :offset - - # The offset this transition changes from (a TimezoneOffsetInfo instance). - attr_reader :previous_offset - - # The numerator of the DateTime if the transition time is defined as a - # DateTime, otherwise the transition time as a timestamp. - attr_reader :numerator_or_time - protected :numerator_or_time - - # Either the denominotor of the DateTime if the transition time is defined - # as a DateTime, otherwise nil. - attr_reader :denominator - protected :denominator - - # Creates a new TimezoneTransitionInfo with the given offset, - # previous_offset (both TimezoneOffsetInfo instances) and UTC time. - # if denominator is nil, numerator_or_time is treated as a number of - # seconds since the epoch. If denominator is specified numerator_or_time - # and denominator are used to create a DateTime as follows: - # - # DateTime.new!(Rational.send(:new!, numerator_or_time, denominator), 0, Date::ITALY) - # - # For performance reasons, the numerator and denominator must be specified - # in their lowest form. - def initialize(offset, previous_offset, numerator_or_time, denominator = nil) - @offset = offset - @previous_offset = previous_offset - @numerator_or_time = numerator_or_time - @denominator = denominator - - @at = nil - @local_end = nil - @local_start = nil - end - - # A TimeOrDateTime instance representing the UTC time when this transition - # occurs. - def at - unless @at - unless @denominator - @at = TimeOrDateTime.new(@numerator_or_time) - else - r = RubyCoreSupport.rational_new!(@numerator_or_time, @denominator) - dt = RubyCoreSupport.datetime_new!(r, 0, Date::ITALY) - @at = TimeOrDateTime.new(dt) - end - end - - @at - end - - # A TimeOrDateTime instance representing the local time when this transition - # causes the previous observance to end (calculated from at using - # previous_offset). - def local_end - @local_end = at.add_with_convert(@previous_offset.utc_total_offset) unless @local_end - @local_end - end - - # A TimeOrDateTime instance representing the local time when this transition - # causes the next observance to start (calculated from at using offset). - def local_start - @local_start = at.add_with_convert(@offset.utc_total_offset) unless @local_start - @local_start - end - - # Returns true if this TimezoneTransitionInfo is equal to the given - # TimezoneTransitionInfo. Two TimezoneTransitionInfo instances are - # considered to be equal by == if offset, previous_offset and at are all - # equal. - def ==(tti) - tti.respond_to?(:offset) && tti.respond_to?(:previous_offset) && tti.respond_to?(:at) && - offset == tti.offset && previous_offset == tti.previous_offset && at == tti.at - end - - # Returns true if this TimezoneTransitionInfo is equal to the given - # TimezoneTransitionInfo. Two TimezoneTransitionInfo instances are - # considered to be equal by eql? if offset, previous_offset, - # numerator_or_time and denominator are all equal. This is stronger than ==, - # which just requires the at times to be equal regardless of how they were - # originally specified. - def eql?(tti) - tti.respond_to?(:offset) && tti.respond_to?(:previous_offset) && - tti.respond_to?(:numerator_or_time) && tti.respond_to?(:denominator) && - offset == tti.offset && previous_offset == tti.previous_offset && - numerator_or_time == tti.numerator_or_time && denominator == tti.denominator - end - - # Returns a hash of this TimezoneTransitionInfo instance. - def hash - @offset.hash ^ @previous_offset.hash ^ @numerator_or_time.hash ^ @denominator.hash - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #{at.inspect},#{@offset.inspect}>" - end - end -end -- cgit v1.2.3 From f1fe71d754f589710ce6a4deacca0e2dc4b5b8de Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Thu, 28 Jan 2010 11:51:37 +1100 Subject: Unvendor'd Builder. Now requires the Builder gem as a dependency --- activesupport/CHANGELOG | 2 + activesupport/activesupport.gemspec | 1 + .../vendor/builder-2.1.2/lib/blankslate.rb | 113 ------- .../vendor/builder-2.1.2/lib/builder.rb | 13 - .../vendor/builder-2.1.2/lib/builder/blankslate.rb | 20 -- .../vendor/builder-2.1.2/lib/builder/css.rb | 250 ---------------- .../vendor/builder-2.1.2/lib/builder/xchar.rb | 115 -------- .../vendor/builder-2.1.2/lib/builder/xmlbase.rb | 139 --------- .../vendor/builder-2.1.2/lib/builder/xmlevents.rb | 63 ---- .../vendor/builder-2.1.2/lib/builder/xmlmarkup.rb | 328 --------------------- 10 files changed, 3 insertions(+), 1041 deletions(-) delete mode 100644 activesupport/lib/active_support/vendor/builder-2.1.2/lib/blankslate.rb delete mode 100644 activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder.rb delete mode 100644 activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/blankslate.rb delete mode 100644 activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/css.rb delete mode 100644 activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xchar.rb delete mode 100644 activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xmlbase.rb delete mode 100644 activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xmlevents.rb delete mode 100644 activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xmlmarkup.rb diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 3f008ac6f8..2d80f3ce6b 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,5 +1,7 @@ *Edge* +* Unvendor'd Builder. Now requires the Builder gem as a dependency + * Unvendor'd TZInfo. Now requires the TZInfo gem as a dependency * YAML serialization for OrderedHash. #3608 [Gregor Schmidt] diff --git a/activesupport/activesupport.gemspec b/activesupport/activesupport.gemspec index e610456a5e..ada5c5c0fe 100644 --- a/activesupport/activesupport.gemspec +++ b/activesupport/activesupport.gemspec @@ -8,6 +8,7 @@ Gem::Specification.new do |s| s.add_dependency('i18n', '~> 0.3.0') s.add_dependency('tzinfo', '~> 0.3.16') + s.add_dependency('builder', '~> 2.1.2') s.files = Dir['CHANGELOG', 'README', 'lib/**/*'] s.require_path = 'lib' diff --git a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/blankslate.rb b/activesupport/lib/active_support/vendor/builder-2.1.2/lib/blankslate.rb deleted file mode 100644 index da6034d9c4..0000000000 --- a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/blankslate.rb +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/env ruby -#-- -# Copyright 2004, 2006 by Jim Weirich (jim@weirichhouse.org). -# All rights reserved. - -# Permission is granted for use, copying, modification, distribution, -# and distribution of modified versions of this work as long as the -# above copyright notice is included. -#++ - -###################################################################### -# BlankSlate provides an abstract base class with no predefined -# methods (except for \_\_send__ and \_\_id__). -# BlankSlate is useful as a base class when writing classes that -# depend upon method_missing (e.g. dynamic proxies). -# -class BlankSlate - class << self - - # Hide the method named +name+ in the BlankSlate class. Don't - # hide +instance_eval+ or any method beginning with "__". - def hide(name) - if instance_methods.include?(name.to_s) and - name !~ /^(__|instance_eval)/ - @hidden_methods ||= {} - @hidden_methods[name.to_sym] = instance_method(name) - undef_method name - end - end - - def find_hidden_method(name) - @hidden_methods ||= {} - @hidden_methods[name] || superclass.find_hidden_method(name) - end - - # Redefine a previously hidden method so that it may be called on a blank - # slate object. - def reveal(name) - bound_method = nil - unbound_method = find_hidden_method(name) - fail "Don't know how to reveal method '#{name}'" unless unbound_method - define_method(name) do |*args| - bound_method ||= unbound_method.bind(self) - bound_method.call(*args) - end - end - end - - instance_methods.each { |m| hide(m) } -end - -###################################################################### -# Since Ruby is very dynamic, methods added to the ancestors of -# BlankSlate after BlankSlate is defined will show up in the -# list of available BlankSlate methods. We handle this by defining a -# hook in the Object and Kernel classes that will hide any method -# defined after BlankSlate has been loaded. -# -module Kernel - class << self - alias_method :blank_slate_method_added, :method_added - - # Detect method additions to Kernel and remove them in the - # BlankSlate class. - def method_added(name) - result = blank_slate_method_added(name) - return result if self != Kernel - BlankSlate.hide(name) - result - end - end -end - -###################################################################### -# Same as above, except in Object. -# -class Object - class << self - alias_method :blank_slate_method_added, :method_added - - # Detect method additions to Object and remove them in the - # BlankSlate class. - def method_added(name) - result = blank_slate_method_added(name) - return result if self != Object - BlankSlate.hide(name) - result - end - - def find_hidden_method(name) - nil - end - end -end - -###################################################################### -# Also, modules included into Object need to be scanned and have their -# instance methods removed from blank slate. In theory, modules -# included into Kernel would have to be removed as well, but a -# "feature" of Ruby prevents late includes into modules from being -# exposed in the first place. -# -class Module - alias blankslate_original_append_features append_features - def append_features(mod) - result = blankslate_original_append_features(mod) - return result if mod != Object - instance_methods.each do |name| - BlankSlate.hide(name) - end - result - end -end \ No newline at end of file diff --git a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder.rb b/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder.rb deleted file mode 100644 index 9719277669..0000000000 --- a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder.rb +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env ruby - -#-- -# Copyright 2004 by Jim Weirich (jim@weirichhouse.org). -# All rights reserved. - -# Permission is granted for use, copying, modification, distribution, -# and distribution of modified versions of this work as long as the -# above copyright notice is included. -#++ - -require 'builder/xmlmarkup' -require 'builder/xmlevents' diff --git a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/blankslate.rb b/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/blankslate.rb deleted file mode 100644 index 2935b6f1d1..0000000000 --- a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/blankslate.rb +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env ruby -#-- -# Copyright 2004, 2006 by Jim Weirich (jim@weirichhouse.org). -# All rights reserved. - -# Permission is granted for use, copying, modification, distribution, -# and distribution of modified versions of this work as long as the -# above copyright notice is included. -#++ - -require 'blankslate' - -###################################################################### -# BlankSlate has been promoted to a top level name and is now -# available as a standalone gem. We make the name available in the -# Builder namespace for compatibility. -# -module Builder - BlankSlate = ::BlankSlate -end diff --git a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/css.rb b/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/css.rb deleted file mode 100644 index e086a1b132..0000000000 --- a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/css.rb +++ /dev/null @@ -1,250 +0,0 @@ -#!/usr/bin/env ruby -#-- -# Copyright 2004, 2005 by Jim Weirich (jim@weirichhouse.org). -# Copyright 2005 by Scott Barron (scott@elitists.net). -# All rights reserved. -# -# Permission is granted for use, copying, modification, distribution, -# and distribution of modified versions of this work as long as the -# above copyright notice is included. -# -# Much of this is taken from Jim's work in xmlbase.rb and xmlmarkup.rb. -# Documentation has also been copied and pasted and modified to reflect -# that we're building CSS here instead of XML. Jim is conducting the -# orchestra here and I'm just off in the corner playing a flute. -#++ - -# Provide a flexible and easy to use Builder for creating Cascading -# Style Sheets (CSS). - - -require 'builder/blankslate' - -module Builder - - # Create a Cascading Style Sheet (CSS) using Ruby. - # - # Example usage: - # - # css = Builder::CSS.new - # - # text_color = '#7F7F7F' - # preferred_fonts = 'Helvetica, Arial, sans_serif' - # - # css.comment! 'This is our stylesheet' - # css.body { - # background_color '#FAFAFA' - # font_size 'small' - # font_family preferred_fonts - # color text_color - # } - # - # css.id!('navbar') { - # width '500px' - # } - # - # css.class!('navitem') { - # color 'red' - # } - # - # css.a :hover { - # text_decoration 'underline' - # } - # - # css.div(:id => 'menu') { - # background 'green' - # } - # - # css.div(:class => 'foo') { - # background 'red' - # } - # - # This will yield the following stylesheet: - # - # /* This is our stylesheet */ - # body { - # background_color: #FAFAFA; - # font_size: small; - # font_family: Helvetica, Arial, sans_serif; - # color: #7F7F7F; - # } - # - # #navbar { - # width: 500px; - # } - # - # .navitem { - # color: red; - # } - # - # a:hover { - # text_decoration: underline; - # } - # - # div#menu { - # background: green; - # } - # - # div.foo { - # background: red; - # } - # - class CSS < BlankSlate - - # Create a CSS builder. - # - # out:: Object receiving the markup.1 +out+ must respond to - # <<. - # indent:: Number of spaces used for indentation (0 implies no - # indentation and no line breaks). - # - def initialize(indent=2) - @indent = indent - @target = [] - @parts = [] - @library = {} - end - - def +(part) - _join_with_op! '+' - self - end - - def >>(part) - _join_with_op! '' - self - end - - def >(part) - _join_with_op! '>' - self - end - - def |(part) - _join_with_op! ',' - self - end - - # Return the target of the builder - def target! - @target * '' - end - - # Create a comment string in the output. - def comment!(comment_text) - @target << "/* #{comment_text} */\n" - end - - def id!(arg, &block) - _start_container('#'+arg.to_s, nil, block_given?) - _css_block(block) if block - _unify_block - self - end - - def class!(arg, &block) - _start_container('.'+arg.to_s, nil, block_given?) - _css_block(block) if block - _unify_block - self - end - - def store!(sym, &block) - @library[sym] = block.to_proc - end - - def group!(*args, &block) - args.each do |arg| - if arg.is_a?(Symbol) - instance_eval(&@library[arg]) - else - instance_eval(&arg) - end - _text ', ' unless arg == args.last - end - if block - _css_block(block) - _unify_block - end - end - - def method_missing(sym, *args, &block) - sym = "#{sym}:#{args.shift}" if args.first.kind_of?(Symbol) - if block - _start_container(sym, args.first) - _css_block(block) - _unify_block - elsif @in_block - _indent - _css_line(sym, *args) - _newline - return self - else - _start_container(sym, args.first, false) - _unify_block - end - self - end - - # "Cargo culted" from Jim who also "cargo culted" it. See xmlbase.rb. - def nil? - false - end - - private - def _unify_block - @target << @parts * '' - @parts = [] - end - - def _join_with_op!(op) - rhs, lhs = @target.pop, @target.pop - @target << "#{lhs} #{op} #{rhs}" - end - - def _text(text) - @parts << text - end - - def _css_block(block) - _newline - _nested_structures(block) - _end_container - _end_block - end - - def _end_block - _newline - _newline - end - - def _newline - _text "\n" - end - - def _indent - _text ' ' * @indent - end - - def _nested_structures(block) - @in_block = true - self.instance_eval(&block) - @in_block = false - end - - def _start_container(sym, atts = {}, with_bracket = true) - selector = sym.to_s - selector << ".#{atts[:class]}" if atts && atts[:class] - selector << '#' + "#{atts[:id]}" if atts && atts[:id] - @parts << "#{selector}#{with_bracket ? ' {' : ''}" - end - - def _end_container - @parts << "}" - end - - def _css_line(sym, *args) - _text("#{sym.to_s.gsub('_','-')}: #{args * ' '};") - end - end -end diff --git a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xchar.rb b/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xchar.rb deleted file mode 100644 index 8bdbd05899..0000000000 --- a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xchar.rb +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env ruby - -# The XChar library is provided courtesy of Sam Ruby (See -# http://intertwingly.net/stories/2005/09/28/xchar.rb) - -# -------------------------------------------------------------------- - -# If the Builder::XChar module is not currently defined, fail on any -# name clashes in standard library classes. - -module Builder - def self.check_for_name_collision(klass, method_name, defined_constant=nil) - if klass.instance_methods.include?(method_name.to_s) - fail RuntimeError, - "Name Collision: Method '#{method_name}' is already defined in #{klass}" - end - end -end - -if ! defined?(Builder::XChar) - Builder.check_for_name_collision(String, "to_xs") - Builder.check_for_name_collision(Fixnum, "xchr") -end - -###################################################################### -module Builder - - #################################################################### - # XML Character converter, from Sam Ruby: - # (see http://intertwingly.net/stories/2005/09/28/xchar.rb). - # - module XChar # :nodoc: - - # See - # http://intertwingly.net/stories/2004/04/14/i18n.html#CleaningWindows - # for details. - CP1252 = { # :nodoc: - 128 => 8364, # euro sign - 130 => 8218, # single low-9 quotation mark - 131 => 402, # latin small letter f with hook - 132 => 8222, # double low-9 quotation mark - 133 => 8230, # horizontal ellipsis - 134 => 8224, # dagger - 135 => 8225, # double dagger - 136 => 710, # modifier letter circumflex accent - 137 => 8240, # per mille sign - 138 => 352, # latin capital letter s with caron - 139 => 8249, # single left-pointing angle quotation mark - 140 => 338, # latin capital ligature oe - 142 => 381, # latin capital letter z with caron - 145 => 8216, # left single quotation mark - 146 => 8217, # right single quotation mark - 147 => 8220, # left double quotation mark - 148 => 8221, # right double quotation mark - 149 => 8226, # bullet - 150 => 8211, # en dash - 151 => 8212, # em dash - 152 => 732, # small tilde - 153 => 8482, # trade mark sign - 154 => 353, # latin small letter s with caron - 155 => 8250, # single right-pointing angle quotation mark - 156 => 339, # latin small ligature oe - 158 => 382, # latin small letter z with caron - 159 => 376, # latin capital letter y with diaeresis - } - - # See http://www.w3.org/TR/REC-xml/#dt-chardata for details. - PREDEFINED = { - 38 => '&', # ampersand - 60 => '<', # left angle bracket - 62 => '>', # right angle bracket - } - - # See http://www.w3.org/TR/REC-xml/#charsets for details. - VALID = [ - 0x9, 0xA, 0xD, - (0x20..0xD7FF), - (0xE000..0xFFFD), - (0x10000..0x10FFFF) - ] - end - -end - - -###################################################################### -# Enhance the Fixnum class with a XML escaped character conversion. -# -class Fixnum - XChar = Builder::XChar if ! defined?(XChar) - - # XML escaped version of chr - def xchr - n = XChar::CP1252[self] || self - case n when *XChar::VALID - XChar::PREDEFINED[n] or (n<128 ? n.chr : "&##{n};") - else - '*' - end - end -end - - -###################################################################### -# Enhance the String class with a XML escaped character version of -# to_s. -# -class String - # XML escaped version of to_s - def to_xs - unpack('U*').map {|n| n.xchr}.join # ASCII, UTF-8 - rescue - unpack('C*').map {|n| n.xchr}.join # ISO-8859-1, WIN-1252 - end -end diff --git a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xmlbase.rb b/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xmlbase.rb deleted file mode 100644 index ace4b56d59..0000000000 --- a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xmlbase.rb +++ /dev/null @@ -1,139 +0,0 @@ -#!/usr/bin/env ruby - -require 'builder/blankslate' - -module Builder - - # Generic error for builder - class IllegalBlockError < RuntimeError; end - - # XmlBase is a base class for building XML builders. See - # Builder::XmlMarkup and Builder::XmlEvents for examples. - class XmlBase < BlankSlate - - # Create an XML markup builder. - # - # out:: Object receiving the markup. +out+ must respond to - # <<. - # indent:: Number of spaces used for indentation (0 implies no - # indentation and no line breaks). - # initial:: Level of initial indentation. - # - def initialize(indent=0, initial=0) - @indent = indent - @level = initial - end - - # Create a tag named +sym+. Other than the first argument which - # is the tag name, the arguments are the same as the tags - # implemented via method_missing. - def tag!(sym, *args, &block) - method_missing(sym.to_sym, *args, &block) - end - - # Create XML markup based on the name of the method. This method - # is never invoked directly, but is called for each markup method - # in the markup block. - def method_missing(sym, *args, &block) - text = nil - attrs = nil - sym = "#{sym}:#{args.shift}" if args.first.kind_of?(Symbol) - args.each do |arg| - case arg - when Hash - attrs ||= {} - attrs.merge!(arg) - else - text ||= '' - text << arg.to_s - end - end - if block - unless text.nil? - raise ArgumentError, "XmlMarkup cannot mix a text argument with a block" - end - _indent - _start_tag(sym, attrs) - _newline - _nested_structures(block) - _indent - _end_tag(sym) - _newline - elsif text.nil? - _indent - _start_tag(sym, attrs, true) - _newline - else - _indent - _start_tag(sym, attrs) - text! text - _end_tag(sym) - _newline - end - @target - end - - # Append text to the output target. Escape any markup. May be - # used within the markup brackets as: - # - # builder.p { |b| b.br; b.text! "HI" } #=>


HI

- def text!(text) - _text(_escape(text)) - end - - # Append text to the output target without escaping any markup. - # May be used within the markup brackets as: - # - # builder.p { |x| x << "
HI" } #=>


HI

- # - # This is useful when using non-builder enabled software that - # generates strings. Just insert the string directly into the - # builder without changing the inserted markup. - # - # It is also useful for stacking builder objects. Builders only - # use << to append to the target, so by supporting this - # method/operation builders can use other builders as their - # targets. - def <<(text) - _text(text) - end - - # For some reason, nil? is sent to the XmlMarkup object. If nil? - # is not defined and method_missing is invoked, some strange kind - # of recursion happens. Since nil? won't ever be an XML tag, it - # is pretty safe to define it here. (Note: this is an example of - # cargo cult programming, - # cf. http://fishbowl.pastiche.org/2004/10/13/cargo_cult_programming). - def nil? - false - end - - private - - require 'builder/xchar' - def _escape(text) - text.to_xs - end - - def _escape_quote(text) - _escape(text).gsub(%r{"}, '"') # " WART - end - - def _newline - return if @indent == 0 - text! "\n" - end - - def _indent - return if @indent == 0 || @level == 0 - text!(" " * (@level * @indent)) - end - - def _nested_structures(block) - @level += 1 - block.call(self) - ensure - @level -= 1 - end - end -end diff --git a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xmlevents.rb b/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xmlevents.rb deleted file mode 100644 index b373e4da3c..0000000000 --- a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xmlevents.rb +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env ruby - -#-- -# Copyright 2004 by Jim Weirich (jim@weirichhouse.org). -# All rights reserved. - -# Permission is granted for use, copying, modification, distribution, -# and distribution of modified versions of this work as long as the -# above copyright notice is included. -#++ - -require 'builder/xmlmarkup' - -module Builder - - # Create a series of SAX-like XML events (e.g. start_tag, end_tag) - # from the markup code. XmlEvent objects are used in a way similar - # to XmlMarkup objects, except that a series of events are generated - # and passed to a handler rather than generating character-based - # markup. - # - # Usage: - # xe = Builder::XmlEvents.new(handler) - # xe.title("HI") # Sends start_tag/end_tag/text messages to the handler. - # - # Indentation may also be selected by providing value for the - # indentation size and initial indentation level. - # - # xe = Builder::XmlEvents.new(handler, indent_size, initial_indent_level) - # - # == XML Event Handler - # - # The handler object must expect the following events. - # - # [start_tag(tag, attrs)] - # Announces that a new tag has been found. +tag+ is the name of - # the tag and +attrs+ is a hash of attributes for the tag. - # - # [end_tag(tag)] - # Announces that an end tag for +tag+ has been found. - # - # [text(text)] - # Announces that a string of characters (+text+) has been found. - # A series of characters may be broken up into more than one - # +text+ call, so the client cannot assume that a single - # callback contains all the text data. - # - class XmlEvents < XmlMarkup - def text!(text) - @target.text(text) - end - - def _start_tag(sym, attrs, end_too=false) - @target.start_tag(sym, attrs) - _end_tag(sym) if end_too - end - - def _end_tag(sym) - @target.end_tag(sym) - end - end - -end diff --git a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xmlmarkup.rb b/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xmlmarkup.rb deleted file mode 100644 index ec59dddc36..0000000000 --- a/activesupport/lib/active_support/vendor/builder-2.1.2/lib/builder/xmlmarkup.rb +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env ruby -#-- -# Copyright 2004, 2005 by Jim Weirich (jim@weirichhouse.org). -# All rights reserved. - -# Permission is granted for use, copying, modification, distribution, -# and distribution of modified versions of this work as long as the -# above copyright notice is included. -#++ - -# Provide a flexible and easy to use Builder for creating XML markup. -# See XmlBuilder for usage details. - -require 'builder/xmlbase' - -module Builder - - # Create XML markup easily. All (well, almost all) methods sent to - # an XmlMarkup object will be translated to the equivalent XML - # markup. Any method with a block will be treated as an XML markup - # tag with nested markup in the block. - # - # Examples will demonstrate this easier than words. In the - # following, +xm+ is an +XmlMarkup+ object. - # - # xm.em("emphasized") # => emphasized - # xm.em { xmm.b("emp & bold") } # => emph & bold - # xm.a("A Link", "href"=>"http://onestepback.org") - # # => A Link - # xm.div { br } # =>

- # xm.target("name"=>"compile", "option"=>"fast") - # # => - # # NOTE: order of attributes is not specified. - # - # xm.instruct! # - # xm.html { # - # xm.head { # - # xm.title("History") # History - # } # - # xm.body { # - # xm.comment! "HI" # - # xm.h1("Header") #

Header

- # xm.p("paragraph") #

paragraph

- # } # - # } # - # - # == Notes: - # - # * The order that attributes are inserted in markup tags is - # undefined. - # - # * Sometimes you wish to insert text without enclosing tags. Use - # the text! method to accomplish this. - # - # Example: - # - # xm.div { #
- # xm.text! "line"; xm.br # line
- # xm.text! "another line"; xmbr # another line
- # } #
- # - # * The special XML characters <, >, and & are converted to <, - # > and & automatically. Use the << operation to - # insert text without modification. - # - # * Sometimes tags use special characters not allowed in ruby - # identifiers. Use the tag! method to handle these - # cases. - # - # Example: - # - # xml.tag!("SOAP:Envelope") { ... } - # - # will produce ... - # - # ... " - # - # tag! will also take text and attribute arguments (after - # the tag name) like normal markup methods. (But see the next - # bullet item for a better way to handle XML namespaces). - # - # * Direct support for XML namespaces is now available. If the - # first argument to a tag call is a symbol, it will be joined to - # the tag to produce a namespace:tag combination. It is easier to - # show this than describe it. - # - # xml.SOAP :Envelope do ... end - # - # Just put a space before the colon in a namespace to produce the - # right form for builder (e.g. "SOAP:Envelope" => - # "xml.SOAP :Envelope") - # - # * XmlMarkup builds the markup in any object (called a _target_) - # that accepts the << method. If no target is given, - # then XmlMarkup defaults to a string target. - # - # Examples: - # - # xm = Builder::XmlMarkup.new - # result = xm.title("yada") - # # result is a string containing the markup. - # - # buffer = "" - # xm = Builder::XmlMarkup.new(buffer) - # # The markup is appended to buffer (using <<) - # - # xm = Builder::XmlMarkup.new(STDOUT) - # # The markup is written to STDOUT (using <<) - # - # xm = Builder::XmlMarkup.new - # x2 = Builder::XmlMarkup.new(:target=>xm) - # # Markup written to +x2+ will be send to +xm+. - # - # * Indentation is enabled by providing the number of spaces to - # indent for each level as a second argument to XmlBuilder.new. - # Initial indentation may be specified using a third parameter. - # - # Example: - # - # xm = Builder.new(:indent=>2) - # # xm will produce nicely formatted and indented XML. - # - # xm = Builder.new(:indent=>2, :margin=>4) - # # xm will produce nicely formatted and indented XML with 2 - # # spaces per indent and an over all indentation level of 4. - # - # builder = Builder::XmlMarkup.new(:target=>$stdout, :indent=>2) - # builder.name { |b| b.first("Jim"); b.last("Weirich) } - # # prints: - # # - # # Jim - # # Weirich - # # - # - # * The instance_eval implementation which forces self to refer to - # the message receiver as self is now obsolete. We now use normal - # block calls to execute the markup block. This means that all - # markup methods must now be explicitly send to the xml builder. - # For instance, instead of - # - # xml.div { strong("text") } - # - # you need to write: - # - # xml.div { xml.strong("text") } - # - # Although more verbose, the subtle change in semantics within the - # block was found to be prone to error. To make this change a - # little less cumbersome, the markup block now gets the markup - # object sent as an argument, allowing you to use a shorter alias - # within the block. - # - # For example: - # - # xml_builder = Builder::XmlMarkup.new - # xml_builder.div { |xml| - # xml.stong("text") - # } - # - class XmlMarkup < XmlBase - - # Create an XML markup builder. Parameters are specified by an - # option hash. - # - # :target=>target_object:: - # Object receiving the markup. +out+ must respond to the - # << operator. The default is a plain string target. - # - # :indent=>indentation:: - # Number of spaces used for indentation. The default is no - # indentation and no line breaks. - # - # :margin=>initial_indentation_level:: - # Amount of initial indentation (specified in levels, not - # spaces). - # - # :escape_attrs=>OBSOLETE
:: - # The :escape_attrs option is no longer supported by builder - # (and will be quietly ignored). String attribute values are - # now automatically escaped. If you need unescaped attribute - # values (perhaps you are using entities in the attribute - # values), then give the value as a Symbol. This allows much - # finer control over escaping attribute values. - # - def initialize(options={}) - indent = options[:indent] || 0 - margin = options[:margin] || 0 - super(indent, margin) - @target = options[:target] || "" - end - - # Return the target of the builder. - def target! - @target - end - - def comment!(comment_text) - _ensure_no_block block_given? - _special("", comment_text, nil) - end - - # Insert an XML declaration into the XML markup. - # - # For example: - # - # xml.declare! :ELEMENT, :blah, "yada" - # # => - def declare!(inst, *args, &block) - _indent - @target << "" - _newline - end - - # Insert a processing instruction into the XML markup. E.g. - # - # For example: - # - # xml.instruct! - # #=> - # xml.instruct! :aaa, :bbb=>"ccc" - # #=> - # - def instruct!(directive_tag=:xml, attrs={}) - _ensure_no_block block_given? - if directive_tag == :xml - a = { :version=>"1.0", :encoding=>"UTF-8" } - attrs = a.merge attrs - end - _special( - "", - nil, - attrs, - [:version, :encoding, :standalone]) - end - - # Insert a CDATA section into the XML markup. - # - # For example: - # - # xml.cdata!("text to be included in cdata") - # #=> - # - def cdata!(text) - _ensure_no_block block_given? - _special("", text, nil) - end - - private - - # NOTE: All private methods of a builder object are prefixed when - # a "_" character to avoid possible conflict with XML tag names. - - # Insert text directly in to the builder's target. - def _text(text) - @target << text - end - - # Insert special instruction. - def _special(open, close, data=nil, attrs=nil, order=[]) - _indent - @target << open - @target << data if data - _insert_attributes(attrs, order) if attrs - @target << close - _newline - end - - # Start an XML tag. If end_too is true, then the start - # tag is also the end tag (e.g.
- def _start_tag(sym, attrs, end_too=false) - @target << "<#{sym}" - _insert_attributes(attrs) - @target << "/" if end_too - @target << ">" - end - - # Insert an ending tag. - def _end_tag(sym) - @target << "" - end - - # Insert the attributes (given in the hash). - def _insert_attributes(attrs, order=[]) - return if attrs.nil? - order.each do |k| - v = attrs[k] - @target << %{ #{k}="#{_attr_value(v)}"} if v # " WART - end - attrs.each do |k, v| - @target << %{ #{k}="#{_attr_value(v)}"} unless order.member?(k) # " WART - end - end - - def _attr_value(value) - case value - when Symbol - value.to_s - else - _escape_quote(value.to_s) - end - end - - def _ensure_no_block(got_block) - if got_block - fail IllegalBlockError, - "Blocks are not allowed on XML instructions" - end - end - - end - -end -- cgit v1.2.3 From c1f308f8c6fc2eec4a4b8a9ef61a561ea8e76749 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Thu, 28 Jan 2010 11:56:47 +1100 Subject: Unvendor'd MemCache-Client. Now requires the MemCache Client gem as a dependency - Don't forget to gem bundle buys and girls --- activesupport/CHANGELOG | 6 +- activesupport/Rakefile | 1 - activesupport/activesupport.gemspec | 1 + activesupport/lib/active_support.rb | 2 - activesupport/lib/active_support/vendor.rb | 19 - .../vendor/memcache-client-1.7.5/lib/memcache.rb | 1133 -------------------- 6 files changed, 5 insertions(+), 1157 deletions(-) delete mode 100644 activesupport/lib/active_support/vendor.rb delete mode 100644 activesupport/lib/active_support/vendor/memcache-client-1.7.5/lib/memcache.rb diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 2d80f3ce6b..cd72aa1bee 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,8 +1,10 @@ *Edge* -* Unvendor'd Builder. Now requires the Builder gem as a dependency +* Unvendor'd Memcach Client. Now requires the Builder gem as a dependency [Mikel Lindsaar] -* Unvendor'd TZInfo. Now requires the TZInfo gem as a dependency +* Unvendor'd Builder. Now requires the Builder gem as a dependency [Mikel Lindsaar] + +* Unvendor'd TZInfo. Now requires the TZInfo gem as a dependency [Mikel Lindsaar] * YAML serialization for OrderedHash. #3608 [Gregor Schmidt] diff --git a/activesupport/Rakefile b/activesupport/Rakefile index 434c5e2ed4..03ab3b2760 100644 --- a/activesupport/Rakefile +++ b/activesupport/Rakefile @@ -41,7 +41,6 @@ Rake::RDocTask.new { |rdoc| rdoc.rdoc_files.include('README', 'CHANGELOG') rdoc.rdoc_files.include('lib/active_support.rb') rdoc.rdoc_files.include('lib/active_support/**/*.rb') - rdoc.rdoc_files.exclude('lib/active_support/vendor/*') } spec = eval(File.read('activesupport.gemspec')) diff --git a/activesupport/activesupport.gemspec b/activesupport/activesupport.gemspec index ada5c5c0fe..19cdbaa41a 100644 --- a/activesupport/activesupport.gemspec +++ b/activesupport/activesupport.gemspec @@ -9,6 +9,7 @@ Gem::Specification.new do |s| s.add_dependency('i18n', '~> 0.3.0') s.add_dependency('tzinfo', '~> 0.3.16') s.add_dependency('builder', '~> 2.1.2') + s.add_dependency('memcache-client', '~> 1.7.5') s.files = Dir['CHANGELOG', 'README', 'lib/**/*'] s.require_path = 'lib' diff --git a/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb index 51ec87f329..833ae351b9 100644 --- a/activesupport/lib/active_support.rb +++ b/activesupport/lib/active_support.rb @@ -69,5 +69,3 @@ module ActiveSupport autoload :TestCase end - -require 'active_support/vendor' diff --git a/activesupport/lib/active_support/vendor.rb b/activesupport/lib/active_support/vendor.rb deleted file mode 100644 index caa77d19e2..0000000000 --- a/activesupport/lib/active_support/vendor.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'pathname' - -def ActiveSupport.requirable?(file) - $LOAD_PATH.any? { |p| Dir.glob("#{p}/#{file}.*").any? } -end - -[%w(builder 2.1.2), %w(memcache-client 1.7.5)].each do |lib, version| - # If the lib is not already requirable - unless ActiveSupport.requirable? lib - # Try to activate a gem ~> satisfying the requested version first. - begin - gem lib, ">= #{version}" - # Use the vendored lib if the gem's missing or we aren't using RubyGems. - rescue LoadError, NoMethodError - # There could be symlinks - $LOAD_PATH.unshift Pathname.new(__FILE__).dirname.join("vendor/#{lib}-#{version}/lib").realpath.to_s - end - end -end diff --git a/activesupport/lib/active_support/vendor/memcache-client-1.7.5/lib/memcache.rb b/activesupport/lib/active_support/vendor/memcache-client-1.7.5/lib/memcache.rb deleted file mode 100644 index 3fcc388ba0..0000000000 --- a/activesupport/lib/active_support/vendor/memcache-client-1.7.5/lib/memcache.rb +++ /dev/null @@ -1,1133 +0,0 @@ -$TESTING = defined?($TESTING) && $TESTING - -require 'socket' -require 'thread' -require 'zlib' -require 'digest/sha1' -require 'net/protocol' - -## -# A Ruby client library for memcached. -# - -class MemCache - - ## - # The version of MemCache you are using. - - VERSION = '1.7.5' - - ## - # Default options for the cache object. - - DEFAULT_OPTIONS = { - :namespace => nil, - :readonly => false, - :multithread => true, - :failover => true, - :timeout => 0.5, - :logger => nil, - :no_reply => false, - :check_size => true, - :autofix_keys => false, - :namespace_separator => ':', - } - - ## - # Default memcached port. - - DEFAULT_PORT = 11211 - - ## - # Default memcached server weight. - - DEFAULT_WEIGHT = 1 - - ## - # The namespace for this instance - - attr_reader :namespace - - ## - # The multithread setting for this instance - - attr_reader :multithread - - ## - # Whether to try to fix keys that are too long and will be truncated by - # using their SHA1 hash instead. - # The hash is only used on keys longer than 250 characters, or containing spaces, - # to avoid impacting performance unnecesarily. - # - # In theory, your code should generate correct keys when calling memcache, - # so it's your responsibility and you should try to fix this problem at its source. - # - # But if that's not possible, enable this option and memcache-client will give you a hand. - - attr_reader :autofix_keys - - ## - # The servers this client talks to. Play at your own peril. - - attr_reader :servers - - ## - # Socket timeout limit with this client, defaults to 0.5 sec. - # Set to nil to disable timeouts. - - attr_reader :timeout - - ## - # Should the client try to failover to another server if the - # first server is down? Defaults to true. - - attr_reader :failover - - ## - # Log debug/info/warn/error to the given Logger, defaults to nil. - - attr_reader :logger - - ## - # Don't send or look for a reply from the memcached server for write operations. - # Please note this feature only works in memcached 1.2.5 and later. Earlier - # versions will reply with "ERROR". - attr_reader :no_reply - - ## - # Accepts a list of +servers+ and a list of +opts+. +servers+ may be - # omitted. See +servers=+ for acceptable server list arguments. - # - # Valid options for +opts+ are: - # - # [:namespace] Prepends this value to all keys added or retrieved. - # [:readonly] Raises an exception on cache writes when true. - # [:multithread] Wraps cache access in a Mutex for thread safety. Defaults to true. - # [:failover] Should the client try to failover to another server if the - # first server is down? Defaults to true. - # [:timeout] Time to use as the socket read timeout. Defaults to 0.5 sec, - # set to nil to disable timeouts. - # [:logger] Logger to use for info/debug output, defaults to nil - # [:no_reply] Don't bother looking for a reply for write operations (i.e. they - # become 'fire and forget'), memcached 1.2.5 and later only, speeds up - # set/add/delete/incr/decr significantly. - # [:check_size] Raises a MemCacheError if the value to be set is greater than 1 MB, which - # is the maximum key size for the standard memcached server. Defaults to true. - # [:autofix_keys] If a key is longer than 250 characters or contains spaces, - # use an SHA1 hash instead, to prevent collisions on truncated keys. - # Other options are ignored. - - def initialize(*args) - servers = [] - opts = {} - - case args.length - when 0 then # NOP - when 1 then - arg = args.shift - case arg - when Hash then opts = arg - when Array then servers = arg - when String then servers = [arg] - else raise ArgumentError, 'first argument must be Array, Hash or String' - end - when 2 then - servers, opts = args - else - raise ArgumentError, "wrong number of arguments (#{args.length} for 2)" - end - - opts = DEFAULT_OPTIONS.merge opts - @namespace = opts[:namespace] - @readonly = opts[:readonly] - @multithread = opts[:multithread] - @autofix_keys = opts[:autofix_keys] - @timeout = opts[:timeout] - @failover = opts[:failover] - @logger = opts[:logger] - @no_reply = opts[:no_reply] - @check_size = opts[:check_size] - @namespace_separator = opts[:namespace_separator] - @mutex = Mutex.new if @multithread - - logger.info { "memcache-client #{VERSION} #{Array(servers).inspect}" } if logger - - Thread.current[:memcache_client] = self.object_id if !@multithread - - self.servers = servers - end - - ## - # Returns a string representation of the cache object. - - def inspect - "" % - [@servers.length, @namespace, @readonly] - end - - ## - # Returns whether there is at least one active server for the object. - - def active? - not @servers.empty? - end - - ## - # Returns whether or not the cache object was created read only. - - def readonly? - @readonly - end - - ## - # Set the servers that the requests will be distributed between. Entries - # can be either strings of the form "hostname:port" or - # "hostname:port:weight" or MemCache::Server objects. - # - def servers=(servers) - # Create the server objects. - @servers = Array(servers).collect do |server| - case server - when String - host, port, weight = server.split ':', 3 - port ||= DEFAULT_PORT - weight ||= DEFAULT_WEIGHT - Server.new self, host, port, weight - else - server - end - end - - logger.debug { "Servers now: #{@servers.inspect}" } if logger - - # There's no point in doing this if there's only one server - @continuum = create_continuum_for(@servers) if @servers.size > 1 - - @servers - end - - ## - # Decrements the value for +key+ by +amount+ and returns the new value. - # +key+ must already exist. If +key+ is not an integer, it is assumed to be - # 0. +key+ can not be decremented below 0. - - def decr(key, amount = 1) - raise MemCacheError, "Update of readonly cache" if @readonly - with_server(key) do |server, cache_key| - cache_decr server, cache_key, amount - end - rescue TypeError => err - handle_error nil, err - end - - ## - # Retrieves +key+ from memcache. If +raw+ is false, the value will be - # unmarshalled. - - def get(key, raw = false) - with_server(key) do |server, cache_key| - logger.debug { "get #{key} from #{server.inspect}" } if logger - value = cache_get server, cache_key - return nil if value.nil? - value = Marshal.load value unless raw - return value - end - rescue TypeError => err - handle_error nil, err - end - - ## - # Performs a +get+ with the given +key+. If - # the value does not exist and a block was given, - # the block will be called and the result saved via +add+. - # - # If you do not provide a block, using this - # method is the same as using +get+. - # - def fetch(key, expiry = 0, raw = false) - value = get(key, raw) - - if value.nil? && block_given? - value = yield - add(key, value, expiry, raw) - end - - value - end - - ## - # Retrieves multiple values from memcached in parallel, if possible. - # - # The memcached protocol supports the ability to retrieve multiple - # keys in a single request. Pass in an array of keys to this method - # and it will: - # - # 1. map the key to the appropriate memcached server - # 2. send a single request to each server that has one or more key values - # - # Returns a hash of values. - # - # cache["a"] = 1 - # cache["b"] = 2 - # cache.get_multi "a", "b" # => { "a" => 1, "b" => 2 } - # - # Note that get_multi assumes the values are marshalled. - - def get_multi(*keys) - raise MemCacheError, 'No active servers' unless active? - - keys.flatten! - key_count = keys.length - cache_keys = {} - server_keys = Hash.new { |h,k| h[k] = [] } - - # map keys to servers - keys.each do |key| - server, cache_key = request_setup key - cache_keys[cache_key] = key - server_keys[server] << cache_key - end - - results = {} - - server_keys.each do |server, keys_for_server| - keys_for_server_str = keys_for_server.join ' ' - begin - values = cache_get_multi server, keys_for_server_str - values.each do |key, value| - results[cache_keys[key]] = Marshal.load value - end - rescue IndexError => e - # Ignore this server and try the others - logger.warn { "Unable to retrieve #{keys_for_server.size} elements from #{server.inspect}: #{e.message}"} if logger - end - end - - return results - rescue TypeError => err - handle_error nil, err - end - - ## - # Increments the value for +key+ by +amount+ and returns the new value. - # +key+ must already exist. If +key+ is not an integer, it is assumed to be - # 0. - - def incr(key, amount = 1) - raise MemCacheError, "Update of readonly cache" if @readonly - with_server(key) do |server, cache_key| - cache_incr server, cache_key, amount - end - rescue TypeError => err - handle_error nil, err - end - - ## - # Add +key+ to the cache with value +value+ that expires in +expiry+ - # seconds. If +raw+ is true, +value+ will not be Marshalled. - # - # Warning: Readers should not call this method in the event of a cache miss; - # see MemCache#add. - - ONE_MB = 1024 * 1024 - - def set(key, value, expiry = 0, raw = false) - raise MemCacheError, "Update of readonly cache" if @readonly - - value = Marshal.dump value unless raw - with_server(key) do |server, cache_key| - logger.debug { "set #{key} to #{server.inspect}: #{value.to_s.size}" } if logger - - if @check_size && value.to_s.size > ONE_MB - raise MemCacheError, "Value too large, memcached can only store 1MB of data per key" - end - - command = "set #{cache_key} 0 #{expiry} #{value.to_s.size}#{noreply}\r\n#{value}\r\n" - - with_socket_management(server) do |socket| - socket.write command - break nil if @no_reply - result = socket.gets - raise_on_error_response! result - - if result.nil? - server.close - raise MemCacheError, "lost connection to #{server.host}:#{server.port}" - end - - result - end - end - end - - ## - # "cas" is a check and set operation which means "store this data but - # only if no one else has updated since I last fetched it." This can - # be used as a form of optimistic locking. - # - # Works in block form like so: - # cache.cas('some-key') do |value| - # value + 1 - # end - # - # Returns: - # +nil+ if the value was not found on the memcached server. - # +STORED+ if the value was updated successfully - # +EXISTS+ if the value was updated by someone else since last fetch - - def cas(key, expiry=0, raw=false) - raise MemCacheError, "Update of readonly cache" if @readonly - raise MemCacheError, "A block is required" unless block_given? - - (value, token) = gets(key, raw) - return nil unless value - updated = yield value - value = Marshal.dump updated unless raw - - with_server(key) do |server, cache_key| - logger.debug { "cas #{key} to #{server.inspect}: #{value.to_s.size}" } if logger - command = "cas #{cache_key} 0 #{expiry} #{value.to_s.size} #{token}#{noreply}\r\n#{value}\r\n" - - with_socket_management(server) do |socket| - socket.write command - break nil if @no_reply - result = socket.gets - raise_on_error_response! result - - if result.nil? - server.close - raise MemCacheError, "lost connection to #{server.host}:#{server.port}" - end - - result - end - end - end - - ## - # Add +key+ to the cache with value +value+ that expires in +expiry+ - # seconds, but only if +key+ does not already exist in the cache. - # If +raw+ is true, +value+ will not be Marshalled. - # - # Readers should call this method in the event of a cache miss, not - # MemCache#set. - - def add(key, value, expiry = 0, raw = false) - raise MemCacheError, "Update of readonly cache" if @readonly - value = Marshal.dump value unless raw - with_server(key) do |server, cache_key| - logger.debug { "add #{key} to #{server}: #{value ? value.to_s.size : 'nil'}" } if logger - command = "add #{cache_key} 0 #{expiry} #{value.to_s.size}#{noreply}\r\n#{value}\r\n" - - with_socket_management(server) do |socket| - socket.write command - break nil if @no_reply - result = socket.gets - raise_on_error_response! result - result - end - end - end - - ## - # Add +key+ to the cache with value +value+ that expires in +expiry+ - # seconds, but only if +key+ already exists in the cache. - # If +raw+ is true, +value+ will not be Marshalled. - def replace(key, value, expiry = 0, raw = false) - raise MemCacheError, "Update of readonly cache" if @readonly - value = Marshal.dump value unless raw - with_server(key) do |server, cache_key| - logger.debug { "replace #{key} to #{server}: #{value ? value.to_s.size : 'nil'}" } if logger - command = "replace #{cache_key} 0 #{expiry} #{value.to_s.size}#{noreply}\r\n#{value}\r\n" - - with_socket_management(server) do |socket| - socket.write command - break nil if @no_reply - result = socket.gets - raise_on_error_response! result - result - end - end - end - - ## - # Append - 'add this data to an existing key after existing data' - # Please note the value is always passed to memcached as raw since it - # doesn't make a lot of sense to concatenate marshalled data together. - def append(key, value) - raise MemCacheError, "Update of readonly cache" if @readonly - with_server(key) do |server, cache_key| - logger.debug { "append #{key} to #{server}: #{value ? value.to_s.size : 'nil'}" } if logger - command = "append #{cache_key} 0 0 #{value.to_s.size}#{noreply}\r\n#{value}\r\n" - - with_socket_management(server) do |socket| - socket.write command - break nil if @no_reply - result = socket.gets - raise_on_error_response! result - result - end - end - end - - ## - # Prepend - 'add this data to an existing key before existing data' - # Please note the value is always passed to memcached as raw since it - # doesn't make a lot of sense to concatenate marshalled data together. - def prepend(key, value) - raise MemCacheError, "Update of readonly cache" if @readonly - with_server(key) do |server, cache_key| - logger.debug { "prepend #{key} to #{server}: #{value ? value.to_s.size : 'nil'}" } if logger - command = "prepend #{cache_key} 0 0 #{value.to_s.size}#{noreply}\r\n#{value}\r\n" - - with_socket_management(server) do |socket| - socket.write command - break nil if @no_reply - result = socket.gets - raise_on_error_response! result - result - end - end - end - - ## - # Removes +key+ from the cache in +expiry+ seconds. - - def delete(key, expiry = 0) - raise MemCacheError, "Update of readonly cache" if @readonly - with_server(key) do |server, cache_key| - with_socket_management(server) do |socket| - logger.debug { "delete #{cache_key} on #{server}" } if logger - socket.write "delete #{cache_key} #{expiry}#{noreply}\r\n" - break nil if @no_reply - result = socket.gets - raise_on_error_response! result - result - end - end - end - - ## - # Flush the cache from all memcache servers. - # A non-zero value for +delay+ will ensure that the flush - # is propogated slowly through your memcached server farm. - # The Nth server will be flushed N*delay seconds from now, - # asynchronously so this method returns quickly. - # This prevents a huge database spike due to a total - # flush all at once. - - def flush_all(delay=0) - raise MemCacheError, 'No active servers' unless active? - raise MemCacheError, "Update of readonly cache" if @readonly - - begin - delay_time = 0 - @servers.each do |server| - with_socket_management(server) do |socket| - logger.debug { "flush_all #{delay_time} on #{server}" } if logger - if delay == 0 # older versions of memcached will fail silently otherwise - socket.write "flush_all#{noreply}\r\n" - else - socket.write "flush_all #{delay_time}#{noreply}\r\n" - end - break nil if @no_reply - result = socket.gets - raise_on_error_response! result - result - end - delay_time += delay - end - rescue IndexError => err - handle_error nil, err - end - end - - ## - # Reset the connection to all memcache servers. This should be called if - # there is a problem with a cache lookup that might have left the connection - # in a corrupted state. - - def reset - @servers.each { |server| server.close } - end - - ## - # Returns statistics for each memcached server. An explanation of the - # statistics can be found in the memcached docs: - # - # http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt - # - # Example: - # - # >> pp CACHE.stats - # {"localhost:11211"=> - # {"bytes"=>4718, - # "pid"=>20188, - # "connection_structures"=>4, - # "time"=>1162278121, - # "pointer_size"=>32, - # "limit_maxbytes"=>67108864, - # "cmd_get"=>14532, - # "version"=>"1.2.0", - # "bytes_written"=>432583, - # "cmd_set"=>32, - # "get_misses"=>0, - # "total_connections"=>19, - # "curr_connections"=>3, - # "curr_items"=>4, - # "uptime"=>1557, - # "get_hits"=>14532, - # "total_items"=>32, - # "rusage_system"=>0.313952, - # "rusage_user"=>0.119981, - # "bytes_read"=>190619}} - # => nil - - def stats - raise MemCacheError, "No active servers" unless active? - server_stats = {} - - @servers.each do |server| - next unless server.alive? - - with_socket_management(server) do |socket| - value = nil - socket.write "stats\r\n" - stats = {} - while line = socket.gets do - raise_on_error_response! line - break if line == "END\r\n" - if line =~ /\ASTAT ([\S]+) ([\w\.\:]+)/ then - name, value = $1, $2 - stats[name] = case name - when 'version' - value - when 'rusage_user', 'rusage_system' then - seconds, microseconds = value.split(/:/, 2) - microseconds ||= 0 - Float(seconds) + (Float(microseconds) / 1_000_000) - else - if value =~ /\A\d+\Z/ then - value.to_i - else - value - end - end - end - end - server_stats["#{server.host}:#{server.port}"] = stats - end - end - - raise MemCacheError, "No active servers" if server_stats.empty? - server_stats - end - - ## - # Shortcut to get a value from the cache. - - alias [] get - - ## - # Shortcut to save a value in the cache. This method does not set an - # expiration on the entry. Use set to specify an explicit expiry. - - def []=(key, value) - set key, value - end - - protected unless $TESTING - - ## - # Create a key for the cache, incorporating the namespace qualifier if - # requested. - - def make_cache_key(key) - if @autofix_keys and (key =~ /\s/ or (key.length + (namespace.nil? ? 0 : namespace.length)) > 250) - key = "#{Digest::SHA1.hexdigest(key)}-autofixed" - end - - if namespace.nil? then - key - else - "#{@namespace}#{@namespace_separator}#{key}" - end - end - - ## - # Returns an interoperable hash value for +key+. (I think, docs are - # sketchy for down servers). - - def hash_for(key) - Zlib.crc32(key) - end - - ## - # Pick a server to handle the request based on a hash of the key. - - def get_server_for_key(key, options = {}) - raise ArgumentError, "illegal character in key #{key.inspect}" if - key =~ /\s/ - raise ArgumentError, "key too long #{key.inspect}" if key.length > 250 - raise MemCacheError, "No servers available" if @servers.empty? - return @servers.first if @servers.length == 1 - - hkey = hash_for(key) - - 20.times do |try| - entryidx = Continuum.binary_search(@continuum, hkey) - server = @continuum[entryidx].server - return server if server.alive? - break unless failover - hkey = hash_for "#{try}#{key}" - end - - raise MemCacheError, "No servers available" - end - - ## - # Performs a raw decr for +cache_key+ from +server+. Returns nil if not - # found. - - def cache_decr(server, cache_key, amount) - with_socket_management(server) do |socket| - socket.write "decr #{cache_key} #{amount}#{noreply}\r\n" - break nil if @no_reply - text = socket.gets - raise_on_error_response! text - return nil if text == "NOT_FOUND\r\n" - return text.to_i - end - end - - ## - # Fetches the raw data for +cache_key+ from +server+. Returns nil on cache - # miss. - - def cache_get(server, cache_key) - with_socket_management(server) do |socket| - socket.write "get #{cache_key}\r\n" - keyline = socket.gets # "VALUE \r\n" - - if keyline.nil? then - server.close - raise MemCacheError, "lost connection to #{server.host}:#{server.port}" - end - - raise_on_error_response! keyline - return nil if keyline == "END\r\n" - - unless keyline =~ /(\d+)\r/ then - server.close - raise MemCacheError, "unexpected response #{keyline.inspect}" - end - value = socket.read $1.to_i - socket.read 2 # "\r\n" - socket.gets # "END\r\n" - return value - end - end - - def gets(key, raw = false) - with_server(key) do |server, cache_key| - logger.debug { "gets #{key} from #{server.inspect}" } if logger - result = with_socket_management(server) do |socket| - socket.write "gets #{cache_key}\r\n" - keyline = socket.gets # "VALUE \r\n" - - if keyline.nil? then - server.close - raise MemCacheError, "lost connection to #{server.host}:#{server.port}" - end - - raise_on_error_response! keyline - return nil if keyline == "END\r\n" - - unless keyline =~ /(\d+) (\w+)\r/ then - server.close - raise MemCacheError, "unexpected response #{keyline.inspect}" - end - value = socket.read $1.to_i - socket.read 2 # "\r\n" - socket.gets # "END\r\n" - [value, $2] - end - result[0] = Marshal.load result[0] unless raw - result - end - rescue TypeError => err - handle_error nil, err - end - - - ## - # Fetches +cache_keys+ from +server+ using a multi-get. - - def cache_get_multi(server, cache_keys) - with_socket_management(server) do |socket| - values = {} - socket.write "get #{cache_keys}\r\n" - - while keyline = socket.gets do - return values if keyline == "END\r\n" - raise_on_error_response! keyline - - unless keyline =~ /\AVALUE (.+) (.+) (.+)/ then - server.close - raise MemCacheError, "unexpected response #{keyline.inspect}" - end - - key, data_length = $1, $3 - values[$1] = socket.read data_length.to_i - socket.read(2) # "\r\n" - end - - server.close - raise MemCacheError, "lost connection to #{server.host}:#{server.port}" # TODO: retry here too - end - end - - ## - # Performs a raw incr for +cache_key+ from +server+. Returns nil if not - # found. - - def cache_incr(server, cache_key, amount) - with_socket_management(server) do |socket| - socket.write "incr #{cache_key} #{amount}#{noreply}\r\n" - break nil if @no_reply - text = socket.gets - raise_on_error_response! text - return nil if text == "NOT_FOUND\r\n" - return text.to_i - end - end - - ## - # Gets or creates a socket connected to the given server, and yields it - # to the block, wrapped in a mutex synchronization if @multithread is true. - # - # If a socket error (SocketError, SystemCallError, IOError) or protocol error - # (MemCacheError) is raised by the block, closes the socket, attempts to - # connect again, and retries the block (once). If an error is again raised, - # reraises it as MemCacheError. - # - # If unable to connect to the server (or if in the reconnect wait period), - # raises MemCacheError. Note that the socket connect code marks a server - # dead for a timeout period, so retrying does not apply to connection attempt - # failures (but does still apply to unexpectedly lost connections etc.). - - def with_socket_management(server, &block) - check_multithread_status! - - @mutex.lock if @multithread - retried = false - - begin - socket = server.socket - - # Raise an IndexError to show this server is out of whack. If were inside - # a with_server block, we'll catch it and attempt to restart the operation. - - raise IndexError, "No connection to server (#{server.status})" if socket.nil? - - block.call(socket) - - rescue SocketError, Errno::EAGAIN, Timeout::Error => err - logger.warn { "Socket failure: #{err.message}" } if logger - server.mark_dead(err) - handle_error(server, err) - - rescue MemCacheError, SystemCallError, IOError => err - logger.warn { "Generic failure: #{err.class.name}: #{err.message}" } if logger - handle_error(server, err) if retried || socket.nil? - retried = true - retry - end - ensure - @mutex.unlock if @multithread - end - - def with_server(key) - retried = false - begin - server, cache_key = request_setup(key) - yield server, cache_key - rescue IndexError => e - logger.warn { "Server failed: #{e.class.name}: #{e.message}" } if logger - if !retried && @servers.size > 1 - logger.info { "Connection to server #{server.inspect} DIED! Retrying operation..." } if logger - retried = true - retry - end - handle_error(nil, e) - end - end - - ## - # Handles +error+ from +server+. - - def handle_error(server, error) - raise error if error.is_a?(MemCacheError) - server.close if server - new_error = MemCacheError.new error.message - new_error.set_backtrace error.backtrace - raise new_error - end - - def noreply - @no_reply ? ' noreply' : '' - end - - ## - # Performs setup for making a request with +key+ from memcached. Returns - # the server to fetch the key from and the complete key to use. - - def request_setup(key) - raise MemCacheError, 'No active servers' unless active? - cache_key = make_cache_key key - server = get_server_for_key cache_key - return server, cache_key - end - - def raise_on_error_response!(response) - if response =~ /\A(?:CLIENT_|SERVER_)?ERROR(.*)/ - raise MemCacheError, $1.strip - end - end - - def create_continuum_for(servers) - total_weight = servers.inject(0) { |memo, srv| memo + srv.weight } - continuum = [] - - servers.each do |server| - entry_count_for(server, servers.size, total_weight).times do |idx| - hash = Digest::SHA1.hexdigest("#{server.host}:#{server.port}:#{idx}") - value = Integer("0x#{hash[0..7]}") - continuum << Continuum::Entry.new(value, server) - end - end - - continuum.sort { |a, b| a.value <=> b.value } - end - - def entry_count_for(server, total_servers, total_weight) - ((total_servers * Continuum::POINTS_PER_SERVER * server.weight) / Float(total_weight)).floor - end - - def check_multithread_status! - return if @multithread - - if Thread.current[:memcache_client] != self.object_id - raise MemCacheError, <<-EOM - You are accessing this memcache-client instance from multiple threads but have not enabled multithread support. - Normally: MemCache.new(['localhost:11211'], :multithread => true) - In Rails: config.cache_store = [:mem_cache_store, 'localhost:11211', { :multithread => true }] - EOM - end - end - - ## - # This class represents a memcached server instance. - - class Server - - ## - # The amount of time to wait before attempting to re-establish a - # connection with a server that is marked dead. - - RETRY_DELAY = 30.0 - - ## - # The host the memcached server is running on. - - attr_reader :host - - ## - # The port the memcached server is listening on. - - attr_reader :port - - ## - # The weight given to the server. - - attr_reader :weight - - ## - # The time of next retry if the connection is dead. - - attr_reader :retry - - ## - # A text status string describing the state of the server. - - attr_reader :status - - attr_reader :logger - - ## - # Create a new MemCache::Server object for the memcached instance - # listening on the given host and port, weighted by the given weight. - - def initialize(memcache, host, port = DEFAULT_PORT, weight = DEFAULT_WEIGHT) - raise ArgumentError, "No host specified" if host.nil? or host.empty? - raise ArgumentError, "No port specified" if port.nil? or port.to_i.zero? - - @host = host - @port = port.to_i - @weight = weight.to_i - - @sock = nil - @retry = nil - @status = 'NOT CONNECTED' - @timeout = memcache.timeout - @logger = memcache.logger - end - - ## - # Return a string representation of the server object. - - def inspect - "" % [@host, @port, @weight, @status] - end - - ## - # Check whether the server connection is alive. This will cause the - # socket to attempt to connect if it isn't already connected and or if - # the server was previously marked as down and the retry time has - # been exceeded. - - def alive? - !!socket - end - - ## - # Try to connect to the memcached server targeted by this object. - # Returns the connected socket object on success or nil on failure. - - def socket - return @sock if @sock and not @sock.closed? - - @sock = nil - - # If the host was dead, don't retry for a while. - return if @retry and @retry > Time.now - - # Attempt to connect if not already connected. - begin - @sock = connect_to(@host, @port, @timeout) - @sock.setsockopt Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1 - @retry = nil - @status = 'CONNECTED' - rescue SocketError, SystemCallError, IOError => err - logger.warn { "Unable to open socket: #{err.class.name}, #{err.message}" } if logger - mark_dead err - end - - return @sock - end - - def connect_to(host, port, timeout=nil) - io = MemCache::BufferedIO.new(TCPSocket.new(host, port)) - io.read_timeout = timeout - io - end - - ## - # Close the connection to the memcached server targeted by this - # object. The server is not considered dead. - - def close - @sock.close if @sock && !@sock.closed? - @sock = nil - @retry = nil - @status = "NOT CONNECTED" - end - - ## - # Mark the server as dead and close its socket. - - def mark_dead(error) - @sock.close if @sock && !@sock.closed? - @sock = nil - @retry = Time.now + RETRY_DELAY - - reason = "#{error.class.name}: #{error.message}" - @status = sprintf "%s:%s DEAD (%s), will retry at %s", @host, @port, reason, @retry - @logger.info { @status } if @logger - end - - end - - ## - # Base MemCache exception class. - - class MemCacheError < RuntimeError; end - - class BufferedIO < Net::BufferedIO # :nodoc: - BUFSIZE = 1024 * 16 - - if RUBY_VERSION < '1.9.1' - def rbuf_fill - begin - @rbuf << @io.read_nonblock(BUFSIZE) - rescue Errno::EWOULDBLOCK - retry unless @read_timeout - if IO.select([@io], nil, nil, @read_timeout) - retry - else - raise Timeout::Error, 'IO timeout' - end - end - end - end - - def setsockopt(*args) - @io.setsockopt(*args) - end - - def gets - readuntil("\n") - end - end - -end - -module Continuum - POINTS_PER_SERVER = 160 # this is the default in libmemcached - - # Find the closest index in Continuum with value <= the given value - def self.binary_search(ary, value, &block) - upper = ary.size - 1 - lower = 0 - idx = 0 - - while(lower <= upper) do - idx = (lower + upper) / 2 - comp = ary[idx].value <=> value - - if comp == 0 - return idx - elsif comp > 0 - upper = idx - 1 - else - lower = idx + 1 - end - end - return upper - end - - class Entry - attr_reader :value - attr_reader :server - - def initialize(val, srv) - @value = val - @server = srv - end - - def inspect - "<#{value}, #{server.host}:#{server.port}>" - end - end - -end -- cgit v1.2.3 From a06a5a64ba8f7d7b11025d136013b48a01ccdcc8 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Thu, 28 Jan 2010 12:08:14 +1100 Subject: Unvendor'd text-format, now requires text-format gem --- actionmailer/CHANGELOG | 2 + actionmailer/actionmailer.gemspec | 1 + actionmailer/lib/action_mailer.rb | 2 +- .../vendor/text-format-0.6.3/text/format.rb | 1467 -------------------- .../lib/action_mailer/vendor/text_format.rb | 10 - 5 files changed, 4 insertions(+), 1478 deletions(-) delete mode 100755 actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb delete mode 100644 actionmailer/lib/action_mailer/vendor/text_format.rb diff --git a/actionmailer/CHANGELOG b/actionmailer/CHANGELOG index 0018a2ed5d..4ee6bd4620 100644 --- a/actionmailer/CHANGELOG +++ b/actionmailer/CHANGELOG @@ -1,5 +1,7 @@ *Rails 3.0 (pending)* +* Unvendor'd text-format, now requires text-format gem + * Whole new API added with tests. See base.rb for full details. Old API is deprecated. * The Mail::Message class has helped methods for all the field types that return 'common' defaults for the common use case, so to get the subject, mail.subject will give you a string, mail.date will give you a DateTime object, mail.from will give you an array of address specs (mikel@test.lindsaar.net) etc. If you want to access the field object itself, call mail[:field_name] which will return the field object you want, which you can then chain, like mail[:from].formatted diff --git a/actionmailer/actionmailer.gemspec b/actionmailer/actionmailer.gemspec index b0ec3d798e..abbb542293 100644 --- a/actionmailer/actionmailer.gemspec +++ b/actionmailer/actionmailer.gemspec @@ -12,6 +12,7 @@ Gem::Specification.new do |s| s.add_dependency('actionpack', '= 3.0.pre') s.add_dependency('mail', '~> 2.1.2') + s.add_dependency('text-format', '~> 1.0.0') s.files = Dir['CHANGELOG', 'README', 'MIT-LICENSE', 'lib/**/*'] s.has_rdoc = true diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index 8339826197..17f63aca25 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -45,5 +45,5 @@ end module Text extend ActiveSupport::Autoload - autoload :Format, 'action_mailer/vendor/text_format' + autoload :Format, 'text/format' end diff --git a/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb b/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb deleted file mode 100755 index 81cc7906d8..0000000000 --- a/actionmailer/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb +++ /dev/null @@ -1,1467 +0,0 @@ -#-- -# Text::Format for Ruby -# Version 0.63 -# -# Copyright (c) 2002 - 2003 Austin Ziegler -# -# $Id: format.rb,v 1.1.1.1 2004/10/14 11:59:57 webster132 Exp $ -# -# ========================================================================== -# Revision History :: -# YYYY.MM.DD Change ID Developer -# Description -# -------------------------------------------------------------------------- -# 2002.10.18 Austin Ziegler -# Fixed a minor problem with tabs not being counted. Changed -# abbreviations from Hash to Array to better suit Ruby's -# capabilities. Fixed problems with the way that Array arguments -# are handled in calls to the major object types, excepting in -# Text::Format#expand and Text::Format#unexpand (these will -# probably need to be fixed). -# 2002.10.30 Austin Ziegler -# Fixed the ordering of the <=> for binary tests. Fixed -# Text::Format#expand and Text::Format#unexpand to handle array -# arguments better. -# 2003.01.24 Austin Ziegler -# Fixed a problem with Text::Format::RIGHT_FILL handling where a -# single word is larger than #columns. Removed Comparable -# capabilities (<=> doesn't make sense; == does). Added Symbol -# equivalents for the Hash initialization. Hash initialization has -# been modified so that values are set as follows (Symbols are -# highest priority; strings are middle; defaults are lowest): -# @columns = arg[:columns] || arg['columns'] || @columns -# Added #hard_margins, #split_rules, #hyphenator, and #split_words. -# 2003.02.07 Austin Ziegler -# Fixed the installer for proper case-sensitive handling. -# 2003.03.28 Austin Ziegler -# Added the ability for a hyphenator to receive the formatter -# object. Fixed a bug for strings matching /\A\s*\Z/ failing -# entirely. Fixed a test case failing under 1.6.8. -# 2003.04.04 Austin Ziegler -# Handle the case of hyphenators returning nil for first/rest. -# 2003.09.17 Austin Ziegler -# Fixed a problem where #paragraphs(" ") was raising -# NoMethodError. -# -# ========================================================================== -#++ - -module Text #:nodoc: - # Text::Format for Ruby is copyright 2002 - 2005 by Austin Ziegler. It - # is available under Ruby's licence, the Perl Artistic licence, or the - # GNU GPL version 2 (or at your option, any later version). As a - # special exception, for use with official Rails (provided by the - # rubyonrails.org development team) and any project created with - # official Rails, the following alternative MIT-style licence may be - # used: - # - # == Text::Format Licence for Rails and Rails Applications - # Permission is hereby granted, free of charge, to any person - # obtaining a copy of this software and associated documentation files - # (the "Software"), to deal in the Software without restriction, - # including without limitation the rights to use, copy, modify, merge, - # publish, distribute, sublicense, and/or sell copies of the Software, - # and to permit persons to whom the Software is furnished to do so, - # subject to the following conditions: - # - # * The names of its contributors may not be used to endorse or - # promote products derived from this software without specific prior - # written permission. - # - # The above copyright notice and this permission notice shall be - # included in all copies or substantial portions of the Software. - # - # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - # SOFTWARE. - class Format - VERSION = '0.63' - - # Local abbreviations. More can be added with Text::Format.abbreviations - ABBREV = [ 'Mr', 'Mrs', 'Ms', 'Jr', 'Sr' ] - - # Formatting values - LEFT_ALIGN = 0 - RIGHT_ALIGN = 1 - RIGHT_FILL = 2 - JUSTIFY = 3 - - # Word split modes (only applies when #hard_margins is true). - SPLIT_FIXED = 1 - SPLIT_CONTINUATION = 2 - SPLIT_HYPHENATION = 4 - SPLIT_CONTINUATION_FIXED = SPLIT_CONTINUATION | SPLIT_FIXED - SPLIT_HYPHENATION_FIXED = SPLIT_HYPHENATION | SPLIT_FIXED - SPLIT_HYPHENATION_CONTINUATION = SPLIT_HYPHENATION | SPLIT_CONTINUATION - SPLIT_ALL = SPLIT_HYPHENATION | SPLIT_CONTINUATION | SPLIT_FIXED - - # Words forcibly split by Text::Format will be stored as split words. - # This class represents a word forcibly split. - class SplitWord - # The word that was split. - attr_reader :word - # The first part of the word that was split. - attr_reader :first - # The remainder of the word that was split. - attr_reader :rest - - def initialize(word, first, rest) #:nodoc: - @word = word - @first = first - @rest = rest - end - end - - private - LEQ_RE = /[.?!]['"]?$/ - - def brk_re(i) #:nodoc: - %r/((?:\S+\s+){#{i}})(.+)/ - end - - def posint(p) #:nodoc: - p.to_i.abs - end - - public - # Compares two Text::Format objects. All settings of the objects are - # compared *except* #hyphenator. Generated results (e.g., #split_words) - # are not compared, either. - def ==(o) - (@text == o.text) && - (@columns == o.columns) && - (@left_margin == o.left_margin) && - (@right_margin == o.right_margin) && - (@hard_margins == o.hard_margins) && - (@split_rules == o.split_rules) && - (@first_indent == o.first_indent) && - (@body_indent == o.body_indent) && - (@tag_text == o.tag_text) && - (@tabstop == o.tabstop) && - (@format_style == o.format_style) && - (@extra_space == o.extra_space) && - (@tag_paragraph == o.tag_paragraph) && - (@nobreak == o.nobreak) && - (@abbreviations == o.abbreviations) && - (@nobreak_regex == o.nobreak_regex) - end - - # The text to be manipulated. Note that value is optional, but if the - # formatting functions are called without values, this text is what will - # be formatted. - # - # *Default*:: [] - # Used in:: All methods - attr_accessor :text - - # The total width of the format area. The margins, indentation, and text - # are formatted into this space. - # - # COLUMNS - # <--------------------------------------------------------------> - # <-----------><------><---------------------------><------------> - # left margin indent text is formatted into here right margin - # - # *Default*:: 72 - # Used in:: #format, #paragraphs, - # #center - attr_reader :columns - - # The total width of the format area. The margins, indentation, and text - # are formatted into this space. The value provided is silently - # converted to a positive integer. - # - # COLUMNS - # <--------------------------------------------------------------> - # <-----------><------><---------------------------><------------> - # left margin indent text is formatted into here right margin - # - # *Default*:: 72 - # Used in:: #format, #paragraphs, - # #center - def columns=(c) - @columns = posint(c) - end - - # The number of spaces used for the left margin. - # - # columns - # <--------------------------------------------------------------> - # <-----------><------><---------------------------><------------> - # LEFT MARGIN indent text is formatted into here right margin - # - # *Default*:: 0 - # Used in:: #format, #paragraphs, - # #center - attr_reader :left_margin - - # The number of spaces used for the left margin. The value provided is - # silently converted to a positive integer value. - # - # columns - # <--------------------------------------------------------------> - # <-----------><------><---------------------------><------------> - # LEFT MARGIN indent text is formatted into here right margin - # - # *Default*:: 0 - # Used in:: #format, #paragraphs, - # #center - def left_margin=(left) - @left_margin = posint(left) - end - - # The number of spaces used for the right margin. - # - # columns - # <--------------------------------------------------------------> - # <-----------><------><---------------------------><------------> - # left margin indent text is formatted into here RIGHT MARGIN - # - # *Default*:: 0 - # Used in:: #format, #paragraphs, - # #center - attr_reader :right_margin - - # The number of spaces used for the right margin. The value provided is - # silently converted to a positive integer value. - # - # columns - # <--------------------------------------------------------------> - # <-----------><------><---------------------------><------------> - # left margin indent text is formatted into here RIGHT MARGIN - # - # *Default*:: 0 - # Used in:: #format, #paragraphs, - # #center - def right_margin=(r) - @right_margin = posint(r) - end - - # The number of spaces to indent the first line of a paragraph. - # - # columns - # <--------------------------------------------------------------> - # <-----------><------><---------------------------><------------> - # left margin INDENT text is formatted into here right margin - # - # *Default*:: 4 - # Used in:: #format, #paragraphs - attr_reader :first_indent - - # The number of spaces to indent the first line of a paragraph. The - # value provided is silently converted to a positive integer value. - # - # columns - # <--------------------------------------------------------------> - # <-----------><------><---------------------------><------------> - # left margin INDENT text is formatted into here right margin - # - # *Default*:: 4 - # Used in:: #format, #paragraphs - def first_indent=(f) - @first_indent = posint(f) - end - - # The number of spaces to indent all lines after the first line of a - # paragraph. - # - # columns - # <--------------------------------------------------------------> - # <-----------><------><---------------------------><------------> - # left margin INDENT text is formatted into here right margin - # - # *Default*:: 0 - # Used in:: #format, #paragraphs - attr_reader :body_indent - - # The number of spaces to indent all lines after the first line of - # a paragraph. The value provided is silently converted to a - # positive integer value. - # - # columns - # <--------------------------------------------------------------> - # <-----------><------><---------------------------><------------> - # left margin INDENT text is formatted into here right margin - # - # *Default*:: 0 - # Used in:: #format, #paragraphs - def body_indent=(b) - @body_indent = posint(b) - end - - # Normally, words larger than the format area will be placed on a line - # by themselves. Setting this to +true+ will force words larger than the - # format area to be split into one or more "words" each at most the size - # of the format area. The first line and the original word will be - # placed into #split_words. Note that this will cause the - # output to look *similar* to a #format_style of JUSTIFY. (Lines will be - # filled as much as possible.) - # - # *Default*:: +false+ - # Used in:: #format, #paragraphs - attr_accessor :hard_margins - - # An array of words split during formatting if #hard_margins is set to - # +true+. - # #split_words << Text::Format::SplitWord.new(word, first, rest) - attr_reader :split_words - - # The object responsible for hyphenating. It must respond to - # #hyphenate_to(word, size) or #hyphenate_to(word, size, formatter) and - # return an array of the word split into two parts; if there is a - # hyphenation mark to be applied, responsibility belongs to the - # hyphenator object. The size is the MAXIMUM size permitted, including - # any hyphenation marks. If the #hyphenate_to method has an arity of 3, - # the formatter will be provided to the method. This allows the - # hyphenator to make decisions about the hyphenation based on the - # formatting rules. - # - # *Default*:: +nil+ - # Used in:: #format, #paragraphs - attr_reader :hyphenator - - # The object responsible for hyphenating. It must respond to - # #hyphenate_to(word, size) and return an array of the word hyphenated - # into two parts. The size is the MAXIMUM size permitted, including any - # hyphenation marks. - # - # *Default*:: +nil+ - # Used in:: #format, #paragraphs - def hyphenator=(h) - raise ArgumentError, "#{h.inspect} is not a valid hyphenator." unless h.respond_to?(:hyphenate_to) - arity = h.method(:hyphenate_to).arity - raise ArgumentError, "#{h.inspect} must have exactly two or three arguments." unless [2, 3].include?(arity) - @hyphenator = h - @hyphenator_arity = arity - end - - # Specifies the split mode; used only when #hard_margins is set to - # +true+. Allowable values are: - # [+SPLIT_FIXED+] The word will be split at the number of - # characters needed, with no marking at all. - # repre - # senta - # ion - # [+SPLIT_CONTINUATION+] The word will be split at the number of - # characters needed, with a C-style continuation - # character. If a word is the only item on a - # line and it cannot be split into an - # appropriate size, SPLIT_FIXED will be used. - # repr\ - # esen\ - # tati\ - # on - # [+SPLIT_HYPHENATION+] The word will be split according to the - # hyphenator specified in #hyphenator. If there - # is no #hyphenator specified, works like - # SPLIT_CONTINUATION. The example is using - # TeX::Hyphen. If a word is the only item on a - # line and it cannot be split into an - # appropriate size, SPLIT_CONTINUATION mode will - # be used. - # rep- - # re- - # sen- - # ta- - # tion - # - # *Default*:: Text::Format::SPLIT_FIXED - # Used in:: #format, #paragraphs - attr_reader :split_rules - - # Specifies the split mode; used only when #hard_margins is set to - # +true+. Allowable values are: - # [+SPLIT_FIXED+] The word will be split at the number of - # characters needed, with no marking at all. - # repre - # senta - # ion - # [+SPLIT_CONTINUATION+] The word will be split at the number of - # characters needed, with a C-style continuation - # character. - # repr\ - # esen\ - # tati\ - # on - # [+SPLIT_HYPHENATION+] The word will be split according to the - # hyphenator specified in #hyphenator. If there - # is no #hyphenator specified, works like - # SPLIT_CONTINUATION. The example is using - # TeX::Hyphen as the #hyphenator. - # rep- - # re- - # sen- - # ta- - # tion - # - # These values can be bitwise ORed together (e.g., SPLIT_FIXED | - # SPLIT_CONTINUATION) to provide fallback split methods. In the - # example given, an attempt will be made to split the word using the - # rules of SPLIT_CONTINUATION; if there is not enough room, the word - # will be split with the rules of SPLIT_FIXED. These combinations are - # also available as the following values: - # * +SPLIT_CONTINUATION_FIXED+ - # * +SPLIT_HYPHENATION_FIXED+ - # * +SPLIT_HYPHENATION_CONTINUATION+ - # * +SPLIT_ALL+ - # - # *Default*:: Text::Format::SPLIT_FIXED - # Used in:: #format, #paragraphs - def split_rules=(s) - raise ArgumentError, "Invalid value provided for split_rules." if ((s < SPLIT_FIXED) || (s > SPLIT_ALL)) - @split_rules = s - end - - # Indicates whether sentence terminators should be followed by a single - # space (+false+), or two spaces (+true+). - # - # *Default*:: +false+ - # Used in:: #format, #paragraphs - attr_accessor :extra_space - - # Defines the current abbreviations as an array. This is only used if - # extra_space is turned on. - # - # If one is abbreviating "President" as "Pres." (abbreviations = - # ["Pres"]), then the results of formatting will be as illustrated in - # the table below: - # - # extra_space | include? | !include? - # true | Pres. Lincoln | Pres. Lincoln - # false | Pres. Lincoln | Pres. Lincoln - # - # *Default*:: {} - # Used in:: #format, #paragraphs - attr_accessor :abbreviations - - # Indicates whether the formatting of paragraphs should be done with - # tagged paragraphs. Useful only with #tag_text. - # - # *Default*:: +false+ - # Used in:: #format, #paragraphs - attr_accessor :tag_paragraph - - # The array of text to be placed before each paragraph when - # #tag_paragraph is +true+. When #format() is called, - # only the first element of the array is used. When #paragraphs - # is called, then each entry in the array will be used once, with - # corresponding paragraphs. If the tag elements are exhausted before the - # text is exhausted, then the remaining paragraphs will not be tagged. - # Regardless of indentation settings, a blank line will be inserted - # between all paragraphs when #tag_paragraph is +true+. - # - # *Default*:: [] - # Used in:: #format, #paragraphs - attr_accessor :tag_text - - # Indicates whether or not the non-breaking space feature should be - # used. - # - # *Default*:: +false+ - # Used in:: #format, #paragraphs - attr_accessor :nobreak - - # A hash which holds the regular expressions on which spaces should not - # be broken. The hash is set up such that the key is the first word and - # the value is the second word. - # - # For example, if +nobreak_regex+ contains the following hash: - # - # { '^Mrs?\.$' => '\S+$', '^\S+$' => '^(?:S|J)r\.$'} - # - # Then "Mr. Jones", "Mrs. Jones", and "Jones Jr." would not be broken. - # If this simple matching algorithm indicates that there should not be a - # break at the current end of line, then a backtrack is done until there - # are two words on which line breaking is permitted. If two such words - # are not found, then the end of the line will be broken *regardless*. - # If there is a single word on the current line, then no backtrack is - # done and the word is stuck on the end. - # - # *Default*:: {} - # Used in:: #format, #paragraphs - attr_accessor :nobreak_regex - - # Indicates the number of spaces that a single tab represents. - # - # *Default*:: 8 - # Used in:: #expand, #unexpand, - # #paragraphs - attr_reader :tabstop - - # Indicates the number of spaces that a single tab represents. - # - # *Default*:: 8 - # Used in:: #expand, #unexpand, - # #paragraphs - def tabstop=(t) - @tabstop = posint(t) - end - - # Specifies the format style. Allowable values are: - # [+LEFT_ALIGN+] Left justified, ragged right. - # |A paragraph that is| - # |left aligned.| - # [+RIGHT_ALIGN+] Right justified, ragged left. - # |A paragraph that is| - # | right aligned.| - # [+RIGHT_FILL+] Left justified, right ragged, filled to width by - # spaces. (Essentially the same as +LEFT_ALIGN+ except - # that lines are padded on the right.) - # |A paragraph that is| - # |left aligned. | - # [+JUSTIFY+] Fully justified, words filled to width by spaces, - # except the last line. - # |A paragraph that| - # |is justified.| - # - # *Default*:: Text::Format::LEFT_ALIGN - # Used in:: #format, #paragraphs - attr_reader :format_style - - # Specifies the format style. Allowable values are: - # [+LEFT_ALIGN+] Left justified, ragged right. - # |A paragraph that is| - # |left aligned.| - # [+RIGHT_ALIGN+] Right justified, ragged left. - # |A paragraph that is| - # | right aligned.| - # [+RIGHT_FILL+] Left justified, right ragged, filled to width by - # spaces. (Essentially the same as +LEFT_ALIGN+ except - # that lines are padded on the right.) - # |A paragraph that is| - # |left aligned. | - # [+JUSTIFY+] Fully justified, words filled to width by spaces. - # |A paragraph that| - # |is justified.| - # - # *Default*:: Text::Format::LEFT_ALIGN - # Used in:: #format, #paragraphs - def format_style=(fs) - raise ArgumentError, "Invalid value provided for format_style." if ((fs < LEFT_ALIGN) || (fs > JUSTIFY)) - @format_style = fs - end - - # Indicates that the format style is left alignment. - # - # *Default*:: +true+ - # Used in:: #format, #paragraphs - def left_align? - return @format_style == LEFT_ALIGN - end - - # Indicates that the format style is right alignment. - # - # *Default*:: +false+ - # Used in:: #format, #paragraphs - def right_align? - return @format_style == RIGHT_ALIGN - end - - # Indicates that the format style is right fill. - # - # *Default*:: +false+ - # Used in:: #format, #paragraphs - def right_fill? - return @format_style == RIGHT_FILL - end - - # Indicates that the format style is full justification. - # - # *Default*:: +false+ - # Used in:: #format, #paragraphs - def justify? - return @format_style == JUSTIFY - end - - # The default implementation of #hyphenate_to implements - # SPLIT_CONTINUATION. - def hyphenate_to(word, size) - [word[0 .. (size - 2)] + "\\", word[(size - 1) .. -1]] - end - - private - def __do_split_word(word, size) #:nodoc: - [word[0 .. (size - 1)], word[size .. -1]] - end - - def __format(to_wrap) #:nodoc: - words = to_wrap.split(/\s+/).compact - words.shift if words[0].nil? or words[0].empty? - to_wrap = [] - - abbrev = false - width = @columns - @first_indent - @left_margin - @right_margin - indent_str = ' ' * @first_indent - first_line = true - line = words.shift - abbrev = __is_abbrev(line) unless line.nil? || line.empty? - - while w = words.shift - if (w.size + line.size < (width - 1)) || - ((line !~ LEQ_RE || abbrev) && (w.size + line.size < width)) - line << " " if (line =~ LEQ_RE) && (not abbrev) - line << " #{w}" - else - line, w = __do_break(line, w) if @nobreak - line, w = __do_hyphenate(line, w, width) if @hard_margins - if w.index(/\s+/) - w, *w2 = w.split(/\s+/) - words.unshift(w2) - words.flatten! - end - to_wrap << __make_line(line, indent_str, width, w.nil?) unless line.nil? - if first_line - first_line = false - width = @columns - @body_indent - @left_margin - @right_margin - indent_str = ' ' * @body_indent - end - line = w - end - - abbrev = __is_abbrev(w) unless w.nil? - end - - loop do - break if line.nil? or line.empty? - line, w = __do_hyphenate(line, w, width) if @hard_margins - to_wrap << __make_line(line, indent_str, width, w.nil?) - line = w - end - - if (@tag_paragraph && (to_wrap.size > 0)) then - clr = %r{`(\w+)'}.match([caller(1)].flatten[0])[1] - clr = "" if clr.nil? - - if ((not @tag_text[0].nil?) && (@tag_cur.size < 1) && - (clr != "__paragraphs")) then - @tag_cur = @tag_text[0] - end - - fchar = /(\S)/.match(to_wrap[0])[1] - white = to_wrap[0].index(fchar) - if ((white - @left_margin - 1) > @tag_cur.size) then - white = @tag_cur.size + @left_margin - to_wrap[0].gsub!(/^ {#{white}}/, "#{' ' * @left_margin}#{@tag_cur}") - else - to_wrap.unshift("#{' ' * @left_margin}#{@tag_cur}\n") - end - end - to_wrap.join('') - end - - # format lines in text into paragraphs with each element of @wrap a - # paragraph; uses Text::Format.format for the formatting - def __paragraphs(to_wrap) #:nodoc: - if ((@first_indent == @body_indent) || @tag_paragraph) then - p_end = "\n" - else - p_end = '' - end - - cnt = 0 - ret = [] - to_wrap.each do |tw| - @tag_cur = @tag_text[cnt] if @tag_paragraph - @tag_cur = '' if @tag_cur.nil? - line = __format(tw) - ret << "#{line}#{p_end}" if (not line.nil?) && (line.size > 0) - cnt += 1 - end - - ret[-1].chomp! unless ret.empty? - ret.join('') - end - - # center text using spaces on left side to pad it out empty lines - # are preserved - def __center(to_center) #:nodoc: - tabs = 0 - width = @columns - @left_margin - @right_margin - centered = [] - to_center.each do |tc| - s = tc.strip - tabs = s.count("\t") - tabs = 0 if tabs.nil? - ct = ((width - s.size - (tabs * @tabstop) + tabs) / 2) - ct = (width - @left_margin - @right_margin) - ct - centered << "#{s.rjust(ct)}\n" - end - centered.join('') - end - - # expand tabs to spaces should be similar to Text::Tabs::expand - def __expand(to_expand) #:nodoc: - expanded = [] - to_expand.split("\n").each { |te| expanded << te.gsub(/\t/, ' ' * @tabstop) } - expanded.join('') - end - - def __unexpand(to_unexpand) #:nodoc: - unexpanded = [] - to_unexpand.split("\n").each { |tu| unexpanded << tu.gsub(/ {#{@tabstop}}/, "\t") } - unexpanded.join('') - end - - def __is_abbrev(word) #:nodoc: - # remove period if there is one. - w = word.gsub(/\.$/, '') unless word.nil? - return true if (!@extra_space || ABBREV.include?(w) || @abbreviations.include?(w)) - false - end - - def __make_line(line, indent, width, last = false) #:nodoc: - lmargin = " " * @left_margin - fill = " " * (width - line.size) if right_fill? && (line.size <= width) - - if (justify? && ((not line.nil?) && (not line.empty?)) && line =~ /\S+\s+\S+/ && !last) - spaces = width - line.size - words = line.split(/(\s+)/) - ws = spaces / (words.size / 2) - spaces = spaces % (words.size / 2) if ws > 0 - words.reverse.each do |rw| - next if (rw =~ /^\S/) - rw.sub!(/^/, " " * ws) - next unless (spaces > 0) - rw.sub!(/^/, " ") - spaces -= 1 - end - line = words.join('') - end - line = "#{lmargin}#{indent}#{line}#{fill}\n" unless line.nil? - if right_align? && (not line.nil?) - line.sub(/^/, " " * (@columns - @right_margin - (line.size - 1))) - else - line - end - end - - def __do_hyphenate(line, next_line, width) #:nodoc: - rline = line.dup rescue line - rnext = next_line.dup rescue next_line - loop do - if rline.size == width - break - elsif rline.size > width - words = rline.strip.split(/\s+/) - word = words[-1].dup - size = width - rline.size + word.size - if (size <= 0) - words[-1] = nil - rline = words.join(' ').strip - rnext = "#{word} #{rnext}".strip - next - end - - first = rest = nil - - if ((@split_rules & SPLIT_HYPHENATION) != 0) - if @hyphenator_arity == 2 - first, rest = @hyphenator.hyphenate_to(word, size) - else - first, rest = @hyphenator.hyphenate_to(word, size, self) - end - end - - if ((@split_rules & SPLIT_CONTINUATION) != 0) and first.nil? - first, rest = self.hyphenate_to(word, size) - end - - if ((@split_rules & SPLIT_FIXED) != 0) and first.nil? - first.nil? or @split_rules == SPLIT_FIXED - first, rest = __do_split_word(word, size) - end - - if first.nil? - words[-1] = nil - rest = word - else - words[-1] = first - @split_words << SplitWord.new(word, first, rest) - end - rline = words.join(' ').strip - rnext = "#{rest} #{rnext}".strip - break - else - break if rnext.nil? or rnext.empty? or rline.nil? or rline.empty? - words = rnext.split(/\s+/) - word = words.shift - size = width - rline.size - 1 - - if (size <= 0) - rnext = "#{word} #{words.join(' ')}".strip - break - end - - first = rest = nil - - if ((@split_rules & SPLIT_HYPHENATION) != 0) - if @hyphenator_arity == 2 - first, rest = @hyphenator.hyphenate_to(word, size) - else - first, rest = @hyphenator.hyphenate_to(word, size, self) - end - end - - first, rest = self.hyphenate_to(word, size) if ((@split_rules & SPLIT_CONTINUATION) != 0) and first.nil? - - first, rest = __do_split_word(word, size) if ((@split_rules & SPLIT_FIXED) != 0) and first.nil? - - if (rline.size + (first ? first.size : 0)) < width - @split_words << SplitWord.new(word, first, rest) - rline = "#{rline} #{first}".strip - rnext = "#{rest} #{words.join(' ')}".strip - end - break - end - end - [rline, rnext] - end - - def __do_break(line, next_line) #:nodoc: - no_brk = false - words = [] - words = line.split(/\s+/) unless line.nil? - last_word = words[-1] - - @nobreak_regex.each { |k, v| no_brk = ((last_word =~ /#{k}/) and (next_line =~ /#{v}/)) } - - if no_brk && words.size > 1 - i = words.size - while i > 0 - no_brk = false - @nobreak_regex.each { |k, v| no_brk = ((words[i + 1] =~ /#{k}/) && (words[i] =~ /#{v}/)) } - i -= 1 - break if not no_brk - end - if i > 0 - l = brk_re(i).match(line) - line.sub!(brk_re(i), l[1]) - next_line = "#{l[2]} #{next_line}" - line.sub!(/\s+$/, '') - end - end - [line, next_line] - end - - def __create(arg = nil, &block) #:nodoc: - # Format::Text.new(text-to-wrap) - @text = arg unless arg.nil? - # Defaults - @columns = 72 - @tabstop = 8 - @first_indent = 4 - @body_indent = 0 - @format_style = LEFT_ALIGN - @left_margin = 0 - @right_margin = 0 - @extra_space = false - @text = Array.new if @text.nil? - @tag_paragraph = false - @tag_text = Array.new - @tag_cur = "" - @abbreviations = Array.new - @nobreak = false - @nobreak_regex = Hash.new - @split_words = Array.new - @hard_margins = false - @split_rules = SPLIT_FIXED - @hyphenator = self - @hyphenator_arity = self.method(:hyphenate_to).arity - - instance_eval(&block) unless block.nil? - end - - public - # Formats text into a nice paragraph format. The text is separated - # into words and then reassembled a word at a time using the settings - # of this Format object. If a word is larger than the number of - # columns available for formatting, then that word will appear on the - # line by itself. - # - # If +to_wrap+ is +nil+, then the value of #text will be - # worked on. - def format(to_wrap = nil) - to_wrap = @text if to_wrap.nil? - if to_wrap.class == Array - __format(to_wrap[0]) - else - __format(to_wrap) - end - end - - # Considers each element of text (provided or internal) as a paragraph. - # If #first_indent is the same as #body_indent, then - # paragraphs will be separated by a single empty line in the result; - # otherwise, the paragraphs will follow immediately after each other. - # Uses #format to do the heavy lifting. - def paragraphs(to_wrap = nil) - to_wrap = @text if to_wrap.nil? - __paragraphs([to_wrap].flatten) - end - - # Centers the text, preserving empty lines and tabs. - def center(to_center = nil) - to_center = @text if to_center.nil? - __center([to_center].flatten) - end - - # Replaces all tab characters in the text with #tabstop spaces. - def expand(to_expand = nil) - to_expand = @text if to_expand.nil? - if to_expand.class == Array - to_expand.collect { |te| __expand(te) } - else - __expand(to_expand) - end - end - - # Replaces all occurrences of #tabstop consecutive spaces - # with a tab character. - def unexpand(to_unexpand = nil) - to_unexpand = @text if to_unexpand.nil? - if to_unexpand.class == Array - to_unexpand.collect { |te| v << __unexpand(te) } - else - __unexpand(to_unexpand) - end - end - - # This constructor takes advantage of a technique for Ruby object - # construction introduced by Andy Hunt and Dave Thomas (see reference), - # where optional values are set using commands in a block. - # - # Text::Format.new { - # columns = 72 - # left_margin = 0 - # right_margin = 0 - # first_indent = 4 - # body_indent = 0 - # format_style = Text::Format::LEFT_ALIGN - # extra_space = false - # abbreviations = {} - # tag_paragraph = false - # tag_text = [] - # nobreak = false - # nobreak_regex = {} - # tabstop = 8 - # text = nil - # } - # - # As shown above, +arg+ is optional. If +arg+ is specified and is a - # +String+, then arg is used as the default value of #text. - # Alternately, an existing Text::Format object can be used or a Hash can - # be used. With all forms, a block can be specified. - # - # *Reference*:: "Object Construction and Blocks" - # - # - def initialize(arg = nil, &block) - @text = nil - case arg - when Text::Format - __create(arg.text) do - @columns = arg.columns - @tabstop = arg.tabstop - @first_indent = arg.first_indent - @body_indent = arg.body_indent - @format_style = arg.format_style - @left_margin = arg.left_margin - @right_margin = arg.right_margin - @extra_space = arg.extra_space - @tag_paragraph = arg.tag_paragraph - @tag_text = arg.tag_text - @abbreviations = arg.abbreviations - @nobreak = arg.nobreak - @nobreak_regex = arg.nobreak_regex - @text = arg.text - @hard_margins = arg.hard_margins - @split_words = arg.split_words - @split_rules = arg.split_rules - @hyphenator = arg.hyphenator - end - instance_eval(&block) unless block.nil? - when Hash - __create do - @columns = arg[:columns] || arg['columns'] || @columns - @tabstop = arg[:tabstop] || arg['tabstop'] || @tabstop - @first_indent = arg[:first_indent] || arg['first_indent'] || @first_indent - @body_indent = arg[:body_indent] || arg['body_indent'] || @body_indent - @format_style = arg[:format_style] || arg['format_style'] || @format_style - @left_margin = arg[:left_margin] || arg['left_margin'] || @left_margin - @right_margin = arg[:right_margin] || arg['right_margin'] || @right_margin - @extra_space = arg[:extra_space] || arg['extra_space'] || @extra_space - @text = arg[:text] || arg['text'] || @text - @tag_paragraph = arg[:tag_paragraph] || arg['tag_paragraph'] || @tag_paragraph - @tag_text = arg[:tag_text] || arg['tag_text'] || @tag_text - @abbreviations = arg[:abbreviations] || arg['abbreviations'] || @abbreviations - @nobreak = arg[:nobreak] || arg['nobreak'] || @nobreak - @nobreak_regex = arg[:nobreak_regex] || arg['nobreak_regex'] || @nobreak_regex - @hard_margins = arg[:hard_margins] || arg['hard_margins'] || @hard_margins - @split_rules = arg[:split_rules] || arg['split_rules'] || @split_rules - @hyphenator = arg[:hyphenator] || arg['hyphenator'] || @hyphenator - end - instance_eval(&block) unless block.nil? - when String - __create(arg, &block) - when NilClass - __create(&block) - else - raise TypeError - end - end - end -end - -if __FILE__ == $0 - require 'test/unit' - - class TestText__Format < Test::Unit::TestCase #:nodoc: - attr_accessor :format_o - - GETTYSBURG = <<-'EOS' - Four score and seven years ago our fathers brought forth on this - continent a new nation, conceived in liberty and dedicated to the - proposition that all men are created equal. Now we are engaged in - a great civil war, testing whether that nation or any nation so - conceived and so dedicated can long endure. We are met on a great - battlefield of that war. We have come to dedicate a portion of - that field as a final resting-place for those who here gave their - lives that that nation might live. It is altogether fitting and - proper that we should do this. But in a larger sense, we cannot - dedicate, we cannot consecrate, we cannot hallow this ground. - The brave men, living and dead who struggled here have consecrated - it far above our poor power to add or detract. The world will - little note nor long remember what we say here, but it can never - forget what they did here. It is for us the living rather to be - dedicated here to the unfinished work which they who fought here - have thus far so nobly advanced. It is rather for us to be here - dedicated to the great task remaining before us--that from these - honored dead we take increased devotion to that cause for which - they gave the last full measure of devotion--that we here highly - resolve that these dead shall not have died in vain, that this - nation under God shall have a new birth of freedom, and that - government of the people, by the people, for the people shall - not perish from the earth. - - -- Pres. Abraham Lincoln, 19 November 1863 - EOS - - FIVE_COL = "Four \nscore\nand s\neven \nyears\nago o\nur fa\nthers\nbroug\nht fo\nrth o\nn thi\ns con\ntinen\nt a n\new na\ntion,\nconce\nived \nin li\nberty\nand d\nedica\nted t\no the\npropo\nsitio\nn tha\nt all\nmen a\nre cr\neated\nequal\n. Now\nwe ar\ne eng\naged \nin a \ngreat\ncivil\nwar, \ntesti\nng wh\nether\nthat \nnatio\nn or \nany n\nation\nso co\nnceiv\ned an\nd so \ndedic\nated \ncan l\nong e\nndure\n. We \nare m\net on\na gre\nat ba\nttlef\nield \nof th\nat wa\nr. We\nhave \ncome \nto de\ndicat\ne a p\nortio\nn of \nthat \nfield\nas a \nfinal\nresti\nng-pl\nace f\nor th\nose w\nho he\nre ga\nve th\neir l\nives \nthat \nthat \nnatio\nn mig\nht li\nve. I\nt is \naltog\nether\nfitti\nng an\nd pro\nper t\nhat w\ne sho\nuld d\no thi\ns. Bu\nt in \na lar\nger s\nense,\nwe ca\nnnot \ndedic\nate, \nwe ca\nnnot \nconse\ncrate\n, we \ncanno\nt hal\nlow t\nhis g\nround\n. The\nbrave\nmen, \nlivin\ng and\ndead \nwho s\ntrugg\nled h\nere h\nave c\nonsec\nrated\nit fa\nr abo\nve ou\nr poo\nr pow\ner to\nadd o\nr det\nract.\nThe w\norld \nwill \nlittl\ne not\ne nor\nlong \nremem\nber w\nhat w\ne say\nhere,\nbut i\nt can\nnever\nforge\nt wha\nt the\ny did\nhere.\nIt is\nfor u\ns the\nlivin\ng rat\nher t\no be \ndedic\nated \nhere \nto th\ne unf\ninish\ned wo\nrk wh\nich t\nhey w\nho fo\nught \nhere \nhave \nthus \nfar s\no nob\nly ad\nvance\nd. It\nis ra\nther \nfor u\ns to \nbe he\nre de\ndicat\ned to\nthe g\nreat \ntask \nremai\nning \nbefor\ne us-\n-that\nfrom \nthese\nhonor\ned de\nad we\ntake \nincre\nased \ndevot\nion t\no tha\nt cau\nse fo\nr whi\nch th\ney ga\nve th\ne las\nt ful\nl mea\nsure \nof de\nvotio\nn--th\nat we\nhere \nhighl\ny res\nolve \nthat \nthese\ndead \nshall\nnot h\nave d\nied i\nn vai\nn, th\nat th\nis na\ntion \nunder\nGod s\nhall \nhave \na new\nbirth\nof fr\needom\n, and\nthat \ngover\nnment\nof th\ne peo\nple, \nby th\ne peo\nple, \nfor t\nhe pe\nople \nshall\nnot p\nerish\nfrom \nthe e\narth.\n-- Pr\nes. A\nbraha\nm Lin\ncoln,\n19 No\nvembe\nr 186\n3 \n" - - FIVE_CNT = "Four \nscore\nand \nseven\nyears\nago \nour \nfath\\\ners \nbrou\\\nght \nforth\non t\\\nhis \ncont\\\ninent\na new\nnati\\\non, \nconc\\\neived\nin l\\\niber\\\nty a\\\nnd d\\\nedic\\\nated \nto t\\\nhe p\\\nropo\\\nsiti\\\non t\\\nhat \nall \nmen \nare \ncrea\\\nted \nequa\\\nl. N\\\now we\nare \nenga\\\nged \nin a \ngreat\ncivil\nwar, \ntest\\\ning \nwhet\\\nher \nthat \nnati\\\non or\nany \nnati\\\non so\nconc\\\neived\nand \nso d\\\nedic\\\nated \ncan \nlong \nendu\\\nre. \nWe a\\\nre m\\\net on\na gr\\\neat \nbatt\\\nlefi\\\neld \nof t\\\nhat \nwar. \nWe h\\\nave \ncome \nto d\\\nedic\\\nate a\nport\\\nion \nof t\\\nhat \nfield\nas a \nfinal\nrest\\\ning-\\\nplace\nfor \nthose\nwho \nhere \ngave \ntheir\nlives\nthat \nthat \nnati\\\non m\\\night \nlive.\nIt is\nalto\\\ngeth\\\ner f\\\nitti\\\nng a\\\nnd p\\\nroper\nthat \nwe s\\\nhould\ndo t\\\nhis. \nBut \nin a \nlarg\\\ner s\\\nense,\nwe c\\\nannot\ndedi\\\ncate,\nwe c\\\nannot\ncons\\\necra\\\nte, \nwe c\\\nannot\nhall\\\now t\\\nhis \ngrou\\\nnd. \nThe \nbrave\nmen, \nlivi\\\nng a\\\nnd d\\\nead \nwho \nstru\\\nggled\nhere \nhave \ncons\\\necra\\\nted \nit f\\\nar a\\\nbove \nour \npoor \npower\nto a\\\ndd or\ndetr\\\nact. \nThe \nworld\nwill \nlitt\\\nle n\\\note \nnor \nlong \nreme\\\nmber \nwhat \nwe s\\\nay h\\\nere, \nbut \nit c\\\nan n\\\never \nforg\\\net w\\\nhat \nthey \ndid \nhere.\nIt is\nfor \nus t\\\nhe l\\\niving\nrath\\\ner to\nbe d\\\nedic\\\nated \nhere \nto t\\\nhe u\\\nnfin\\\nished\nwork \nwhich\nthey \nwho \nfoug\\\nht h\\\nere \nhave \nthus \nfar \nso n\\\nobly \nadva\\\nnced.\nIt is\nrath\\\ner f\\\nor us\nto be\nhere \ndedi\\\ncated\nto t\\\nhe g\\\nreat \ntask \nrema\\\nining\nbefo\\\nre u\\\ns--t\\\nhat \nfrom \nthese\nhono\\\nred \ndead \nwe t\\\nake \nincr\\\neased\ndevo\\\ntion \nto t\\\nhat \ncause\nfor \nwhich\nthey \ngave \nthe \nlast \nfull \nmeas\\\nure \nof d\\\nevot\\\nion-\\\n-that\nwe h\\\nere \nhigh\\\nly r\\\nesol\\\nve t\\\nhat \nthese\ndead \nshall\nnot \nhave \ndied \nin v\\\nain, \nthat \nthis \nnati\\\non u\\\nnder \nGod \nshall\nhave \na new\nbirth\nof f\\\nreed\\\nom, \nand \nthat \ngove\\\nrnme\\\nnt of\nthe \npeop\\\nle, \nby t\\\nhe p\\\neopl\\\ne, f\\\nor t\\\nhe p\\\neople\nshall\nnot \nperi\\\nsh f\\\nrom \nthe \neart\\\nh. --\nPres.\nAbra\\\nham \nLinc\\\noln, \n19 N\\\novem\\\nber \n1863 \n" - - # Tests both abbreviations and abbreviations= - def test_abbreviations - abbr = [" Pres. Abraham Lincoln\n", " Pres. Abraham Lincoln\n"] - assert_nothing_raised { @format_o = Text::Format.new } - assert_equal([], @format_o.abbreviations) - assert_nothing_raised { @format_o.abbreviations = [ 'foo', 'bar' ] } - assert_equal([ 'foo', 'bar' ], @format_o.abbreviations) - assert_equal(abbr[0], @format_o.format(abbr[0])) - assert_nothing_raised { @format_o.extra_space = true } - assert_equal(abbr[1], @format_o.format(abbr[0])) - assert_nothing_raised { @format_o.abbreviations = [ "Pres" ] } - assert_equal([ "Pres" ], @format_o.abbreviations) - assert_equal(abbr[0], @format_o.format(abbr[0])) - assert_nothing_raised { @format_o.extra_space = false } - assert_equal(abbr[0], @format_o.format(abbr[0])) - end - - # Tests both body_indent and body_indent= - def test_body_indent - assert_nothing_raised { @format_o = Text::Format.new } - assert_equal(0, @format_o.body_indent) - assert_nothing_raised { @format_o.body_indent = 7 } - assert_equal(7, @format_o.body_indent) - assert_nothing_raised { @format_o.body_indent = -3 } - assert_equal(3, @format_o.body_indent) - assert_nothing_raised { @format_o.body_indent = "9" } - assert_equal(9, @format_o.body_indent) - assert_nothing_raised { @format_o.body_indent = "-2" } - assert_equal(2, @format_o.body_indent) - assert_match(/^ [^ ]/, @format_o.format(GETTYSBURG).split("\n")[1]) - end - - # Tests both columns and columns= - def test_columns - assert_nothing_raised { @format_o = Text::Format.new } - assert_equal(72, @format_o.columns) - assert_nothing_raised { @format_o.columns = 7 } - assert_equal(7, @format_o.columns) - assert_nothing_raised { @format_o.columns = -3 } - assert_equal(3, @format_o.columns) - assert_nothing_raised { @format_o.columns = "9" } - assert_equal(9, @format_o.columns) - assert_nothing_raised { @format_o.columns = "-2" } - assert_equal(2, @format_o.columns) - assert_nothing_raised { @format_o.columns = 40 } - assert_equal(40, @format_o.columns) - assert_match(/this continent$/, - @format_o.format(GETTYSBURG).split("\n")[1]) - end - - # Tests both extra_space and extra_space= - def test_extra_space - assert_nothing_raised { @format_o = Text::Format.new } - assert(!@format_o.extra_space) - assert_nothing_raised { @format_o.extra_space = true } - assert(@format_o.extra_space) - # The behaviour of extra_space is tested in test_abbreviations. There - # is no need to reproduce it here. - end - - # Tests both first_indent and first_indent= - def test_first_indent - assert_nothing_raised { @format_o = Text::Format.new } - assert_equal(4, @format_o.first_indent) - assert_nothing_raised { @format_o.first_indent = 7 } - assert_equal(7, @format_o.first_indent) - assert_nothing_raised { @format_o.first_indent = -3 } - assert_equal(3, @format_o.first_indent) - assert_nothing_raised { @format_o.first_indent = "9" } - assert_equal(9, @format_o.first_indent) - assert_nothing_raised { @format_o.first_indent = "-2" } - assert_equal(2, @format_o.first_indent) - assert_match(/^ [^ ]/, @format_o.format(GETTYSBURG).split("\n")[0]) - end - - def test_format_style - assert_nothing_raised { @format_o = Text::Format.new } - assert_equal(Text::Format::LEFT_ALIGN, @format_o.format_style) - assert_match(/^November 1863$/, - @format_o.format(GETTYSBURG).split("\n")[-1]) - assert_nothing_raised { - @format_o.format_style = Text::Format::RIGHT_ALIGN - } - assert_equal(Text::Format::RIGHT_ALIGN, @format_o.format_style) - assert_match(/^ +November 1863$/, - @format_o.format(GETTYSBURG).split("\n")[-1]) - assert_nothing_raised { - @format_o.format_style = Text::Format::RIGHT_FILL - } - assert_equal(Text::Format::RIGHT_FILL, @format_o.format_style) - assert_match(/^November 1863 +$/, - @format_o.format(GETTYSBURG).split("\n")[-1]) - assert_nothing_raised { @format_o.format_style = Text::Format::JUSTIFY } - assert_equal(Text::Format::JUSTIFY, @format_o.format_style) - assert_match(/^of freedom, and that government of the people, by the people, for the$/, - @format_o.format(GETTYSBURG).split("\n")[-3]) - assert_raise(ArgumentError) { @format_o.format_style = 33 } - end - - def test_tag_paragraph - assert_nothing_raised { @format_o = Text::Format.new } - assert(!@format_o.tag_paragraph) - assert_nothing_raised { @format_o.tag_paragraph = true } - assert(@format_o.tag_paragraph) - assert_not_equal(@format_o.paragraphs([GETTYSBURG, GETTYSBURG]), - Text::Format.new.paragraphs([GETTYSBURG, GETTYSBURG])) - end - - def test_tag_text - assert_nothing_raised { @format_o = Text::Format.new } - assert_equal([], @format_o.tag_text) - assert_equal(@format_o.format(GETTYSBURG), - Text::Format.new.format(GETTYSBURG)) - assert_nothing_raised { - @format_o.tag_paragraph = true - @format_o.tag_text = ["Gettysburg Address", "---"] - } - assert_not_equal(@format_o.format(GETTYSBURG), - Text::Format.new.format(GETTYSBURG)) - assert_not_equal(@format_o.paragraphs([GETTYSBURG, GETTYSBURG]), - Text::Format.new.paragraphs([GETTYSBURG, GETTYSBURG])) - assert_not_equal(@format_o.paragraphs([GETTYSBURG, GETTYSBURG, - GETTYSBURG]), - Text::Format.new.paragraphs([GETTYSBURG, GETTYSBURG, - GETTYSBURG])) - end - - def test_justify? - assert_nothing_raised { @format_o = Text::Format.new } - assert(!@format_o.justify?) - assert_nothing_raised { - @format_o.format_style = Text::Format::RIGHT_ALIGN - } - assert(!@format_o.justify?) - assert_nothing_raised { - @format_o.format_style = Text::Format::RIGHT_FILL - } - assert(!@format_o.justify?) - assert_nothing_raised { - @format_o.format_style = Text::Format::JUSTIFY - } - assert(@format_o.justify?) - # The format testing is done in test_format_style - end - - def test_left_align? - assert_nothing_raised { @format_o = Text::Format.new } - assert(@format_o.left_align?) - assert_nothing_raised { - @format_o.format_style = Text::Format::RIGHT_ALIGN - } - assert(!@format_o.left_align?) - assert_nothing_raised { - @format_o.format_style = Text::Format::RIGHT_FILL - } - assert(!@format_o.left_align?) - assert_nothing_raised { @format_o.format_style = Text::Format::JUSTIFY } - assert(!@format_o.left_align?) - # The format testing is done in test_format_style - end - - def test_left_margin - assert_nothing_raised { @format_o = Text::Format.new } - assert_equal(0, @format_o.left_margin) - assert_nothing_raised { @format_o.left_margin = -3 } - assert_equal(3, @format_o.left_margin) - assert_nothing_raised { @format_o.left_margin = "9" } - assert_equal(9, @format_o.left_margin) - assert_nothing_raised { @format_o.left_margin = "-2" } - assert_equal(2, @format_o.left_margin) - assert_nothing_raised { @format_o.left_margin = 7 } - assert_equal(7, @format_o.left_margin) - assert_nothing_raised { - ft = @format_o.format(GETTYSBURG).split("\n") - assert_match(/^ {11}Four score/, ft[0]) - assert_match(/^ {7}November/, ft[-1]) - } - end - - def test_hard_margins - assert_nothing_raised { @format_o = Text::Format.new } - assert(!@format_o.hard_margins) - assert_nothing_raised { - @format_o.hard_margins = true - @format_o.columns = 5 - @format_o.first_indent = 0 - @format_o.format_style = Text::Format::RIGHT_FILL - } - assert(@format_o.hard_margins) - assert_equal(FIVE_COL, @format_o.format(GETTYSBURG)) - assert_nothing_raised { - @format_o.split_rules |= Text::Format::SPLIT_CONTINUATION - assert_equal(Text::Format::SPLIT_CONTINUATION_FIXED, - @format_o.split_rules) - } - assert_equal(FIVE_CNT, @format_o.format(GETTYSBURG)) - end - - # Tests both nobreak and nobreak_regex, since one is only useful - # with the other. - def test_nobreak - assert_nothing_raised { @format_o = Text::Format.new } - assert(!@format_o.nobreak) - assert(@format_o.nobreak_regex.empty?) - assert_nothing_raised { - @format_o.nobreak = true - @format_o.nobreak_regex = { '^this$' => '^continent$' } - @format_o.columns = 77 - } - assert(@format_o.nobreak) - assert_equal({ '^this$' => '^continent$' }, @format_o.nobreak_regex) - assert_match(/^this continent/, - @format_o.format(GETTYSBURG).split("\n")[1]) - end - - def test_right_align? - assert_nothing_raised { @format_o = Text::Format.new } - assert(!@format_o.right_align?) - assert_nothing_raised { - @format_o.format_style = Text::Format::RIGHT_ALIGN - } - assert(@format_o.right_align?) - assert_nothing_raised { - @format_o.format_style = Text::Format::RIGHT_FILL - } - assert(!@format_o.right_align?) - assert_nothing_raised { @format_o.format_style = Text::Format::JUSTIFY } - assert(!@format_o.right_align?) - # The format testing is done in test_format_style - end - - def test_right_fill? - assert_nothing_raised { @format_o = Text::Format.new } - assert(!@format_o.right_fill?) - assert_nothing_raised { - @format_o.format_style = Text::Format::RIGHT_ALIGN - } - assert(!@format_o.right_fill?) - assert_nothing_raised { - @format_o.format_style = Text::Format::RIGHT_FILL - } - assert(@format_o.right_fill?) - assert_nothing_raised { - @format_o.format_style = Text::Format::JUSTIFY - } - assert(!@format_o.right_fill?) - # The format testing is done in test_format_style - end - - def test_right_margin - assert_nothing_raised { @format_o = Text::Format.new } - assert_equal(0, @format_o.right_margin) - assert_nothing_raised { @format_o.right_margin = -3 } - assert_equal(3, @format_o.right_margin) - assert_nothing_raised { @format_o.right_margin = "9" } - assert_equal(9, @format_o.right_margin) - assert_nothing_raised { @format_o.right_margin = "-2" } - assert_equal(2, @format_o.right_margin) - assert_nothing_raised { @format_o.right_margin = 7 } - assert_equal(7, @format_o.right_margin) - assert_nothing_raised { - ft = @format_o.format(GETTYSBURG).split("\n") - assert_match(/^ {4}Four score.*forth on$/, ft[0]) - assert_match(/^November/, ft[-1]) - } - end - - def test_tabstop - assert_nothing_raised { @format_o = Text::Format.new } - assert_equal(8, @format_o.tabstop) - assert_nothing_raised { @format_o.tabstop = 7 } - assert_equal(7, @format_o.tabstop) - assert_nothing_raised { @format_o.tabstop = -3 } - assert_equal(3, @format_o.tabstop) - assert_nothing_raised { @format_o.tabstop = "9" } - assert_equal(9, @format_o.tabstop) - assert_nothing_raised { @format_o.tabstop = "-2" } - assert_equal(2, @format_o.tabstop) - end - - def test_text - assert_nothing_raised { @format_o = Text::Format.new } - assert_equal([], @format_o.text) - assert_nothing_raised { @format_o.text = "Test Text" } - assert_equal("Test Text", @format_o.text) - assert_nothing_raised { @format_o.text = ["Line 1", "Line 2"] } - assert_equal(["Line 1", "Line 2"], @format_o.text) - end - - def test_s_new - # new(NilClass) { block } - assert_nothing_raised do - @format_o = Text::Format.new { - self.text = "Test 1, 2, 3" - } - end - assert_equal("Test 1, 2, 3", @format_o.text) - - # new(Hash Symbols) - assert_nothing_raised { @format_o = Text::Format.new(:columns => 72) } - assert_equal(72, @format_o.columns) - - # new(Hash String) - assert_nothing_raised { @format_o = Text::Format.new('columns' => 72) } - assert_equal(72, @format_o.columns) - - # new(Hash) { block } - assert_nothing_raised do - @format_o = Text::Format.new('columns' => 80) { - self.text = "Test 4, 5, 6" - } - end - assert_equal("Test 4, 5, 6", @format_o.text) - assert_equal(80, @format_o.columns) - - # new(Text::Format) - assert_nothing_raised do - fo = Text::Format.new(@format_o) - assert(fo == @format_o) - end - - # new(Text::Format) { block } - assert_nothing_raised do - fo = Text::Format.new(@format_o) { self.columns = 79 } - assert(fo != @format_o) - end - - # new(String) - assert_nothing_raised { @format_o = Text::Format.new("Test A, B, C") } - assert_equal("Test A, B, C", @format_o.text) - - # new(String) { block } - assert_nothing_raised do - @format_o = Text::Format.new("Test X, Y, Z") { self.columns = -5 } - end - assert_equal("Test X, Y, Z", @format_o.text) - assert_equal(5, @format_o.columns) - end - - def test_center - assert_nothing_raised { @format_o = Text::Format.new } - assert_nothing_raised do - ct = @format_o.center(GETTYSBURG.split("\n")).split("\n") - assert_match(/^ Four score and seven years ago our fathers brought forth on this/, ct[0]) - assert_match(/^ not perish from the earth./, ct[-3]) - end - end - - def test_expand - assert_nothing_raised { @format_o = Text::Format.new } - assert_equal(" ", @format_o.expand("\t ")) - assert_nothing_raised { @format_o.tabstop = 4 } - assert_equal(" ", @format_o.expand("\t ")) - end - - def test_unexpand - assert_nothing_raised { @format_o = Text::Format.new } - assert_equal("\t ", @format_o.unexpand(" ")) - assert_nothing_raised { @format_o.tabstop = 4 } - assert_equal("\t ", @format_o.unexpand(" ")) - end - - def test_space_only - assert_equal("", Text::Format.new.format(" ")) - assert_equal("", Text::Format.new.format("\n")) - assert_equal("", Text::Format.new.format(" ")) - assert_equal("", Text::Format.new.format(" \n")) - assert_equal("", Text::Format.new.paragraphs("\n")) - assert_equal("", Text::Format.new.paragraphs(" ")) - assert_equal("", Text::Format.new.paragraphs(" ")) - assert_equal("", Text::Format.new.paragraphs(" \n")) - assert_equal("", Text::Format.new.paragraphs(["\n"])) - assert_equal("", Text::Format.new.paragraphs([" "])) - assert_equal("", Text::Format.new.paragraphs([" "])) - assert_equal("", Text::Format.new.paragraphs([" \n"])) - end - - def test_splendiferous - h = nil - test = "This is a splendiferous test" - assert_nothing_raised { @format_o = Text::Format.new(:columns => 6, :left_margin => 0, :indent => 0, :first_indent => 0) } - assert_match(/^splendiferous$/, @format_o.format(test)) - assert_nothing_raised { @format_o.hard_margins = true } - assert_match(/^lendif$/, @format_o.format(test)) - assert_nothing_raised { h = Object.new } - assert_nothing_raised do - @format_o.split_rules = Text::Format::SPLIT_HYPHENATION - class << h #:nodoc: - def hyphenate_to(word, size) - return ["", word] if size < 2 - [word[0 ... size], word[size .. -1]] - end - end - @format_o.hyphenator = h - end - assert_match(/^iferou$/, @format_o.format(test)) - assert_nothing_raised { h = Object.new } - assert_nothing_raised do - class << h #:nodoc: - def hyphenate_to(word, size, formatter) - return ["", word] if word.size < formatter.columns - [word[0 ... size], word[size .. -1]] - end - end - @format_o.hyphenator = h - end - assert_match(/^ferous$/, @format_o.format(test)) - end - end -end diff --git a/actionmailer/lib/action_mailer/vendor/text_format.rb b/actionmailer/lib/action_mailer/vendor/text_format.rb deleted file mode 100644 index c6c8c394d0..0000000000 --- a/actionmailer/lib/action_mailer/vendor/text_format.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Prefer gems to the bundled libs. -require 'rubygems' - -begin - gem 'text-format', '>= 0.6.3' -rescue Gem::LoadError - $:.unshift "#{File.dirname(__FILE__)}/text-format-0.6.3" -end - -require 'text/format' -- cgit v1.2.3 From 030ab357f94d4f3624e0997b4aeb972681180186 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 27 Jan 2010 17:11:29 -0800 Subject: Remove unbundle changelogs --- actionmailer/CHANGELOG | 2 -- activesupport/CHANGELOG | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/actionmailer/CHANGELOG b/actionmailer/CHANGELOG index 4ee6bd4620..0018a2ed5d 100644 --- a/actionmailer/CHANGELOG +++ b/actionmailer/CHANGELOG @@ -1,7 +1,5 @@ *Rails 3.0 (pending)* -* Unvendor'd text-format, now requires text-format gem - * Whole new API added with tests. See base.rb for full details. Old API is deprecated. * The Mail::Message class has helped methods for all the field types that return 'common' defaults for the common use case, so to get the subject, mail.subject will give you a string, mail.date will give you a DateTime object, mail.from will give you an array of address specs (mikel@test.lindsaar.net) etc. If you want to access the field object itself, call mail[:field_name] which will return the field object you want, which you can then chain, like mail[:from].formatted diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index cd72aa1bee..8553a8c0af 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,10 +1,4 @@ -*Edge* - -* Unvendor'd Memcach Client. Now requires the Builder gem as a dependency [Mikel Lindsaar] - -* Unvendor'd Builder. Now requires the Builder gem as a dependency [Mikel Lindsaar] - -* Unvendor'd TZInfo. Now requires the TZInfo gem as a dependency [Mikel Lindsaar] +*Rails 3.0 (pending)* * YAML serialization for OrderedHash. #3608 [Gregor Schmidt] -- cgit v1.2.3 From f2dd3578c08dda24093a40fe054120a5c4967f66 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 27 Jan 2010 17:34:32 -0800 Subject: self.defaults => default --- railties/lib/generators/rails/mailer/templates/mailer.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/railties/lib/generators/rails/mailer/templates/mailer.rb b/railties/lib/generators/rails/mailer/templates/mailer.rb index cdc6e41266..ab03dd8d78 100644 --- a/railties/lib/generators/rails/mailer/templates/mailer.rb +++ b/railties/lib/generators/rails/mailer/templates/mailer.rb @@ -1,5 +1,5 @@ class <%= class_name %> < ActionMailer::Base - self.defaults :from => "from@example.com" + defaults :from => "from@example.com" <% for action in actions -%> # Subject can be set in your I18n file at config/locales/en.yml @@ -9,7 +9,8 @@ class <%= class_name %> < ActionMailer::Base # def <%= action %> @greeting = "Hi" - mail(:to => "to@example.org") + + mail :to => "to@example.org" end <% end -%> -end \ No newline at end of file +end -- cgit v1.2.3 From 4911343bf7719e76c8964445f9f146e7b8999b54 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Wed, 27 Jan 2010 20:42:36 -0500 Subject: jquery driver now supports :popup --- .../app/templates/public/javascripts/jquery.driver.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js b/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js index 20938b002e..5189130c5c 100644 --- a/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js +++ b/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js @@ -144,6 +144,23 @@ jQuery(function ($) { */ $('a[data-remote="true"],input[data-remote="true"],input[data-remote-submit="true"]').live('click', rails.remote); + /* + * popup + */ + $('a[data-popup],input[data-popup]').live('click', function(e){ + var el = $(this), + url = el.attr('data-url') || el.attr('href'); + + e.preventDefault(); + + if(el.attr('data-popup') === "true"){ + window.open(url); + console.log('without options'); + } else { + window.open(url, el.attr('data-popup')); + console.log('with options'); + } + }); /** * -- cgit v1.2.3 From a0232d864177d14476bff73ac274a3ed820153f3 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Wed, 27 Jan 2010 20:58:17 -0500 Subject: jquery driver now supports :confirm --- .../app/templates/public/javascripts/jquery.driver.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js b/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js index 5189130c5c..52e35ec8bc 100644 --- a/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js +++ b/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js @@ -117,6 +117,18 @@ jQuery(function ($) { setInterval(observe, frequency * 1000); }); + /** + * confirm + * make sure this event is first! + */ + $('a[data-confirm],input[data-confirm]').live('click', function(e){ + var el = $(this); + + if(!confirm(el.attr('data-confirm'))){ + return false; + } + }); + /** * periodically_call_remote */ @@ -155,10 +167,8 @@ jQuery(function ($) { if(el.attr('data-popup') === "true"){ window.open(url); - console.log('without options'); } else { window.open(url, el.attr('data-popup')); - console.log('with options'); } }); -- cgit v1.2.3 From 016f15dc69b876c62606d267dcbb8124d0ad02a5 Mon Sep 17 00:00:00 2001 From: snusnu Date: Thu, 28 Jan 2010 02:03:05 +0100 Subject: active_support/ordered_hash now requires yaml --- activesupport/lib/active_support/ordered_hash.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/activesupport/lib/active_support/ordered_hash.rb b/activesupport/lib/active_support/ordered_hash.rb index 6723805d32..57ead35827 100644 --- a/activesupport/lib/active_support/ordered_hash.rb +++ b/activesupport/lib/active_support/ordered_hash.rb @@ -1,3 +1,5 @@ +require 'yaml' + # OrderedHash is namespaced to prevent conflicts with other implementations module ActiveSupport # Hash is ordered in Ruby 1.9! -- cgit v1.2.3 From e98f9579c472e75f5a8c0678f2fc54b2d681e3ec Mon Sep 17 00:00:00 2001 From: Geoff Buesing Date: Wed, 27 Jan 2010 20:16:08 -0600 Subject: Time#- with a DateTime argument behaves the same as with a Time argument, i.e. returns the difference between self and arg as a Float [#3476 status:resolved] --- activesupport/CHANGELOG | 2 ++ activesupport/lib/active_support/core_ext/time/calculations.rb | 2 +- activesupport/test/core_ext/time_ext_test.rb | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 8553a8c0af..787fa26e44 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,5 +1,7 @@ *Rails 3.0 (pending)* +* Time#- with a DateTime argument behaves the same as with a Time argument, i.e. returns the difference between self and arg as a Float #3476 [Geoff Buesing] + * YAML serialization for OrderedHash. #3608 [Gregor Schmidt] * Update bundled TZInfo to v0.3.16 [Geoff Buesing] diff --git a/activesupport/lib/active_support/core_ext/time/calculations.rb b/activesupport/lib/active_support/core_ext/time/calculations.rb index 703b89ffd0..98906bc5c0 100644 --- a/activesupport/lib/active_support/core_ext/time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/time/calculations.rb @@ -259,7 +259,7 @@ class Time # are coerced into values that Time#- will recognize def minus_with_coercion(other) other = other.comparable_time if other.respond_to?(:comparable_time) - minus_without_coercion(other) + other.is_a?(DateTime) ? to_f - other.to_f : minus_without_coercion(other) end alias_method :minus_without_coercion, :- alias_method :-, :minus_with_coercion diff --git a/activesupport/test/core_ext/time_ext_test.rb b/activesupport/test/core_ext/time_ext_test.rb index f6003bc083..08c079e113 100644 --- a/activesupport/test/core_ext/time_ext_test.rb +++ b/activesupport/test/core_ext/time_ext_test.rb @@ -722,6 +722,10 @@ class TimeExtCalculationsTest < Test::Unit::TestCase def test_minus_with_time_with_zone assert_equal 86_400.0, Time.utc(2000, 1, 2) - ActiveSupport::TimeWithZone.new( Time.utc(2000, 1, 1), ActiveSupport::TimeZone['UTC'] ) end + + def test_minus_with_datetime + assert_equal 86_400.0, Time.utc(2000, 1, 2) - DateTime.civil(2000, 1, 1) + end def test_time_created_with_local_constructor_cannot_represent_times_during_hour_skipped_by_dst with_env_tz 'US/Eastern' do -- cgit v1.2.3 From e87748869af238fe6bcb78e8d9a8d2bbc3734039 Mon Sep 17 00:00:00 2001 From: Jatinder Singh Date: Wed, 27 Jan 2010 15:28:32 -0800 Subject: Use format of ARes rather than content-type of remote errors to load errors. [#1956 state:committed] Signed-off-by: Jeremy Kemper --- activeresource/lib/active_resource/validations.rb | 6 +++--- activeresource/test/cases/base_errors_test.rb | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/activeresource/lib/active_resource/validations.rb b/activeresource/lib/active_resource/validations.rb index 7b2382bd8c..4774c6dd22 100644 --- a/activeresource/lib/active_resource/validations.rb +++ b/activeresource/lib/active_resource/validations.rb @@ -101,10 +101,10 @@ module ActiveResource # Loads the set of remote errors into the object's Errors based on the # content-type of the error-block received def load_remote_errors(remote_errors, save_cache = false ) #:nodoc: - case remote_errors.response['Content-Type'] - when /xml/ + case self.class.format + when ActiveResource::Formats[:xml] errors.from_xml(remote_errors.response.body, save_cache) - when /json/ + when ActiveResource::Formats[:json] errors.from_json(remote_errors.response.body, save_cache) end end diff --git a/activeresource/test/cases/base_errors_test.rb b/activeresource/test/cases/base_errors_test.rb index 1eb7765132..b4fd75fba3 100644 --- a/activeresource/test/cases/base_errors_test.rb +++ b/activeresource/test/cases/base_errors_test.rb @@ -69,6 +69,19 @@ class BaseErrorsTest < Test::Unit::TestCase end end + def test_should_mark_as_invalid_when_content_type_is_unavailable_in_response_header + ActiveResource::HttpMock.respond_to do |mock| + mock.post "/people.xml", {}, %q(Age can't be blankName can't be blankName must start with a letterPerson quota full for today.), 422, {} + mock.post "/people.json", {}, %q({"errors":["Age can't be blank","Name can't be blank","Name must start with a letter","Person quota full for today."]}), 422, {} + end + + [ :json, :xml ].each do |format| + invalid_user_using_format(format) do + assert !@person.valid? + end + end + end + private def invalid_user_using_format(mime_type_reference) previous_format = Person.format -- cgit v1.2.3 From eff999d67933a4e7e349875b51fa6a6469b61d93 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Wed, 27 Jan 2010 21:35:58 -0500 Subject: initial prototype of jQuery driver complete --- .../templates/public/javascripts/jquery.driver.js | 33 ++++++++++++++++++---- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js b/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js index 52e35ec8bc..887da514e2 100644 --- a/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js +++ b/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js @@ -1,6 +1,3 @@ -// TODO: confirm -// TODO: popup -// TODO: disable_with jQuery(function ($) { var rails = { update: function (selector, content, position) { @@ -76,6 +73,21 @@ jQuery(function ($) { } }, complete: function (xhr) { + // enable disabled_with buttons + if (el[0].tagName.toUpperCase() == 'FORM') { + el.children('input[type="button"][data-enable-with],input[type="submit"][data-enable-with]').each(function(i, button){ + button = $(button); + button.attr('value', button.attr('data-enable-with')); + button.removeAttr('data-enable-with'); + button.removeAttr('disabled'); + + }); + } else { + el.attr('value', el.attr('data-enable-with')); + el.removeAttr('data-enable-with'); + el.removeAttr('disabled'); + } + el.trigger('rails:complete', xhr); el.trigger('rails:loaded', xhr); }, @@ -121,7 +133,7 @@ jQuery(function ($) { * confirm * make sure this event is first! */ - $('a[data-confirm],input[data-confirm]').live('click', function(e){ + $('a[data-confirm],input[type="submit"][data-confirm],input[type="button"][data-confirm]').live('click', function(e){ var el = $(this); if(!confirm(el.attr('data-confirm'))){ @@ -146,6 +158,17 @@ jQuery(function ($) { }(e, el), frequency * 1000); }); + /** + * disable_with + */ + $('input[type="button"][data-disable-with],input[type="submit"][data-disable-with]').live('click', function(e){ + var el = $(this); + + el.attr('data-enable-with', el.attr('value')); + el.attr('disabled', 'disabled'); + el.attr('value', el.attr('data-disable-with')); + }); + /** * remote_form_tag, and remote_form_for */ @@ -159,7 +182,7 @@ jQuery(function ($) { /* * popup */ - $('a[data-popup],input[data-popup]').live('click', function(e){ + $('a[data-popup],input[type="button"][data-popup]').live('click', function(e){ var el = $(this), url = el.attr('data-url') || el.attr('href'); -- cgit v1.2.3 From 8c60acbea22645278bb43a4fa575b298cea7671a Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 27 Jan 2010 18:37:01 -0800 Subject: Expected attachment encoding is binary --- actionmailer/test/base_test.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index b7af86b622..9e1a4c22c6 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -167,7 +167,9 @@ class BaseTest < ActiveSupport::TestCase email = BaseMailer.attachment_with_hash assert_equal(1, email.attachments.length) assert_equal('invoice.jpg', email.attachments[0].filename) - assert_equal("\312\213\254\232)b", email.attachments['invoice.jpg'].decoded) + expected = "\312\213\254\232)b" + expected.force_encoding(Encoding::BINARY) if '1.9'.respond_to?(:force_encoding) + assert_equal expected, email.attachments['invoice.jpg'].decoded end test "sets mime type to multipart/mixed when attachment is included" do @@ -483,4 +485,4 @@ class BaseTest < ActiveSupport::TestCase hash[key] = value end end -end \ No newline at end of file +end -- cgit v1.2.3 From 187b3b0b4808c2daf015699dfa1e5a78605072a7 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 27 Jan 2010 19:08:36 -0800 Subject: Fix time comparison. Mail#date returns DateTime not Time. --- actionmailer/test/base_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 9e1a4c22c6..86db3afc15 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -100,7 +100,7 @@ class BaseTest < ActiveSupport::TestCase end test "mail() with bcc, cc, content_type, charset, mime_version, reply_to and date" do - @time = Time.now + @time = Time.now.beginning_of_day.to_datetime email = BaseMailer.welcome(:bcc => 'bcc@test.lindsaar.net', :cc => 'cc@test.lindsaar.net', :content_type => 'multipart/mixed', -- cgit v1.2.3 From 2ec99192d59e3f901b301d5735cee9a0b9ee091a Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Wed, 27 Jan 2010 22:32:10 -0500 Subject: renaming javascript drivers to *.rails.js for better naming convention --- .../templates/public/javascripts/jquery.driver.js | 239 --------------- .../templates/public/javascripts/jquery.rails.js | 239 +++++++++++++++ .../public/javascripts/prototype.driver.js | 324 --------------------- .../public/javascripts/prototype.rails.js | 324 +++++++++++++++++++++ 4 files changed, 563 insertions(+), 563 deletions(-) delete mode 100644 railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js create mode 100644 railties/lib/generators/rails/app/templates/public/javascripts/jquery.rails.js delete mode 100644 railties/lib/generators/rails/app/templates/public/javascripts/prototype.driver.js create mode 100644 railties/lib/generators/rails/app/templates/public/javascripts/prototype.rails.js diff --git a/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js b/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js deleted file mode 100644 index 887da514e2..0000000000 --- a/railties/lib/generators/rails/app/templates/public/javascripts/jquery.driver.js +++ /dev/null @@ -1,239 +0,0 @@ -jQuery(function ($) { - var rails = { - update: function (selector, content, position) { - var element = $('#' + selector); - if (position) { - switch (position) { - case "before": - element.before(content); - break; - case "after": - element.after(content); - break; - case "top": - element.prepend(content); - break; - case "bottom": - element.append(content); - break; - default: - element.append(content); - break; - } - } else { - element.html(content); - } - }, - remote: function (e) { - var el = $(this), - data = [], - condition = el.attr('data-condition') ? eval(el.attr('data-condition')) : true, - method = el.attr('method') || el.attr('data-method') || 'GET', - url = el.attr('action') || el.attr('data-url') || '#', - async = el.attr('data-remote-type') === 'synchronous' ? false : true; - - if (el.attr('data-submit')) { - data = $('#' + el.attr('data-submit')).serializeArray(); - } else if (el.attr('data-with')) { - - if (e && e.target.tagName.toUpperCase() == 'SCRIPT' && el.attr('data-observed') !== null) { - var observed = $('#' + el.attr('data-observed')); - if(observed[0].tagName.toUpperCase() === 'FORM'){ - data = el.attr('data-with') + '=' + observed.serialize(); - } else if(observed[0].tagName.toUpperCase() === 'INPUT' && observed.attr('type').toUpperCase() !== "BUTTON" && observed.attr('type').toUpperCase() !== "SUBMIT") { - data = el.attr('data-with') + '=' + observed.val(); - } - } else { - // TODO: remove eval when deprecated - data = eval(el.attr('data-with')); - } - } else if (e && e.target.tagName.toUpperCase() == 'FORM') { - data = el.serializeArray(); - } else if (e && e.target.tagName.toUpperCase() == 'INPUT') { - data = el.closest('form').serializeArray(); - } - - if (condition) { - el.trigger('rails:before'); - - $.ajax({ - async: async, - url: url, - data: data, - type: method.toUpperCase(), - beforeSend: function (xhr) { - xhr.setRequestHeader("Accept", "text/javascript") - el.trigger('rails:after', xhr); - el.trigger('rails:loading', xhr); - }, - success: function (data, status, xhr) { - el.trigger('rails:success', [data, status, xhr]); - if (el.attr('data-update-success')) { - rails.update(el.attr('data-update-success'), data, el.attr('data-update-position')); - } - }, - complete: function (xhr) { - // enable disabled_with buttons - if (el[0].tagName.toUpperCase() == 'FORM') { - el.children('input[type="button"][data-enable-with],input[type="submit"][data-enable-with]').each(function(i, button){ - button = $(button); - button.attr('value', button.attr('data-enable-with')); - button.removeAttr('data-enable-with'); - button.removeAttr('disabled'); - - }); - } else { - el.attr('value', el.attr('data-enable-with')); - el.removeAttr('data-enable-with'); - el.removeAttr('disabled'); - } - - el.trigger('rails:complete', xhr); - el.trigger('rails:loaded', xhr); - }, - error: function (xhr, status, error) { - el.trigger('rails:failure', [xhr, status, error]); - if (el.attr('data-update-failure')) { - rails.update(el.attr('data-update-failure'), xhr.responseText, el.attr('data-update-position')); - } - } - }); - } - e.preventDefault(); - } - } - - /** - * observe_form, and observe_field - */ - $('script[data-observe="true"]').each(function (index, e) { - var el = $(e), - observed = $('#' + $(e).attr('data-observed')); - frequency = el.attr('data-frequency') ? el.attr('data-frequency') : 10, - value = observed[0].tagName.toUpperCase() === 'FORM' ? observed.serialize() : observed.val(); - - var observe = function (observed, frequency, value, e) { - return function () { - var event = new jQuery.Event('periodical'), - newValue = observed[0].tagName.toUpperCase() === 'FORM' ? observed.serialize() : observed.val(); - event.target = e; - - if(value !== newValue) { - value = newValue; - $(e).trigger('rails:observe'); - rails.remote.call(el, event); - } - } - }(observed, frequency, value, e); - - setInterval(observe, frequency * 1000); - }); - - /** - * confirm - * make sure this event is first! - */ - $('a[data-confirm],input[type="submit"][data-confirm],input[type="button"][data-confirm]').live('click', function(e){ - var el = $(this); - - if(!confirm(el.attr('data-confirm'))){ - return false; - } - }); - - /** - * periodically_call_remote - */ - $('script[data-periodical="true"]').each(function (index, e) { - var el = $(e), - frequency = el.attr('data-frequency') ? el.attr('data-frequency') : 10; - - setInterval(function () { - return function () { - var event = new jQuery.Event('periodical'); - event.target = e; - - rails.remote.call(el, event); - } - }(e, el), frequency * 1000); - }); - - /** - * disable_with - */ - $('input[type="button"][data-disable-with],input[type="submit"][data-disable-with]').live('click', function(e){ - var el = $(this); - - el.attr('data-enable-with', el.attr('value')); - el.attr('disabled', 'disabled'); - el.attr('value', el.attr('data-disable-with')); - }); - - /** - * remote_form_tag, and remote_form_for - */ - $('form[data-remote="true"]').live('submit', rails.remote); - - /** - * link_to_remote, button_to_remote, and submit_to_remote - */ - $('a[data-remote="true"],input[data-remote="true"],input[data-remote-submit="true"]').live('click', rails.remote); - - /* - * popup - */ - $('a[data-popup],input[type="button"][data-popup]').live('click', function(e){ - var el = $(this), - url = el.attr('data-url') || el.attr('href'); - - e.preventDefault(); - - if(el.attr('data-popup') === "true"){ - window.open(url); - } else { - window.open(url, el.attr('data-popup')); - } - }); - - /** - * - * Rails 2.x Helper / Event Handlers - * By default we listen to all callbacks, and status code callbacks and - * check the element for data- attribute and eval it. - * - */ - rails.compat = { - evalAttribute: function (element, attribute) { - var el = $(element), - attr = el.attr('data-' + attribute); - return (attr) ? eval(attr) : true; - } - }; - - $('form[data-remote="true"],a[data-remote="true"],input[data-remote="true"],script[data-observe="true"]') - .live('rails:before', function (e) { - rails.compat.evalAttribute(this, 'onbefore'); - }) - .live('rails:after', function (e, xhr) { - rails.compat.evalAttribute(this, 'onafter'); - }) - .live('rails:loading', function (e, xhr) { - rails.compat.evalAttribute(this, 'onloading'); - }) - .live('rails:loaded', function (e, xhr) { - rails.compat.evalAttribute(this, 'onloaded'); - }) - .live('rails:complete', function (e, xhr) { - rails.compat.evalAttribute(this, 'oncomplete'); - rails.compat.evalAttribute(this, 'on' + xhr.status); - }) - .live('rails:success', function (e, data, status, xhr) { - rails.compat.evalAttribute(this, 'onsuccess'); - }) - .live('rails:failure', function (e, xhr, status, error) { - rails.compat.evalAttribute(this, 'onfailure'); - }) - .live('rails:observe', function (e) { - rails.compat.evalAttribute(this, 'onobserve'); - }); -}); diff --git a/railties/lib/generators/rails/app/templates/public/javascripts/jquery.rails.js b/railties/lib/generators/rails/app/templates/public/javascripts/jquery.rails.js new file mode 100644 index 0000000000..887da514e2 --- /dev/null +++ b/railties/lib/generators/rails/app/templates/public/javascripts/jquery.rails.js @@ -0,0 +1,239 @@ +jQuery(function ($) { + var rails = { + update: function (selector, content, position) { + var element = $('#' + selector); + if (position) { + switch (position) { + case "before": + element.before(content); + break; + case "after": + element.after(content); + break; + case "top": + element.prepend(content); + break; + case "bottom": + element.append(content); + break; + default: + element.append(content); + break; + } + } else { + element.html(content); + } + }, + remote: function (e) { + var el = $(this), + data = [], + condition = el.attr('data-condition') ? eval(el.attr('data-condition')) : true, + method = el.attr('method') || el.attr('data-method') || 'GET', + url = el.attr('action') || el.attr('data-url') || '#', + async = el.attr('data-remote-type') === 'synchronous' ? false : true; + + if (el.attr('data-submit')) { + data = $('#' + el.attr('data-submit')).serializeArray(); + } else if (el.attr('data-with')) { + + if (e && e.target.tagName.toUpperCase() == 'SCRIPT' && el.attr('data-observed') !== null) { + var observed = $('#' + el.attr('data-observed')); + if(observed[0].tagName.toUpperCase() === 'FORM'){ + data = el.attr('data-with') + '=' + observed.serialize(); + } else if(observed[0].tagName.toUpperCase() === 'INPUT' && observed.attr('type').toUpperCase() !== "BUTTON" && observed.attr('type').toUpperCase() !== "SUBMIT") { + data = el.attr('data-with') + '=' + observed.val(); + } + } else { + // TODO: remove eval when deprecated + data = eval(el.attr('data-with')); + } + } else if (e && e.target.tagName.toUpperCase() == 'FORM') { + data = el.serializeArray(); + } else if (e && e.target.tagName.toUpperCase() == 'INPUT') { + data = el.closest('form').serializeArray(); + } + + if (condition) { + el.trigger('rails:before'); + + $.ajax({ + async: async, + url: url, + data: data, + type: method.toUpperCase(), + beforeSend: function (xhr) { + xhr.setRequestHeader("Accept", "text/javascript") + el.trigger('rails:after', xhr); + el.trigger('rails:loading', xhr); + }, + success: function (data, status, xhr) { + el.trigger('rails:success', [data, status, xhr]); + if (el.attr('data-update-success')) { + rails.update(el.attr('data-update-success'), data, el.attr('data-update-position')); + } + }, + complete: function (xhr) { + // enable disabled_with buttons + if (el[0].tagName.toUpperCase() == 'FORM') { + el.children('input[type="button"][data-enable-with],input[type="submit"][data-enable-with]').each(function(i, button){ + button = $(button); + button.attr('value', button.attr('data-enable-with')); + button.removeAttr('data-enable-with'); + button.removeAttr('disabled'); + + }); + } else { + el.attr('value', el.attr('data-enable-with')); + el.removeAttr('data-enable-with'); + el.removeAttr('disabled'); + } + + el.trigger('rails:complete', xhr); + el.trigger('rails:loaded', xhr); + }, + error: function (xhr, status, error) { + el.trigger('rails:failure', [xhr, status, error]); + if (el.attr('data-update-failure')) { + rails.update(el.attr('data-update-failure'), xhr.responseText, el.attr('data-update-position')); + } + } + }); + } + e.preventDefault(); + } + } + + /** + * observe_form, and observe_field + */ + $('script[data-observe="true"]').each(function (index, e) { + var el = $(e), + observed = $('#' + $(e).attr('data-observed')); + frequency = el.attr('data-frequency') ? el.attr('data-frequency') : 10, + value = observed[0].tagName.toUpperCase() === 'FORM' ? observed.serialize() : observed.val(); + + var observe = function (observed, frequency, value, e) { + return function () { + var event = new jQuery.Event('periodical'), + newValue = observed[0].tagName.toUpperCase() === 'FORM' ? observed.serialize() : observed.val(); + event.target = e; + + if(value !== newValue) { + value = newValue; + $(e).trigger('rails:observe'); + rails.remote.call(el, event); + } + } + }(observed, frequency, value, e); + + setInterval(observe, frequency * 1000); + }); + + /** + * confirm + * make sure this event is first! + */ + $('a[data-confirm],input[type="submit"][data-confirm],input[type="button"][data-confirm]').live('click', function(e){ + var el = $(this); + + if(!confirm(el.attr('data-confirm'))){ + return false; + } + }); + + /** + * periodically_call_remote + */ + $('script[data-periodical="true"]').each(function (index, e) { + var el = $(e), + frequency = el.attr('data-frequency') ? el.attr('data-frequency') : 10; + + setInterval(function () { + return function () { + var event = new jQuery.Event('periodical'); + event.target = e; + + rails.remote.call(el, event); + } + }(e, el), frequency * 1000); + }); + + /** + * disable_with + */ + $('input[type="button"][data-disable-with],input[type="submit"][data-disable-with]').live('click', function(e){ + var el = $(this); + + el.attr('data-enable-with', el.attr('value')); + el.attr('disabled', 'disabled'); + el.attr('value', el.attr('data-disable-with')); + }); + + /** + * remote_form_tag, and remote_form_for + */ + $('form[data-remote="true"]').live('submit', rails.remote); + + /** + * link_to_remote, button_to_remote, and submit_to_remote + */ + $('a[data-remote="true"],input[data-remote="true"],input[data-remote-submit="true"]').live('click', rails.remote); + + /* + * popup + */ + $('a[data-popup],input[type="button"][data-popup]').live('click', function(e){ + var el = $(this), + url = el.attr('data-url') || el.attr('href'); + + e.preventDefault(); + + if(el.attr('data-popup') === "true"){ + window.open(url); + } else { + window.open(url, el.attr('data-popup')); + } + }); + + /** + * + * Rails 2.x Helper / Event Handlers + * By default we listen to all callbacks, and status code callbacks and + * check the element for data- attribute and eval it. + * + */ + rails.compat = { + evalAttribute: function (element, attribute) { + var el = $(element), + attr = el.attr('data-' + attribute); + return (attr) ? eval(attr) : true; + } + }; + + $('form[data-remote="true"],a[data-remote="true"],input[data-remote="true"],script[data-observe="true"]') + .live('rails:before', function (e) { + rails.compat.evalAttribute(this, 'onbefore'); + }) + .live('rails:after', function (e, xhr) { + rails.compat.evalAttribute(this, 'onafter'); + }) + .live('rails:loading', function (e, xhr) { + rails.compat.evalAttribute(this, 'onloading'); + }) + .live('rails:loaded', function (e, xhr) { + rails.compat.evalAttribute(this, 'onloaded'); + }) + .live('rails:complete', function (e, xhr) { + rails.compat.evalAttribute(this, 'oncomplete'); + rails.compat.evalAttribute(this, 'on' + xhr.status); + }) + .live('rails:success', function (e, data, status, xhr) { + rails.compat.evalAttribute(this, 'onsuccess'); + }) + .live('rails:failure', function (e, xhr, status, error) { + rails.compat.evalAttribute(this, 'onfailure'); + }) + .live('rails:observe', function (e) { + rails.compat.evalAttribute(this, 'onobserve'); + }); +}); diff --git a/railties/lib/generators/rails/app/templates/public/javascripts/prototype.driver.js b/railties/lib/generators/rails/app/templates/public/javascripts/prototype.driver.js deleted file mode 100644 index aaed677fda..0000000000 --- a/railties/lib/generators/rails/app/templates/public/javascripts/prototype.driver.js +++ /dev/null @@ -1,324 +0,0 @@ -Event.observe(document, 'dom:loaded', function() { - function handle_remote(el, e){ - var data = null, - method = el.readAttribute('method') || el.readAttribute('data-method') || 'GET', - url = el.readAttribute('action') || el.readAttribute('data-url') || '#', - async = el.readAttribute('data-remote-type') === 'synchronous' ? false : true, - update = el.readAttribute('data-update-success'), - position = el.readAttribute('data-update-position'); - - if (el.readAttribute('data-submit')) { - var submit_el = $(el.readAttribute('data-submit')); - if(submit_el !== undefined && submit_el.tagName.toUpperCase() == 'FORM'){ - data = submit_el.serialize(); - } - } else if (el.readAttribute('data-with')) { - // It seems there is a big inconsistency between what :with means depending on the element type - // so this is going to look a bit crazy - if(el.tagName.toUpperCase() === 'SCRIPT' && el.readAttribute('data-observed') !== null){ - // Handle observe_field and observe_form - var observed_element = $(el.readAttribute('data-observed')); - - if(observed_element.tagName.toUpperCase() === 'FORM'){ - data = el.readAttribute('data-with') + '=' + observed_element.serialize(); - } else if(observed_element.tagName.toUpperCase() === 'INPUT' && observed_element.readAttribute('type').toUpperCase() !== "BUTTON" && observed_element.readAttribute('type').toUpperCase() !== "SUBMIT") { - data = el.readAttribute('data-with') + '=' + observed_element.getValue(); - } - } else { - // Handle link_to and button_to - data = evalAttribute(el, 'data-with'); - } - } else if(el.tagName.toUpperCase() === 'FORM') { - data = el.serialize(); - } - - document.fire('rails:before'); - - var request = new Ajax.Request(url, { - method: method, - asynchronous: async, - parameters: data, - evalJS: true, - evalJSON: true, - onComplete: function(xhr){ - document.fire('rails:complete', {xhr: xhr, element: el, submitted_button: getEventProperty(e, 'submitted_button')}); - }, - onLoading: function(xhr){ - document.fire('rails:after', {xhr: xhr, element: el}); - document.fire('rails:loading', {xhr: xhr, element: el}); - }, - onLoaded: function(xhr){ - document.fire('rails:loaded', {xhr: xhr, element: el}); - }, - onSuccess: function(xhr){ - document.fire('rails:success', {xhr: xhr, element: el}); - }, - onFailure: function(xhr){ - document.fire('rails:failure', {xhr: xhr, element: el}); - } - }); - - } - - function setEventProperty(e, property, value){ - if(e.memo === undefined){ - e.memo = {}; - } - - e.memo[property] = value; - } - - function getEventProperty(e, property){ - if(e !== null && e.memo !== undefined && e.memo[property] !== undefined){ - return e.memo[property]; - } - } - - function confirmed(e, el){ - if(getEventProperty(e,'confirm_checked') !== true){ - setEventProperty(e, 'confirm_checked', true); - - el = Event.findElement(e, 'form') || el; - var confirm_msg = el.readAttribute('data-confirm'); - - if(confirm_msg !== null){ - var result = el.fire('rails:confirm', {confirm_msg: confirm_msg}); - if(result.memo.stop_event === true){ - Event.stop(e); - return false; - } - } - } - return true; - } - - function disable_button(el){ - var disable_with = el.readAttribute('data-disable-with'); - if(disable_with !== null){ - el.writeAttribute('data-enable-with', el.readAttribute('value')); - el.writeAttribute('value', disable_with); - el.writeAttribute('disabled', true); - } - } - - function enable_button(el){ - var enable_with = el.readAttribute('data-enable-with'); - if(enable_with !== null){ - el.writeAttribute('value', enable_with); - } - el.writeAttribute('disabled', false); - } - - function updateHTML(el, content, result){ - var element_id = null; - - if(result === 'success'){ - element_id = el.readAttribute('data-update-success'); - } else if(result === 'failure'){ - element_id = el.readAttribute('data-update-failure'); - } - - var element_to_update = $(element_id); - if(element_to_update !== null){ - var position = el.readAttribute('data-update-position'); - if(position !== null){ - var options = {}; - options[position] = content; - element_to_update.insert(options); - } else { - element_to_update.update(content); - } - } - } - - $$("script[data-periodical=true]").each(function(el){ - var executor = new PeriodicalExecuter(function() { handle_remote(el);}, el.readAttribute('data-frequency')); - }); - - $$("script[data-observe=true]").each(function(el){ - var observed_element = $(el.readAttribute('data-observed')); - var original_value = observed_element.tagName.toUpperCase() === 'FORM' ? observed_element.serialize() : observed_element.getValue(); - var callback = el.readAttribute('data-onobserve'); - var executor = new PeriodicalExecuter(function() { - var value = observed_element.tagName.toUpperCase() === 'FORM' ? observed_element.serialize() : observed_element.getValue(); - - if(original_value !== value){ - original_value = value; - - if(callback !== null){ - evalAttribute(el, 'onobserve'); - } else if(el.readAttribute('data-url') !== null){ - handle_remote(el); - } - } - }, el.readAttribute('data-frequency')); - - }); - - /** - * - * Event Listeners - * - * the original element is contained inside the event, - * for some reason prototype wont let me listen for custom events on document - * if the event wasn't fired on document - * - */ - - Event.observe(document, 'submit', function (e) { - var form = Event.findElement(e, 'form'); - // Make sure conditions and confirm have not already run - if(form !== undefined && conditions_met(e, form) && confirmed(e, form)){ - - var button = form.down('input[data-submitted=true]'); - button.writeAttribute('data-submitted', null); - setEventProperty(e, 'submitted_button', button); - disable_button(button); - - if(form.readAttribute('data-remote') === 'true'){ - Event.stop(e); - handle_remote(form, e); - } - } - }); - - Event.observe(document, 'click', function (e) { - var el = Event.findElement(e, 'a') || Event.findElement(e, 'input'); - - if(el !== undefined && el.tagName.toUpperCase() === 'INPUT' && el.readAttribute('type').toUpperCase() === 'SUBMIT'){ - el.writeAttribute('data-submitted', 'true'); - - // Submit is handled by submit event, don't continue on this path - el = undefined; - } else if(el !== undefined && el.tagName.toUpperCase() === 'INPUT' && el.readAttribute('type').toUpperCase() !== 'BUTTON'){ - // Make sure other inputs do not send this event - el = undefined; - } - - if(el !== undefined && conditions_met(e, el) && confirmed(e, el)){ - if(el.tagName.toUpperCase() === 'INPUT' && el.readAttribute('type').toUpperCase() === 'BUTTON'){ - disable_button(el); - } - - if(el.readAttribute('data-remote') === 'true'){ - Event.stop(e); - handle_remote(el, e); - } else if(el.readAttribute('data-popup') !== null){ - Event.stop(e); - document.fire('rails:popup', {element: el}); - } - } - }); - - /** - * - * Default Event Handlers - * - */ - Event.observe(document, 'rails:confirm', function(e){ - setEventProperty(e, 'stop_event', !confirm(getEventProperty(e,'confirm_msg'))); - }); - - Event.observe(document, 'rails:popup', function(e){ - var el = getEventProperty(e, 'element'); - var url = el.readAttribute('href') || el.readAttribute('data-url'); - - if(el.readAttribute('data-popup') === true){ - window.open(url); - } else { - window.open(url, el.readAttribute('data-popup')); - } - }); - - Event.observe(document, 'rails:complete', function(e){ - var el = getEventProperty(e, 'element'); - - if(el.tagName.toUpperCase() === 'FORM'){ - var button = getEventProperty(e, 'submitted_button') ; - enable_button(button); - } - }); - - Event.observe(document, 'rails:success', function(e){ - var el = getEventProperty(e, 'element'), - xhr = getEventProperty(e, 'xhr'); - - if(xhr.responseText !== null){ - updateHTML(el, xhr.responseText, 'success'); - } - }); - - Event.observe(document, 'rails:failure', function(e){ - var el = getEventProperty(e, 'element'), - xhr = getEventProperty(e, 'xhr'); - - if(xhr.responseText !== null){ - updateHTML(el, xhr.responseText, 'failure'); - } - }); - - /** - * - * Rails 2.x Helpers / Event Handlers - * - */ - function evalAttribute(el, attribute){ - var js = el.readAttribute('data-' + attribute); - - if(js){ - eval(js); - } - } - - function conditions_met(e, el){ - if(getEventProperty(e,'condition_checked') !== true){ - setEventProperty(e, 'condition_checked', true); - - el = Event.findElement(e, 'form') || el; - var conditions = el.readAttribute('data-condition'); - - if(conditions !== null){ - if(eval(conditions) === false){ - Event.stop(e); - return false; - } - } - } - return true; - } - - Event.observe(document, 'rails:success', function(e){ - evalAttribute(el, 'onsuccess'); - }); - - Event.observe(document, 'rails:failure', function(e){ - evalAttribute(el, 'onfailure'); - }); - - Event.observe(document, 'rails:complete', function(e){ - var el = getEventProperty(e, 'element'); - - evalAttribute(el, 'oncomplete'); - evalAttribute(el, 'on' + getEventProperty('xhr', xhr.status)); - - if(el.readAttribute('data-periodical') === 'true'){ - evalAttribute(el, 'onobserve'); - } - }); - - Event.observe(document, 'rails:loading', function(e){ - evalAttribute(el, 'onloading'); - }); - - Event.observe(document, 'rails:loaded', function(e){ - evalAttribute(el, 'onloaded'); - }); - - Event.observe(document, 'rails:before', function(e){ - evalAttribute(el, 'onbefore'); - }); - - Event.observe(document, 'rails:after', function(e){ - evalAttribute(el, 'onafter'); - }); -}); diff --git a/railties/lib/generators/rails/app/templates/public/javascripts/prototype.rails.js b/railties/lib/generators/rails/app/templates/public/javascripts/prototype.rails.js new file mode 100644 index 0000000000..aaed677fda --- /dev/null +++ b/railties/lib/generators/rails/app/templates/public/javascripts/prototype.rails.js @@ -0,0 +1,324 @@ +Event.observe(document, 'dom:loaded', function() { + function handle_remote(el, e){ + var data = null, + method = el.readAttribute('method') || el.readAttribute('data-method') || 'GET', + url = el.readAttribute('action') || el.readAttribute('data-url') || '#', + async = el.readAttribute('data-remote-type') === 'synchronous' ? false : true, + update = el.readAttribute('data-update-success'), + position = el.readAttribute('data-update-position'); + + if (el.readAttribute('data-submit')) { + var submit_el = $(el.readAttribute('data-submit')); + if(submit_el !== undefined && submit_el.tagName.toUpperCase() == 'FORM'){ + data = submit_el.serialize(); + } + } else if (el.readAttribute('data-with')) { + // It seems there is a big inconsistency between what :with means depending on the element type + // so this is going to look a bit crazy + if(el.tagName.toUpperCase() === 'SCRIPT' && el.readAttribute('data-observed') !== null){ + // Handle observe_field and observe_form + var observed_element = $(el.readAttribute('data-observed')); + + if(observed_element.tagName.toUpperCase() === 'FORM'){ + data = el.readAttribute('data-with') + '=' + observed_element.serialize(); + } else if(observed_element.tagName.toUpperCase() === 'INPUT' && observed_element.readAttribute('type').toUpperCase() !== "BUTTON" && observed_element.readAttribute('type').toUpperCase() !== "SUBMIT") { + data = el.readAttribute('data-with') + '=' + observed_element.getValue(); + } + } else { + // Handle link_to and button_to + data = evalAttribute(el, 'data-with'); + } + } else if(el.tagName.toUpperCase() === 'FORM') { + data = el.serialize(); + } + + document.fire('rails:before'); + + var request = new Ajax.Request(url, { + method: method, + asynchronous: async, + parameters: data, + evalJS: true, + evalJSON: true, + onComplete: function(xhr){ + document.fire('rails:complete', {xhr: xhr, element: el, submitted_button: getEventProperty(e, 'submitted_button')}); + }, + onLoading: function(xhr){ + document.fire('rails:after', {xhr: xhr, element: el}); + document.fire('rails:loading', {xhr: xhr, element: el}); + }, + onLoaded: function(xhr){ + document.fire('rails:loaded', {xhr: xhr, element: el}); + }, + onSuccess: function(xhr){ + document.fire('rails:success', {xhr: xhr, element: el}); + }, + onFailure: function(xhr){ + document.fire('rails:failure', {xhr: xhr, element: el}); + } + }); + + } + + function setEventProperty(e, property, value){ + if(e.memo === undefined){ + e.memo = {}; + } + + e.memo[property] = value; + } + + function getEventProperty(e, property){ + if(e !== null && e.memo !== undefined && e.memo[property] !== undefined){ + return e.memo[property]; + } + } + + function confirmed(e, el){ + if(getEventProperty(e,'confirm_checked') !== true){ + setEventProperty(e, 'confirm_checked', true); + + el = Event.findElement(e, 'form') || el; + var confirm_msg = el.readAttribute('data-confirm'); + + if(confirm_msg !== null){ + var result = el.fire('rails:confirm', {confirm_msg: confirm_msg}); + if(result.memo.stop_event === true){ + Event.stop(e); + return false; + } + } + } + return true; + } + + function disable_button(el){ + var disable_with = el.readAttribute('data-disable-with'); + if(disable_with !== null){ + el.writeAttribute('data-enable-with', el.readAttribute('value')); + el.writeAttribute('value', disable_with); + el.writeAttribute('disabled', true); + } + } + + function enable_button(el){ + var enable_with = el.readAttribute('data-enable-with'); + if(enable_with !== null){ + el.writeAttribute('value', enable_with); + } + el.writeAttribute('disabled', false); + } + + function updateHTML(el, content, result){ + var element_id = null; + + if(result === 'success'){ + element_id = el.readAttribute('data-update-success'); + } else if(result === 'failure'){ + element_id = el.readAttribute('data-update-failure'); + } + + var element_to_update = $(element_id); + if(element_to_update !== null){ + var position = el.readAttribute('data-update-position'); + if(position !== null){ + var options = {}; + options[position] = content; + element_to_update.insert(options); + } else { + element_to_update.update(content); + } + } + } + + $$("script[data-periodical=true]").each(function(el){ + var executor = new PeriodicalExecuter(function() { handle_remote(el);}, el.readAttribute('data-frequency')); + }); + + $$("script[data-observe=true]").each(function(el){ + var observed_element = $(el.readAttribute('data-observed')); + var original_value = observed_element.tagName.toUpperCase() === 'FORM' ? observed_element.serialize() : observed_element.getValue(); + var callback = el.readAttribute('data-onobserve'); + var executor = new PeriodicalExecuter(function() { + var value = observed_element.tagName.toUpperCase() === 'FORM' ? observed_element.serialize() : observed_element.getValue(); + + if(original_value !== value){ + original_value = value; + + if(callback !== null){ + evalAttribute(el, 'onobserve'); + } else if(el.readAttribute('data-url') !== null){ + handle_remote(el); + } + } + }, el.readAttribute('data-frequency')); + + }); + + /** + * + * Event Listeners + * + * the original element is contained inside the event, + * for some reason prototype wont let me listen for custom events on document + * if the event wasn't fired on document + * + */ + + Event.observe(document, 'submit', function (e) { + var form = Event.findElement(e, 'form'); + // Make sure conditions and confirm have not already run + if(form !== undefined && conditions_met(e, form) && confirmed(e, form)){ + + var button = form.down('input[data-submitted=true]'); + button.writeAttribute('data-submitted', null); + setEventProperty(e, 'submitted_button', button); + disable_button(button); + + if(form.readAttribute('data-remote') === 'true'){ + Event.stop(e); + handle_remote(form, e); + } + } + }); + + Event.observe(document, 'click', function (e) { + var el = Event.findElement(e, 'a') || Event.findElement(e, 'input'); + + if(el !== undefined && el.tagName.toUpperCase() === 'INPUT' && el.readAttribute('type').toUpperCase() === 'SUBMIT'){ + el.writeAttribute('data-submitted', 'true'); + + // Submit is handled by submit event, don't continue on this path + el = undefined; + } else if(el !== undefined && el.tagName.toUpperCase() === 'INPUT' && el.readAttribute('type').toUpperCase() !== 'BUTTON'){ + // Make sure other inputs do not send this event + el = undefined; + } + + if(el !== undefined && conditions_met(e, el) && confirmed(e, el)){ + if(el.tagName.toUpperCase() === 'INPUT' && el.readAttribute('type').toUpperCase() === 'BUTTON'){ + disable_button(el); + } + + if(el.readAttribute('data-remote') === 'true'){ + Event.stop(e); + handle_remote(el, e); + } else if(el.readAttribute('data-popup') !== null){ + Event.stop(e); + document.fire('rails:popup', {element: el}); + } + } + }); + + /** + * + * Default Event Handlers + * + */ + Event.observe(document, 'rails:confirm', function(e){ + setEventProperty(e, 'stop_event', !confirm(getEventProperty(e,'confirm_msg'))); + }); + + Event.observe(document, 'rails:popup', function(e){ + var el = getEventProperty(e, 'element'); + var url = el.readAttribute('href') || el.readAttribute('data-url'); + + if(el.readAttribute('data-popup') === true){ + window.open(url); + } else { + window.open(url, el.readAttribute('data-popup')); + } + }); + + Event.observe(document, 'rails:complete', function(e){ + var el = getEventProperty(e, 'element'); + + if(el.tagName.toUpperCase() === 'FORM'){ + var button = getEventProperty(e, 'submitted_button') ; + enable_button(button); + } + }); + + Event.observe(document, 'rails:success', function(e){ + var el = getEventProperty(e, 'element'), + xhr = getEventProperty(e, 'xhr'); + + if(xhr.responseText !== null){ + updateHTML(el, xhr.responseText, 'success'); + } + }); + + Event.observe(document, 'rails:failure', function(e){ + var el = getEventProperty(e, 'element'), + xhr = getEventProperty(e, 'xhr'); + + if(xhr.responseText !== null){ + updateHTML(el, xhr.responseText, 'failure'); + } + }); + + /** + * + * Rails 2.x Helpers / Event Handlers + * + */ + function evalAttribute(el, attribute){ + var js = el.readAttribute('data-' + attribute); + + if(js){ + eval(js); + } + } + + function conditions_met(e, el){ + if(getEventProperty(e,'condition_checked') !== true){ + setEventProperty(e, 'condition_checked', true); + + el = Event.findElement(e, 'form') || el; + var conditions = el.readAttribute('data-condition'); + + if(conditions !== null){ + if(eval(conditions) === false){ + Event.stop(e); + return false; + } + } + } + return true; + } + + Event.observe(document, 'rails:success', function(e){ + evalAttribute(el, 'onsuccess'); + }); + + Event.observe(document, 'rails:failure', function(e){ + evalAttribute(el, 'onfailure'); + }); + + Event.observe(document, 'rails:complete', function(e){ + var el = getEventProperty(e, 'element'); + + evalAttribute(el, 'oncomplete'); + evalAttribute(el, 'on' + getEventProperty('xhr', xhr.status)); + + if(el.readAttribute('data-periodical') === 'true'){ + evalAttribute(el, 'onobserve'); + } + }); + + Event.observe(document, 'rails:loading', function(e){ + evalAttribute(el, 'onloading'); + }); + + Event.observe(document, 'rails:loaded', function(e){ + evalAttribute(el, 'onloaded'); + }); + + Event.observe(document, 'rails:before', function(e){ + evalAttribute(el, 'onbefore'); + }); + + Event.observe(document, 'rails:after', function(e){ + evalAttribute(el, 'onafter'); + }); +}); -- cgit v1.2.3 From fd0eb3d904235e8ebf21d6e79d45096d4c9c71bf Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 27 Jan 2010 19:33:03 -0800 Subject: Clear up some ivar warnings --- activerecord/lib/active_record/relation/query_methods.rb | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 8954f2d12b..0266700f66 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -133,8 +133,13 @@ module ActiveRecord arel = h.is_a?(String) ? arel.having(h) : arel.having(*h) end - arel = arel.take(@limit_value) if @limit_value.present? - arel = arel.skip(@offset_value) if @offset_value.present? + if defined?(@limit_value) && @limit_value.present? + arel = arel.take(@limit_value) + end + + if defined?(@offset_value) && @offset_value.present? + arel = arel.skip(@offset_value) + end @group_values.uniq.each do |g| arel = arel.group(g) if g.present? @@ -157,7 +162,12 @@ module ActiveRecord arel = arel.project(quoted_table_name + '.*') end - arel = @from_value.present? ? arel.from(@from_value) : arel.from(quoted_table_name) + arel = + if defined?(@from_value) && @from_value.present? + arel.from(@from_value) + else + arel.from(quoted_table_name) + end case @lock_value when TrueClass -- cgit v1.2.3 From 079714277df4641a24513b2595c0237293f48512 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 27 Jan 2010 19:33:26 -0800 Subject: Attend to brittle mailer generator tests --- railties/test/generators/mailer_generator_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb index 0b7f5c6817..e76ac5fb7d 100644 --- a/railties/test/generators/mailer_generator_test.rb +++ b/railties/test/generators/mailer_generator_test.rb @@ -9,7 +9,7 @@ class MailerGeneratorTest < Rails::Generators::TestCase run_generator assert_file "app/mailers/notifier.rb" do |mailer| assert_match /class Notifier < ActionMailer::Base/, mailer - assert_match /self\.defaults :from => "from@example.com"/, mailer + assert_match /defaults :from => "from@example.com"/, mailer end end @@ -61,12 +61,12 @@ class MailerGeneratorTest < Rails::Generators::TestCase assert_file "app/mailers/notifier.rb" do |mailer| assert_instance_method :foo, mailer do |foo| - assert_match /mail\(:to => "to@example.org"\)/, foo + assert_match /mail :to => "to@example.org"/, foo assert_match /@greeting = "Hi"/, foo end assert_instance_method :bar, mailer do |bar| - assert_match /mail\(:to => "to@example.org"\)/, bar + assert_match /mail :to => "to@example.org"/, bar assert_match /@greeting = "Hi"/, bar end end -- cgit v1.2.3 From 452bb1e48d7fa3dd4b2684d9d8ba3091200d59fe Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 27 Jan 2010 19:37:47 -0800 Subject: Rename 'defaults' class method to 'default' to reflect that it's a declaration --- actionmailer/lib/action_mailer/base.rb | 28 +++++++++++------------ actionmailer/lib/action_mailer/deprecated_api.rb | 4 ++-- actionmailer/lib/action_mailer/old_api.rb | 10 ++++---- actionmailer/test/base_test.rb | 10 ++++---- railties/test/generators/mailer_generator_test.rb | 2 +- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 3fbf004a0d..6246530bf0 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -23,8 +23,8 @@ module ActionMailer #:nodoc: # Examples: # # class Notifier < ActionMailer::Base - # defaults :from => 'no-reply@example.com', - # :return_path => 'system@example.com' + # default :from => 'no-reply@example.com', + # :return_path => 'system@example.com' # # def welcome(recipient) # @account = recipient @@ -191,7 +191,7 @@ module ActionMailer #:nodoc: # # These options are specified on the class level, like ActionMailer::Base.template_root = "/my/templates" # - # * defaults - This is a class wide hash of :key => value pairs containing + # * default - This is a class wide hash of :key => value pairs containing # default values for the specified header fields of the Mail::Message. You can # specify a default for any valid header for Mail::Message and it will be used if # you do not override it. The defaults set by Action Mailer are: @@ -232,16 +232,16 @@ module ActionMailer #:nodoc: # * deliveries - Keeps an array of all the emails sent out through the Action Mailer with delivery_method :test. Most useful # for unit and functional testing. # - # * default_charset - This is now deprecated, use the +defaults+ method above to + # * default_charset - This is now deprecated, use the +default+ method above to # set the default +:charset+. # - # * default_content_type - This is now deprecated, use the +defaults+ method above + # * default_content_type - This is now deprecated, use the +default+ method above # to set the default +:content_type+. # - # * default_mime_version - This is now deprecated, use the +defaults+ method above + # * default_mime_version - This is now deprecated, use the +default+ method above # to set the default +:mime_version+. # - # * default_implicit_parts_order - This is now deprecated, use the +defaults+ method above + # * default_implicit_parts_order - This is now deprecated, use the +default+ method above # to set the default +:parts_order+. Parts Order is used when a message is built implicitly # (i.e. multiple parts are assembled from templates which specify the content type in their # filenames) this variable controls how the parts are ordered. @@ -280,7 +280,7 @@ module ActionMailer #:nodoc: attr_writer :mailer_name alias :controller_path :mailer_name - def defaults(value=nil) + def default(value=nil) self.default_params.merge!(value) if value self.default_params end @@ -429,13 +429,13 @@ module ActionMailer #:nodoc: # * :reply_to - Who to set the Reply-To header of the email to. # * :date - The date to say the email was sent on. # - # You can set default values for any of the above headers (except :date) by using the defaults + # You can set default values for any of the above headers (except :date) by using the default # class method: # # class Notifier < ActionMailer::Base - # self.defaults :from => 'no-reply@test.lindsaar.net', - # :bcc => 'email_logger@test.lindsaar.net', - # :reply_to => 'bounces@test.lindsaar.net' + # self.default :from => 'no-reply@test.lindsaar.net', + # :bcc => 'email_logger@test.lindsaar.net', + # :reply_to => 'bounces@test.lindsaar.net' # end # # If you need other headers not listed above, use the headers['name'] = value method. @@ -487,7 +487,7 @@ module ActionMailer #:nodoc: parts_order = headers[:parts_order] # Merge defaults from class - headers = headers.reverse_merge(self.class.defaults) + headers = headers.reverse_merge(self.class.default) charset = headers[:charset] # Quote fields @@ -562,7 +562,7 @@ module ActionMailer #:nodoc: elsif headers[:body] responses << { :body => headers[:body], - :content_type => self.class.defaults[:content_type] || "text/plain" + :content_type => self.class.default[:content_type] || "text/plain" } else each_template do |template| diff --git a/actionmailer/lib/action_mailer/deprecated_api.rb b/actionmailer/lib/action_mailer/deprecated_api.rb index 36eec1087e..54ad18f796 100644 --- a/actionmailer/lib/action_mailer/deprecated_api.rb +++ b/actionmailer/lib/action_mailer/deprecated_api.rb @@ -14,7 +14,7 @@ module ActionMailer def self.default_#{method}=(value) ActiveSupport::Deprecation.warn "ActionMailer::Base.default_#{method}=value is deprecated, " << - "use defaults :#{method} => value instead" + "use default :#{method} => value instead" @@default_#{method} = value end @@ -136,4 +136,4 @@ module ActionMailer end end -end \ No newline at end of file +end diff --git a/actionmailer/lib/action_mailer/old_api.rb b/actionmailer/lib/action_mailer/old_api.rb index 4694958222..936ceb0dd6 100644 --- a/actionmailer/lib/action_mailer/old_api.rb +++ b/actionmailer/lib/action_mailer/old_api.rb @@ -187,10 +187,10 @@ module ActionMailer # mailer. Subclasses may override this method to provide different # defaults. def initialize_defaults(method_name) - @charset ||= self.class.defaults[:charset].try(:dup) - @content_type ||= self.class.defaults[:content_type].try(:dup) - @implicit_parts_order ||= self.class.defaults[:parts_order].try(:dup) - @mime_version ||= self.class.defaults[:mime_version].try(:dup) + @charset ||= self.class.default[:charset].try(:dup) + @content_type ||= self.class.default[:content_type].try(:dup) + @implicit_parts_order ||= self.class.default[:parts_order].try(:dup) + @mime_version ||= self.class.default[:mime_version].try(:dup) @mailer_name ||= self.class.mailer_name.dup @template ||= method_name @@ -245,4 +245,4 @@ module ActionMailer end end end -end \ No newline at end of file +end diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 86db3afc15..03e3f81acd 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -5,9 +5,9 @@ class BaseTest < ActiveSupport::TestCase class BaseMailer < ActionMailer::Base self.mailer_name = "base_mailer" - defaults :to => 'system@test.lindsaar.net', - :from => 'jose@test.plataformatec.com', - :reply_to => 'mikel@test.lindsaar.net' + default :to => 'system@test.lindsaar.net', + :from => 'jose@test.plataformatec.com', + :reply_to => 'mikel@test.lindsaar.net' def welcome(hash = {}) headers['X-SPAM'] = "Not SPAM" @@ -237,7 +237,7 @@ class BaseTest < ActiveSupport::TestCase end test "subject gets default from I18n" do - BaseMailer.defaults[:subject] = nil + BaseMailer.default[:subject] = nil email = BaseMailer.welcome(:subject => nil) assert_equal "Welcome", email.subject @@ -473,7 +473,7 @@ class BaseTest < ActiveSupport::TestCase end def with_default(klass, new_values) - hash = klass.defaults + hash = klass.default old_values = {} new_values.each do |key, value| old_values[key] = hash[key] diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb index e76ac5fb7d..e6fc1bbb5c 100644 --- a/railties/test/generators/mailer_generator_test.rb +++ b/railties/test/generators/mailer_generator_test.rb @@ -9,7 +9,7 @@ class MailerGeneratorTest < Rails::Generators::TestCase run_generator assert_file "app/mailers/notifier.rb" do |mailer| assert_match /class Notifier < ActionMailer::Base/, mailer - assert_match /defaults :from => "from@example.com"/, mailer + assert_match /default :from => "from@example.com"/, mailer end end -- cgit v1.2.3 From 2c12a71378d2146c822acb389b00b866f6420ff5 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 27 Jan 2010 19:53:46 -0800 Subject: Missed template change for defaults -> default --- railties/lib/generators/rails/mailer/templates/mailer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/lib/generators/rails/mailer/templates/mailer.rb b/railties/lib/generators/rails/mailer/templates/mailer.rb index ab03dd8d78..7343eb28b3 100644 --- a/railties/lib/generators/rails/mailer/templates/mailer.rb +++ b/railties/lib/generators/rails/mailer/templates/mailer.rb @@ -1,5 +1,5 @@ class <%= class_name %> < ActionMailer::Base - defaults :from => "from@example.com" + default :from => "from@example.com" <% for action in actions -%> # Subject can be set in your I18n file at config/locales/en.yml -- cgit v1.2.3 From c7c3eac762ed46f1eb165f666916ed52abd2ab3f Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Wed, 27 Jan 2010 17:39:11 -0800 Subject: Test::Unit Railtie --- railties/lib/generators/rails/app/templates/config/boot.rb | 2 ++ railties/lib/rails/all.rb | 1 + railties/lib/rails/generators.rb | 3 +-- railties/lib/rails/tasks.rb | 1 - railties/lib/rails/test_unit/railtie.rb | 11 +++++++++++ railties/test/application/generators_test.rb | 10 ++++++++-- 6 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 railties/lib/rails/test_unit/railtie.rb diff --git a/railties/lib/generators/rails/app/templates/config/boot.rb b/railties/lib/generators/rails/app/templates/config/boot.rb index e91304451b..7fc1aeaeb8 100644 --- a/railties/lib/generators/rails/app/templates/config/boot.rb +++ b/railties/lib/generators/rails/app/templates/config/boot.rb @@ -26,6 +26,7 @@ require 'rails/all' # require "action_view/railtie" # require "action_mailer/railtie" # require "active_resource/railtie" +# require "rails/test_unit/railtie" <% else -%> # Pick the frameworks you want: # require "active_model/railtie" @@ -35,4 +36,5 @@ require "action_controller/railtie" require "action_view/railtie" require "action_mailer/railtie" require "active_resource/railtie" +require "rails/test_unit/railtie" <% end -%> \ No newline at end of file diff --git a/railties/lib/rails/all.rb b/railties/lib/rails/all.rb index b8292a9b7e..1a0b4a8d73 100644 --- a/railties/lib/rails/all.rb +++ b/railties/lib/rails/all.rb @@ -8,6 +8,7 @@ require "rails" action_view action_mailer active_resource + rails/test_unit ).each do |framework| begin require "#{framework}/railtie" diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 2281746b00..ccf338bb6c 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -58,8 +58,7 @@ module Rails :scaffold_controller => :scaffold_controller, :singleton => false, :stylesheets => true, - :template_engine => :erb, - :test_framework => :test_unit + :template_engine => :erb }, :test_unit => { diff --git a/railties/lib/rails/tasks.rb b/railties/lib/rails/tasks.rb index 44c014efe8..9807000578 100644 --- a/railties/lib/rails/tasks.rb +++ b/railties/lib/rails/tasks.rb @@ -10,7 +10,6 @@ $VERBOSE = nil misc routes statistics - testing tmp ).each do |task| load "rails/tasks/#{task}.rake" diff --git a/railties/lib/rails/test_unit/railtie.rb b/railties/lib/rails/test_unit/railtie.rb new file mode 100644 index 0000000000..6858e8ebbd --- /dev/null +++ b/railties/lib/rails/test_unit/railtie.rb @@ -0,0 +1,11 @@ +module Rails + class TestUnitRailtie < Rails::Railtie + railtie_name :test_unit + + config.generators.test_framework :test_unit + + rake_tasks do + load "rails/tasks/testing.rake" + end + end +end \ No newline at end of file diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb index 1e6e30e9c3..13fbdfb417 100644 --- a/railties/test/application/generators_test.rb +++ b/railties/test/application/generators_test.rb @@ -19,8 +19,14 @@ module ApplicationTests yield app_const.config end + def with_bare_config + require "rails" + require "rails/generators" + yield app_const.config + end + test "generators default values" do - with_config do |c| + with_bare_config do |c| assert_equal(true, c.generators.colorize_logging) assert_equal({}, c.generators.aliases) assert_equal({}, c.generators.options) @@ -75,7 +81,7 @@ module ApplicationTests end test "generators with hashes for options and aliases" do - with_config do |c| + with_bare_config do |c| c.generators do |g| g.orm :datamapper, :migration => false g.plugin :aliases => { :generator => "-g" }, -- cgit v1.2.3 From 6268fcdc3083496d3336cfcecac2868e17f8d3b6 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Thu, 28 Jan 2010 10:03:47 -0800 Subject: Fix the test_framework generator tests --- railties/lib/rails/configuration.rb | 2 ++ railties/lib/rails/generators.rb | 1 + railties/test/generators/generators_test_helper.rb | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index c5cb7b2d09..0cf39636ac 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -91,6 +91,8 @@ module Rails def method_missing(method, *args) method = method.to_s.sub(/=$/, '').to_sym + return @options[method] if args.empty? + if method == :rails namespace, configuration = :rails, args.shift elsif args.first.is_a?(Hash) diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index ccf338bb6c..421f3df474 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -58,6 +58,7 @@ module Rails :scaffold_controller => :scaffold_controller, :singleton => false, :stylesheets => true, + :test_framework => nil, :template_engine => :erb }, diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb index 3cd16a69f9..d17be5b964 100644 --- a/railties/test/generators/generators_test_helper.rb +++ b/railties/test/generators/generators_test_helper.rb @@ -9,7 +9,7 @@ Rails.application.config.root = Rails.root require 'rails/generators' require 'rails/generators/test_case' - +Rails::Generators.configure! require 'active_record' require 'action_dispatch' -- cgit v1.2.3 From 252911e37897e1fd6f353f8e2002de3031275612 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Thu, 28 Jan 2010 10:17:41 -0800 Subject: Cleanup the test_unit generator move into the railtie --- railties/lib/rails/generators.rb | 9 ++------- railties/lib/rails/test_unit/railtie.rb | 8 +++++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 421f3df474..41dec3a120 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -52,8 +52,8 @@ module Rails :helper => true, :layout => true, :orm => :active_record, - :integration_tool => :test_unit, - :performance_tool => :test_unit, + :integration_tool => nil, + :performance_tool => nil, :resource_controller => :controller, :scaffold_controller => :scaffold_controller, :singleton => false, @@ -62,11 +62,6 @@ module Rails :template_engine => :erb }, - :test_unit => { - :fixture => true, - :fixture_replacement => nil - }, - :plugin => { :generator => false, :tasks => false diff --git a/railties/lib/rails/test_unit/railtie.rb b/railties/lib/rails/test_unit/railtie.rb index 6858e8ebbd..f93dace9bb 100644 --- a/railties/lib/rails/test_unit/railtie.rb +++ b/railties/lib/rails/test_unit/railtie.rb @@ -2,7 +2,13 @@ module Rails class TestUnitRailtie < Rails::Railtie railtie_name :test_unit - config.generators.test_framework :test_unit + config.generators do |c| + c.test_framework :test_unit, :fixture => true, + :fixture_replacement => nil + + c.integration_tool :test_unit + c.performance_tool :test_unit + end rake_tasks do load "rails/tasks/testing.rake" -- cgit v1.2.3 From 226d8e745a0d47efa50633661a2b7fe1859609bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 27 Jan 2010 17:39:35 +0100 Subject: Refactor MetalLoader and RoutesReloader to rely less on class configuration. Signed-off-by: Carl Lerche --- railties/lib/rails/application.rb | 8 +++- railties/lib/rails/application/finisher.rb | 4 +- railties/lib/rails/application/metal.rb | 46 --------------------- railties/lib/rails/application/metal_loader.rb | 50 +++++++++++++++++++++++ railties/lib/rails/application/routes_reloader.rb | 13 +++--- railties/lib/rails/configuration.rb | 2 +- railties/lib/rails/engine.rb | 8 ++-- 7 files changed, 68 insertions(+), 63 deletions(-) delete mode 100644 railties/lib/rails/application/metal.rb create mode 100644 railties/lib/rails/application/metal_loader.rb diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 9e41210119..3ed34f21a6 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -9,7 +9,7 @@ module Rails autoload :Configurable, 'rails/application/configurable' autoload :Configuration, 'rails/application/configuration' autoload :Finisher, 'rails/application/finisher' - autoload :Metal, 'rails/application/metal' + autoload :MetalLoader, 'rails/application/metal_loader' autoload :Railties, 'rails/application/railties' autoload :RoutesReloader, 'rails/application/routes_reloader' @@ -51,8 +51,12 @@ module Rails @railties ||= Railties.new(config) end + def metal_loader + @metal_laoder ||= MetalLoader.new + end + def routes_reloader - @routes_reloader ||= RoutesReloader.new(config) + @routes_reloader ||= RoutesReloader.new end def reload_routes! diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index d67420938a..c0b16a0090 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -15,9 +15,9 @@ module Rails end end - initializer :add_builtin_route do + initializer :add_builtin_route do |app| if Rails.env.development? - Rails::Application::RoutesReloader.paths << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') + app.routes_reloader.paths << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') end end diff --git a/railties/lib/rails/application/metal.rb b/railties/lib/rails/application/metal.rb deleted file mode 100644 index 17786dd4ba..0000000000 --- a/railties/lib/rails/application/metal.rb +++ /dev/null @@ -1,46 +0,0 @@ -require 'action_dispatch' - -module Rails - class Application - class Metal - def self.paths - @paths ||= [] - end - - def self.metals - @metals ||= [] - end - - def initialize(list=nil) - metals = [] - list = Array(list || :all).map(&:to_sym) - - self.class.paths.each do |path| - matcher = /\A#{Regexp.escape(path)}\/(.*)\.rb\Z/ - Dir.glob("#{path}/**/*.rb").sort.each do |metal_path| - metal = metal_path.sub(matcher, '\1').to_sym - next unless list.include?(metal) || list.include?(:all) - require_dependency metal - metals << metal - end - end - - metals = metals.sort_by do |m| - [list.index(m) || list.index(:all), m.to_s] - end - - @metals = metals.map { |m| m.to_s.camelize.constantize } - self.class.metals.concat(@metals) - end - - def new(app) - ActionDispatch::Cascade.new(@metals, app) - end - - def name - ActionDispatch::Cascade.name - end - alias_method :to_s, :name - end - end -end diff --git a/railties/lib/rails/application/metal_loader.rb b/railties/lib/rails/application/metal_loader.rb new file mode 100644 index 0000000000..c0f2e4f948 --- /dev/null +++ b/railties/lib/rails/application/metal_loader.rb @@ -0,0 +1,50 @@ +require 'action_dispatch' + +module Rails + class Application + class MetalLoader + attr_reader :paths, :metals + + def initialize + @paths, @metals = [], [] + end + + def build_middleware(list=nil) + load_metals!(list) + self + end + + def new(app) + ActionDispatch::Cascade.new(@metals, app) + end + + def name + ActionDispatch::Cascade.name + end + alias :to_s :name + + protected + + def load_metals!(list) + metals = [] + list = Array(list || :all).map(&:to_sym) + + paths.each do |path| + matcher = /\A#{Regexp.escape(path)}\/(.*)\.rb\Z/ + Dir.glob("#{path}/**/*.rb").sort.each do |metal_path| + metal = metal_path.sub(matcher, '\1').to_sym + next unless list.include?(metal) || list.include?(:all) + require_dependency metal + metals << metal + end + end + + metals = metals.sort_by do |m| + [list.index(m) || list.index(:all), m.to_s] + end + + @metals = metals.map { |m| m.to_s.camelize.constantize } + end + end + end +end diff --git a/railties/lib/rails/application/routes_reloader.rb b/railties/lib/rails/application/routes_reloader.rb index fe0cfb7801..fde6211c5d 100644 --- a/railties/lib/rails/application/routes_reloader.rb +++ b/railties/lib/rails/application/routes_reloader.rb @@ -1,19 +1,16 @@ module Rails class Application - # TODO Write tests for this behavior extracted from Application class RoutesReloader - def self.paths - @paths ||= [] - end + attr_reader :paths - def initialize(config) - @config, @last_change_at = config, nil + def initialize + @paths, @last_change_at = [], nil end def changed_at routes_changed_at = nil - self.class.paths.each do |path| + paths.each do |path| config_changed_at = File.stat(path).mtime if routes_changed_at.nil? || config_changed_at > routes_changed_at @@ -29,7 +26,7 @@ module Rails routes.disable_clear_and_finalize = true routes.clear! - self.class.paths.each { |path| load(path) } + paths.each { |path| load(path) } routes.finalize! nil diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index 0cf39636ac..6d5fa87439 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -16,7 +16,7 @@ module Rails middleware.use('::ActionDispatch::Cookies') middleware.use(lambda { ActionController::Base.session_store }, lambda { ActionController::Base.session_options }) middleware.use('::ActionDispatch::Flash', :if => lambda { ActionController::Base.session_store }) - middleware.use(lambda { Rails::Application::Metal.new(Rails.application.config.metals) }, :if => lambda { Rails::Application::Metal.metals.any? }) + middleware.use(lambda { Rails.application.metal_loader.build_middleware(Rails.application.config.metals) }, :if => lambda { Rails.application.metal_loader.metals.any? }) middleware.use('ActionDispatch::ParamsParser') middleware.use('::Rack::MethodOverride') middleware.use('::ActionDispatch::Head') diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index ebbee67cf4..b98393c01a 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -70,9 +70,9 @@ module Rails config.load_once_paths.freeze end - initializer :add_routing_paths do + initializer :add_routing_paths do |app| paths.config.routes.to_a.each do |route| - Rails::Application::RoutesReloader.paths.unshift(route) if File.exists?(route) + app.routes_reloader.paths.unshift(route) if File.exists?(route) end end @@ -98,8 +98,8 @@ module Rails ActionMailer::Base.view_paths.unshift(*views) if defined?(ActionMailer) end - initializer :add_metals do - Rails::Application::Metal.paths.unshift(*paths.app.metals.to_a) + initializer :add_metals do |app| + app.metal_loader.paths.unshift(*paths.app.metals.to_a) end initializer :load_application_initializers do -- cgit v1.2.3 From d3d487479a6d4a5ba6977fb0075e7937eb19718a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 27 Jan 2010 17:46:55 +0100 Subject: Add config.to_prepare back and add tests for it. Signed-off-by: Carl Lerche --- railties/lib/rails/application/finisher.rb | 8 +++++++- railties/lib/rails/configuration.rb | 8 ++++++++ railties/test/application/configuration_test.rb | 23 +++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index c0b16a0090..b722679ec2 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -15,6 +15,12 @@ module Rails end end + initializer :add_to_prepare_blocks do + config.to_prepare_blocks.each do |block| + ActionDispatch::Callbacks.to_prepare(&block) + end + end + initializer :add_builtin_route do |app| if Rails.env.development? app.routes_reloader.paths << File.join(RAILTIES_PATH, 'builtin', 'routes.rb') @@ -25,7 +31,7 @@ module Rails app end - # Fires the user-supplied after_initialize block (config#after_initialize) + # Fires the user-supplied after_initialize block (config.after_initialize) initializer :after_initialize do config.after_initialize_blocks.each do |block| block.call(self) diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index 6d5fa87439..a95075562f 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -52,6 +52,14 @@ module Rails after_initialize_blocks << blk if blk end + def to_prepare_blocks + @@to_prepare_blocks ||= [] + end + + def to_prepare(&blk) + to_prepare_blocks << blk if blk + end + def respond_to?(name) super || name.to_s =~ config_key_regexp end diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 666c47af67..50d6ba2855 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -12,6 +12,10 @@ module ApplicationTests FileUtils.cp_r(app_path, new_app) end + def app + @app ||= Rails.application + end + def setup FileUtils.rm_rf(new_app) if File.directory?(new_app) build_app @@ -132,5 +136,24 @@ module ApplicationTests require "#{app_path}/config/application" end end + + test "config.to_prepare is forwarded to ActionDispatch" do + $prepared = false + + add_to_config <<-RUBY + config.to_prepare do + $prepared = true + end + RUBY + + assert !$prepared + + require "#{app_path}/config/environment" + require 'rack/test' + extend Rack::Test::Methods + + get "/" + assert $prepared + end end end -- cgit v1.2.3 From 64ea3dfd9f14b09b65905a10379050ba2f42d8b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 27 Jan 2010 18:56:31 +0100 Subject: Add reloadable specific for engines and move environment to application paths. Signed-off-by: Carl Lerche --- railties/lib/rails/application/configuration.rb | 9 ++++----- railties/lib/rails/engine.rb | 2 +- railties/lib/rails/engine/configuration.rb | 1 - railties/lib/rails/plugin.rb | 6 ++++++ railties/test/railties/configuration_test.rb | 6 +++--- railties/test/railties/engine_test.rb | 4 ++++ railties/test/railties/plugin_test.rb | 4 ++++ railties/test/railties/shared_tests.rb | 2 +- 8 files changed, 23 insertions(+), 11 deletions(-) diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index aaf18b5f51..31787b5cc9 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -8,14 +8,16 @@ module Rails attr_accessor :cache_classes, :cache_store, :colorize_logging, :consider_all_requests_local, :dependency_loading, :filter_parameters, :log_level, :logger, :metals, - :plugins, :preload_frameworks, :reload_plugins, + :plugins, :preload_frameworks, :reload_engines, :reload_plugins, :serve_static_assets, :time_zone, :whiny_nils def initialize(*) super + @colorize_logging = true @filter_parameters = [] @dependency_loading = true @serve_static_assets = true + @time_zone = "UTC" end def paths @@ -23,6 +25,7 @@ module Rails paths = super paths.app.controllers << builtin_controller if builtin_controller paths.config.database "config/database.yml" + paths.config.environment "config/environments", :glob => "#{Rails.env}.rb" paths.log "log/#{Rails.env}.log" paths.tmp "tmp" paths.tmp.cache "tmp/cache" @@ -76,10 +79,6 @@ module Rails def log_level @log_level ||= Rails.env.production? ? :info : :debug end - - def time_zone - @time_zone ||= "UTC" - end end end end \ No newline at end of file diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index b98393c01a..33d62c8155 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -124,7 +124,7 @@ module Rails protected def reloadable?(app) - app.config.reload_plugins + app.config.reload_engines end end end \ No newline at end of file diff --git a/railties/lib/rails/engine/configuration.rb b/railties/lib/rails/engine/configuration.rb index c4e34b11b8..7d6de91430 100644 --- a/railties/lib/rails/engine/configuration.rb +++ b/railties/lib/rails/engine/configuration.rb @@ -22,7 +22,6 @@ module Rails paths.lib "lib", :load_path => true paths.lib.tasks "lib/tasks", :glob => "**/*.rake" paths.config "config" - paths.config.environment "config/environments", :glob => "#{Rails.env}.rb" paths.config.initializers "config/initializers", :glob => "**/*.rb" paths.config.locales "config/locales", :glob => "*.{rb,yml}" paths.config.routes "config/routes.rb" diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb index 4c73809177..881c97f02d 100644 --- a/railties/lib/rails/plugin.rb +++ b/railties/lib/rails/plugin.rb @@ -54,5 +54,11 @@ module Rails raise "\"#{name}\" is a Railtie/Engine and cannot be installed as plugin" end end + + protected + + def reloadable?(app) + app.config.reload_plugins + end end end diff --git a/railties/test/railties/configuration_test.rb b/railties/test/railties/configuration_test.rb index c5ff6dad9c..17ea526bbf 100644 --- a/railties/test/railties/configuration_test.rb +++ b/railties/test/railties/configuration_test.rb @@ -18,13 +18,13 @@ module RailtiesTest assert_equal "hello", Foo.config.foo.greetings end - test "plugin configurations are available in the application" do + test "railtie configurations are available in the application" do class Foo < Rails::Railtie ; config.foo.greetings = "hello" ; end require "#{app_path}/config/application" assert_equal "hello", AppTemplate::Application.config.foo.greetings end - test "plugin config merges are deep" do + test "railtie config merges are deep" do class Foo < Rails::Railtie ; config.foo.greetings = 'hello' ; end class Bar < Rails::Railtie config.foo.bar = "bar" @@ -33,7 +33,7 @@ module RailtiesTest assert_equal "bar", Bar.config.foo.bar end - test "plugin can add subscribers" do + test "railtie can add subscribers" do begin class Foo < Rails::Railtie; subscriber(Rails::Subscriber.new); end assert_kind_of Rails::Subscriber, Rails::Subscriber.subscribers[:foo] diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index 374f5ea93c..6f49ebcf1b 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -19,5 +19,9 @@ module RailtiesTest plugin.write "lib/another.rb", "class Another; end" end end + + def reload_config + :reload_engines + end end end diff --git a/railties/test/railties/plugin_test.rb b/railties/test/railties/plugin_test.rb index 0adc31e3ed..a29186f14a 100644 --- a/railties/test/railties/plugin_test.rb +++ b/railties/test/railties/plugin_test.rb @@ -15,6 +15,10 @@ module RailtiesTest end end + def reload_config + :reload_plugins + end + test "plugin can load the file with the same name in lib" do boot_rails require "bukkits" diff --git a/railties/test/railties/shared_tests.rb b/railties/test/railties/shared_tests.rb index fc4a19e7e7..2483fa47fd 100644 --- a/railties/test/railties/shared_tests.rb +++ b/railties/test/railties/shared_tests.rb @@ -31,7 +31,7 @@ module RailtiesTest def test_plugin_constants_get_reloaded_if_config_reload_plugins add_to_config <<-RUBY - config.reload_plugins = true + config.#{reload_config} = true RUBY boot_rails -- cgit v1.2.3 From e7418ab63cc4aa024367851f2f692032840cfe76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 27 Jan 2010 21:20:32 +0100 Subject: Add more tests to some key points in Railties. Signed-off-by: Carl Lerche --- railties/lib/rails/application.rb | 4 + railties/test/application/configuration_test.rb | 11 +- .../application/initializers/frameworks_test.rb | 6 + .../application/initializers/load_path_test.rb | 16 ++- railties/test/railties/configuration_test.rb | 45 ------- railties/test/railties/engine_test.rb | 4 + railties/test/railties/framework_extension_test.rb | 82 ------------- railties/test/railties/plugin_test.rb | 11 ++ railties/test/railties/railtie_test.rb | 132 +++++++++++++++++++++ railties/test/railties/shared_tests.rb | 9 ++ 10 files changed, 190 insertions(+), 130 deletions(-) delete mode 100644 railties/test/railties/configuration_test.rb delete mode 100644 railties/test/railties/framework_extension_test.rb create mode 100644 railties/test/railties/railtie_test.rb diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 3ed34f21a6..9384492486 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -31,6 +31,10 @@ module Rails Rails.application = base.instance end + def respond_to?(*args) + super || instance.respond_to?(*args) + end + protected def method_missing(*args, &block) diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 50d6ba2855..57bd797ef0 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -17,12 +17,15 @@ module ApplicationTests end def setup - FileUtils.rm_rf(new_app) if File.directory?(new_app) build_app boot_rails FileUtils.rm_rf("#{app_path}/config/environments") end + def teardown + FileUtils.rm_rf(new_app) if File.directory?(new_app) + end + test "Rails::Application.instance is nil until app is initialized" do require 'rails' assert_nil Rails::Application.instance @@ -30,6 +33,12 @@ module ApplicationTests assert_equal AppTemplate::Application.instance, Rails::Application.instance end + test "Rails::Application responds to all instance methods" do + require "#{app_path}/config/environment" + assert_respond_to Rails::Application, :routes_reloader + assert_equal Rails::Application.routes_reloader, Rails.application.routes_reloader + end + test "the application root is set correctly" do require "#{app_path}/config/environment" assert_equal Pathname.new(app_path), Rails.application.root diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb index ea052320ef..1e7b9c9997 100644 --- a/railties/test/application/initializers/frameworks_test.rb +++ b/railties/test/application/initializers/frameworks_test.rb @@ -71,6 +71,12 @@ module ApplicationTests assert_equal expects, middleware & expects end + test "active_record extensions are applied to ActiveRecord" do + add_to_config "config.active_record.table_name_prefix = 'tbl_'" + require "#{app_path}/config/environment" + assert_equal 'tbl_', ActiveRecord::Base.table_name_prefix + end + test "database middleware doesn't initialize when activerecord is not in frameworks" do use_frameworks [] require "#{app_path}/config/environment" diff --git a/railties/test/application/initializers/load_path_test.rb b/railties/test/application/initializers/load_path_test.rb index 714b6114a2..b39b9ecaae 100644 --- a/railties/test/application/initializers/load_path_test.rb +++ b/railties/test/application/initializers/load_path_test.rb @@ -10,7 +10,6 @@ module ApplicationTests FileUtils.rm_rf "#{app_path}/config/environments" end - # General test "initializing an application adds the application paths to the load path" do add_to_config <<-RUBY config.root = "#{app_path}" @@ -20,10 +19,24 @@ module ApplicationTests assert $:.include?("#{app_path}/app/models") end + test "initializing an application eager load any path under app" do + app_file "app/anything/foo.rb", <<-RUBY + module Foo; end + RUBY + + add_to_config <<-RUBY + config.root = "#{app_path}" + RUBY + + require "#{app_path}/config/environment" + assert Foo + end + test "eager loading loads parent classes before children" do app_file "lib/zoo.rb", <<-ZOO class Zoo ; include ReptileHouse ; end ZOO + app_file "lib/zoo/reptile_house.rb", <<-ZOO module Zoo::ReptileHouse ; end ZOO @@ -34,7 +47,6 @@ module ApplicationTests RUBY require "#{app_path}/config/environment" - assert Zoo end diff --git a/railties/test/railties/configuration_test.rb b/railties/test/railties/configuration_test.rb deleted file mode 100644 index 17ea526bbf..0000000000 --- a/railties/test/railties/configuration_test.rb +++ /dev/null @@ -1,45 +0,0 @@ -require "isolation/abstract_unit" - -module RailtiesTest - class ConfigurationTest < Test::Unit::TestCase - def setup - build_app - boot_rails - require "rails/all" - end - - test "config is available to plugins" do - class Foo < Rails::Railtie ; end - assert_nil Foo.config.action_controller.foo - end - - test "a config name is available for the plugin" do - class Foo < Rails::Railtie ; config.foo.greetings = "hello" ; end - assert_equal "hello", Foo.config.foo.greetings - end - - test "railtie configurations are available in the application" do - class Foo < Rails::Railtie ; config.foo.greetings = "hello" ; end - require "#{app_path}/config/application" - assert_equal "hello", AppTemplate::Application.config.foo.greetings - end - - test "railtie config merges are deep" do - class Foo < Rails::Railtie ; config.foo.greetings = 'hello' ; end - class Bar < Rails::Railtie - config.foo.bar = "bar" - end - assert_equal "hello", Bar.config.foo.greetings - assert_equal "bar", Bar.config.foo.bar - end - - test "railtie can add subscribers" do - begin - class Foo < Rails::Railtie; subscriber(Rails::Subscriber.new); end - assert_kind_of Rails::Subscriber, Rails::Subscriber.subscribers[:foo] - ensure - Rails::Subscriber.subscribers.clear - end - end - end -end diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index 6f49ebcf1b..2f886dcd66 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -23,5 +23,9 @@ module RailtiesTest def reload_config :reload_engines end + + test "Rails::Engine itself does not respond to config" do + assert !Rails::Engine.respond_to?(:config) + end end end diff --git a/railties/test/railties/framework_extension_test.rb b/railties/test/railties/framework_extension_test.rb deleted file mode 100644 index 48e513cf01..0000000000 --- a/railties/test/railties/framework_extension_test.rb +++ /dev/null @@ -1,82 +0,0 @@ -require "isolation/abstract_unit" - -module RailtiesTest - class FrameworkExtensionTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - build_app - boot_rails - FileUtils.rm_rf("#{app_path}/config/environments") - require "rails/all" - end - - test "rake_tasks block is executed when MyApp.load_tasks is called" do - $ran_block = false - - class MyTie < Rails::Railtie - rake_tasks do - $ran_block = true - end - end - - require "#{app_path}/config/environment" - - assert !$ran_block - require 'rake' - require 'rake/testtask' - require 'rake/rdoctask' - - AppTemplate::Application.load_tasks - assert $ran_block - end - - test "generators block is executed when MyApp.load_generators is called" do - $ran_block = false - - class MyTie < Rails::Railtie - generators do - $ran_block = true - end - end - - require "#{app_path}/config/environment" - - assert !$ran_block - AppTemplate::Application.load_generators - assert $ran_block - end - - test "railtie initializer" do - $ran_block = false - - class MyTie < Rails::Railtie - initializer :something_nice do - $ran_block = true - end - end - - assert !$ran_block - require "#{app_path}/config/environment" - assert $ran_block - end - end - - class ActiveRecordExtensionTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - build_app - boot_rails - FileUtils.rm_rf("#{app_path}/config/environments") - end - - test "active_record extensions are applied to ActiveRecord" do - add_to_config "config.active_record.table_name_prefix = 'tbl_'" - - require "#{app_path}/config/environment" - - assert_equal 'tbl_', ActiveRecord::Base.table_name_prefix - end - end -end \ No newline at end of file diff --git a/railties/test/railties/plugin_test.rb b/railties/test/railties/plugin_test.rb index a29186f14a..a3cccba3af 100644 --- a/railties/test/railties/plugin_test.rb +++ b/railties/test/railties/plugin_test.rb @@ -19,6 +19,17 @@ module RailtiesTest :reload_plugins end + test "Rails::Plugin itself does not respond to config" do + assert !Rails::Plugin.respond_to?(:config) + end + + test "cannot inherit from Rails::Plugin" do + boot_rails + assert_raise RuntimeError do + class Foo < Rails::Plugin; end + end + end + test "plugin can load the file with the same name in lib" do boot_rails require "bukkits" diff --git a/railties/test/railties/railtie_test.rb b/railties/test/railties/railtie_test.rb new file mode 100644 index 0000000000..b723e08281 --- /dev/null +++ b/railties/test/railties/railtie_test.rb @@ -0,0 +1,132 @@ +require "isolation/abstract_unit" + +module RailtiesTest + class RailtieTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + boot_rails + FileUtils.rm_rf("#{app_path}/config/environments") + require "rails/all" + end + + def app + @app ||= Rails.application + end + + test "Rails::Railtie itself does not respond to config" do + assert !Rails::Railtie.respond_to?(:config) + end + + test "cannot inherit from a railtie" do + class Foo < Rails::Railtie ; end + assert_raise RuntimeError do + class Bar < Foo; end + end + end + + test "config is available to railtie" do + class Foo < Rails::Railtie ; end + assert_nil Foo.config.action_controller.foo + end + + test "config name is available for the railtie" do + class Foo < Rails::Railtie ; config.foo.greetings = "hello" ; end + assert_equal "hello", Foo.config.foo.greetings + end + + test "railtie configurations are available in the application" do + class Foo < Rails::Railtie ; config.foo.greetings = "hello" ; end + require "#{app_path}/config/application" + assert_equal "hello", AppTemplate::Application.config.foo.greetings + end + + test "railtie config merges are deep" do + class Foo < Rails::Railtie ; config.foo.greetings = 'hello' ; end + class Bar < Rails::Railtie + config.foo.bar = "bar" + end + assert_equal "hello", Bar.config.foo.greetings + assert_equal "bar", Bar.config.foo.bar + end + + test "railtie can add subscribers" do + begin + class Foo < Rails::Railtie ; subscriber(Rails::Subscriber.new) ; end + assert_kind_of Rails::Subscriber, Rails::Subscriber.subscribers[:foo] + ensure + Rails::Subscriber.subscribers.clear + end + end + + test "railtie can add to_prepare callbacks" do + $to_prepare = false + class Foo < Rails::Railtie ; config.to_prepare { $to_prepare = true } ; end + assert !$to_prepare + require "#{app_path}/config/environment" + require "rack/test" + extend Rack::Test::Methods + get "/" + assert $to_prepare + end + + test "railtie can add after_initialize callbacks" do + $after_initialize = false + class Foo < Rails::Railtie ; config.after_initialize { $after_initialize = true } ; end + assert !$after_initialize + require "#{app_path}/config/environment" + assert $after_initialize + end + + test "rake_tasks block is executed when MyApp.load_tasks is called" do + $ran_block = false + + class MyTie < Rails::Railtie + rake_tasks do + $ran_block = true + end + end + + require "#{app_path}/config/environment" + + assert !$ran_block + require 'rake' + require 'rake/testtask' + require 'rake/rdoctask' + + AppTemplate::Application.load_tasks + assert $ran_block + end + + test "generators block is executed when MyApp.load_generators is called" do + $ran_block = false + + class MyTie < Rails::Railtie + generators do + $ran_block = true + end + end + + require "#{app_path}/config/environment" + + assert !$ran_block + AppTemplate::Application.load_generators + assert $ran_block + end + + test "railtie can add initializers" do + $ran_block = false + + class MyTie < Rails::Railtie + initializer :something_nice do + $ran_block = true + end + end + + assert !$ran_block + require "#{app_path}/config/environment" + assert $ran_block + end + end +end diff --git a/railties/test/railties/shared_tests.rb b/railties/test/railties/shared_tests.rb index 2483fa47fd..d51a0d153c 100644 --- a/railties/test/railties/shared_tests.rb +++ b/railties/test/railties/shared_tests.rb @@ -116,6 +116,15 @@ module RailtiesTest assert_equal "Hello bukkits\n", response[2].body end + def test_plugin_eager_load_any_path_under_app + @plugin.write "app/anything/foo.rb", <<-RUBY + module Foo; end + RUBY + + boot_rails + assert Foo + end + def test_routes_are_added_to_router @plugin.write "config/routes.rb", <<-RUBY class Sprokkit -- cgit v1.2.3 From f15bbcf97ee09d431e3ad347beb3fd31a411dda2 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Thu, 28 Jan 2010 10:45:25 -0800 Subject: Move the ActiveRecord generator settings into the Railtie --- activerecord/lib/active_record/railtie.rb | 3 +++ railties/lib/rails/generators.rb | 7 +------ railties/test/application/generators_test.rb | 2 +- railties/test/railties/engine_test.rb | 1 + railties/test/railties/plugin_test.rb | 1 + 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index 5e4ce34934..dc80ac4b30 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -10,6 +10,9 @@ module ActiveRecord class Railtie < Rails::Railtie railtie_name :active_record + config.generators.orm :active_record, :migration => true, + :timestamps => true + rake_tasks do load "active_record/railties/databases.rake" end diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 41dec3a120..1271de7af9 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -38,11 +38,6 @@ module Rails } DEFAULT_OPTIONS = { - :active_record => { - :migration => true, - :timestamps => true - }, - :erb => { :layout => true }, @@ -51,7 +46,7 @@ module Rails :force_plural => false, :helper => true, :layout => true, - :orm => :active_record, + :orm => nil, :integration_tool => nil, :performance_tool => nil, :resource_controller => :controller, diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb index 13fbdfb417..e54edea07c 100644 --- a/railties/test/application/generators_test.rb +++ b/railties/test/application/generators_test.rb @@ -34,7 +34,7 @@ module ApplicationTests end test "generators set rails options" do - with_config do |c| + with_bare_config do |c| c.generators.orm = :datamapper c.generators.test_framework = :rspec c.generators.helper = false diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index 2f886dcd66..40ac11fa03 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -25,6 +25,7 @@ module RailtiesTest end test "Rails::Engine itself does not respond to config" do + boot_rails assert !Rails::Engine.respond_to?(:config) end end diff --git a/railties/test/railties/plugin_test.rb b/railties/test/railties/plugin_test.rb index a3cccba3af..997b692e49 100644 --- a/railties/test/railties/plugin_test.rb +++ b/railties/test/railties/plugin_test.rb @@ -20,6 +20,7 @@ module RailtiesTest end test "Rails::Plugin itself does not respond to config" do + boot_rails assert !Rails::Plugin.respond_to?(:config) end -- cgit v1.2.3 From d58398c2b5e98aad18dc72790230f338c10d145c Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 28 Jan 2010 10:46:07 -0800 Subject: Ensure test sets json time format flag --- activesupport/test/core_ext/time_with_zone_test.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb index 3a12100e86..d88f79ae4f 100644 --- a/activesupport/test/core_ext/time_with_zone_test.rb +++ b/activesupport/test/core_ext/time_with_zone_test.rb @@ -56,8 +56,11 @@ class TimeWithZoneTest < Test::Unit::TestCase assert_equal 'EDT', ActiveSupport::TimeWithZone.new(Time.utc(2000, 6), @time_zone).zone #dst end - def test_to_json + def test_to_json_with_use_standard_json_time_format_config_set_to_false + old, ActiveSupport.use_standard_json_time_format = ActiveSupport.use_standard_json_time_format, false assert_equal "\"1999/12/31 19:00:00 -0500\"", ActiveSupport::JSON.encode(@twz) + ensure + ActiveSupport.use_standard_json_time_format = old end def test_to_json_with_use_standard_json_time_format_config_set_to_true -- cgit v1.2.3