party_cc 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/party_cc/httparty.rb +7 -3
- data/lib/party_cc/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzdiNjRmYmQxZTU3MTk2NjI2N2ZjZDEyOWQ2OTAwOTE3ZWM0ZDdkMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OWRhZGI4ZmZlODk2ZmI1Mzk3NjBhYzhjOGJkNzZmNjE5NjQ2NTlkOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWVkZDg1YTY3MzlmZDk1MjgzYjczYTIyOGMyMGE3YzcwMWZkOTVjZjEzYzYw
|
10
|
+
ODMxYzYxNDBjNzE2NDQyNTQyZWUzZWYyM2VhMDMzZmQwODg1MjYzOGVlNDIz
|
11
|
+
OTdkOTkzNzJhZGJlZWNlYzVjZTE3YmE5YWJmNzk1YjA1NGY2NmE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzQ2ZTM4NzM4MmM2MTU4NTExYmM1MjFkOWFjOTZhMmUzNTBjYzA5ZDhlYzQy
|
14
|
+
NzJjYzA2MjM4NDE1ZmEyZjQyYzMzNTRkMTBhMDRmYTcxNmIzNmU3OTk2ZDQw
|
15
|
+
MGM2NDhjZGJiYzIwNTkyNzkwYTU5OGE1NTBkNTYxOTNkZjFjMDE=
|
data/lib/party_cc/httparty.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
1
3
|
module HTTParty
|
2
4
|
class << self
|
3
5
|
|
@@ -18,16 +20,18 @@ module HTTParty
|
|
18
20
|
def pp_body(body, type)
|
19
21
|
buffer = StringIO.new
|
20
22
|
case
|
21
|
-
when type.downcase.include?('json')
|
23
|
+
when type && type.downcase.include?('json')
|
22
24
|
jsonified = JSON.load body
|
23
25
|
PP.pp(jsonified, buffer)
|
24
|
-
when type.downcase.include?('xml')
|
26
|
+
when type && type.downcase.include?('xml')
|
25
27
|
xmldoc = REXML::Document.new(body)
|
26
28
|
xmldoc.write(buffer)
|
27
29
|
else
|
28
30
|
PP.pp(body, buffer)
|
29
31
|
end
|
30
|
-
|
32
|
+
rescue
|
33
|
+
PP.pp(body, buffer)
|
34
|
+
ensure
|
31
35
|
buffer
|
32
36
|
end
|
33
37
|
|
data/lib/party_cc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: party_cc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- barberj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
93
|
+
rubygems_version: 2.2.2
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Document HTTParty responses for mocking
|