activerecord-shipworks 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/shipworks/audit.rb +27 -0
- data/app/models/shipworks/user.rb +1 -0
- data/lib/shipworks/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a67b311a344411c09eb8f3831da4270744b507af043cebb60d29563d0197531e
|
4
|
+
data.tar.gz: 06cad043769e48d18eebc5e25756f39ed1b828952f05852588aa89a71a269f3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 847d7e83b4504068075d1a988a371fef2f78e6325ecff0411e81f5dd6187c98181dd77bde09dbd1698c0f57cc90ec16acfc8a979d8f0a230f1506c069eae9871
|
7
|
+
data.tar.gz: 6967bbb8ed45d7f8a1c427a7f47785102aceda6dd19f3bdac6babb3e0b08bbd8282e84c4846ee5260fe1ca9280322542cbcacb7cee5583cec3c8e44a032b6df9
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Shipworks
|
2
|
+
class Audit < ShipworksRecord
|
3
|
+
belongs_to :user, foreign_key: 'UserID'
|
4
|
+
|
5
|
+
ACTION_MAPPING = {
|
6
|
+
1 => 'Log On',
|
7
|
+
2 => 'Log Off',
|
8
|
+
3 => 'Upgrade Database',
|
9
|
+
4 => 'Backup Database',
|
10
|
+
5 => 'Add',
|
11
|
+
6 => 'Edit',
|
12
|
+
7 => 'Delete',
|
13
|
+
8 => 'Reset ShipSense',
|
14
|
+
9 => 'Reload ShipSense started',
|
15
|
+
10 => 'Combine Order',
|
16
|
+
11 => 'Split Order',
|
17
|
+
}
|
18
|
+
|
19
|
+
ACTION_MAPPING.each do |k, v|
|
20
|
+
scope "action_#{v}".parameterize.underscore.to_sym, -> { where(Action: k) }
|
21
|
+
end
|
22
|
+
|
23
|
+
def ActionName
|
24
|
+
ACTION_MAPPING[self.Action] || self.Action
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/shipworks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-shipworks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dennis Wu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord-sqlserver-adapter
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- Rakefile
|
37
37
|
- app/models/shipworks/amazon_order.rb
|
38
38
|
- app/models/shipworks/amazon_order_item.rb
|
39
|
+
- app/models/shipworks/audit.rb
|
39
40
|
- app/models/shipworks/note.rb
|
40
41
|
- app/models/shipworks/order.rb
|
41
42
|
- app/models/shipworks/order_charge.rb
|