rack-apimock 0.0.3 → 0.0.4

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: a9cc281675b62d8d4408ab9b0f2ef06ab9a5a6c7
4
- data.tar.gz: 77714ae80af1572e00f5270f8ba054d59ceb2c01
3
+ metadata.gz: d5deeba63279091390a93dd2ee2a93004cd78cc9
4
+ data.tar.gz: 73ed948d3a8cb17a343321ca9042bb2fca109440
5
5
  SHA512:
6
- metadata.gz: 19589190d21a67f8231bd37cbbad3dc700dfa5abcfdf7c7a620cdd8b3a0f7c611f6430f5e598652d1a50fd86edfdf6064c8216af9377cba7785f0779fe9a7ec9
7
- data.tar.gz: 9b4673a6985a061c707ec20f9984dce3966040c0b17c80ac96610ac27dfb3f24184b48230fc21d39ba9e8fb236bc370c423d90c7f0b89b6d7c188bd5972b57c5
6
+ metadata.gz: a702cb9ff720a003952637433a688d2600a27ef9b68ece4c3017804ef6811ec53d7901584a27c0d88997ced6e4df212cc4de7f965cad82edda9704b24a827c94
7
+ data.tar.gz: 13adcb7953c50e8fec3a777fb9554559bb55cb2104197858a9675fe7e469848bb7b990808cd743639ad3f43c7ded8193424a1873147cc56b8220b2ac4d6e88d1
data/lib/rack/apimock.rb CHANGED
@@ -9,6 +9,10 @@ module Rack
9
9
  end
10
10
 
11
11
  def call(env)
12
+ dup._call(env)
13
+ end
14
+
15
+ def _call(env)
12
16
  @status, @headers = 200, {}
13
17
  if env["CONTENT_TYPE"] =~ /application\/json/i
14
18
  @request_body = JSON.parse(env["rack.input"].gets) rescue nil
data/rack-apimock.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "rack-apimock"
7
- spec.version = "0.0.3"
7
+ spec.version = "0.0.4"
8
8
  spec.authors = ["hiro-su"]
9
9
  spec.email = ["h.sugipon@gmail.com"]
10
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-apimock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - hiro-su
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-25 00:00:00.000000000 Z
11
+ date: 2015-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.4.5
107
+ rubygems_version: 2.4.8
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Simple Rack Middleware for API Mock