access_watch_rails 0.0.4 → 0.0.5
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/README.md +33 -0
- data/lib/access_watch/logger.rb +1 -1
- data/lib/access_watch/rails_version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6345706880f3dc99dd53c11f1f7c82278cb97477
|
4
|
+
data.tar.gz: de358289c2ae11a6784536d7af283967702f6afb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8aba510681433df1a81946f476d8a424e34cc538d8e0cc1a1b3914b323b3cd994fd9ae3ed941515d3bb3e0bf1811d8e55c8d9bf50292cba772aac21e6464764b
|
7
|
+
data.tar.gz: 4371dbafd2fd51f23994c7a581b8356a574455caadd1c0d7514e6e4780f790db4b02924c351c851c17c126bb93601cf4d4c7cabc41e70cac5d7e70715d857404
|
data/README.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# Access Watch Rails library
|
2
|
+
|
3
|
+
A Ruby library to log and analyse Rails HTTP requests using the [Access Watch](http://access.watch/) cloud service.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Install the latest version in your Gemfile
|
8
|
+
|
9
|
+
```gem "access_watch_rails"```
|
10
|
+
|
11
|
+
## Basic Usage
|
12
|
+
|
13
|
+
You will need an API key.
|
14
|
+
|
15
|
+
To get an API key, send us an email at api@access.watch and we will come back to you.
|
16
|
+
|
17
|
+
Then add the following `after_action` callback in your `ApplicationController`.
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
class ApplicationController < ActionController::Base
|
21
|
+
after_action { AccessWatch::Logger.new(api_key: API_KEY).record(request, response) }
|
22
|
+
end
|
23
|
+
```
|
24
|
+
|
25
|
+
API documentation is here: https://access.watch/api-documentation/#request-logging
|
26
|
+
|
27
|
+
### Author
|
28
|
+
|
29
|
+
Alexis Bernard - <alexis@bernard.io> - <http://basesecrete.com/>
|
30
|
+
|
31
|
+
### License
|
32
|
+
|
33
|
+
The Access Watch Ruby library is licensed under the MIT License - see the `LICENSE` file for details
|
data/lib/access_watch/logger.rb
CHANGED
@@ -18,7 +18,7 @@ module AccessWatch
|
|
18
18
|
scheme: URI(request.original_url).scheme,
|
19
19
|
host: request.host,
|
20
20
|
port: request.port,
|
21
|
-
url: request.
|
21
|
+
url: request.original_fullpath,
|
22
22
|
headers: extract_http_headers(request.headers)
|
23
23
|
},
|
24
24
|
response: {status: response.status},
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: access_watch_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexis Bernard
|
@@ -61,6 +61,7 @@ extensions: []
|
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
63
|
- ".gitignore"
|
64
|
+
- README.md
|
64
65
|
- access_watch_rails.gemspec
|
65
66
|
- lib/access_watch/logger.rb
|
66
67
|
- lib/access_watch/rails_version.rb
|