bbmb 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +4 -0
- data/lib/bbmb/model/customer.rb +3 -4
- data/lib/bbmb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce9a5032fdcc3373fb7c9e71aad87962a8bcf544
|
4
|
+
data.tar.gz: e1e8a51f597e798860dbdcc7e72ef05f44a74e17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcb5347927b02ea0c2c8a2cbc8a244cc0517f0c3630478feaa5469fdb11e35ae764684725543666d2fb4f4d78c8a6541337918e0dda88bc2bfc3aad91a4c58e7
|
7
|
+
data.tar.gz: 902fb4f55adafccc2d580428cbd7e4236c13d92a1287848b6250e783a71100f058a83a41723ce1286d096c5d6720c7e0d3d7fe4330bc63df7bd28d43ead9d7f3
|
data/History.txt
CHANGED
data/lib/bbmb/model/customer.rb
CHANGED
@@ -6,9 +6,8 @@ require 'bbmb/model/order'
|
|
6
6
|
|
7
7
|
module BBMB
|
8
8
|
module Model
|
9
|
+
MUTEX ||= Mutex.new
|
9
10
|
class Customer
|
10
|
-
MUTEX = Mutex.new
|
11
|
-
|
12
11
|
attr_reader :customer_id, :email, :archive, :quotas
|
13
12
|
attr_accessor :address1, :address2, :address3, :canton, :city,
|
14
13
|
:drtitle, :ean13, :fax, :firstname, :language, :lastname,
|
@@ -37,7 +36,7 @@ class Customer
|
|
37
36
|
].compact
|
38
37
|
end
|
39
38
|
def commit_order!(commit_time = Time.now)
|
40
|
-
MUTEX.synchronize {
|
39
|
+
BBMB::Model::MUTEX.synchronize {
|
41
40
|
id = @archive.keys.max.to_i.next
|
42
41
|
order = current_order
|
43
42
|
order.commit!(id, commit_time)
|
@@ -74,7 +73,7 @@ class Customer
|
|
74
73
|
@favorites ||= Order.new(self)
|
75
74
|
end
|
76
75
|
def inject_order(order, commit_time = Time.now)
|
77
|
-
MUTEX.synchronize {
|
76
|
+
BBMB::Model::MUTEX.synchronize {
|
78
77
|
id = @archive.keys.max.to_i.next
|
79
78
|
order.commit!(id, commit_time)
|
80
79
|
@archive.store(id, order)
|
data/lib/bbmb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bbmb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masaomi Hatakeyama, Zeno R.R. Davatz, Niklaus Giger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: odba
|