wordjelly-auth 1.3.8 → 1.3.9
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 +4 -4
- data/app/models/auth/concerns/shopping/bar_code_concern.rb +17 -5
- data/lib/auth/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: 0f4556edfc53178f58ffc5e97b4840d92ffcdf2bd7c2b5f5a034055ddf62fe70
|
|
4
|
+
data.tar.gz: d96c660b8f0ded7cce2eacb969b0fea1a8810b2af3833aa7266ce719cf41b32b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1940a2b7323358910169b7f5aeadbfa79d03b2058a938745fd491e943f30ab46b3b41ce62e023fe27a3cb3c0ecddc8bf680f945553b48a4fb6a13531583d3653
|
|
7
|
+
data.tar.gz: 7bbc3b5fbf605dfa2a78c2eb81cf83510d96126033f8c17c4edfe472d18e41b38ad561564a5f755643ef1b81e73c25c27f440c0751143d5229f1c3adaac33f1e
|
|
@@ -8,14 +8,12 @@ module Auth::Concerns::Shopping::BarCodeConcern
|
|
|
8
8
|
|
|
9
9
|
after_find do |document|
|
|
10
10
|
## look for a barcode
|
|
11
|
-
=begin
|
|
12
11
|
unless document.bar_code_tag
|
|
13
12
|
bar_codes = Auth::Shopping::BarCode.where(:assigned_to_object_id => document.id.to_s, :assigned_to_object_class => document.class.name)
|
|
14
13
|
if bar_codes.size == 1
|
|
15
14
|
document.bar_code_tag = bar_codes.first.bar_code_tag
|
|
16
15
|
end
|
|
17
16
|
end
|
|
18
|
-
=end
|
|
19
17
|
end
|
|
20
18
|
|
|
21
19
|
## so if i want to assign a barcode , i.e the same barcode to the unit.
|
|
@@ -48,6 +46,8 @@ module Auth::Concerns::Shopping::BarCodeConcern
|
|
|
48
46
|
document.errors.add(:bar_code_tag,"could not clear the barcode tag. Please try again later")
|
|
49
47
|
else
|
|
50
48
|
puts "clear barcode succeeds."
|
|
49
|
+
## remove the barcode from the object, that was loaded at find.
|
|
50
|
+
document.bar_code_tag = nil
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
53
|
end
|
|
@@ -58,16 +58,28 @@ module Auth::Concerns::Shopping::BarCodeConcern
|
|
|
58
58
|
after_save do |document|
|
|
59
59
|
|
|
60
60
|
puts "Came to after_Save product."
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
|
|
62
|
+
unless document.bar_code_tag.blank?
|
|
63
|
+
|
|
64
|
+
#puts "bar code tag is not nil"
|
|
65
|
+
#puts "barcode tag is:"
|
|
66
|
+
|
|
67
|
+
#puts "-----------|||||||||||||||||||||||||"
|
|
68
|
+
#puts document.bar_code_tag.to_s
|
|
69
|
+
#puts "-----------|||||||||||||||||||||||||"
|
|
70
|
+
|
|
63
71
|
if bar_code_object = Auth::Shopping::BarCode.upsert_and_assign_object(self)
|
|
64
|
-
puts "upsert and assign works."
|
|
72
|
+
#puts "upsert and assign works."
|
|
73
|
+
#puts "self barcode is:"
|
|
74
|
+
#puts self.bar_code_tag.to_s
|
|
65
75
|
else
|
|
66
76
|
document.errors.add(:bar_code_tag,"the bar code tag could not be persisted")
|
|
67
77
|
end
|
|
68
78
|
|
|
69
79
|
end
|
|
80
|
+
|
|
70
81
|
end
|
|
82
|
+
|
|
71
83
|
end
|
|
72
84
|
|
|
73
85
|
end
|
data/lib/auth/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wordjelly-auth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- bhargav
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-12-
|
|
11
|
+
date: 2018-12-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: xpath
|