dynowatch 0.1.1 → 0.1.2
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 +2 -2
- data/lib/dynowatch/parser.rb +7 -1
- data/lib/dynowatch/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 782cef7b392b6b70306acfebc2977d062dfa849b
|
|
4
|
+
data.tar.gz: 2c0f1c52d09f6793c96d7eeec5614c806e29672a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b1856820cc613a8ba91f06b2b3053045a7216fa46135e3d2cd5cb908790d830a4155c13b7794867ad7749b524de94d692158f485b22625857032968c9429dafc
|
|
7
|
+
data.tar.gz: 257264f1a59699afb57198db1aaaee121aa40fdb04aa741539074afc381a2ff3a90b0d31cacfc7a1bdf3b222e12c9e422714d1eb0b74c97a46eef4ea993a28c0
|
data/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Or install it yourself as:
|
|
|
23
23
|
To perform analysis on a log file, execute
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
|
|
26
|
+
dynowatch <logfile>
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## Development
|
|
@@ -34,7 +34,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
34
34
|
|
|
35
35
|
## Contributing
|
|
36
36
|
|
|
37
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
37
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/gnerkus/dynowatch.
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
## License
|
data/lib/dynowatch/parser.rb
CHANGED
|
@@ -49,7 +49,13 @@ module Dynowatch
|
|
|
49
49
|
# Get API endpoint
|
|
50
50
|
endpoint = log.match(API_ENDPOINT).to_a.dig(1) || 'blank'
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
# Check if the log should be processed
|
|
53
|
+
# - Ensure a method exists
|
|
54
|
+
# - Ensure the resource in the route matches the ones to be analyzed. For
|
|
55
|
+
# example, the current resource to be analyzed is 'users' so the route
|
|
56
|
+
# must match /api/users
|
|
57
|
+
# - Ensure the endpoint is listed in the ENDPOINTS object
|
|
58
|
+
if method && (resource == valid_resource) && (ENDPOINTS[valid_resource.to_sym].keys().include? endpoint.to_sym)
|
|
53
59
|
ENDPOINTS[resource.to_sym][endpoint.to_sym][method.to_sym]
|
|
54
60
|
else
|
|
55
61
|
false
|
data/lib/dynowatch/version.rb
CHANGED