lib/active_merchant/billing/integrations.rb in activemerchant-1.4.2 vs lib/active_merchant/billing/integrations.rb in activemerchant-1.5.0

- old
+ new

@@ -1,22 +1,29 @@ -require 'active_merchant/billing/integrations/notification' -require 'active_merchant/billing/integrations/helper' -require 'active_merchant/billing/integrations/return' -require 'active_merchant/billing/integrations/bogus' -require 'active_merchant/billing/integrations/chronopay' -require 'active_merchant/billing/integrations/paypal' -require 'active_merchant/billing/integrations/nochex' -require 'active_merchant/billing/integrations/gestpay' -require 'active_merchant/billing/integrations/two_checkout' -require 'active_merchant/billing/integrations/hi_trust' -require 'active_merchant/billing/integrations/quickpay' # make the bogus gateway be classified correctly by the inflector if defined?(ActiveSupport::Inflector) ActiveSupport::Inflector.inflections do |inflect| inflect.uncountable 'bogus' end else Inflector.inflections do |inflect| inflect.uncountable 'bogus' + end +end + +module ActiveMerchant + module Billing + module Integrations + + Dir[File.dirname(__FILE__) + '/integrations/*.rb'].each do |f| + + # Get camelized class name + filename = File.basename(f, '.rb') + # Camelize the string to get the class name + gateway_class = filename.camelize.to_sym + + # Register for autoloading + autoload gateway_class, f + end + end end end