bbmb 2.2.1 → 2.2.2

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: 74b33b06bdc40e8e375f2cb467bad60696906bd5
4
- data.tar.gz: 24fe53d831147f6efdc76eb012bd105c8ef3b780
3
+ metadata.gz: 41dc6c1f01a081082be4b1fd376e41b1faa8be13
4
+ data.tar.gz: f5398f218f446f20d18795888f830b0569db1460
5
5
  SHA512:
6
- metadata.gz: 936dbe0717e852eb213a1b7f2d8c71f03c832b73958be9ded5205461478efc391675018aafbe538b00e243262ee38d804cb8bec1d821b21acf50ced53783b755
7
- data.tar.gz: 44ca2e4e4488f7fa689198e8a9e5246e93afe7105d6abc648f75fe7089a0e1a99abc4279a91525a6a6ce1e54bce0dd37d27dd9cfc68bfe5628a3093b3db7dc45
6
+ metadata.gz: c86e7a2e7dc6918767f3d8c2d7954b38b5e38b24a4d44efd9ed8cb5d894beb808d00cb922a3fca18e7c79b8ff7c0527e322a62a20b031eaf151a944caea7c709
7
+ data.tar.gz: 8386ea2ab6179c50f185d6ff9f6220af27edfa559de024bb9bca8c862d90106c9fcd257a090d7765333ed55284ba9c4c5e9d8a108c1170b58b2552cc45079ba9
@@ -1,3 +1,8 @@
1
+ === 2.2.1 / upcoming
2
+
3
+ * Remove bin/bbmbd. It is replaced by config.ru to start the rack process
4
+ * Made bin/bbmb_admin work again
5
+
1
6
  === 2.2.1 / 17.05.2017
2
7
 
3
8
  * Fix logout. Uses app
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_dependency "ydbd-pg", '>= 0.5.2'
22
22
  spec.add_dependency "ydbi", '>= 0.5.3'
23
23
  spec.add_dependency "json"
24
- spec.add_dependency "sbsm", '>= 1.3.9'
24
+ spec.add_dependency "sbsm", '>= 1.4.0'
25
25
  spec.add_dependency "htmlgrid"
26
26
  spec.add_dependency "ydim", '>= 0.5.1'
27
27
  spec.add_dependency "syck"
@@ -1,11 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
- # Admin -- bbmb -- 09.07.2003 -- hwyss@ywesee.com
2
+ # Admin -- bbmb -- 09.07.2003 -- hwyss@ywesee.com
3
3
 
4
4
  require 'drb'
5
- require 'sbsm/drb'
6
5
  require 'bbmb'
7
- require 'bbmb/config'
8
- require 'bbmb/util/invoicer'
6
+ $: << File.expand_path('../lib', File.dirname(__FILE__))
7
+ require 'bbmb/util/app'
9
8
  require 'readline'
10
9
  include Readline
11
10
 
@@ -39,7 +38,7 @@ while(line = readline(prompt, true))
39
38
  break
40
39
  when 'bt', 'backtrace'
41
40
  if last_error.respond_to?(:backtrace)
42
- $stdout.puts last_error.backtrace
41
+ $stdout.puts last_error.backtrace
43
42
  else
44
43
  $stdout.puts 'No Error'
45
44
  end
@@ -49,7 +48,7 @@ while(line = readline(prompt, true))
49
48
  rescue StandardError, SyntaxError => last_error
50
49
  $stdout.puts last_error
51
50
  end
52
- when /sp\s+(-?\d+)/, /set_priority\s+(-?\d+)/
51
+ when /sp\s+(-?\d+)/, /set_priority\s+(-?\d+)/
53
52
  priority = $~[1].to_i
54
53
  $stdout.puts "setting Priority to #{priority}"
55
54
  else
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # Util::Server -- de.bbmb.org -- 01.09.2006 -- hwyss@ywesee.com
3
-
4
3
  require 'bbmb/config'
4
+ require 'ydim/invoice'
5
5
  require 'bbmb/html/util/known_user'
6
6
  require 'bbmb/html/util/session'
7
7
  require 'bbmb/html/util/validator'
@@ -34,11 +34,9 @@ module BBMB
34
34
  BBMB.persistence = BBMB::Persistence::ODBA
35
35
  end
36
36
  BBMB.auth = DRb::DRbObject.new(nil, BBMB.config.auth_url)
37
- puts "installed BBMB.auth for #{BBMB.config.auth_url}"
38
37
  BBMB.server = BBMB::Util::Server.new(BBMB.persistence, self)
39
38
  BBMB.server.extend(DRbUndumped)
40
39
  BBMB.server = BBMB.server
41
- puts "installed BBMB.server #{BBMB.server}"
42
40
  if(BBMB.config.update?)
43
41
  BBMB.server.run_updater
44
42
  end
