master_data_tool 0.10.0 → 0.11.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
  SHA256:
3
- metadata.gz: 14d09ea955d0a1aa9a9af1631d1693a966bf8f865e95c11f830eb35037eb1d79
4
- data.tar.gz: 1f3e61ebc99c806615f631c463440c1ef1f7a09ecf7b3790e9c226338ccc810b
3
+ metadata.gz: c8ebd8a88c9055d0c745c87114670f1ee0d7e6d898883e9472c54ca37ea3a22c
4
+ data.tar.gz: 5b3cdba7ee2a9f3690087ed90abf74d3838543ea8d268979ec789f28dd060399
5
5
  SHA512:
6
- metadata.gz: 337d5dd89ceb3f8531b144391f1f3c1e5d5e6407817d06a446e4c72379cba3f2add92121fd28f5074da382f2c5f8ea1394123588084ccd1fe2566398d96dab16
7
- data.tar.gz: bf1241162ed8c45535b754904244b03cc9937895e565aa2777135c9eaabf29050af2bee36dbe8f0af78b831bd5014ad2351c3d8a9b1a323e9ef4774aaa6e3d25
6
+ metadata.gz: 94d4272694cb2fd10c6fec969ca3b8b877d9f40173586f0300bcf97f1ad54d7ef3cd240b0c96e7cfd33627560e841ae1f336acc58fd188ac323b39d44428c7d9
7
+ data.tar.gz: bdae562479f4e795e13f3140add0c58046669ad6a69164b8d409954ae095b99574e1ad6d951585d82b491d482862219c6bc30acd7415cec42c7ea8a81b6a1aba
@@ -57,7 +57,7 @@ module MasterDataTool
57
57
 
58
58
  master_data_list << master_data
59
59
  end
60
- end
60
+ end.sort_by { |m| m.csv_path } # 外部キー制約などがある場合には先に入れておかないといけないデータなどがある。なので、プレフィックスを付けて順序を指定して貰う
61
61
  end
62
62
 
63
63
  def import_all!(master_data_list)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MasterDataTool
4
- VERSION = "0.10.0"
4
+ VERSION = "0.11.0"
5
5
  end
@@ -25,7 +25,8 @@ module MasterDataTool
25
25
  end
26
26
 
27
27
  def resolve_table_name(csv_path)
28
- csv_path.relative_path_from(config.master_data_dir).to_s.delete_suffix('.csv')
28
+ # 0001_table_nameのように投入順序を制御可能にする
29
+ csv_path.relative_path_from(config.master_data_dir).to_s.gsub(/^\d+_/, '').delete_suffix('.csv')
29
30
  end
30
31
  end
31
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: master_data_tool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takahiro Ooishi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-22 00:00:00.000000000 Z
11
+ date: 2022-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec