tshield 0.11.2.0 → 0.11.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/tshield/request_matching.rb +1 -1
- data/lib/tshield/server.rb +2 -1
- data/lib/tshield/version.rb +1 -1
- data/spec/tshield/request_matching_spec.rb +10 -0
- data/tshield.gemspec +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97285007a9cef5cece7c2b4a871321d34444e935c7e5a9497001b590452d0055
|
4
|
+
data.tar.gz: df36573a7686e81f08ac1c6d40de0b6038aff679762958385310ab68eaa59c3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce850d423ec93a4811a7a350d5e416ec6973bea37d8c3b5eb17ac9e64144897fe5dec40da878e07b3b021066698d54df170dc708cbc4a7da85aca430e5515f70
|
7
|
+
data.tar.gz: ac1b5b86edd0b6303a589fecad734ae40d49533ee7f37099da5ffb05cd2863d97fbb6c07bdc958b52b4ae53708f57bd1cec5f21a52869dba73188d073d176baf
|
data/README.md
CHANGED
@@ -2,7 +2,9 @@ TShield
|
|
2
2
|
=======
|
3
3
|
|
4
4
|
[](https://travis-ci.org/diegorubin/tshield)
|
5
|
-
[](https://app.sourcelevel.io/github/diegorubin/tshield)
|
5
|
+
[](https://app.sourcelevel.io/github/diegorubin/tshield)
|
6
|
+
[](https://gitter.im/diegorubin/tshield?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
7
|
+
[](https://badge.fury.io/rb/tshield)
|
6
8
|
|
7
9
|
## API mocks for development and testing
|
8
10
|
TShield is an open source proxy for mocks API responses.
|
@@ -36,7 +36,7 @@ module TShield
|
|
36
36
|
result = filter_stubs(stubs[@options[:session]] || {})
|
37
37
|
return result if result
|
38
38
|
|
39
|
-
filter_stubs(stubs[DEFAULT_SESSION]) unless @options[:session] == DEFAULT_SESSION
|
39
|
+
filter_stubs(stubs[DEFAULT_SESSION] || {}) unless @options[:session] == DEFAULT_SESSION
|
40
40
|
end
|
41
41
|
|
42
42
|
def filter_by_method(stubs)
|
data/lib/tshield/server.rb
CHANGED
data/lib/tshield/version.rb
CHANGED
@@ -24,6 +24,16 @@ describe TShield::RequestMatching do
|
|
24
24
|
request_matching = TShield::RequestMatching.new('/')
|
25
25
|
expect(request_matching.match_request).to be_nil
|
26
26
|
end
|
27
|
+
|
28
|
+
it 'should return empty response when called via post' do
|
29
|
+
request_matching = TShield::RequestMatching.new('/', method: 'POST')
|
30
|
+
expect(request_matching.match_request).to be_nil
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'should return empty response when called via post and in session' do
|
34
|
+
request_matching = TShield::RequestMatching.new('/', method: 'POST', session: 'session')
|
35
|
+
expect(request_matching.match_request).to be_nil
|
36
|
+
end
|
27
37
|
end
|
28
38
|
|
29
39
|
context 'matching path' do
|
data/tshield.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.email = 'rubin.diego@gmail.com'
|
13
13
|
s.homepage = 'https://github.com/diegorubin/tshield'
|
14
14
|
s.description = 'Proxy for mocks API responses'
|
15
|
-
s.authors = ['Diego Rubin']
|
15
|
+
s.authors = ['Diego Rubin', 'Eduardo Garcia']
|
16
16
|
|
17
17
|
s.files = Dir['{app,config,lib}/**/*', 'MIT-LICENSE', 'Rakefile', 'README.md']
|
18
18
|
s.files += %w[Gemfile README.md]
|
metadata
CHANGED