recurly 2.10.4 → 2.10.5

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: 6c2bb3abcd64e881fcd8172cf8505051a6c50234
4
- data.tar.gz: a592fc7b27402540fc0aed4d67017e6985fb438e
2
+ SHA256:
3
+ metadata.gz: 8e13772317176aaf69b6e856951daa32227e6f534a8bd58a7f08126e5a30e6a1
4
+ data.tar.gz: c710080c11c55d525225dcf35efaca658e45eb6c5b5458c5a43c7e4ad9deba94
5
5
  SHA512:
6
- metadata.gz: e7d8529b6c7ab19780c5614cf4347ebe1a96854e245209a18adc668f83cb1f36f4a6808ba4811f273a5cf7c43b331e42b07f2a690893f21b7de9518cb97f8736
7
- data.tar.gz: 7d1693efcc5ec7bbee57230621ddc1eef39debae676e299347c97ca86cc0b2a6770e9915d6fbf591facb7ae8cac6e4942abccf0d150e42a9ad569e32903ea3dc
6
+ metadata.gz: 7d77399dd921733fd137f278672f1651ff96a14ecfb5ed038b070d21eb42face7d64ad15d5880c2284ba201e0abc8e19516911949dfd7014fe409ab88ad0294d
7
+ data.tar.gz: 968072f0aee3fbb4731ae47cfec5d0e337e363071318cd80ee9a5d50475e9951df3c9153cc1040846505533a99e0d6d2ca384d4d5bcc08845af0aa1a8da81b01
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 = 10
5
- PATCH = 4
5
+ PATCH = 5
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.10.4
4
+ version: 2.10.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-10 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