lib/action_smser.rb in action_smser-1.0.1 vs lib/action_smser.rb in action_smser-1.1.0

- old
+ new

@@ -1,22 +1,31 @@ require "action_smser/engine" require "action_smser/base" -Dir[File.dirname(__FILE__) + '/action_smser/delivery_methods/*.rb'].each do |file| - require file -end +require "action_smser/delivery_methods/test_array" +require "action_smser/delivery_methods/simple_http" +require "action_smser/delivery_methods/nexmo" module ActionSmser mattr_accessor :delivery_options self.delivery_options= {:delivery_method => :test_array, :save_delivery_reports => false} + self.delivery_options[:gateway_commit] = {} + self.delivery_options[:gateway_commit_observers] = [] + def self.gateway_commit_observer_add(observer_class) + self.delivery_options[:gateway_commit_observers].push(observer_class) + end + class Logger def self.info(str) Rails.logger.info("ActionSmser: #{str}") end def self.warn(str) Rails.logger.warn("ActionSmser: #{str}") + end + def self.error(str) + Rails.logger.error("ActionSmser: #{str}") end end end