recurly 2.12.1 → 2.12.2

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: 06ed1fa47719b4353f1837574fefbbecf996108b
4
- data.tar.gz: 8b3d8a509878a8a2196e5f714361e5ca698b1dac
2
+ SHA256:
3
+ metadata.gz: 74023d51f607419b02eebf1519c5bf2fd10ad2d5a6936f1cf91ec9f4826cc306
4
+ data.tar.gz: 150c6aa2260f26af8e404a8fc2aecc195bbc674aa43ed23dea707bc3232905b7
5
5
  SHA512:
6
- metadata.gz: bd284f548b2d62a4056572d921c577ba9aefbf09e35202f03e6c658fd8752d0577a18d9b0b37bd4ba2ce6d356db15cc389d9885329368c0997fc10fb413e5467
7
- data.tar.gz: 631ed8af4aa654ebc41f7727324a64e849132a616d2cae03a10ea9e73c19d53e6c403756c20ec6305636190cca450ab7924471948185e98bf8b5e3cb2f6f8678
6
+ metadata.gz: 54f0574b246972282aeb8a486d136dd458f33c94cf2768d4834cd767c6245ae75c4c264d502f8e5c91bbfd13daa0ab779a876a926bfff87ebeba2ce5bd7904c0
7
+ data.tar.gz: f3cc7e804713624a2aab966619df96733e391e778d454cecaff64d98ad43f3e9cfd142152bd764faf020fc50b98c32978f023bfe1ae99337e5248d8768e8f7ba
data/lib/recurly.rb CHANGED
@@ -87,6 +87,8 @@ module Recurly
87
87
  end
88
88
 
89
89
  # Assigns a logger to log requests/responses and more.
90
+ # The logger can only be set if the environment variable
91
+ # `RECURLY_INSECURE_DEBUG` equals `true`.
90
92
  #
91
93
  # @return [Logger, nil]
92
94
  # @example
@@ -98,6 +100,22 @@ module Recurly
98
100
  # Recurly.logger = nil # Or Recurly.logger = Logger.new nil
99
101
  attr_accessor :logger
100
102
 
103
+ def logger=(logger)
104
+ if ENV['RECURLY_INSECURE_DEBUG'].to_s.downcase == 'true'
105
+ @logger = logger
106
+ puts <<-MSG
107
+ [WARNING] Recurly logger enabled. The logger has the potential to leak
108
+ PII and should never be used in production environments.
109
+ MSG
110
+ else
111
+ puts <<-MSG
112
+ [WARNING] Recurly logger has been disabled. If you wish to use it,
113
+ only do so in a non-production environment and make sure
114
+ the `RECURLY_INSECURE_DEBUG` environment variable is set to `true`.
115
+ MSG
116
+ end
117
+ end
118
+
101
119
  # Convenience logging method includes a Logger#progname dynamically.
102
120
  # @return [true, nil]
103
121
  def log level, message
@@ -2,7 +2,7 @@ module Recurly
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 12
5
- PATCH = 1
5
+ PATCH = 2
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.12.1
4
+ version: 2.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-19 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
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
238
  version: '0'
239
239
  requirements: []
240
240
  rubyforge_project:
241
- rubygems_version: 2.6.13
241
+ rubygems_version: 2.7.6
242
242
  signing_key:
243
243
  specification_version: 4
244
244
  summary: Recurly API Client