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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1638a863b2fd6f3b6edacce9901af5d0dd37ffd65db2f940bc2e0e207d2f7ae
4
- data.tar.gz: edd442212d894f3c481993559a5e6c94050a409035c602629bdc604f629d4d6c
3
+ metadata.gz: 97285007a9cef5cece7c2b4a871321d34444e935c7e5a9497001b590452d0055
4
+ data.tar.gz: df36573a7686e81f08ac1c6d40de0b6038aff679762958385310ab68eaa59c3c
5
5
  SHA512:
6
- metadata.gz: 2ccc7c8ffea46ca7a467374e37d399d58588c3e02acebe1e87ffdf007c75529ac0118a5655923f2caf4bf2fdb5777544c7832730725ef5eb6ee12e0b521f6134
7
- data.tar.gz: d8bd3b1e229aa029808a04a7f7d4f42519a98d2896a1100f01abdd3a7a0cb733e22da0a9f8a8297df4233f9b3774592f8edb8bef81d29e14f4a3ec55ceba4f7f
6
+ metadata.gz: ce850d423ec93a4811a7a350d5e416ec6973bea37d8c3b5eb17ac9e64144897fe5dec40da878e07b3b021066698d54df170dc708cbc4a7da85aca430e5515f70
7
+ data.tar.gz: ac1b5b86edd0b6303a589fecad734ae40d49533ee7f37099da5ffb05cd2863d97fbb6c07bdc958b52b4ae53708f57bd1cec5f21a52869dba73188d073d176baf
data/README.md CHANGED
@@ -2,7 +2,9 @@ TShield
2
2
  =======
3
3
 
4
4
  [![Build Status](https://travis-ci.org/diegorubin/tshield.svg)](https://travis-ci.org/diegorubin/tshield)
5
- [![SourceLevel](https://app.sourcelevel.io/github/diegorubin/tshield.svg)](https://app.sourcelevel.io/github/diegorubin/tshield)[![Join the chat at https://gitter.im/diegorubin/tshield](https://badges.gitter.im/diegorubin/tshield.svg)](https://gitter.im/diegorubin/tshield?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5
+ [![SourceLevel](https://app.sourcelevel.io/github/diegorubin/tshield.svg)](https://app.sourcelevel.io/github/diegorubin/tshield)
6
+ [![Join the chat at https://gitter.im/diegorubin/tshield](https://badges.gitter.im/diegorubin/tshield.svg)](https://gitter.im/diegorubin/tshield?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
7
+ [![Gem Version](https://badge.fury.io/rb/tshield.svg)](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)
@@ -40,7 +40,8 @@ module TShield
40
40
 
41
41
  def self.run!
42
42
  register_resources
43
- super.run!
43
+ require 'byebug'
44
+ super
44
45
  end
45
46
  end
46
47
  end
@@ -5,7 +5,7 @@ module TShield
5
5
  class Version
6
6
  MAJOR = 0
7
7
  MINOR = 11
8
- PATCH = 2
8
+ PATCH = 3
9
9
  PRE = 0
10
10
 
11
11
  class << self
@@ -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
@@ -1,10 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tshield
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2.0
4
+ version: 0.11.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Rubin
8
+ - Eduardo Garcia
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []