lucarecord 0.7.0 → 0.7.1

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
  SHA256:
3
- metadata.gz: acbbdd5bec6e0582ecfae94fa619d0da6bb2f8de44a278ecb007837262e714bc
4
- data.tar.gz: ac27f73dace69080863366d1d9dc65f0452df6ee83a9e2041db53afdd08ab6f4
3
+ metadata.gz: 75aa7ba67a42741a9b533dcdbd83a52a3a9d4d113b8bdb558d894d39cdab453b
4
+ data.tar.gz: 1f80272124518bfdf0f8f2461e8e5f24a2d60ca5bffa1c4f06e386b5f5b966d3
5
5
  SHA512:
6
- metadata.gz: 6ce8638946c47268506f2f3877097011afb924fe7c9a744dee23aa893afbfd3b2d683456bb3f3460c330ab005cd62e37d05cfbd94e9b5e80027cb9588466f9c4
7
- data.tar.gz: 6669c9151391f60e52361d8ed3d680c7f6aca7ec5639256ce3717ac283daefad2b9f49e018cbd8322cf0fac2e964b889dc7e5d4690cf44036e93ba17adad55da
6
+ metadata.gz: b18fe1bb5b4094d76330adb36445c673941f4b75987657029c72fb987bbc1b64dd405623bb6b4a1636288c7f3054bf02cdb0e77a1161b761d6b7e5e4510e8663
7
+ data.tar.gz: 0eb7fda772606eec3019b08fcaccc89c99b17fb9d52169c7c31b529ac70fbd16c18a6b305dc95acc29dfee04f22f14381ee8302b081c4e26d4f3c352c45df87e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## LucaRecord 0.7.1
2
+
3
+ * `LucaRecord::IO.load_project()` supports optional `ext_conf:` keyword for an extra config file.
4
+
1
5
  ## LucaRecord 0.7.0
2
6
 
3
7
  Reworked global constants to be singleton Class instance:
@@ -292,16 +292,25 @@ module LucaRecord # :nodoc:
292
292
  end
293
293
  end
294
294
 
295
- def load_project(path)
295
+ def load_project(path, ext_conf: nil)
296
296
  CONST.set_pjdir(path)
297
297
  begin
298
298
  config = {
299
299
  'decimal_separator' => '.',
300
300
  'thousands_separator' => ','
301
- }.merge(YAML.safe_load(File.read(Pathname(CONST.pjdir) / 'config.yml'), permitted_classes: [Date]))
301
+ }.merge(YAML.safe_load(
302
+ File.read(Pathname(CONST.pjdir) / 'config.yml'),
303
+ permitted_classes: [Date]
304
+ ))
305
+ config['decimal_num'] ||= config['country'] == 'jp' ? 0 : 2
306
+ if ext_conf
307
+ config.merge(YAML.safe_load(
308
+ File.read(Pathname(CONST.pjdir) / ext_conf),
309
+ permitted_classes: [Date]
310
+ ))
311
+ end
312
+ CONST.set_config(config)
302
313
  end
303
- config['decimal_num'] ||= config['country'] == 'jp' ? 0 : 2
304
- CONST.set_config(config)
305
314
  end
306
315
 
307
316
  # test if having required dirs/files under exec path
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LucaRecord
4
- VERSION = '0.7.0'
4
+ VERSION = '0.7.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lucarecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chuma Takahiro
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-10 00:00:00.000000000 Z
11
+ date: 2024-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler