request_interceptor 0.1.0 → 0.1.1

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: 0a7e5effe2f0a9cd010dab836e26e21a3fa27926
4
- data.tar.gz: 8bfddbba2c833abc8f795a78d313d5359ce4bba6
3
+ metadata.gz: c71d28cdbf09e7e8cef303d41b8bcfe1f52f55a7
4
+ data.tar.gz: 2fa0efa5e19d3975ad6e502f309141e0dc87abaf
5
5
  SHA512:
6
- metadata.gz: 2837e6e5bb2a5bce1d3aa80beec3048af324153244bd0fe95bc2191398a98c610e47fa38c37a637b7b1339d196e9fa7fb9ddc442fb789f55794bd845104c871e
7
- data.tar.gz: a4bf84df00666296fc4ed166c2d9475ff6fa5052198297ed3b501088898713307f94773577931f9aa3180f298c0c34c937c164e05fa104e4dc93f7782ec06bb9
6
+ metadata.gz: 75d941129c251e6c0595d53020b1f6ebce625424e5f9a0605881d07ff3059ba05692bec55011440fb973cdb3378c4253b445f9f05519f967dd75f958d52d4f78
7
+ data.tar.gz: 9e254ab6980c329f7d2780f13f7ee6cb341a103f5602a568b1e07a39122b8c8f43bfb81df2687425a9f63cb64b2a0e0440bd5282d340e92c52bd4a8295f86f27
@@ -4,7 +4,7 @@ require "net/http"
4
4
  require "rack/mock"
5
5
 
6
6
  class RequestInterceptor
7
- class Transaction < Struct.new(:request, :reponse); end
7
+ class Transaction < Struct.new(:request, :response); end
8
8
 
9
9
  GET = "GET".freeze
10
10
  POST = "POST".freeze
@@ -93,12 +93,13 @@ class RequestInterceptor
93
93
 
94
94
  # yield the response because Net::HTTP#request does
95
95
  block.call(response) unless block.nil?
96
+
97
+ # log intercepted transaction
98
+ log_transaction(request, response)
96
99
  else
97
100
  response = real_request(http_context, request, body, &block)
98
101
  end
99
102
 
100
- log_transaction(request, response)
101
-
102
103
  response
103
104
  end
104
105
 
@@ -1,3 +1,3 @@
1
1
  class RequestInterceptor
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: request_interceptor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Tennhard
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2015-11-17 00:00:00.000000000 Z
12
+ date: 2015-12-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra