rack-ougai 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.rubocop.yml +162 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +61 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/rack/ougai/attach_requestid.rb +31 -0
- data/lib/rack/ougai/constant_logger.rb +19 -0
- data/lib/rack/ougai/log_requests.rb +33 -0
- data/lib/rack/ougai/logger.rb +20 -0
- data/lib/rack/ougai/version.rb +5 -0
- data/lib/rack/ougai.rb +12 -0
- data/rack-ougai.gemspec +27 -0
- metadata +118 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 27e100432cac9884d52ad4933f9d3224a2256e62
|
4
|
+
data.tar.gz: cea9f134706c03c91166c25dffef970ccdce29a3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9ee784842d6d78fb28f3d056cfbc1d38acd9b4ad4f5ce8113e977cbbfd9f640bee907850c0429eb2ffffa03dc5eebcd47203b22020e30c9036e187dd64e50ee6
|
7
|
+
data.tar.gz: 73f60d0fa8de95aad6437376d9e6b7be15a4f93c71217ea525989b05baee2fc832f9d083029a0a813a7da09b10540b88c85737668c603e7d02e8f7e74d04019c
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,162 @@
|
|
1
|
+
# Relaxed.Ruby.Style
|
2
|
+
## Version 2.1
|
3
|
+
|
4
|
+
Style/Alias:
|
5
|
+
Enabled: false
|
6
|
+
StyleGuide: http://relaxed.ruby.style/#stylealias
|
7
|
+
|
8
|
+
Style/AsciiComments:
|
9
|
+
Enabled: false
|
10
|
+
StyleGuide: http://relaxed.ruby.style/#styleasciicomments
|
11
|
+
|
12
|
+
Style/BeginBlock:
|
13
|
+
Enabled: false
|
14
|
+
StyleGuide: http://relaxed.ruby.style/#stylebeginblock
|
15
|
+
|
16
|
+
Style/BlockDelimiters:
|
17
|
+
Enabled: false
|
18
|
+
StyleGuide: http://relaxed.ruby.style/#styleblockdelimiters
|
19
|
+
|
20
|
+
Style/CommentAnnotation:
|
21
|
+
Enabled: false
|
22
|
+
StyleGuide: http://relaxed.ruby.style/#stylecommentannotation
|
23
|
+
|
24
|
+
Style/Documentation:
|
25
|
+
Enabled: false
|
26
|
+
StyleGuide: http://relaxed.ruby.style/#styledocumentation
|
27
|
+
|
28
|
+
Layout/DotPosition:
|
29
|
+
Enabled: false
|
30
|
+
StyleGuide: http://relaxed.ruby.style/#layoutdotposition
|
31
|
+
|
32
|
+
Style/DoubleNegation:
|
33
|
+
Enabled: false
|
34
|
+
StyleGuide: http://relaxed.ruby.style/#styledoublenegation
|
35
|
+
|
36
|
+
Style/EndBlock:
|
37
|
+
Enabled: false
|
38
|
+
StyleGuide: http://relaxed.ruby.style/#styleendblock
|
39
|
+
|
40
|
+
Style/FormatString:
|
41
|
+
Enabled: false
|
42
|
+
StyleGuide: http://relaxed.ruby.style/#styleformatstring
|
43
|
+
|
44
|
+
Style/IfUnlessModifier:
|
45
|
+
Enabled: false
|
46
|
+
StyleGuide: http://relaxed.ruby.style/#styleifunlessmodifier
|
47
|
+
|
48
|
+
Style/Lambda:
|
49
|
+
Enabled: false
|
50
|
+
StyleGuide: http://relaxed.ruby.style/#stylelambda
|
51
|
+
|
52
|
+
Style/ModuleFunction:
|
53
|
+
Enabled: false
|
54
|
+
StyleGuide: http://relaxed.ruby.style/#stylemodulefunction
|
55
|
+
|
56
|
+
Style/MultilineBlockChain:
|
57
|
+
Enabled: false
|
58
|
+
StyleGuide: http://relaxed.ruby.style/#stylemultilineblockchain
|
59
|
+
|
60
|
+
Style/NegatedIf:
|
61
|
+
Enabled: false
|
62
|
+
StyleGuide: http://relaxed.ruby.style/#stylenegatedif
|
63
|
+
|
64
|
+
Style/NegatedWhile:
|
65
|
+
Enabled: false
|
66
|
+
StyleGuide: http://relaxed.ruby.style/#stylenegatedwhile
|
67
|
+
|
68
|
+
Style/ParallelAssignment:
|
69
|
+
Enabled: false
|
70
|
+
StyleGuide: http://relaxed.ruby.style/#styleparallelassignment
|
71
|
+
|
72
|
+
Style/PercentLiteralDelimiters:
|
73
|
+
Enabled: false
|
74
|
+
StyleGuide: http://relaxed.ruby.style/#stylepercentliteraldelimiters
|
75
|
+
|
76
|
+
Style/PerlBackrefs:
|
77
|
+
Enabled: false
|
78
|
+
StyleGuide: http://relaxed.ruby.style/#styleperlbackrefs
|
79
|
+
|
80
|
+
Style/Semicolon:
|
81
|
+
Enabled: false
|
82
|
+
StyleGuide: http://relaxed.ruby.style/#stylesemicolon
|
83
|
+
|
84
|
+
Style/SignalException:
|
85
|
+
Enabled: false
|
86
|
+
StyleGuide: http://relaxed.ruby.style/#stylesignalexception
|
87
|
+
|
88
|
+
Style/SingleLineBlockParams:
|
89
|
+
Enabled: false
|
90
|
+
StyleGuide: http://relaxed.ruby.style/#stylesinglelineblockparams
|
91
|
+
|
92
|
+
Style/SingleLineMethods:
|
93
|
+
Enabled: false
|
94
|
+
StyleGuide: http://relaxed.ruby.style/#stylesinglelinemethods
|
95
|
+
|
96
|
+
Layout/SpaceBeforeBlockBraces:
|
97
|
+
Enabled: false
|
98
|
+
StyleGuide: http://relaxed.ruby.style/#layoutspacebeforeblockbraces
|
99
|
+
|
100
|
+
Layout/SpaceInsideParens:
|
101
|
+
Enabled: false
|
102
|
+
StyleGuide: http://relaxed.ruby.style/#layoutspaceinsideparens
|
103
|
+
|
104
|
+
Style/SpecialGlobalVars:
|
105
|
+
Enabled: false
|
106
|
+
StyleGuide: http://relaxed.ruby.style/#stylespecialglobalvars
|
107
|
+
|
108
|
+
Style/StringLiterals:
|
109
|
+
Enabled: false
|
110
|
+
StyleGuide: http://relaxed.ruby.style/#stylestringliterals
|
111
|
+
|
112
|
+
Style/TrailingCommaInArguments:
|
113
|
+
Enabled: false
|
114
|
+
StyleGuide: http://relaxed.ruby.style/#styletrailingcommainarguments
|
115
|
+
|
116
|
+
Style/TrailingCommaInLiteral:
|
117
|
+
Enabled: false
|
118
|
+
StyleGuide: http://relaxed.ruby.style/#styletrailingcommainliteral
|
119
|
+
|
120
|
+
Style/WhileUntilModifier:
|
121
|
+
Enabled: false
|
122
|
+
StyleGuide: http://relaxed.ruby.style/#stylewhileuntilmodifier
|
123
|
+
|
124
|
+
Style/WordArray:
|
125
|
+
Enabled: false
|
126
|
+
StyleGuide: http://relaxed.ruby.style/#stylewordarray
|
127
|
+
|
128
|
+
Lint/AmbiguousRegexpLiteral:
|
129
|
+
Enabled: false
|
130
|
+
StyleGuide: http://relaxed.ruby.style/#lintambiguousregexpliteral
|
131
|
+
|
132
|
+
Lint/AssignmentInCondition:
|
133
|
+
Enabled: false
|
134
|
+
StyleGuide: http://relaxed.ruby.style/#lintassignmentincondition
|
135
|
+
|
136
|
+
Metrics/AbcSize:
|
137
|
+
Enabled: false
|
138
|
+
|
139
|
+
Metrics/BlockNesting:
|
140
|
+
Enabled: false
|
141
|
+
|
142
|
+
Metrics/ClassLength:
|
143
|
+
Enabled: false
|
144
|
+
|
145
|
+
Metrics/ModuleLength:
|
146
|
+
Enabled: false
|
147
|
+
|
148
|
+
Metrics/CyclomaticComplexity:
|
149
|
+
Enabled: false
|
150
|
+
|
151
|
+
Metrics/LineLength:
|
152
|
+
Enabled: false
|
153
|
+
|
154
|
+
Metrics/MethodLength:
|
155
|
+
Enabled: false
|
156
|
+
|
157
|
+
Metrics/ParameterLists:
|
158
|
+
Enabled: false
|
159
|
+
|
160
|
+
Metrics/PerceivedComplexity:
|
161
|
+
Enabled: false
|
162
|
+
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at ed@edropple.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Toshimitsu Takahashi, Ed Ropple
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
# Rack::Ougai #
|
2
|
+
`Rack::Ougai` replaces the Rack logging system with an [Ougai](https://github.com/tilfin/ougai) logger
|
3
|
+
that supports Bunyan-styled structured logging in JSON. It includes a few options for building those logs,
|
4
|
+
as well as integration with (`Rack::RequestID`)[https://github.com/dancavallaro/rack-requestid].
|
5
|
+
|
6
|
+
## Installation ##
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'rack-ougai'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install rack-ougai
|
20
|
+
|
21
|
+
## Usage ##
|
22
|
+
Your `config.ru` should include directives similar to these. Obviously, `Rack::RequestID` is
|
23
|
+
optional, but `Rack::Ougai::Logger` (or another logger provider) should be high in your middleware
|
24
|
+
stack so as to push a logger down into the subsequent middleware.
|
25
|
+
|
26
|
+
```
|
27
|
+
require 'rack/ougai'
|
28
|
+
require 'rack/requestid'
|
29
|
+
|
30
|
+
use Rack::RequestID # makes sure `env` has an X-Request-Id header
|
31
|
+
|
32
|
+
use Rack::Ougai::Logger, Logger::INFO # see Log Providers below
|
33
|
+
use Rack::Ougai::AttachRequestID # Replaces logger with a child logger that's tagged with the request ID
|
34
|
+
|
35
|
+
use Rack::Ougai::LogRequests # logs every request with timing data, request result, etc.
|
36
|
+
```
|
37
|
+
|
38
|
+
## Log Providers ##
|
39
|
+
|
40
|
+
### `Rack::Ougai::Logger` ###
|
41
|
+
Simple, no-configuration Ougai logger that accepts a `Logger` severity level.
|
42
|
+
|
43
|
+
### `Rack::Ougai::ConstantLogger` ###
|
44
|
+
Specify a preconfigured logger to be used for all requests. For example, in one project I
|
45
|
+
build a global logger, separate from Rack, which is configured via a YAML file; I add it as the
|
46
|
+
top level logger in Rack, too.
|
47
|
+
|
48
|
+
```
|
49
|
+
require 'myproject/log'
|
50
|
+
|
51
|
+
use Rack::Ougai::ConstantLogger, MyProject::Log # an instance of Ougai::Logging
|
52
|
+
```
|
53
|
+
|
54
|
+
## Contributing ##
|
55
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rack-ougai. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
56
|
+
|
57
|
+
## License ##
|
58
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
59
|
+
|
60
|
+
## Code of Conduct ##
|
61
|
+
Everyone interacting in the Rack::Ougai project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/rack-ougai/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "rack/ougai"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'ougai'
|
2
|
+
|
3
|
+
module Rack
|
4
|
+
module Ougai
|
5
|
+
class AttachRequestID
|
6
|
+
REQUEST_ID_KEY = 'HTTP_X_REQUEST_ID'
|
7
|
+
|
8
|
+
def initialize(app, opts = {})
|
9
|
+
@app = app
|
10
|
+
|
11
|
+
@storage = opts[:storage] || proc { Thread.current }
|
12
|
+
end
|
13
|
+
|
14
|
+
def call(env)
|
15
|
+
parent = env[Rack::RACK_LOGGER]
|
16
|
+
|
17
|
+
request_id = env[REQUEST_ID_KEY]
|
18
|
+
|
19
|
+
if request_id.nil?
|
20
|
+
parent.warn "No request ID in storage (is Rack::RequestID in your middleware stack?)."
|
21
|
+
end
|
22
|
+
|
23
|
+
env[Rack::RACK_LOGGER] = parent.child(request_id: request_id)
|
24
|
+
ret = @app.call(env)
|
25
|
+
env[Rack::RACK_LOGGER] = parent
|
26
|
+
|
27
|
+
ret
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'ougai'
|
2
|
+
|
3
|
+
module Rack
|
4
|
+
module Ougai
|
5
|
+
class ConstantLogger
|
6
|
+
def initialize(app, logger)
|
7
|
+
raise "logger must be an Ougai::Logging (got: #{logger.class.name})." unless logger.is_a?(::Ougai::Logging)
|
8
|
+
|
9
|
+
@app = app
|
10
|
+
@logger = logger
|
11
|
+
end
|
12
|
+
|
13
|
+
def call(env)
|
14
|
+
env[RACK_LOGGER] = @logger
|
15
|
+
@app.call(env)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'time'
|
2
|
+
|
3
|
+
module Rack
|
4
|
+
module Ougai
|
5
|
+
class LogRequests
|
6
|
+
def initialize(app, logger = nil)
|
7
|
+
@app = app
|
8
|
+
@logger = logger
|
9
|
+
end
|
10
|
+
|
11
|
+
def call(env)
|
12
|
+
status, headers, body = @app.call(env)
|
13
|
+
ensure
|
14
|
+
logger = @logger || env[RACK_LOGGER]
|
15
|
+
logger.info('HTTP Request', create_log(env, status, headers))
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def create_log(env, status, header)
|
21
|
+
{
|
22
|
+
time: Time.now,
|
23
|
+
remote_addr: env['HTTP_X_FORWARDED_FOR'] || env["REMOTE_ADDR"],
|
24
|
+
method: env[REQUEST_METHOD],
|
25
|
+
path: env[PATH_INFO],
|
26
|
+
query: env[QUERY_STRING],
|
27
|
+
status: status.to_i,
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'ougai'
|
2
|
+
|
3
|
+
module Rack
|
4
|
+
module Ougai
|
5
|
+
class Logger
|
6
|
+
def initialize(app, level = ::Logger::INFO)
|
7
|
+
@app = app
|
8
|
+
@level = level
|
9
|
+
end
|
10
|
+
|
11
|
+
def call(env)
|
12
|
+
logger = ::Ougai::Logger.new(env[RACK_ERRORS])
|
13
|
+
logger.level = @level
|
14
|
+
|
15
|
+
env[RACK_LOGGER] = logger
|
16
|
+
@app.call(env)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/rack/ougai.rb
ADDED
data/rack-ougai.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "rack/ougai/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "rack-ougai"
|
7
|
+
spec.version = Rack::Ougai::VERSION
|
8
|
+
spec.authors = ["Toshimitsu Takahashi", "Ed Ropple"]
|
9
|
+
spec.email = ["toshi@tilfin.com", "ed@edropple.com"]
|
10
|
+
|
11
|
+
spec.summary = "Rack integration for the Ougai logger."
|
12
|
+
spec.homepage = "https://github.com/eropple/rack-ougai"
|
13
|
+
spec.license = "MIT"
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
16
|
+
f.match(%r{^(test|spec|features)/})
|
17
|
+
end
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
|
25
|
+
spec.add_runtime_dependency "rack", "~> 2.0"
|
26
|
+
spec.add_runtime_dependency "ougai", "~> 1.5"
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rack-ougai
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Toshimitsu Takahashi
|
8
|
+
- Ed Ropple
|
9
|
+
autorequire:
|
10
|
+
bindir: exe
|
11
|
+
cert_chain: []
|
12
|
+
date: 2017-12-13 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.16'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '1.16'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rake
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '10.0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '10.0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rack
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '2.0'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '2.0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: ougai
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '1.5'
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1.5'
|
70
|
+
description:
|
71
|
+
email:
|
72
|
+
- toshi@tilfin.com
|
73
|
+
- ed@edropple.com
|
74
|
+
executables: []
|
75
|
+
extensions: []
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
78
|
+
- ".gitignore"
|
79
|
+
- ".rubocop.yml"
|
80
|
+
- CODE_OF_CONDUCT.md
|
81
|
+
- Gemfile
|
82
|
+
- LICENSE.txt
|
83
|
+
- README.md
|
84
|
+
- Rakefile
|
85
|
+
- bin/console
|
86
|
+
- bin/setup
|
87
|
+
- lib/rack/ougai.rb
|
88
|
+
- lib/rack/ougai/attach_requestid.rb
|
89
|
+
- lib/rack/ougai/constant_logger.rb
|
90
|
+
- lib/rack/ougai/log_requests.rb
|
91
|
+
- lib/rack/ougai/logger.rb
|
92
|
+
- lib/rack/ougai/version.rb
|
93
|
+
- rack-ougai.gemspec
|
94
|
+
homepage: https://github.com/eropple/rack-ougai
|
95
|
+
licenses:
|
96
|
+
- MIT
|
97
|
+
metadata: {}
|
98
|
+
post_install_message:
|
99
|
+
rdoc_options: []
|
100
|
+
require_paths:
|
101
|
+
- lib
|
102
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
requirements: []
|
113
|
+
rubyforge_project:
|
114
|
+
rubygems_version: 2.6.13
|
115
|
+
signing_key:
|
116
|
+
specification_version: 4
|
117
|
+
summary: Rack integration for the Ougai logger.
|
118
|
+
test_files: []
|