recurly 2.13.0 → 2.13.1

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
- SHA1:
3
- metadata.gz: ce78f65370210f07aadec09d3ee7adc7914953c6
4
- data.tar.gz: 3645d216c72e512ac2a9404524de84f051a581ac
2
+ SHA256:
3
+ metadata.gz: 191ead44d9b1d23fe7df5632d2624d36098fe51be7c390c6e9e60c23a24cc1d3
4
+ data.tar.gz: 7824ca4ea7257d2d48f03815f57b630eecc177662820380dad31466aec8d3468
5
5
  SHA512:
6
- metadata.gz: de8957a86ec7fa7d81af94bcc62fbcef07d8c4fb26c2ebc935c1f09fbf9a14fd9658c1be9c8fe51c4a45c570cb2256c5cfc65217f90c2f4e6ac3685b379d9a60
7
- data.tar.gz: 3715c88543466b84c2e79d48fbadcbf04b1c4e0ddcce586356a3bfeea4fad2951eb01010aa9171abfa8f2bd8573ee23e316b83c18635fdd940b494a6e6509f1d
6
+ metadata.gz: d5da08fda6e75a6f54960843f72d3a3007ea6d539dc7215eaa2d0d53f5b93a7db7b199e8a65acb12a34a74573da6248fa85d3c21a55642c751b708466e7d8038
7
+ data.tar.gz: f5f1046d70f65c0d41b4edbfda5519236bbec3b5cbf85ea3e8a147e059f928846effe5d3c3a7664b0c22aee608b1484e8243e6ec2edd93b3aebe2b2375414b57
data/lib/recurly.rb CHANGED
@@ -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 = 13
5
- PATCH = 0
5
+ PATCH = 1
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.13.0
4
+ version: 2.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-09 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
@@ -255,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
255
255
  version: '0'
256
256
  requirements: []
257
257
  rubyforge_project:
258
- rubygems_version: 2.6.13
258
+ rubygems_version: 2.7.6
259
259
  signing_key:
260
260
  specification_version: 4
261
261
  summary: Recurly API Client