google-ads-common 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog +3 -0
- data/lib/ads_common/savon_service.rb +4 -1
- data/lib/ads_common/version.rb +1 -1
- data/test/test_savon_service.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 991111457e7120b976a506c037b0fd935aa5c6f9
|
4
|
+
data.tar.gz: 0a769071c1c36367d1b5f484290584f43401bf72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95974d42f490a7b4395089032f09afd8e570289831120fd51a95cad0fec249150e0a89a26cf4dbfe5286cd886c622ab9ba6f4ff695a74c403ee61e3cfda8a19f
|
7
|
+
data.tar.gz: 3bcc749b38ab140d2b994bdd2ae01bbf13a34947574412f49498b64f5c83d488bd355503bc399c5b76e49106d048e218099d0132e49a64afc8baa32973062a2b
|
data/ChangeLog
CHANGED
@@ -220,8 +220,11 @@ module AdsCommon
|
|
220
220
|
|
221
221
|
# Sanitize the request body, redacting sensitive information.
|
222
222
|
def sanitize_request(body)
|
223
|
-
body.gsub(/developerToken>[
|
223
|
+
body = body.gsub(/developerToken>[^<]+<\//,
|
224
224
|
'developerToken>REDACTED</')
|
225
|
+
body = body.gsub(/httpAuthorizationHeader>[^<]+<\//,
|
226
|
+
'httpAuthorizationHeader>REDACTED</')
|
227
|
+
return body
|
225
228
|
end
|
226
229
|
|
227
230
|
# Format the fault message by capping length and removing newlines.
|
data/lib/ads_common/version.rb
CHANGED
data/test/test_savon_service.rb
CHANGED
@@ -90,9 +90,14 @@ class TestSavonService < Test::Unit::TestCase
|
|
90
90
|
test2 = "<xml><element1></element1><element2></element2></xml>"
|
91
91
|
test3 = "<xml><ns1:developerToken>w-x_Y-Z_</ns1:developerToken></xml>"
|
92
92
|
expected3 = "<xml><ns1:developerToken>REDACTED</ns1:developerToken></xml>"
|
93
|
+
test4 = "<xml><httpAuthorizationHeader>Authorization: Bearer " +
|
94
|
+
"1/abcdEFGH1234</httpAuthorizationHeader></xml>"
|
95
|
+
expected4 = "<xml><httpAuthorizationHeader>REDACTED" +
|
96
|
+
"</httpAuthorizationHeader></xml>"
|
93
97
|
assert_equal(expected1, @stub_service.sanitize_request(test1))
|
94
98
|
assert_equal(test2, @stub_service.sanitize_request(test2))
|
95
99
|
assert_equal(expected3, @stub_service.sanitize_request(test3))
|
100
|
+
assert_equal(expected4, @stub_service.sanitize_request(test4))
|
96
101
|
end
|
97
102
|
|
98
103
|
def test_format_fault()
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-ads-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio Gomes
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-06-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: google-ads-savon
|