bbmb 2.2.9 → 2.3.0

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: a2d183b03706d8559019ff4dc090b85e23a9b2a8
4
- data.tar.gz: 077a75bd3d642ece584a5e422b570ad6c296b466
3
+ metadata.gz: 95bb9df5480ff6caed99262bd25c01f5294495fa
4
+ data.tar.gz: 1898c6f44136e99b25fda49015121c75e258536f
5
5
  SHA512:
6
- metadata.gz: 97c91fb51fbabebd497ea2504831c913103dc84c122962ebea6b4549c8cc33f6670ed98b2be15fb071355b19698e976190cea871801b58f589eed11ec74d0e85
7
- data.tar.gz: 68a820b5779f418636da8384352c5b0a9dabe96512544568a71063bf1db99995e04078c84be6b5e0171c938aa51f2b032ebeffea35f2190c7cf83933bc006694
6
+ metadata.gz: d45c865e1cc9e052a55bd8904d1cfd7a371e231c8f6815b7cdd52230545b316e58f30b7bb93cb4d480ae70680c6df20fc4ec5778dcf3fe21af88ecc593aff202
7
+ data.tar.gz: d707982da74212b859464803df9f7a96140fa38d409f52a0aa3fd59e32a0c9f8cb5d9ac2007d1609c19c9938b0005e83ca9daca711f30386e7e809e738f43e01
@@ -1,3 +1,7 @@
1
+ === 2.3.0 / 07.06.2017
2
+
3
+ * Use by default only the etc/config.yml inside the current working directory
4
+
1
5
  === 2.2.9 / 01.06.2017
2
6
 
3
7
  * Work around order without customer and no positions
@@ -54,7 +54,7 @@ while(line = readline(prompt, true))
54
54
  else
55
55
  begin
56
56
  bgflag = line.slice!(/\s*\&\s*$/)
57
- $current = bbmb._admin(line, result, priority)
57
+ $current = BBMB.server._admin(line, result, priority)
58
58
  unless(bgflag)
59
59
  $current.join
60
60
  end
@@ -5,31 +5,20 @@ require 'rclconf'
5
5
  require 'bbmb'
6
6
 
7
7
  module BBMB
8
- default_dir = if(root = ENV['DOCUMENT_ROOT'])
9
- File.expand_path('../etc', root)
10
- elsif(home = ENV['HOME'])
11
- File.expand_path('.bbmb/etc', home)
12
- else
13
- require 'tmpdir'
14
- Dir.tmpdir
15
- end
16
- default_config_files = [
17
- File.join(default_dir, 'bbmb.yml'),
18
- '/etc/bbmb/bbmb.yml',
19
- ]
8
+ default_config_file = File.join(Dir.pwd, 'etc', 'config.yml')
20
9
  defaults = {
21
10
  'admin_address' => '',
22
11
  'admins' => [],
23
12
  'auth_domain' => 'ch.bbmb',
24
13
  'auth_url' => 'druby://localhost:12001',
25
- 'bbmb_dir' => File.expand_path('..', default_dir),
26
- 'config' => default_config_files,
14
+ 'bbmb_dir' => Dir.pwd,
15
+ 'config' => default_config_file,
27
16
  'confirm_error_body' => 'Customer %s does not have an email address configured',
28
17
  'confirm_error_cc' => [],
29
18
  'confirm_error_from' => 'errors.test@bbmb.ch',
30
19
  'confirm_error_subject' => 'Customer %s without email address',
31
20
  'confirm_error_to' => nil,
32
- 'data_dir' => File.expand_path('../data', default_dir),
21
+ 'data_dir' => File.join(Dir.pwd, 'data'),
33
22
  'db_name' => 'bbmb',
34
23
  'db_user' => 'bbmb',
35
24
  'db_auth' => 'bbmb',
@@ -79,7 +68,7 @@ module BBMB
79
68
  'order_destinations' => [],
80
69
  'pagestep' => 20,
81
70
  'persistence' => 'odba',
82
- 'polling_file' => File.expand_path('polling.yml', default_dir),
71
+ 'polling_file' => File.join(Dir.pwd, 'etc', 'polling.yml'),
83
72
  'scm_link' => 'https://github.com/zdavatz/bbmb',
84
73
  'server_url' => 'druby://localhost:12000',
85
74
  'session_timeout' => 3600,
@@ -107,6 +96,8 @@ module BBMB
107
96
  }
108
97
 
109
98
  config = RCLConf::RCLConf.new(ARGV, defaults)
99
+ raise "config file #{config.config} must exist" unless File.exist?(config.config)
100
+ puts "Loading BBMB config from #{config.config}"
110
101
  config.load(config.config)
111
102
  @config = config
112
103
  end
@@ -1,3 +1,3 @@
1
1
  module BBMB
2
- VERSION = '2.2.9'
2
+ VERSION = '2.3.0'
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.2.9
4
+ version: 2.3.0
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-06-01 00:00:00.000000000 Z
11
+ date: 2017-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: odba