recurly 2.14.0 → 2.14.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: e5d927750a6f80afe7369fa8acd53d89caf15197
4
- data.tar.gz: 4dc7825dd15b4be75074eff6ccbb641b195a19ec
2
+ SHA256:
3
+ metadata.gz: c8e60038f1fbb3762105225c21991eeeb0c87d6d90c6ed6f024dda9c95369a41
4
+ data.tar.gz: c8a792a38f9faffc340abf9370f2646303bb467b8034422f6e796f119beab148
5
5
  SHA512:
6
- metadata.gz: ed533f915f2963c3b621cf89b54023500c42f5a1d0ea68e64e230119f8e8f66b1b786a2353070d2294aebba34caee43163dbaab28ca72587ea1108c744f05bee
7
- data.tar.gz: 1b2cdcb562a7ad3294c3eef8435e60f3cf14f3c2b19fd52ea2459609ffc00c4d8417e55f2983504d4ed559e4b51784e7e4b1c322ef3080746f9f6190941430f5
6
+ metadata.gz: e7f8d7e9cc69df1ceda438557e90be530f1691ce413458f78da5d06cd19780d2986cece301672f6a6937f25fa01f59ed59f8369623897ea0313afd4ca7758f58
7
+ data.tar.gz: '093ba8354e1a54df6f5f3bb91c13df07c58086f010a7df24a9d4b8e42627ce24459499fc9aa32c98bc8dc126c699d5d69b7fa5a97b717ae00398000937e9cb6a'
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 = 14
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.14.0
4
+ version: 2.14.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-20 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