dcidev_approval 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dcidev_approval.rb +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20f66e60b4649eaa1fd5dac521750139be8ea81509dea70b84853545ed3cee77
|
4
|
+
data.tar.gz: 60490cb5777e4774311d10402e1a0ef5e746cbe43e9146d6109e558fdd185a1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e6b9be5f4875dbbfaf11ee80d8b36da30fb1981b1ef764c5de2e7ba93826e5b12844dc08510937f8b329329c49f3324a44acb49612a6131b9a2fffdf4ba189c
|
7
|
+
data.tar.gz: 95e8dcca531fc23e1c00a6ad611d1bd5c3bcba02c7cb3749f1263af8c108b86364987f2fe6b2e005a4c7f0b17f5d7c3e334fe2f3e5bce61b29f98267aea9b4ad
|
data/lib/dcidev_approval.rb
CHANGED
@@ -52,7 +52,7 @@ module DcidevApproval
|
|
52
52
|
def created_by
|
53
53
|
log = self.activity_logs.try(:first)
|
54
54
|
{
|
55
|
-
created_by: log.present? && log.try(:agent).try(:name).present? ? log.try(:agent).try(:name).to_s + " (#{log.try(:agent).try(:username).to_s}
|
55
|
+
created_by: log.present? && log.try(:agent).try(:name).present? ? log.try(:agent).try(:name).to_s + " (#{log.try(:agent).try(:username).to_s} | #{log.try(:agent).try(:roles).try(:first).try(:name)})" : "System",
|
56
56
|
created_at: self.try(:created_at) || log.try(:created_at)
|
57
57
|
}
|
58
58
|
end
|
@@ -61,7 +61,7 @@ module DcidevApproval
|
|
61
61
|
last_approve = self.activity_logs.where("activity LIKE '%approv%'").limit(1).order(created_at: :desc).try(:first)
|
62
62
|
last_entry = self.activity_logs.last
|
63
63
|
{
|
64
|
-
approved_by: last_approve.try(:id) == last_entry.try(:id) ? last_approve.try(:agent).try(:name) : nil,
|
64
|
+
approved_by: last_approve.try(:id) == last_entry.try(:id) ? last_approve.try(:agent).try(:name).to_s + " (#{log.try(:agent).try(:username).to_s} | #{log.try(:agent).try(:roles).try(:first).try(:name)})" : nil,
|
65
65
|
approved_at: last_approve.try(:id) == last_entry.try(:id) ? last_approve.try(:created_at) : nil
|
66
66
|
}
|
67
67
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dcidev_approval
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Punto Damar P
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dcidev_active_record
|
@@ -33,10 +33,10 @@ extra_rdoc_files: []
|
|
33
33
|
files:
|
34
34
|
- README.md
|
35
35
|
- lib/dcidev_approval.rb
|
36
|
-
homepage:
|
36
|
+
homepage:
|
37
37
|
licenses: []
|
38
38
|
metadata: {}
|
39
|
-
post_install_message:
|
39
|
+
post_install_message:
|
40
40
|
rdoc_options: []
|
41
41
|
require_paths:
|
42
42
|
- lib
|
@@ -51,8 +51,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0'
|
53
53
|
requirements: []
|
54
|
-
rubygems_version: 3.
|
55
|
-
signing_key:
|
54
|
+
rubygems_version: 3.0.3.1
|
55
|
+
signing_key:
|
56
56
|
specification_version: 4
|
57
57
|
summary: Logic for implementing record changes approval
|
58
58
|
test_files: []
|