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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjIwY2NjMDRmOGQxYzExYTZiZjk0YzUyNTVhZDFmNWRhOTliZmNhNA==
4
+ MzdiNjRmYmQxZTU3MTk2NjI2N2ZjZDEyOWQ2OTAwOTE3ZWM0ZDdkMQ==
5
5
  data.tar.gz: !binary |-
6
- NjE0N2RjY2MwYzIyNTViZTY5MjA1MWY2ODdmMjgxZmYwODM2M2VhZA==
6
+ OWRhZGI4ZmZlODk2ZmI1Mzk3NjBhYzhjOGJkNzZmNjE5NjQ2NTlkOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjBiMTY2ZjFjMGUyOWY2MzAwODhmNDNhNzJhNWJhNjQ0MDc2NjI2MTEyMTI5
10
- NzZmYmFiOTRmMGUyNzVhOTIzMWZiNGExMTY3MWRkY2E0YWE0ZjVjNjk3YzUx
11
- Mzc0MDIyOGQyNDE5ZjdhNzc2OGJmY2FjNDRmNzkxMzNmNTdiZWE=
9
+ NWVkZDg1YTY3MzlmZDk1MjgzYjczYTIyOGMyMGE3YzcwMWZkOTVjZjEzYzYw
10
+ ODMxYzYxNDBjNzE2NDQyNTQyZWUzZWYyM2VhMDMzZmQwODg1MjYzOGVlNDIz
11
+ OTdkOTkzNzJhZGJlZWNlYzVjZTE3YmE5YWJmNzk1YjA1NGY2NmE=
12
12
  data.tar.gz: !binary |-
13
- Y2MyYTQ2YjMzNzI0MzhjNDg1YjRmMDllNzRmN2IzODBjM2IyMDgyMGVhNDM4
14
- OGZkZjE2YWRkYTEzYjIzNmJmNTE3YWY5ZDI1YmNhODRlNDNkZDg1YzYwOTMz
15
- NDE3OTUxMmQ0MDM1ODQyYWY2YzA5M2QxNGZkZGU4ZmE5OGQ4Y2I=
13
+ YzQ2ZTM4NzM4MmM2MTU4NTExYmM1MjFkOWFjOTZhMmUzNTBjYzA5ZDhlYzQy
14
+ NzJjYzA2MjM4NDE1ZmEyZjQyYzMzNTRkMTBhMDRmYTcxNmIzNmU3OTk2ZDQw
15
+ MGM2NDhjZGJiYzIwNTkyNzkwYTU5OGE1NTBkNTYxOTNkZjFjMDE=
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module PartyCC
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
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.8
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-03-10 00:00:00.000000000 Z
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.1.11
93
+ rubygems_version: 2.2.2
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: Document HTTParty responses for mocking