lib/recurly.rb in recurly-2.12.2 vs lib/recurly.rb in recurly-2.13.0

- old
+ new

@@ -12,12 +12,14 @@ require 'recurly/tax_detail' require 'recurly/tax_type' require 'recurly/juris_detail' require 'recurly/adjustment' require 'recurly/coupon' + require 'recurly/credit_payment' require 'recurly/helper' require 'recurly/invoice' + require 'recurly/invoice_collection' require 'recurly/js' require 'recurly/money' require 'recurly/measured_unit' require 'recurly/plan' require 'recurly/redemption' @@ -85,37 +87,19 @@ def js JS end # Assigns a logger to log requests/responses and more. - # The logger can only be set if the environment variable - # `RECURLY_INSECURE_DEBUG` equals `true`. # # @return [Logger, nil] # @example # require 'logger' # Recurly.logger = Logger.new STDOUT # @example Rails applications automatically log to the Rails log: # Recurly.logger = Rails.logger # @example Turn off logging entirely: # Recurly.logger = nil # Or Recurly.logger = Logger.new nil attr_accessor :logger - - def logger=(logger) - if ENV['RECURLY_INSECURE_DEBUG'].to_s.downcase == 'true' - @logger = logger - puts <<-MSG - [WARNING] Recurly logger enabled. The logger has the potential to leak - PII and should never be used in production environments. - MSG - else - puts <<-MSG - [WARNING] Recurly logger has been disabled. If you wish to use it, - only do so in a non-production environment and make sure - the `RECURLY_INSECURE_DEBUG` environment variable is set to `true`. - MSG - end - end # Convenience logging method includes a Logger#progname dynamically. # @return [true, nil] def log level, message logger.send(level, name) { message }