@@ -50,16 +48,16 @@ module BBMB
50
48
  DRb.start_service(url, BBMB.server)
51
49
  $SAFE = 1
52
50
  $0 = BBMB.config.name
53
- SBSM.logger.info('start') { sprintf("starting bbmb-server on %s", url) }
51
+ SBSM.logger.info("started bbmb-server on #{url}")
54
52
  DRb.thread.join
55
53
  SBSM.logger.info('finished') { sprintf("starting bbmb-server on %s", url) }
56
54
  rescue Exception => error
57
- SBSM.logger.error('fatal') { error }
55
+ SBSM.logger.error('fatal')
58
56
  raise
59
57
  end
60
58
  def initialize
61
59
  super
62
- puts "Starting Rack-Service #{self.class} and service #{BBMB.config.server_url}"
60
+ SBSM.logger.info "Starting Rack-Service #{self.class} and service #{BBMB.config.server_url}"
63
61
  Thread.new {
64
62
  start_service
65
63
  }
@@ -18,16 +18,18 @@ require 'bbmb/model/customer'
18
18
  require 'bbmb/model/quota'
19
19
  require 'bbmb/model/product'
20
20
  require 'bbmb/model/promotion'
21
+ require 'sbsm/admin_server'
21
22
 
22
23
  module BBMB
23
24
  def self.persistence
24
25
  @@persistence ||= BBMB::Persistence::ODBA
25
26
  end
26
27
  module Util
27
- class Server
28
+ class Server < SBSM::AdminServer
28
29
  def initialize(persistence, app)
29
30
  @persistence = persistence
30
31
  @app = app
32
+ super(app: app)
31
33
  end
32
34
  def invoice(range)
33
35
  SBSM.info "invoice started at #{Time.now} for #{range}"
@@ -1,3 +1,3 @@
1
1
  module BBMB
2
- VERSION = '2.2.1'
2
+ VERSION = '2.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bbmb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masaomi Hatakeyama, Zeno R.R. Davatz, Niklaus Giger
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 1.3.9
75
+ version: 1.4.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 1.3.9
82
+ version: 1.4.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: htmlgrid
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -336,7 +336,6 @@ description: A Ruby gem for browser based orders of approved medical drugs in Sw
336
336
  email: mhatakeyama@ywesee.com, zdavatz@ywesee.com, ngiger@ywesee.com
337
337
  executables:
338
338
  - bbmb_admin
339
- - bbmbd
340
339
  - update_articles_and_products
341
340
  extensions: []
342
341
  extra_rdoc_files: []
@@ -352,7 +351,6 @@ files:
352
351
  - bbmb.gemspec
353
352
  - bbmb.jpeg
354
353
  - bin/bbmb_admin
355
- - bin/bbmbd
356
354
  - bin/update_articles_and_products
357
355
  - lib/bbmb.rb
358
356
  - lib/bbmb/config.rb
data/bin/bbmbd DELETED
@@ -1,58 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- $: << File.expand_path('../lib', File.dirname(__FILE__))
4
-
5
- require 'drb'
6
- require 'logger'
7
- require 'ydim/invoice'
8
- require 'bbmb/config'
9
- require 'bbmb/util/server'
10
- require 'mail'
11
-
12
- module BBMB
13
- @config.load_files.each { |local|
14
- require local
15
- }
16
- require File.join('bbmb', 'persistence', @config.persistence)
17
- case @config.persistence
18
- when 'odba'
19
- DRb.install_id_conv ODBA::DRbIdConv.new
20
- @persistence = BBMB::Persistence::ODBA
21
- end
22
-
23
- log_file = @config.log_file
24
- if(log_file.is_a?(String))
25
- FileUtils.mkdir_p(File.dirname(log_file))
26
- log_file = File.open(log_file, 'a')
27
- at_exit { log_file.close }
28
- end
29
- @logger = Logger.new(log_file)
30
- @logger.level = Logger.const_get(@config.log_level)
31
- @logger.debug('config') { @config.pretty_inspect }
32
-
33
- VERSION = `git rev-parse HEAD`
34
-
35
- @auth = DRb::DRbObject.new(nil, @config.auth_url)
36
-
37
- begin
38
- @server = BBMB::Util::Server.new(@persistence)
39
- @server.extend(DRbUndumped)
40
- if(@config.update?)
41
- @server.run_updater
42
- end
43
- if(@config.invoice?)
44
- @server.run_invoicer
45
- end
46
-
47
- url = @config.server_url
48
- url.untaint
49
- DRb.start_service(url, @server)
50
- $SAFE = 1
51
- $0 = @config.name
52
- @logger.info('start') { sprintf("starting bbmb-server on %s", url) }
53
- DRb.thread.join
54
- rescue Exception => error
55
- @logger.error('fatal') { error }
56
- raise
57
- end
58
- end