rack-ltsv_logger 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +6 -0
- data/lib/rack/ltsv_logger.rb +1 -1
- data/rack-ltsv_logger.gemspec +1 -1
- data/spec/ltsv_logger_spec.rb +16 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3a58e6c432c0ef84714600fe7b8f43f118f3f9723a8ce19a617f6c7d20e1cd78
|
4
|
+
data.tar.gz: ca82e43f236e1a5f74aa5d5fb6fc6bbda38fc88e120d66184642cc2c59e8d10d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92e88510131a16f9a8226ad4ecf0be53d86c6484e1df4bc37abae421484998dbed82181852304fd6e759fb17a160fc114770bac59e5e76f9950ff780fb1df4f7
|
7
|
+
data.tar.gz: b01a48fe0fe04ec5d0237498e78392186201b1663bcce41d5daf96291664f24ebc98688f461a8cb80d6caf81ef7555a7e6ccfa02a7fd3e7f76700826fac7cfaa
|
data/CHANGELOG.md
CHANGED
data/lib/rack/ltsv_logger.rb
CHANGED
data/rack-ltsv_logger.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "rack-ltsv_logger"
|
7
|
-
spec.version = "0.1.
|
7
|
+
spec.version = "0.1.1"
|
8
8
|
spec.authors = ["Naotoshi Seo"]
|
9
9
|
spec.email = ["sonots@gmail.com"]
|
10
10
|
spec.description = %q{A rack middleware to output access log in ltsv format}
|
data/spec/ltsv_logger_spec.rb
CHANGED
@@ -122,4 +122,20 @@ describe Rack::LtsvLogger do
|
|
122
122
|
expect(params['status']).to eq('500')
|
123
123
|
end
|
124
124
|
end
|
125
|
+
|
126
|
+
context 'when app returns invalid http status code' do
|
127
|
+
subject do
|
128
|
+
@output = StringIO.new
|
129
|
+
invalid_status_code_app = lambda do |env|
|
130
|
+
[2000, {'Content-Type' => 'text/plain'}, ["Hello, World!"]]
|
131
|
+
end
|
132
|
+
Rack::Lint.new( Rack::LtsvLogger.new(invalid_status_code_app, @output) )
|
133
|
+
end
|
134
|
+
|
135
|
+
it 'GET /get' do
|
136
|
+
Rack::MockRequest.new(subject).get('/get', env)
|
137
|
+
params = parse_ltsv(@output.string)
|
138
|
+
expect(params['status']).to eq '200'
|
139
|
+
end
|
140
|
+
end
|
125
141
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-ltsv_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -150,8 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
- !ruby/object:Gem::Version
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
|
-
|
154
|
-
rubygems_version: 2.6.13
|
153
|
+
rubygems_version: 3.0.1
|
155
154
|
signing_key:
|
156
155
|
specification_version: 4
|
157
156
|
summary: A rack middleware to output access log in ltsv format.
|