mocktopus 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mocktopus/mock_api_call.rb +6 -1
- data/mocktopus.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30da376cf32eddf2ecc30c0b164f99f6bef93963
|
4
|
+
data.tar.gz: ade277507f628f20b1f44a8c4e7f7721d6af9d0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a514f931b968ea6162bf50c6327ca16d1b67e889e2136d71a16412e0838f39e4fe70db3a632e82b41c26ac8c87c7e407d11152116def8b5a21e160acd5972ab8
|
7
|
+
data.tar.gz: e80e9da782506e982e900a4ea759ab33075167fb7632ef4935b14819471046657cd417ab9a1def4730966f2c883aa008c8a84f901c69b0ce63da1de970025ea0
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'time'
|
2
2
|
require 'json'
|
3
|
+
require 'uri'
|
3
4
|
|
4
5
|
module Mocktopus
|
5
6
|
|
@@ -17,7 +18,11 @@ module Mocktopus
|
|
17
18
|
@verb = verb
|
18
19
|
@headers = headers
|
19
20
|
begin
|
20
|
-
@body =
|
21
|
+
@body = if @headers.has_key?('content_type') && @headers['content_type'] == 'application/x-www-form-urlencoded'
|
22
|
+
URI::decode_www_form_component(body).to_s
|
23
|
+
else
|
24
|
+
JSON.parse(body)
|
25
|
+
end
|
21
26
|
rescue
|
22
27
|
@body = body
|
23
28
|
end
|
data/mocktopus.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mocktopus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rackspace
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|