rack-request_police 0.1.0alpha → 0.1.0alpha2

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: 032ca4a54509f306b4699d1461798949e6364efe
4
- data.tar.gz: 6ce6034762b55d4fd09fafefa83b6c13a367b6a1
3
+ metadata.gz: 8816f4a1c7dffd338af6240d09c3455c7bad718f
4
+ data.tar.gz: c36289abea2d7d0dc39683a176be672cf2eb1dd5
5
5
  SHA512:
6
- metadata.gz: 160d0fde3ac9edc4f6a470e1e7e742a58d544a4f7a510df86962cf7851d6c44529b700a9bd679651102c7c6762ff1ac7261adf268dfa12309d3e52d3c0d70da0
7
- data.tar.gz: 82abba729dfbd1ecfd73cef00e5bfd5a28467908dbd409e0d1ab2b706c1ee2fa548a6cce151ead42b88e28a1d803f41f660cac9c5146a8bf1f167b24c61212a0
6
+ metadata.gz: 0ff474177628520498e828a08787ed7a4adab776d7f65c97e9fbb72744fd1168fe3494bbae83ddefeba90b97018be1fd2f48d84470f275b8493909aa86521464
7
+ data.tar.gz: d9a84f84aa0e00be12ffb4015200e45d69c0d8b9ccf1949523ae550933b6f3abd9472b94ff0856be4bc45941bec23447d2f056ff761506138a3c3e69102dcd09
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.1.0alpha2
2
+
3
+ - web ui parse headers fix
4
+
1
5
  ## 0.1.0alpha
2
6
 
3
7
  **Backward incompatible changes**
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module RequestPolice
3
- VERSION = "0.1.0alpha"
3
+ VERSION = "0.1.0alpha2"
4
4
  end
5
5
  end
@@ -36,9 +36,15 @@ module Rack
36
36
 
37
37
  def pretty_parse(post_data)
38
38
  JSON.pretty_generate(JSON.parse(post_data))
39
- rescue JSON::ParserError
39
+ rescue JSON::ParserError, JSON::GeneratorError
40
40
  post_data
41
41
  end
42
+
43
+ def pretty_parse_hash(hash)
44
+ JSON.pretty_generate(hash)
45
+ rescue JSON::GeneratorError
46
+ hash.to_s
47
+ end
42
48
  end
43
49
  end
44
50
  end
data/web/views/index.erb CHANGED
@@ -84,7 +84,7 @@
84
84
  <% if log.headers %>
85
85
  <h4>Headers:</h4>
86
86
  <pre>
87
- <%= escape(pretty_parse(log.headers)) %>
87
+ <%= escape(pretty_parse_hash(log.headers)) %>
88
88
  </pre>
89
89
  <% end %>
90
90
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-request_police
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0alpha
4
+ version: 0.1.0alpha2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafał Wojsznis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2015-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler