parliament-utils 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/parliament/utils/test_helpers/vcr_helper.rb +11 -8
- data/lib/parliament/utils/version.rb +1 -1
- 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: 581133e7b5941a4d421a217f174b2c143f2d139b
|
4
|
+
data.tar.gz: a306e76e027393cf8ae12ca3bd9207a21704e129
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed4683c8351964691db255108c3a2a04f6210225ab194af4e09b990372820f53d25cfd5514d82e3edd123956568b220c1a17fab41ec82fb4766da25ca5530a49
|
7
|
+
data.tar.gz: b22c3394c0573f1fb355e12fa03186622e851308133228a2252903cabc4c09a83d010b4a1ee96f54e821ef470946abcf950d25755bca700a0cd5bae16ee67676
|
@@ -19,6 +19,7 @@ module Parliament
|
|
19
19
|
parliament_uri = 'http://localhost:3030'
|
20
20
|
bandiera_uri = 'http://localhost:5000'
|
21
21
|
opensearch_uri = 'https://apidataparliament.azure-api.net/search/description'
|
22
|
+
hybrid_bills_uri = 'https://localhost:5050'
|
22
23
|
|
23
24
|
VCR.configure do |config|
|
24
25
|
config.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
|
@@ -32,20 +33,22 @@ module Parliament
|
|
32
33
|
|
33
34
|
# Create a simple matcher which will 'filter' any request URIs on the fly
|
34
35
|
config.register_request_matcher :filtered_uri do |request_1, request_2|
|
35
|
-
parliament_match
|
36
|
-
bandiera_match
|
37
|
-
opensearch_match
|
36
|
+
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']
|
37
|
+
bandiera_match = request_1.uri.sub(ENV['BANDIERA_URL'], bandiera_uri) == request_2.uri.sub(ENV['BANDIERA_URL'], bandiera_uri) if ENV['BANDIERA_URL']
|
38
|
+
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']
|
39
|
+
hybrid_bills_match = request_1.uri.sub(ENV['HYBRID_BILL_API_BASE_URL'], hybrid_bills_uri) == request_2.uri.sub(ENV['HYBRID_BILL_API_BASE_URL'], hybrid_bills_uri) if ENV['HYBRID_BILL_API_BASE_URL']
|
38
40
|
|
39
|
-
parliament_match || bandiera_match || opensearch_match
|
41
|
+
parliament_match || bandiera_match || opensearch_match || hybrid_bills_match
|
40
42
|
end
|
41
43
|
|
42
44
|
config.default_cassette_options = { match_requests_on: [:method, :filtered_uri] }
|
43
45
|
|
44
46
|
# Dynamically filter our sensitive information
|
45
|
-
config.filter_sensitive_data('<AUTH_TOKEN>')
|
46
|
-
config.filter_sensitive_data(parliament_uri)
|
47
|
-
config.filter_sensitive_data(bandiera_uri)
|
48
|
-
config.filter_sensitive_data(opensearch_uri)
|
47
|
+
config.filter_sensitive_data('<AUTH_TOKEN>') { ENV['PARLIAMENT_AUTH_TOKEN'] } if ENV['PARLIAMENT_AUTH_TOKEN']
|
48
|
+
config.filter_sensitive_data(parliament_uri) { ENV['PARLIAMENT_BASE_URL'] } if ENV['PARLIAMENT_BASE_URL']
|
49
|
+
config.filter_sensitive_data(bandiera_uri) { ENV['BANDIERA_URL'] } if ENV['BANDIERA_URL']
|
50
|
+
config.filter_sensitive_data(opensearch_uri) { ENV['OPENSEARCH_DESCRIPTION_URL'] } if ENV['OPENSEARCH_DESCRIPTION_URL']
|
51
|
+
config.filter_sensitive_data(hybrid_bills_uri) { ENV['HYBRID_BILL_API_BASE_URL'] } if ENV['HYBRID_BILL_API_BASE_URL']
|
49
52
|
|
50
53
|
# Dynamically filter n-triple data
|
51
54
|
config.before_record do |interaction|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parliament-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rebecca Appleyard
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parliament-ruby
|