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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eaca2cbd7486b718f90979812c60e0f2833e7299
4
- data.tar.gz: a4176b3d86d56939891921b4c326206b4478b02e
3
+ metadata.gz: 581133e7b5941a4d421a217f174b2c143f2d139b
4
+ data.tar.gz: a306e76e027393cf8ae12ca3bd9207a21704e129
5
5
  SHA512:
6
- metadata.gz: f5889acc132338f9e3bb4950d6b0d53c21a34c6be27ed56a9096f551bbfb1de90cd8c6e1274434134dd6b89259b9a6a75912dc9feffbf4dd27a15a25b6f0d3af
7
- data.tar.gz: 2c19d01a3c0d4bc0cfa49f01d5532a3ce0a0037c193dbae30689ea5be04b9324dfa244f8294a05a5177506ddcf81229d455dcb9d7025d8be580017fc51a56d45
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 = 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']
36
- bandiera_match = request_1.uri.sub(ENV['BANDIERA_URL'], bandiera_uri) == request_2.uri.sub(ENV['BANDIERA_URL'], bandiera_uri) if ENV['BANDIERA_URL']
37
- 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']
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>') { ENV['PARLIAMENT_AUTH_TOKEN'] } if ENV['PARLIAMENT_AUTH_TOKEN']
46
- config.filter_sensitive_data(parliament_uri) { ENV['PARLIAMENT_BASE_URL'] } if ENV['PARLIAMENT_BASE_URL']
47
- config.filter_sensitive_data(bandiera_uri) { ENV['BANDIERA_URL'] } if ENV['BANDIERA_URL']
48
- config.filter_sensitive_data(opensearch_uri) { ENV['OPENSEARCH_DESCRIPTION_URL'] } if ENV['OPENSEARCH_DESCRIPTION_URL']
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|
@@ -1,5 +1,5 @@
1
1
  module Parliament
2
2
  module Utils
3
- VERSION = '0.4.1'.freeze
3
+ VERSION = '0.4.2'.freeze
4
4
  end
5
5
  end
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.1
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-17 00:00:00.000000000 Z
11
+ date: 2017-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parliament-ruby