rack-action_logger 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.codeclimate.yml +9 -0
- data/.gitignore +3 -0
- data/.ruby-version +1 -0
- data/Gemfile.lock +5 -2
- data/README.md +3 -1
- data/circle.yml +5 -0
- data/lib/rack/action_logger/metrics/rack_metrics.rb +5 -1
- data/lib/rack/action_logger/version.rb +1 -1
- data/rack-action_logger.gemspec +1 -0
- metadata +20 -4
- data/.simplecov +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c699cc16212b714dbb03fbdc789f8a6f2820ccfc
|
|
4
|
+
data.tar.gz: 9502d93c2f958b57cd5507c6e51541b51edb3e26
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2d6f3b08d1a49fe068e42034a57acd239abdf3730b62a6a672ce2bc1d1af5e3cc68cf8b38179183ccc3cd07ec9e0ac496ecbf8bcce6b161a6b4909127387680c
|
|
7
|
+
data.tar.gz: 26e7cfddc5335a447500f510380d4c805492f7a6f198cc9aeaa36450adda7a186b75d46ed17f0be74af67228b8bdc38c00ad303fc684712d366ac481b794e7de
|
data/.codeclimate.yml
ADDED
data/.gitignore
CHANGED
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.4.1
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rack-action_logger (0.
|
|
4
|
+
rack-action_logger (0.3.0)
|
|
5
5
|
activesupport
|
|
6
6
|
fluent-logger (~> 0.5)
|
|
7
7
|
woothee (~> 1.4)
|
|
@@ -14,6 +14,8 @@ GEM
|
|
|
14
14
|
i18n (~> 0.7)
|
|
15
15
|
minitest (~> 5.1)
|
|
16
16
|
tzinfo (~> 1.1)
|
|
17
|
+
codeclimate-test-reporter (1.0.3)
|
|
18
|
+
simplecov
|
|
17
19
|
concurrent-ruby (1.0.2)
|
|
18
20
|
diff-lcs (1.2.5)
|
|
19
21
|
docile (1.1.5)
|
|
@@ -55,6 +57,7 @@ PLATFORMS
|
|
|
55
57
|
|
|
56
58
|
DEPENDENCIES
|
|
57
59
|
bundler (~> 1.13)
|
|
60
|
+
codeclimate-test-reporter
|
|
58
61
|
rack-action_logger!
|
|
59
62
|
rack-test (~> 0.6.3)
|
|
60
63
|
rake (~> 10.0)
|
|
@@ -62,4 +65,4 @@ DEPENDENCIES
|
|
|
62
65
|
simplecov
|
|
63
66
|
|
|
64
67
|
BUNDLED WITH
|
|
65
|
-
1.
|
|
68
|
+
1.15.1
|
data/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
[](https://circleci.com/gh/wapa5pow/rack-action_logger)
|
|
4
4
|
[](https://badge.fury.io/rb/rack-action_logger)
|
|
5
5
|
[](https://codeclimate.com/github/wapa5pow/rack-action_logger)
|
|
6
|
+
[](https://codeclimate.com/github/wapa5pow/rack-action_logger/coverage)
|
|
6
7
|
|
|
7
8
|
**Rack::ActionLogger** is a tool to collect user action logs via fluentd, Rails.logger or any custome logger.
|
|
8
9
|
|
|
@@ -34,6 +35,7 @@ It is intended to collect user request log, action log and any other custome log
|
|
|
34
35
|
"HTTP_COOKIE": "xxx"
|
|
35
36
|
},
|
|
36
37
|
"status_code": 200,
|
|
38
|
+
"ip": "127.0.0.1",
|
|
37
39
|
"remote_ip": "127.0.0.1",
|
|
38
40
|
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36",
|
|
39
41
|
"device": "pc",
|
|
@@ -152,7 +154,7 @@ Rack::ActionLogger::Container.add_append_log({ value: 'ok' }, 'activities')
|
|
|
152
154
|
Add the folloing line to ```config/initializers/rack-action_logger.rb``` at the end of line.
|
|
153
155
|
|
|
154
156
|
```
|
|
155
|
-
ActiveRecord::Base.send(:include, Rack::
|
|
157
|
+
ActiveRecord::Base.send(:include, Rack::ActionLogger::ActiveRecordExtension)
|
|
156
158
|
```
|
|
157
159
|
|
|
158
160
|
### Override log attributes
|
data/circle.yml
ADDED
|
@@ -5,7 +5,7 @@ require 'woothee'
|
|
|
5
5
|
module Rack::ActionLogger::Metrics
|
|
6
6
|
class RackMetrics
|
|
7
7
|
METRICS = [
|
|
8
|
-
:path, :method, :params, :request_headers, :status_code, :remote_ip, :user_agent, :device, :os, :browser,
|
|
8
|
+
:path, :method, :params, :request_headers, :status_code, :ip, :remote_ip, :user_agent, :device, :os, :browser,
|
|
9
9
|
:browser_version, :request_id, :response_headers, :response_json_body,
|
|
10
10
|
]
|
|
11
11
|
RACK_TAG_PREFIX = 'rack'
|
|
@@ -71,6 +71,10 @@ module Rack::ActionLogger::Metrics
|
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
def remote_ip
|
|
74
|
+
@env['action_dispatch.remote_ip']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def ip
|
|
74
78
|
@request.ip
|
|
75
79
|
end
|
|
76
80
|
|
data/rack-action_logger.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rack-action_logger
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Koichi Ishida
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2017-07-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -122,6 +122,20 @@ dependencies:
|
|
|
122
122
|
- - ">="
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
124
|
version: '0'
|
|
125
|
+
- !ruby/object:Gem::Dependency
|
|
126
|
+
name: codeclimate-test-reporter
|
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
|
128
|
+
requirements:
|
|
129
|
+
- - ">="
|
|
130
|
+
- !ruby/object:Gem::Version
|
|
131
|
+
version: '0'
|
|
132
|
+
type: :development
|
|
133
|
+
prerelease: false
|
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
- - ">="
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
version: '0'
|
|
125
139
|
description: Rack::ActionLogger is a tool to log user activity
|
|
126
140
|
email:
|
|
127
141
|
- wapa5pow@gmail.com
|
|
@@ -129,9 +143,10 @@ executables: []
|
|
|
129
143
|
extensions: []
|
|
130
144
|
extra_rdoc_files: []
|
|
131
145
|
files:
|
|
146
|
+
- ".codeclimate.yml"
|
|
132
147
|
- ".gitignore"
|
|
133
148
|
- ".rspec"
|
|
134
|
-
- ".
|
|
149
|
+
- ".ruby-version"
|
|
135
150
|
- ".travis.yml"
|
|
136
151
|
- CODE_OF_CONDUCT.md
|
|
137
152
|
- Gemfile
|
|
@@ -142,6 +157,7 @@ files:
|
|
|
142
157
|
- bin/console
|
|
143
158
|
- bin/rspec
|
|
144
159
|
- bin/setup
|
|
160
|
+
- circle.yml
|
|
145
161
|
- lib/rack/action_logger.rb
|
|
146
162
|
- lib/rack/action_logger/active_record_extension.rb
|
|
147
163
|
- lib/rack/action_logger/configuration.rb
|
|
@@ -179,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
179
195
|
version: 1.3.5
|
|
180
196
|
requirements: []
|
|
181
197
|
rubyforge_project:
|
|
182
|
-
rubygems_version: 2.6.
|
|
198
|
+
rubygems_version: 2.6.11
|
|
183
199
|
signing_key:
|
|
184
200
|
specification_version: 4
|
|
185
201
|
summary: Rack::ActionLogger is a tool to log user activity
|
data/.simplecov
DELETED