rack-http-logger 0.1.0 → 0.2.1

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: 642e14eefadc39818c60f0a90a509d19ef658b14
4
- data.tar.gz: b716b5ea8311d70c64ff05687f3698f7ff8dac59
3
+ metadata.gz: fd3d65614b42572ab7cdb0dac8be048f385f0fd7
4
+ data.tar.gz: 05afe553209b79960a18a80d7fb16055ad8994a0
5
5
  SHA512:
6
- metadata.gz: a28ea9211e98c4224641f02da06cae9ed9eacfd494dc95e761908229690046fb8f590a51f772abb934a24c2a6a89ac9aaa546862c167c12e64ff04d8165c7bf1
7
- data.tar.gz: 1bf1c05284c5241642b7d16646bb775b84c1333d8182bc33a5234246ccb7acd32147e91203f3afa4471b011b2cae60363ac21abc42b62de1b2d688fa29517a5e
6
+ metadata.gz: dfabf193f487bed015df776e5827953c84d13126999dd0b75b893e6abf49d3c996adc191ad142c6baa91837f7dd37f1ab1c92ef5ab138b9626577dda7e651277
7
+ data.tar.gz: 0300c9bbfef8c223f3f8b404b6af2c4e4581d0e4765ef5b710ffa36b9b684e3a4bc63d04b935b42712ae7fb47e2bf3194d9503ea45f63143f53cce7757cd6940
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-http-logger (0.1.0)
4
+ rack-http-logger (0.2.1)
5
5
  rack (~> 1.5)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- rack (1.5.2)
11
- rake (10.0.4)
10
+ rack (1.6.11)
11
+ rake (12.3.2)
12
12
 
13
13
  PLATFORMS
14
14
  ruby
@@ -16,3 +16,6 @@ PLATFORMS
16
16
  DEPENDENCIES
17
17
  rack-http-logger!
18
18
  rake
19
+
20
+ BUNDLED WITH
21
+ 2.0.1
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 Mattt Thompson (http://mattt.me/)
1
+ Copyright (c) 2013 – 2019 Mattt (https://mat.tt/)
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,8 +1,18 @@
1
1
  # Rack::HTTPLogger
2
2
 
3
- `Rack::HTTPLogger` is Rack middleware that provides a logging endpoint for your application. HTTP request parameters are automatically formatted according to [l2met](https://github.com/ryandotsmith/l2met) and logged to a specified stream, such as `STDOUT`.
4
-
5
- This is designed for anyone using Heroku, which uses [Logplex](https://devcenter.heroku.com/articles/logplex) to aggregate messages for further monitoring and analytics. With `Rack::HTTPLogger` remote events such as mobile device registrations can be collected and processed into your common log stream.
3
+ `Rack::HTTPLogger` is Rack middleware
4
+ that provides a logging endpoint for your application.
5
+ HTTP request parameters are automatically formatted
6
+ according to [l2met](https://github.com/ryandotsmith/l2met)
7
+ and logged to a specified stream,
8
+ such as `STDOUT`.
9
+
10
+ This is designed for anyone using Heroku,
11
+ which uses [Logplex](https://devcenter.heroku.com/articles/logplex)
12
+ to aggregate messages for further monitoring and analytics.
13
+ With `Rack::HTTPLogger` remote events,
14
+ such as mobile device registrations,
15
+ can be collected and processed into your common log stream.
6
16
 
7
17
  ## Installation
8
18
 
@@ -32,12 +42,9 @@ use Rack::HTTPLogger
32
42
 
33
43
  ## Contact
34
44
 
35
- Mattt Thompson
36
-
37
- - http://github.com/mattt
38
- - http://twitter.com/mattt
39
- - m@mattt.me
45
+ [Mattt](https://twitter.com/mattt)
40
46
 
41
47
  ## License
42
48
 
43
- Rack::HTTPLogger is available under the MIT license. See the LICENSE file for more info.
49
+ Rack::HTTPLogger is available under the MIT license.
50
+ See the LICENSE file for more info.
@@ -1,6 +1,6 @@
1
1
  module Rack #:nodoc:
2
2
  class HTTPLogger
3
- VERSION = '0.1.0'
3
+ VERSION = '0.2.1'
4
4
 
5
5
  def initialize(app, options = {})
6
6
  @app = app
@@ -14,11 +14,11 @@ module Rack #:nodoc:
14
14
  end
15
15
 
16
16
  def call(env)
17
- return @app.call(env) unless env["REQUEST_METHOD"] == @method and env["REQUEST_PATH"] == @path
18
-
19
17
  request = Rack::Request.new(env)
20
18
 
21
- if request.media_type == "application/json" and (body = env[POST_BODY].read).length.nonzero?
19
+ return @app.call(env) unless request.request_method == @method and request.path == @path
20
+
21
+ if request.media_type == "application/json" and (body = request.body.read).length.nonzero?
22
22
  log JSON.parse(body)
23
23
  else
24
24
  log request.params
@@ -4,9 +4,10 @@ require "rack/http-logger"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "rack-http-logger"
7
- s.authors = ["Mattt Thompson"]
8
- s.email = "m@mattt.me"
9
- s.homepage = "http://mattt.me"
7
+ s.authors = ["Mattt"]
8
+ s.email = "mattt@me.com"
9
+ s.license = 'MIT'
10
+ s.homepage = "https://mat.tt"
10
11
  s.version = Rack::HTTPLogger::VERSION
11
12
  s.platform = Gem::Platform::RUBY
12
13
  s.summary = "Rack::HTTPLogger"
metadata CHANGED
@@ -1,60 +1,61 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-http-logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
- - Mattt Thompson
7
+ - Mattt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-06 00:00:00.000000000 Z
11
+ date: 2019-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: Log arbitrary metrics from HTTP request parameters according to l2met
42
42
  conventions.
43
- email: m@mattt.me
43
+ email: mattt@me.com
44
44
  executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - ./Gemfile
49
- - ./Gemfile.lock
50
- - ./lib/rack/http-logger.rb
51
- - ./LICENSE
52
- - ./rack-http-logger-0.0.1.gem
53
- - ./rack-http-logger.gemspec
54
- - ./Rakefile
55
- - ./README.md
56
- homepage: http://mattt.me
57
- licenses: []
48
+ - "./Gemfile"
49
+ - "./Gemfile.lock"
50
+ - "./LICENSE.md"
51
+ - "./README.md"
52
+ - "./Rakefile"
53
+ - "./lib/rack/http-logger.rb"
54
+ - "./rack-http-logger-0.2.0.gem"
55
+ - "./rack-http-logger.gemspec"
56
+ homepage: https://mat.tt
57
+ licenses:
58
+ - MIT
58
59
  metadata: {}
59
60
  post_install_message:
60
61
  rdoc_options: []
@@ -62,17 +63,17 @@ require_paths:
62
63
  - lib
63
64
  required_ruby_version: !ruby/object:Gem::Requirement
64
65
  requirements:
65
- - - ! '>='
66
+ - - ">="
66
67
  - !ruby/object:Gem::Version
67
68
  version: '0'
68
69
  required_rubygems_version: !ruby/object:Gem::Requirement
69
70
  requirements:
70
- - - ! '>='
71
+ - - ">="
71
72
  - !ruby/object:Gem::Version
72
73
  version: '0'
73
74
  requirements: []
74
75
  rubyforge_project:
75
- rubygems_version: 2.0.3
76
+ rubygems_version: 2.6.14
76
77
  signing_key:
77
78
  specification_version: 4
78
79
  summary: Rack::HTTPLogger
Binary file