lib/pagarme.rb in pagarme-2.1.3 vs lib/pagarme.rb in pagarme-2.1.4

- old
+ new

@@ -29,6 +29,13 @@ # TODO: Remove deprecated PagarMe.validate_fingerprint def self.validate_fingerprint(*args) raise '[Deprecation Error] PagarMe.validate_fingerprint is deprecated, use PagarMe::Postback.valid_request_signature? instead' end + + def self.production? + ENV['RACK_ENV'] == 'production' || + ENV['RAILS_ENV'] == 'production' || + ENV['PRODUCTION'] || + ENV['production'] + end end