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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7051e0881790746191bfc00fc388210c0a3744e5
4
- data.tar.gz: 9af912982dfef3a4b29a71355f3c6236d051ecdf
3
+ metadata.gz: b29ec4d6d6178db5e1574ccded088ab928e1e6d2
4
+ data.tar.gz: 536f8b59b3cb31288ea56460fd02240ca214af02
5
5
  SHA512:
6
- metadata.gz: 2d4dd48477a746b76ddb309192d7ad5cfe66f5cadc1e12fbc05291e28708630b0b6ec3598eb3112019f7199bc1a2ce479eb054594e323e120712c605935c5a37
7
- data.tar.gz: 0066dbf465f5f0bb0799f6b4fd2475132e059b5fd0409c6524b39cde40c8b2172ba586b3e2a4daf1bc354068f987c4b3c7e66053fcfdbf88e0ce53180bc0e12d
6
+ metadata.gz: 6b2e9e859a43b8e37aaf6f3686318994b5e20d4277ab77613bbfed01bbc501fcef40623f71a3f4cd34e66c88744d026168684ef3035c02bb7f6b2001cbfbd0de
7
+ data.tar.gz: 7ebe2956bf40b51c2fb44d68548548ad87439f2bd636cff7bf548fda2306c0e4a0abd5b2c144d927bb7a0b29d47fbd1fdb6314e770db1a9aea8e7a685851a9d7
@@ -1,3 +1,8 @@
1
+ **Version 0.2.0** - *2017-07-15*
2
+
3
+ - Removed @splat options and replaced with @clean
4
+
5
+
1
6
  **Version 0.1.4** - *2017-07-12*
2
7
 
3
8
  - Separated print method into helper
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'fuprint'
3
- s.version = '0.1.4'
4
- s.date = '2017-07-12'
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"]
@@ -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 :splat, :strip, :mode, :debug; end
13
- # Include splat and captures from Sinatra params
14
- @splat = false
10
+ class << self; attr_accessor :clean, :strip, :mode, :debug; end
15
11
 
16
- # Strip all params
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
@@ -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| %w[splat captures].include?(k)} unless Fuprint.splat
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.1.4
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-12 00:00:00.000000000 Z
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.10
78
+ rubygems_version: 2.6.12
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Fuprint Rack request printer middleware