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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca1e3853d456eb17bb861dfa2735d6f9cef58f7f
4
- data.tar.gz: 2fec7f8260d9804273caf1ccd16f93e629be669f
3
+ metadata.gz: ce9a5032fdcc3373fb7c9e71aad87962a8bcf544
4
+ data.tar.gz: e1e8a51f597e798860dbdcc7e72ef05f44a74e17
5
5
  SHA512:
6
- metadata.gz: a5e38799dbb236992aaa921f114ed82df2a54e40cf9f5611267407d2ab8515365494cf3015e7eb9f8e7a8ace72cc9b1e53ff82d6e1d5214a112abc7c7862f1d9
7
- data.tar.gz: fc0bdd0bad5a25a652c4a740246a0cd73e6501ee97448a1acc58e5b327176a6ab2e59609dc4768a88cde4c5ca3c86bd9e4e8c1341629dc085782775fdfb9d7c7
6
+ metadata.gz: bcb5347927b02ea0c2c8a2cbc8a244cc0517f0c3630478feaa5469fdb11e35ae764684725543666d2fb4f4d78c8a6541337918e0dda88bc2bfc3aad91a4c58e7
7
+ data.tar.gz: 902fb4f55adafccc2d580428cbd7e4236c13d92a1287848b6250e783a71100f058a83a41723ce1286d096c5d6720c7e0d3d7fe4330bc63df7bd28d43ead9d7f3
@@ -1,3 +1,7 @@
1
+ === 2.1.3 / 08.09.2016
2
+
3
+ * Improve mutex usage on model
4
+
1
5
  === 2.1.2 / 07.09.2016
2
6
 
3
7
  * Prevent mail error by no price product
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module BBMB
2
- VERSION = '2.1.2'
2
+ VERSION = '2.1.3'
3
3
  end
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.2
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-07 00:00:00.000000000 Z
11
+ date: 2016-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: odba