mn_utils_gem 1.4.0 → 1.5.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/lib/mn_utils_gem/site_action.rb +5 -5
- data/lib/mn_utils_gem/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a7d9f83e1f996549ad042fd8b0812f3fe27390d62731e2aaa5839a8aee40e6a
|
4
|
+
data.tar.gz: 1fa68d7cf66b338697367f5d5a17d632fa5101f646fd6b51ac94c7aac436de16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57490881bdb096df54ec6eac89e8ffca8f14fcdcfa141c44088061158084ff12fe312edbdef81023dff2f3517d7dd96ace9dae83f3c5602016136fb22255893e
|
7
|
+
data.tar.gz: dcb9ca7dcef88c8160679b294a92b138301231f4e92a4068ee48d4828370182fceefc60e75d8ef55d41d31688e5974842bee3873bce8b92a7488c6a145078e3b
|
@@ -6,9 +6,9 @@ require 'singleton'
|
|
6
6
|
# SiteAction class to log important site actions to Graylog
|
7
7
|
# and send a matching metric to Cloudwatch
|
8
8
|
#
|
9
|
-
# usage:
|
9
|
+
# usage: MnUtilsLogging::SiteAction.instance.log(message, site_action, optional_payload)
|
10
10
|
#
|
11
|
-
# eg:
|
11
|
+
# eg: MnUtilsLogging::SiteAction.instance.log(
|
12
12
|
# "Login attempted with non-existent email",
|
13
13
|
# :login_attempt_nonexistent_email,
|
14
14
|
# {_email: "fish@banana.com", _request_ip: "123.123.123.123"}
|
@@ -19,7 +19,7 @@ require 'singleton'
|
|
19
19
|
# The optional payload should be a simple flat hash with all keys starting
|
20
20
|
# with an underscore _ and all values being strings
|
21
21
|
|
22
|
-
module
|
22
|
+
module MnUtilsLogging
|
23
23
|
class SiteAction
|
24
24
|
|
25
25
|
include Singleton
|
@@ -91,7 +91,7 @@ module MnUtils
|
|
91
91
|
|
92
92
|
# check for duplicates, and throw a tantrum if any are found
|
93
93
|
tmp_map = {}
|
94
|
-
|
94
|
+
@_site_actions_and_groups.each do |k, arr|
|
95
95
|
arr.each do |v|
|
96
96
|
raise ArgumentError, "Site action #{v} is declared more than once" \
|
97
97
|
if tmp_map.key? v
|
@@ -206,4 +206,4 @@ module MnUtils
|
|
206
206
|
|
207
207
|
end # of class SiteAction
|
208
208
|
|
209
|
-
end # of module
|
209
|
+
end # of module MnUtilsLogging
|
data/lib/mn_utils_gem/version.rb
CHANGED