bbmb 2.2.4 → 2.2.5

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: b9960291f2555edc515e193b763d95d082fadb45
4
- data.tar.gz: f4d91f9aa827270b523daae89046879d03d52c4f
3
+ metadata.gz: 9c5793216ed5dcafa2aa43eb9a9a19e2b4b98f1a
4
+ data.tar.gz: 65c7898f71d0383f766b22538a87102d3552affe
5
5
  SHA512:
6
- metadata.gz: 48b42e38b311a50603742e0afd4b7149dbb66fcd98307baaa888619ca6312f40ac196ece8aaf57808070255df9b00098383677285c12dd2bb091cdba6d495709
7
- data.tar.gz: 7c60ac0e1f92d79270b16341da870032a1c88096209d75bc38693023b53f0edffb81fc9a82d98fe680afabea61fddd8544ed83a215a18354de28931dac1d7253
6
+ metadata.gz: f96dbf0eb7ff92a5e5976b904a4efed7c3e47ab57bd8721fdc7ec29726a53b0c79d65050adeb6176c392c161acfe73f78a3e69d3dd68c9c041a4b2334e06a6d9
7
+ data.tar.gz: 504b09e106f02f33ec5b2bd449191b14891a01d9a232ce38e49cb6c8f6c1130905966b19617ca516c09621447fe63620ba9abd19e60e83969db8015f659b6961
@@ -1,3 +1,9 @@
1
+ === 2.2.5 / 23.05.2017
2
+
3
+ * Don't require persistence/odba if config.persitence == none
4
+ * Avoid eternal loop when displaying generated password
5
+ * Made unit tests work again on Travis-CI
6
+
1
7
  === 2.2.4 / 22.05.2017
2
8
 
3
9
  * Fix send_order
@@ -17,7 +17,7 @@ class ShowPassInnerComposite < HtmlGrid::Composite
17
17
  end
18
18
  class Address < HtmlGrid::Composite
19
19
  COMPONENTS = {
20
- [0,0] => :to_str
20
+ [0,0] => :to_str
21
21
  }
22
22
  end
23
23
  class ShowPassComposite < HtmlGrid::DivComposite
@@ -33,9 +33,6 @@ class ShowPassComposite < HtmlGrid::DivComposite
33
33
  }
34
34
  CSS_MAP = ['address', 'address']
35
35
  def admin_address(model)
36
- #div = HtmlGrid::Div.new(model, @session, self)
37
- #div.css_id = 'admin-address'
38
- #div.value =
39
36
  BBMB.config.admin_address.gsub("\n", "<br>")
40
37
  end
41
38
  def customer_address(model)
@@ -48,11 +45,10 @@ class ShowPass < Template
48
45
  [0,1] => ShowPassComposite,
49
46
  }
50
47
  SYMBOL_MAP = {
51
- :logo => HtmlGrid::Image,
48
+ :logo => HtmlGrid::Image,
52
49
  }
53
50
  def init
54
51
  super
55
- self.onload = 'window.opener.location.reload();'
56
52
  end
57
53
  end
58
54
  end
@@ -259,7 +259,7 @@ class Order
259
259
  pos.total
260
260
  false
261
261
  rescue => error
262
- SBSM.info "Deleting an invalid position from order #{order_id}"
262
+ SBSM.info "Deleting an invalid position from order #{order_id}" if defined?(SBSM)
263
263
  true
264
264
  end
265
265
  end
@@ -13,7 +13,7 @@ require 'bbmb/model/order' # needed to be enable to invoice later
13
13
  require 'bbmb/model/customer'
14
14
  require 'date'
15
15
  require 'sbsm/app'
16
- require 'bbmb/persistence/odba'
16
+ require 'bbmb/persistence/odba' unless BBMB.config.persistence.eql?('none')
17
17
  require 'bbmb/model/customer'
18
18
  require 'bbmb/model/quota'
19
19
  require 'bbmb/model/product'
@@ -12,7 +12,7 @@ require 'bbmb/model/order' # needed to be enable to invoice later
12
12
  require 'bbmb/model/customer'
13
13
  require 'date'
14
14
  require 'sbsm/app'
15
- require 'bbmb/persistence/odba'
15
+ require 'bbmb/persistence/odba' unless BBMB.config.persistence.eql?('none')
16
16
  require 'bbmb/model/customer'
17
17
  require 'bbmb/model/quota'
18
18
  require 'bbmb/model/product'
@@ -13,7 +13,7 @@ require 'bbmb/model/order' # needed to be enable to invoice later
13
13
  require 'bbmb/model/customer'
14
14
  require 'date'
15
15
  require 'sbsm/app'
16
- require 'bbmb/persistence/odba'
16
+ require 'bbmb/persistence/odba' unless BBMB.config.persistence.eql?('none')
17
17
  require 'bbmb/model/customer'
18
18
  require 'bbmb/model/quota'
19
19
  require 'bbmb/model/product'
@@ -1,3 +1,3 @@
1
1
  module BBMB
2
- VERSION = '2.2.4'
2
+ VERSION = '2.2.5'
3
3
  end
@@ -25,17 +25,14 @@ class TestCustomer < Minitest::Test
25
25
  def test_email_writer
26
26
  BBMB.server = flexmock('server')
27
27
  @customer.instance_variable_set('@email', 'old@bbmb.ch')
28
- BBMB.server.should_receive(:rename_user).and_return { |old, new|
29
- assert_equal('old@bbmb.ch', old)
30
- assert_equal('test@bbmb.ch', new)
31
- }
28
+ BBMB.server.should_receive(:rename_user).once
32
29
  @customer.email = 'test@bbmb.ch'
33
30
  assert_equal('test@bbmb.ch', @customer.email)
34
31
  end
35
32
  def test_email_writer__nil
36
33
  BBMB.server = flexmock('server')
37
34
  @customer.instance_variable_set('@email', 'old@bbmb.ch')
38
- assert_raises(RuntimeError) {
35
+ assert_raises(RuntimeError) {
39
36
  @customer.email = nil
40
37
  }
41
38
  assert_equal('old@bbmb.ch', @customer.email)
@@ -15,6 +15,7 @@ class TestOrder < Minitest::Test
15
15
  BBMB.config = $default_config.clone
16
16
  @customer = flexmock("customer")
17
17
  @customer.should_receive(:quota)
18
+ @customer.should_receive(:customer_id).and_return(7)
18
19
  @order = Order.new(@customer)
19
20
  @position = flexmock('position')
20
21
  @position.should_receive(:pcode).and_return(nil).by_default
@@ -65,7 +66,7 @@ class TestOrder < Minitest::Test
65
66
  @order.comment = 'Comment'
66
67
  assert_equal({:comment => 'Comment'}, @order.additional_info)
67
68
  @order.reference = '12345'
68
- assert_equal({:comment => 'Comment', :reference => '12345'},
69
+ assert_equal({:comment => 'Comment', :reference => '12345'},
69
70
  @order.additional_info)
70
71
  @order.comment = nil
71
72
  assert_equal({:reference => '12345'}, @order.additional_info)
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.2.4
4
+ version: 2.2.5
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: 2017-05-22 00:00:00.000000000 Z
11
+ date: 2017-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: odba