mn_utils_gem 1.2.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mn_utils_gem/site_action.rb +51 -3
- data/lib/mn_utils_gem/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa83dfca11d05d1aacf1da7ccc9f1a05b2bfd42d8f513d1fa3f6b64c50708f20
|
4
|
+
data.tar.gz: 278fe6b6932e847bfe8721bb58461cbdd70c0649843fbbedbc98285b9b618dd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94d93f3af371c757fcf717d197b496770c04c7f3445eb52cbf04c9eb45c338244212b00d92aca6624ec8514c7a219ee05b384fce67bc8203aabd9f84f82d7d8a
|
7
|
+
data.tar.gz: 248ea15faa47cc9a7445c1c63f0fa60b56bbc9b3a7c564c4202c9093e6eedf2d7da978fdf8a401211d37cc17078e0e70a737dcb727240d10a293e63cae03d968
|
@@ -39,6 +39,16 @@ module MnUtils
|
|
39
39
|
:reg_attempt_invalid_email,
|
40
40
|
:reg_attempt_invalid_password,
|
41
41
|
:reg_attempt_invalid_username,
|
42
|
+
:reg_conf_link_email_success,
|
43
|
+
:reg_conf_link_email_fail,
|
44
|
+
:reg_welcome_email_success,
|
45
|
+
:reg_welcome_email_fail,
|
46
|
+
:reg_conf_remind_email_success,
|
47
|
+
:reg_conf_remind_email_fail,
|
48
|
+
:bn_reg_email_success,
|
49
|
+
:bn_reg_email_fail,
|
50
|
+
:insight_welcome_email_success,
|
51
|
+
:insight_welcome_email_fail
|
42
52
|
],
|
43
53
|
auth: [
|
44
54
|
:login_success_via_email,
|
@@ -47,13 +57,51 @@ module MnUtils
|
|
47
57
|
:login_attempt_invalid_email,
|
48
58
|
:login_attempt_nonexistent_email,
|
49
59
|
:login_attempt_invalid_password,
|
50
|
-
:login_attempt_incorrect_password
|
60
|
+
:login_attempt_incorrect_password
|
51
61
|
],
|
62
|
+
account: [
|
63
|
+
:email_change_conf_link_email_success,
|
64
|
+
:email_change_conf_link_email_fail,
|
65
|
+
:pwd_reset_link_email_success,
|
66
|
+
:pwd_reset_link_email_fail,
|
67
|
+
:dereg_rqst_email_success,
|
68
|
+
:dereg_rqst_email_fail
|
69
|
+
],
|
70
|
+
pm: [
|
71
|
+
:pm_notif_email_success,
|
72
|
+
:pm_notif_email_fail
|
73
|
+
],
|
74
|
+
talk: [
|
75
|
+
:watch_thread_notif_email_success,
|
76
|
+
:watch_thread_notif_email_fail,
|
77
|
+
:media_rqst_welcome_email_success,
|
78
|
+
:media_rqst_welcome_email_fail,
|
79
|
+
:mention_notif_email_success,
|
80
|
+
:mention_notif_email_fail
|
81
|
+
],
|
82
|
+
admin: [
|
83
|
+
:admin_email_success,
|
84
|
+
:admin_email_fail,
|
85
|
+
],
|
86
|
+
misc: [
|
87
|
+
:unknown_email_success,
|
88
|
+
:unknown_email_fail
|
89
|
+
]
|
52
90
|
}.freeze
|
53
91
|
|
54
|
-
#
|
92
|
+
# check for duplicates, and throw a tantrum if any are found
|
93
|
+
tmp_map = {}
|
94
|
+
stuff.each do |k, arr|
|
95
|
+
arr.each do |v|
|
96
|
+
raise ArgumentError, "Site action #{v} is declared more than once" \
|
97
|
+
if tmp_map.key? v
|
98
|
+
tmp_map[v] = true
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
# create a reverse map of all site actions and their corresponding group
|
55
103
|
# for quick lookups by the code
|
56
|
-
@_site_action_group_map = Hash[*(@_site_actions_and_groups.map {|k,
|
104
|
+
@_site_action_group_map = Hash[*(@_site_actions_and_groups.map {|k, arr| arr.map {|v| [v, k]}}.flatten)].freeze
|
57
105
|
end
|
58
106
|
|
59
107
|
def log(message, site_action, payload = {})
|
data/lib/mn_utils_gem/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mn_utils_gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shamim Mirzai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gelf
|