bsb 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/lib/bsb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BSB
4
- VERSION = '1.1.4'
4
+ VERSION = '1.1.5'
5
5
  end
@@ -13,12 +13,22 @@ namespace :bsb do
13
13
  file_format: '.txt'
14
14
  )
15
15
 
16
- require 'bsb/bank_list_generator'
17
- bsb_bl_gen = BSB::BankListGenerator.load_file(bank_list_filename)
18
- File.write('config/bsb_bank_list.json', bsb_bl_gen.json)
16
+ raise 'No bank list or bsb found' unless bank_list_filename || db_list_filename
19
17
 
20
- require 'bsb/database_generator'
21
- bsb_db_gen = BSB::DatabaseGenerator.load_file(db_list_filename)
22
- File.write('config/bsb_db.json', bsb_db_gen.json)
18
+ if bank_list_filename
19
+ require 'bsb/bank_list_generator'
20
+ bsb_bl_gen = BSB::BankListGenerator.load_file(bank_list_filename)
21
+ File.write('config/bsb_bank_list.json', bsb_bl_gen.json)
22
+ else
23
+ $stderr.puts 'Missing bank list "KEY TO ABBREVIATIONS AND BSB NUMBERS"'
24
+ end
25
+
26
+ if db_list_filename
27
+ require 'bsb/database_generator'
28
+ bsb_db_gen = BSB::DatabaseGenerator.load_file(db_list_filename)
29
+ File.write('config/bsb_db.json', bsb_db_gen.json)
30
+ else
31
+ $stderr.puts 'Missing bsb db "BSBDirectory"'
32
+ end
23
33
  end
24
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bsb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Zhou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-09 00:00:00.000000000 Z
11
+ date: 2024-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel