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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f698ba43ed7732c8c63ce018b7a2804804ffbfe2
4
- data.tar.gz: 699dacecdc8dab17a93038141e1bb66f9d4f0c75
3
+ metadata.gz: 782cef7b392b6b70306acfebc2977d062dfa849b
4
+ data.tar.gz: 2c0f1c52d09f6793c96d7eeec5614c806e29672a
5
5
  SHA512:
6
- metadata.gz: 8ab0de47f1a1b24bed5d35626c2960a081ad8172f21834a802e2085b1e9ca553c5e2deefa439581d853d05d447997004e1a56b97290eb633ff4ef424d2eca235
7
- data.tar.gz: de4c246dfee11e2470fe5ffd275605682fbe153a0dff7361bdf73f86fa83ebaf9be9d94a6e9f5d13ff6cac053389eb22d27ee75fe8b1b2860076380d04518856
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
- bundle exec bin/dynowatch <log file>
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/[USERNAME]/dynowatch.
37
+ Bug reports and pull requests are welcome on GitHub at https://github.com/gnerkus/dynowatch.
38
38
 
39
39
 
40
40
  ## License
@@ -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
- if method && resource == valid_resource && endpoint
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
@@ -1,3 +1,3 @@
1
1
  module Dynowatch
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynowatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - gnerkus