parliament-utils 0.2.3 → 0.2.4
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
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed11ec623a9ae74af0b72b04f01f25201aacfa64
|
4
|
+
data.tar.gz: f12187648cedb1c32131ed0c65d7e6eb4a32d628
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6766728711e5c12310944e98266e20e6e9b4aaf15f0e07406c33f927673c9f46108f8eb670102370a849e11ba2e2762b4ccfea5e805b575181c9683bcd2143c5
|
7
|
+
data.tar.gz: ba4b293509bfdfba17bb4442a57cc844c2c8498226124862ae08296ab6fff08278c2707745c0c92eaa6ca59f8dfd6b7660f9cbc2d0574bfb78a3c036b4d94cae
|
@@ -22,9 +22,9 @@ module Parliament
|
|
22
22
|
|
23
23
|
# Create a simple matcher which will 'filter' any request URIs on the fly
|
24
24
|
config.register_request_matcher :filtered_uri do |request_1, request_2|
|
25
|
-
parliament_match = request_1.uri.sub(ENV['PARLIAMENT_BASE_URL'], parliament_uri) == request_2.uri.sub(ENV['PARLIAMENT_BASE_URL'], parliament_uri)
|
26
|
-
bandiera_match = request_1.uri.sub(ENV['BANDIERA_URL'], bandiera_uri) == request_2.uri.sub(ENV['BANDIERA_URL'], bandiera_uri)
|
27
|
-
opensearch_match = request_1.uri.sub(ENV['OPENSEARCH_DESCRIPTION_URL'], opensearch_uri) == request_2.uri.sub(ENV['OPENSEARCH_DESCRIPTION_URL'], opensearch_uri)
|
25
|
+
parliament_match = request_1.uri.sub(ENV['PARLIAMENT_BASE_URL'], parliament_uri) == request_2.uri.sub(ENV['PARLIAMENT_BASE_URL'], parliament_uri) if ENV['PARLIAMENT_BASE_URL']
|
26
|
+
bandiera_match = request_1.uri.sub(ENV['BANDIERA_URL'], bandiera_uri) == request_2.uri.sub(ENV['BANDIERA_URL'], bandiera_uri) if ENV['BANDIERA_URL']
|
27
|
+
opensearch_match = request_1.uri.sub(ENV['OPENSEARCH_DESCRIPTION_URL'], opensearch_uri) == request_2.uri.sub(ENV['OPENSEARCH_DESCRIPTION_URL'], opensearch_uri) if ENV['OPENSEARCH_DESCRIPTION_URL']
|
28
28
|
|
29
29
|
parliament_match || bandiera_match || opensearch_match
|
30
30
|
end
|
@@ -32,10 +32,10 @@ module Parliament
|
|
32
32
|
config.default_cassette_options = { match_requests_on: [:method, :filtered_uri] }
|
33
33
|
|
34
34
|
# Dynamically filter our sensitive information
|
35
|
-
config.filter_sensitive_data('<AUTH_TOKEN>') { ENV['PARLIAMENT_AUTH_TOKEN'] }
|
36
|
-
config.filter_sensitive_data(parliament_uri) { ENV['PARLIAMENT_BASE_URL'] }
|
37
|
-
config.filter_sensitive_data(bandiera_uri) { ENV['BANDIERA_URL'] }
|
38
|
-
config.filter_sensitive_data(opensearch_uri) { ENV['OPENSEARCH_DESCRIPTION_URL'] }
|
35
|
+
config.filter_sensitive_data('<AUTH_TOKEN>') { ENV['PARLIAMENT_AUTH_TOKEN'] } if ENV['PARLIAMENT_AUTH_TOKEN']
|
36
|
+
config.filter_sensitive_data(parliament_uri) { ENV['PARLIAMENT_BASE_URL'] } if ENV['PARLIAMENT_BASE_URL']
|
37
|
+
config.filter_sensitive_data(bandiera_uri) { ENV['BANDIERA_URL'] } if ENV['BANDIERA_URL']
|
38
|
+
config.filter_sensitive_data(opensearch_uri) { ENV['OPENSEARCH_DESCRIPTION_URL'] } if ENV['OPENSEARCH_DESCRIPTION_URL']
|
39
39
|
|
40
40
|
# Dynamically filter n-triple data
|
41
41
|
config.before_record do |interaction|
|