effective_logging 3.0.6 → 3.0.7
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc9fced444e21c7fe1cdfc6eefbb7a4a1c5aefde46e660c80ea8e556e4811a53
|
4
|
+
data.tar.gz: '02657769444b4e41d0fd0fa0ecd1d083aa5e60b7ba49df2f64be18d70e434404'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01efee520769124bc69f458c9db6301a3c9413ea43da4fae9b74cebf5b387a951828a058256c26db99926eb8a89851cfda74f85d879c90809586e3284c1503de
|
7
|
+
data.tar.gz: ed09985141339c9fe27f9f377bf84ed8e4c0e902609f0eddb493d235f9fc0ee78812cb7afd97592a4ff3c83fe3a0c0e281b9feb706f136360d253f2dd57c7093
|
@@ -5,16 +5,17 @@ module EffectiveLogging
|
|
5
5
|
BLANK = "''"
|
6
6
|
BLACKLIST = [:updated_at, :created_at, :encrypted_password, :status_steps] # Don't log changes or attributes
|
7
7
|
|
8
|
-
|
8
|
+
# to, prefix, only, except
|
9
|
+
def initialize(object, args = {})
|
9
10
|
@object = object
|
10
11
|
@resource = Effective::Resource.new(object)
|
11
12
|
|
12
13
|
# Validate changes_to value
|
13
|
-
if to.present? && !@resource.belong_tos.map(&:name).include?(to)
|
14
|
-
raise ArgumentError.new("unable to find existing belongs_to relationship matching #{to}. Expected a symbol matching a belongs_to.")
|
14
|
+
if args[:to].present? && !@resource.belong_tos.map(&:name).include?(args[:to])
|
15
|
+
raise ArgumentError.new("unable to find existing belongs_to relationship matching #{args[:to]}. Expected a symbol matching a belongs_to.")
|
15
16
|
end
|
16
17
|
|
17
|
-
@options = { to: to, prefix: prefix, only: only, except: Array(except) + BLACKLIST }.compact
|
18
|
+
@options = { to: args[:to], prefix: args[:prefix], only: args[:only], except: Array(args[:except]) + BLACKLIST }.compact
|
18
19
|
end
|
19
20
|
|
20
21
|
# Effective::Log.where(message: 'Deleted').where('details ILIKE ?', '%lab_test_id: 263%')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
|
-
rubygems_version: 3.
|
141
|
+
rubygems_version: 3.1.2
|
142
142
|
signing_key:
|
143
143
|
specification_version: 4
|
144
144
|
summary: Automatically log all sent emails, user logins, and page views. This also
|