bbmb 2.0.6 → 2.0.7

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: ac2d880f1abfb6fa43db599022667fd4ecfe266a
4
- data.tar.gz: 8cb12047e8165d7a8cb77db4f85dd7b5e495906d
3
+ metadata.gz: 67ee64829561f37c9cf3c4eb2346f7add7bb7092
4
+ data.tar.gz: 34b5e99df58800d3193b7d89328a0828ee9501ee
5
5
  SHA512:
6
- metadata.gz: 973c9c3e16c9554f0b276d0f4d3fbdf7ec0d151e95aee533cb8408876f4365ce18c4e849d5ef6c628cdfd2a56185177dc0345d5aa2c5155730feba9e328f1b1a
7
- data.tar.gz: 2fb275fde9ece13470b1c2f5558f804a55d30f8133167a4ce425b296adc1cddf454ba4d276edc17b41a10f44b03be0b35dea7279a0ca5540b3df9129aa489575
6
+ metadata.gz: 8ffe4cd1c37bca62263f89e50277040889f4ea6b5bce32da42b6308b97a5c60a5e36e295ce06afe6042aa3ee635fb8f372ef42f41124269a7879e6dc9dbb3e2d
7
+ data.tar.gz: 4699bbcbddc0678a2dd359a17bd772bda1f89a48b1d25969cb8f9e325fc008005f46e4374023d074c58ea55ebe7a2770b315a01a4e65bab897d84d80ba1aa12c
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 2.0.7 / 18.07.2016
2
+
3
+ * Fixed search filter
4
+
1
5
  === 2.0.6 / 13.07.2016
2
6
 
3
7
  * Fixed running test/suite.rb by suppressing test_invoicer, which runs fine if run standalone
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env ruby
2
1
  # Html::State::Customers -- bbmb.ch -- 18.09.2006 -- hwyss@ywesee.com
3
2
 
4
3
  require 'bbmb/html/state/global_predefine'
@@ -18,15 +17,24 @@ class Customers < Global
18
17
  start = Time.now
19
18
  @model = BBMB.persistence.all(Model::Customer)
20
19
  @sortby = [:organisation]
21
- BBMB.logger.debug('State') {
22
- sprintf("Customers#init: loaded %i customers in %1.5fs",
20
+ BBMB.logger.debug('State') {
21
+ sprintf("Customers#init: loaded %i customers in %1.5fs",
23
22
  @model.size, Time.now - start)
24
23
  }
25
24
  @filter = Proc.new { |model|
26
- if(filter = @session.event_bound_user_input(:filter))
27
- pattern = Regexp.new(filter.gsub("*", ".*"), 'i')
28
- model = model.select { |customer|
29
- FILTER.any? { |key| pattern.match(customer.send(key).to_s) }
25
+ input = @session.event_bound_user_input(:filter)
26
+ if input
27
+ pattern = Regexp.new(input.gsub('*', '.*'), 'ui')
28
+ model = model.select { |customer|
29
+ FILTER.any? { |key|
30
+ value = customer.send(key).to_s
31
+ next if value.empty?
32
+ begin
33
+ pattern.match(value)
34
+ rescue ArgumentError
35
+ false
36
+ end
37
+ }
30
38
  }
31
39
  end
32
40
  get_sortby!
data/lib/bbmb/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # Bbmb -- bbmb.ch -- 17.12.2019 -- zdavatz@ywesee.com
3
3
 
4
4
  module BBMB
5
- VERSION = '2.0.6'
5
+ VERSION = '2.0.7'
6
6
  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.0.6
4
+ version: 2.0.7
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-07-13 00:00:00.000000000 Z
11
+ date: 2016-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: odba