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: d050ead54413d5e5add3db477f62722452ff0cfb
4
- data.tar.gz: 1426f74fdbe7abb1cc2d940281f80afd7b03622d
3
+ metadata.gz: ed11ec623a9ae74af0b72b04f01f25201aacfa64
4
+ data.tar.gz: f12187648cedb1c32131ed0c65d7e6eb4a32d628
5
5
  SHA512:
6
- metadata.gz: 3277280384cf8071914ab3db7150d589bfe48f1721c0aadab9cf4a6a395c17df686cfab733b8fee5a050e714fad0d320b354b8f7a7607b122f86691f001b1e6f
7
- data.tar.gz: e65d6abe42df7bcb7c6c325c2e19c6389edf25adc80bf65370c1eb7ceec34f8877926c1e5b3fc4a2e747b3a419044b7fa0cf8b4d2877141500a773003b0a0c07
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|
@@ -1,5 +1,5 @@
1
1
  module Parliament
2
2
  module Utils
3
- VERSION = '0.2.3'.freeze
3
+ VERSION = '0.2.4'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parliament-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rebecca Appleyard