tshield 0.11.11.0 → 0.11.13.0

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
  SHA256:
3
- metadata.gz: d529a1c1f05cdb1b55bf3c98e2f27734e4c4c0e629c42c5aaa47b47fbb915cbf
4
- data.tar.gz: bed2c5eef5de6b373872a68726a18c1b9f6e2fcb7398000aa8166e9f30886693
3
+ metadata.gz: 822edc6241a2e6d53abc32da081364b3c56c7804a76bdc5f280cf42229ab36a4
4
+ data.tar.gz: de7090a23614e79b2d422665e86218df7cd313c26765660422b7ce8d2c7ab081
5
5
  SHA512:
6
- metadata.gz: ffd115c92396a127a7433ace24ac29057f28510dc60e1f2fb547cb4f421355acbab994a6ba2f54fa19a8ac2e7eaf3df6f353fc7aaae29e16bf9249046166fcd9
7
- data.tar.gz: 2ac272848b9a0594a6969a0582ecd05f1d214a1061e855ea9144f8d1c17fce7fadf61cb2fe5c2cce91ce73e31e1f5e80f6b726e76bdb5eb21846eb66352040cd
6
+ metadata.gz: 9faf59a02b986ff0ebede6763451fb93157516b4aebe1e809043f8519a65dd9fed61b4a46e9efa57b8be63b841d3861c211cdd0c60fb1c01722c9a62eec710a4
7
+ data.tar.gz: c89b1ead5400a31bae4d8a06e807f3e66503e4a2314924a1dc263b7c992524791a7334cd401bbeb0ea20382ebcf8edbf9ab85ae57c62689d4057a73a8d4b3678
@@ -65,7 +65,7 @@ module TShield
65
65
  api_response = TShield::RequestMatching.new(path, options.clone).match_request
66
66
 
67
67
  unless api_response
68
- add_headers(headers, path)
68
+ add_headers(options, path)
69
69
 
70
70
  api_response ||= TShield::RequestVCR.new(path, options.clone).response
71
71
  api_response.headers.reject! do |key, _v|
@@ -85,9 +85,9 @@ module TShield
85
85
  body api_response.body
86
86
  end
87
87
 
88
- def add_headers(headers, path)
88
+ def add_headers(options, path)
89
89
  (configuration.get_headers(domain(path)) || {}).each do |source, destiny|
90
- headers[destiny] = request.env[source] if request.env[source]
90
+ options[:headers][destiny] = request.env[source] if request.env[source]
91
91
  end
92
92
  end
93
93
 
@@ -5,7 +5,7 @@ module TShield
5
5
  class Version
6
6
  MAJOR = 0
7
7
  MINOR = 11
8
- PATCH = 11
8
+ PATCH = 13
9
9
  PRE = 0
10
10
 
11
11
  class << self
@@ -28,11 +28,12 @@ Gem::Specification.new do |s|
28
28
  s.add_dependency('httparty', '~> 0.14', '>= 0.14.0')
29
29
  s.add_dependency('json', '~> 2.0', '>= 2.0')
30
30
  s.add_dependency('sinatra', '~> 1.4', '>= 1.4.0')
31
+ s.add_dependency('sinatra-cross_origin', '~> 0.4.0', '>= 0.4')
31
32
  s.add_development_dependency('coveralls')
32
33
  s.add_development_dependency('cucumber', '~> 3.1', '>= 3.1.2')
33
34
  s.add_development_dependency('guard', '~> 2.15', '>= 2.15.0')
34
35
  s.add_development_dependency('guard-rspec', '~> 4.7', '>= 4.7.3')
35
- s.add_development_dependency('rake', '~> 10.0', '>= 10.0')
36
+ s.add_development_dependency('rake', '>= 10.0', '~> 13.0')
36
37
  s.add_development_dependency('rdoc', '~> 6.0', '>= 6.0')
37
38
  s.add_development_dependency('reek', '~> 5.4.0', '>= 5.4.0')
38
39
  s.add_development_dependency('rspec', '~> 3.5', '>= 3.5.0')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tshield
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.11.0
4
+ version: 0.11.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Rubin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-02-29 00:00:00.000000000 Z
12
+ date: 2020-04-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: byebug
@@ -91,6 +91,26 @@ dependencies:
91
91
  - - "~>"
92
92
  - !ruby/object:Gem::Version
93
93
  version: '1.4'
94
+ - !ruby/object:Gem::Dependency
95
+ name: sinatra-cross_origin
96
+ requirement: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: '0.4'
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 0.4.0
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0.4'
111
+ - - "~>"
112
+ - !ruby/object:Gem::Version
113
+ version: 0.4.0
94
114
  - !ruby/object:Gem::Dependency
95
115
  name: coveralls
96
116
  requirement: !ruby/object:Gem::Requirement
@@ -174,7 +194,7 @@ dependencies:
174
194
  version: '10.0'
175
195
  - - "~>"
176
196
  - !ruby/object:Gem::Version
177
- version: '10.0'
197
+ version: '13.0'
178
198
  type: :development
179
199
  prerelease: false
180
200
  version_requirements: !ruby/object:Gem::Requirement
@@ -184,7 +204,7 @@ dependencies:
184
204
  version: '10.0'
185
205
  - - "~>"
186
206
  - !ruby/object:Gem::Version
187
- version: '10.0'
207
+ version: '13.0'
188
208
  - !ruby/object:Gem::Dependency
189
209
  name: rdoc
190
210
  requirement: !ruby/object:Gem::Requirement
@@ -388,18 +408,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
388
408
  - !ruby/object:Gem::Version
389
409
  version: '0'
390
410
  requirements: []
391
- rubygems_version: 3.0.6
411
+ rubygems_version: 3.0.8
392
412
  signing_key:
393
413
  specification_version: 4
394
414
  summary: Proxy for mocks API responses
395
415
  test_files:
396
416
  - spec/spec_helper.rb
397
417
  - spec/tshield/request_matching_spec.rb
398
- - spec/tshield/options_spec.rb
399
- - spec/tshield/controllers/requests_spec.rb
418
+ - spec/tshield/configuration_spec.rb
400
419
  - spec/tshield/request_vcr_spec.rb
401
- - spec/tshield/fixtures/config/tshield.yml
420
+ - spec/tshield/controllers/requests_spec.rb
421
+ - spec/tshield/options_spec.rb
422
+ - spec/tshield/after_filter_spec.rb
402
423
  - spec/tshield/fixtures/matching/example.json
403
424
  - spec/tshield/fixtures/filters/example_filter.rb
404
- - spec/tshield/configuration_spec.rb
405
- - spec/tshield/after_filter_spec.rb
425
+ - spec/tshield/fixtures/config/tshield.yml