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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0bfaddce902d1f38bc5e8abc3708880acd17c21e91143283e7bd45b7ba37a27b
4
- data.tar.gz: f340e14f587deb77c76d98f6ccb2420d25d5ebb2ad9459518252fc5814791774
3
+ metadata.gz: fa83dfca11d05d1aacf1da7ccc9f1a05b2bfd42d8f513d1fa3f6b64c50708f20
4
+ data.tar.gz: 278fe6b6932e847bfe8721bb58461cbdd70c0649843fbbedbc98285b9b618dd3
5
5
  SHA512:
6
- metadata.gz: 5aa796e32d4083d2123c1be55f33c46abeff43e4b5c35688f6e2c48c70f73153b37483512c7129f4c407d767fa61713ae06fdd07222591b5db521d25769b6e98
7
- data.tar.gz: e3ce4b9f9f276b9df07e0e704ef4287f39d6025cdb554a78690ab7bec8c8b94ef42e74f988acdab0442e891ff2b6b18a725f836b49d073713d0a3790f7b76d0f
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
- # this creates a reverse map of all site actions and their corresponding group
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, v| v.map {|x| [x, k]}}.flatten)].freeze
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 = {})
@@ -1,3 +1,3 @@
1
1
  module MnUtilsGem
2
- VERSION = "1.2.0"
2
+ VERSION = "1.4.0"
3
3
  end
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.2.0
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-08 00:00:00.000000000 Z
11
+ date: 2019-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gelf