recurly 2.15.2 → 2.15.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 435421667969ab85e80f5d636ff056462380a42feed0f6db5d7ded82965c7e28
4
- data.tar.gz: 8f070aec99e9dbba6e5ece4eaa42c94d885d048f71e05d42df807dd97c494978
3
+ metadata.gz: 9d73e8a6a9ed11996aab5b9ade68b0c096129001cbd8e53ec413c54aa069b36c
4
+ data.tar.gz: c765f551409dd907115e324ae04387765c93bb814810a3ce4b0af421cbdd9241
5
5
  SHA512:
6
- metadata.gz: 2963d34f5732bdd3331139485577ebb09fd7637e517637502e71419ae47f430fb9f1f8d9ab622e86b47711632f33a7163f23c126271111fcee895286e8f268f0
7
- data.tar.gz: 79197deb0459cc55518a0f0995d047311c376471ebd82f3a04a42f0e888e912cff9c489bd1448f4ae5a82e8bebcfc7a58de32b2c33872571d25a03545755b94c
6
+ metadata.gz: fc7b7e064ecca26ed5c86ca08bab1d1b2e4ac7a8ee569404d41ef848bbc3e96f6c5cad9dd4cc4190144945c1a9073815cb385032a0e39ec0a0f3008ec8dfa5d2
7
+ data.tar.gz: 40060514d41cdb8212132d72db405313d6eb7333913dbcc3717d120c55a13fb6df72f7743ec5d3e6389c0e7996db103cb2dd1c47aac7698689e7c6c86ac71ae9
@@ -89,6 +89,8 @@ module Recurly
89
89
  end
90
90
 
91
91
  # Assigns a logger to log requests/responses and more.
92
+ # The logger can only be set if the environment variable
93
+ # `RECURLY_INSECURE_DEBUG` equals `true`.
92
94
  #
93
95
  # @return [Logger, nil]
94
96
  # @example
@@ -100,6 +102,22 @@ module Recurly
100
102
  # Recurly.logger = nil # Or Recurly.logger = Logger.new nil
101
103
  attr_accessor :logger
102
104
 
105
+ def logger=(logger)
106
+ if ENV['RECURLY_INSECURE_DEBUG'].to_s.downcase == 'true'
107
+ @logger = logger
108
+ puts <<-MSG
109
+ [WARNING] Recurly logger enabled. The logger has the potential to leak
110
+ PII and should never be used in production environments.
111
+ MSG
112
+ else
113
+ puts <<-MSG
114
+ [WARNING] Recurly logger has been disabled. If you wish to use it,
115
+ only do so in a non-production environment and make sure
116
+ the `RECURLY_INSECURE_DEBUG` environment variable is set to `true`.
117
+ MSG
118
+ end
119
+ end
120
+
103
121
  # Convenience logging method includes a Logger#progname dynamically.
104
122
  # @return [true, nil]
105
123
  def log level, message
@@ -2,7 +2,7 @@ module Recurly
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 15
5
- PATCH = 2
5
+ PATCH = 3
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recurly
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.2
4
+ version: 2.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-18 00:00:00.000000000 Z
11
+ date: 2018-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri