hickory 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hickory/ext/rails/rack/logger.rb +20 -0
- data/lib/hickory/rails.rb +1 -0
- data/lib/hickory/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95526be9d2c6c2cf393cd547e944477252e4ca527c0d0afcbdfd221f70e32dbe
|
4
|
+
data.tar.gz: 2e2a00ff43e19de1903a1013902a323427b6ae7af1e79f268d84d24977e3bf8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b6de3ba2d0aadda8ac2442ce827093c84b43208c6e1db35d6930a38aaea0a789ea3fe057b1c26af3028b8384ae6c58499f9d961f6ae4b3c34eb7681dc5cd2ba
|
7
|
+
data.tar.gz: 30f1055d3259ce95db4fee0fe12cea4151ba62279955d1fc2cd93353b6935e85079b6bca7ce54c05c81e3719fecf8e086d8742b8a0ff5df5529e3735b8a49aa9
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'rails/rack/logger'
|
2
|
+
|
3
|
+
module Rails
|
4
|
+
module Rack
|
5
|
+
# Overwrites defaults of Rails::Rack::Logger that cause
|
6
|
+
# unnecessary logging.
|
7
|
+
# This effectively removes the log lines from the log
|
8
|
+
# that say:
|
9
|
+
# Started GET / for 192.168.2.1...
|
10
|
+
class Logger
|
11
|
+
# Overwrites Rails 3.2 code that logs new requests
|
12
|
+
def call_app(*args)
|
13
|
+
env = args.last
|
14
|
+
@app.call(env)
|
15
|
+
ensure
|
16
|
+
ActiveSupport::LogSubscriber.flush_all!
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/hickory/rails.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'active_support/log_subscriber'
|
2
2
|
require 'active_support/core_ext/module/attribute_accessors'
|
3
3
|
|
4
|
+
require 'hickory/ext/rails/rack/logger'
|
4
5
|
require 'hickory/rails/railtie'
|
5
6
|
require 'hickory/log_subscribers/action_controller'
|
6
7
|
require 'hickory/log_subscribers/action_mailer'
|
data/lib/hickory/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hickory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- blahed
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- bin/setup
|
113
113
|
- hickory.gemspec
|
114
114
|
- lib/hickory.rb
|
115
|
+
- lib/hickory/ext/rails/rack/logger.rb
|
115
116
|
- lib/hickory/formatters/json.rb
|
116
117
|
- lib/hickory/formatters/simple.rb
|
117
118
|
- lib/hickory/log_subscribers/action_controller.rb
|