fuprint 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/fuprint.gemspec +2 -2
- data/lib/fuprint.rb +5 -6
- data/lib/fuprint/helpers.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b29ec4d6d6178db5e1574ccded088ab928e1e6d2
|
4
|
+
data.tar.gz: 536f8b59b3cb31288ea56460fd02240ca214af02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b2e9e859a43b8e37aaf6f3686318994b5e20d4277ab77613bbfed01bbc501fcef40623f71a3f4cd34e66c88744d026168684ef3035c02bb7f6b2001cbfbd0de
|
7
|
+
data.tar.gz: 7ebe2956bf40b51c2fb44d68548548ad87439f2bd636cff7bf548fda2306c0e4a0abd5b2c144d927bb7a0b29d47fbd1fdb6314e770db1a9aea8e7a685851a9d7
|
data/CHANGELOG.md
CHANGED
data/fuprint.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'fuprint'
|
3
|
-
s.version = '0.
|
4
|
-
s.date = '2017-07-
|
3
|
+
s.version = '0.2.0'
|
4
|
+
s.date = '2017-07-15'
|
5
5
|
s.summary = "Fuprint Rack request printer middleware"
|
6
6
|
s.description = "Rack middleware that prints information about your request to console in development."
|
7
7
|
s.authors = ["Fugroup Limited"]
|
data/lib/fuprint.rb
CHANGED
@@ -2,18 +2,17 @@ require 'rack'
|
|
2
2
|
|
3
3
|
module Fuprint
|
4
4
|
|
5
|
-
# # # # # #
|
6
5
|
# Fuprint rack middleware request printer
|
7
6
|
# @homepage: https://github.com/fugroup/fuprint
|
8
7
|
# @author: Vidar <vidar@fugroup.net>, Fugroup Ltd.
|
9
8
|
# @license: MIT, contributions are welcome.
|
10
|
-
# # # # # #
|
11
9
|
|
12
|
-
class << self; attr_accessor :
|
13
|
-
# Include splat and captures from Sinatra params
|
14
|
-
@splat = false
|
10
|
+
class << self; attr_accessor :clean, :strip, :mode, :debug; end
|
15
11
|
|
16
|
-
#
|
12
|
+
# Delete these parameters before every request
|
13
|
+
@clean = %w[splat captures _method]
|
14
|
+
|
15
|
+
# Remove white space from all params
|
17
16
|
@strip = true
|
18
17
|
|
19
18
|
# Mode
|
data/lib/fuprint/helpers.rb
CHANGED
@@ -14,7 +14,7 @@ module Fuprint
|
|
14
14
|
puts env.inspect if Fuprint.debug
|
15
15
|
|
16
16
|
# Delete the splat and captures if Fuprint.splat = false (default)
|
17
|
-
req.params.delete_if{|k, v|
|
17
|
+
req.params.delete_if{|k, v| Fuprint.clean.include?(k)} if Fuprint.clean.any?
|
18
18
|
|
19
19
|
# Strip all params if Fuprint.strip = true (default)
|
20
20
|
req.params.each{|k, v| req.params[k] = (v.is_a?(String) ? v.strip : v)} if Fuprint.strip
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fuprint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fugroup Limited
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
75
|
version: '0'
|
76
76
|
requirements: []
|
77
77
|
rubyforge_project:
|
78
|
-
rubygems_version: 2.6.
|
78
|
+
rubygems_version: 2.6.12
|
79
79
|
signing_key:
|
80
80
|
specification_version: 4
|
81
81
|
summary: Fuprint Rack request printer middleware
|