master_data_tool 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +6 -6
- data/README.md +6 -7
- data/docker-compose.yml +1 -1
- data/gemfiles/{rails52.gemfile → activerecord52.gemfile} +1 -1
- data/gemfiles/{rails61.gemfile → activerecord61.gemfile} +1 -1
- data/gemfiles/{rails70.gemfile → activerecord70.gemfile} +1 -1
- data/lib/master_data_tool/config.rb +2 -2
- data/lib/master_data_tool/dump/executor.rb +1 -1
- data/lib/master_data_tool/import/executor.rb +1 -1
- data/lib/master_data_tool/master_data_status.rb +1 -0
- data/lib/master_data_tool/version.rb +1 -1
- data/master_data_tool.gemspec +41 -0
- data/scripts/setup.sh +17 -0
- metadata +51 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a92262ac7a93ea8237ec6740589c865ca6bce067f1fba4a48403a6f3cd42a379
|
4
|
+
data.tar.gz: d738dce7d637aa27ae2b9b27e9ed1a7d4ae119e41cf240b24f874e86cf6cde4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9ebcb430a6d91175cff4e36a512958b30ac5318639f855d4f82e8ab2a74c147a0eeec25f90c5dc97b11a5c3ab7c81b7e1666bee5fee5ad046a8d4cbfcb9a5bc
|
7
|
+
data.tar.gz: 76587a7eb98d0b2b0ac28f2cbf9c59e649c05a1d456ea4011cd9f83daa89c9193509b7a25c89780b5e5ec7a6e25cc4f79b31745f3a6c70a619eb5c271915c2b2
|
data/Appraisals
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
appraise '
|
2
|
-
gem '
|
1
|
+
appraise 'activerecord52' do
|
2
|
+
gem 'activerecord', '~> 5.2'
|
3
3
|
end
|
4
4
|
|
5
|
-
appraise '
|
6
|
-
gem '
|
5
|
+
appraise 'activerecord61' do
|
6
|
+
gem 'activerecord', '~> 6.1'
|
7
7
|
end
|
8
8
|
|
9
9
|
if RUBY_VERSION >= '2.7.0'
|
10
|
-
appraise '
|
11
|
-
gem '
|
10
|
+
appraise 'activerecord70' do
|
11
|
+
gem 'activerecord', '~> 7.0'
|
12
12
|
end
|
13
13
|
end
|
data/README.md
CHANGED
@@ -157,24 +157,23 @@ docker-compose up -d
|
|
157
157
|
export DB_HOST=127.0.0.1
|
158
158
|
export DB_PORT=`docker port master_data_tool_mysql57 3306 | cut -f 2 -d ':'`
|
159
159
|
export DB_USERNAME=root
|
160
|
-
export DB_PASSWORD=
|
160
|
+
export DB_PASSWORD=f3WpxNreVT2NgQry
|
161
|
+
export DB_NAME=master_data_tool_test
|
161
162
|
```
|
162
163
|
|
163
164
|
- dockerでMySQLを立ち上げるたびにポートは変わるのでDB_PORTは都度設定する
|
164
165
|
- direnvを使っているならば `direnv reload` すればいい
|
165
166
|
|
166
167
|
```
|
167
|
-
|
168
|
-
RAILS_ENV=test bundle exec rake db:create
|
169
|
-
RAILS_ENV=test bundle exec rake db:migrate
|
168
|
+
./scripts/setup.sh
|
170
169
|
```
|
171
170
|
|
172
171
|
## rspec
|
173
172
|
|
174
173
|
```
|
175
|
-
bundle exec appraisal
|
176
|
-
bundle exec appraisal
|
177
|
-
bundle exec appraisal
|
174
|
+
bundle exec appraisal activerecord52 rspec
|
175
|
+
bundle exec appraisal activerecord61 rspec
|
176
|
+
bundle exec appraisal activerecord70 rspec
|
178
177
|
```
|
179
178
|
|
180
179
|
|
data/docker-compose.yml
CHANGED
@@ -11,10 +11,10 @@ module MasterDataTool
|
|
11
11
|
|
12
12
|
def self.default_config
|
13
13
|
new.tap do |config|
|
14
|
-
config.master_data_dir = Rails.root.join('db/fixtures')
|
14
|
+
config.master_data_dir = nil # Rails.root.join('db/fixtures')
|
15
15
|
config.dump_ignore_tables = %w[]
|
16
16
|
config.dump_ignore_columns = %w[]
|
17
|
-
config.logger =
|
17
|
+
config.logger = Logger.new(nil)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -40,7 +40,7 @@ module MasterDataTool
|
|
40
40
|
table_name = MasterDataTool.resolve_table_name(path)
|
41
41
|
load_skip = load_skip_table?(table_name, path)
|
42
42
|
|
43
|
-
model_klass =
|
43
|
+
model_klass = Object.const_get(table_name.classify)
|
44
44
|
master_data = MasterData.new(path, model_klass)
|
45
45
|
master_data.load unless load_skip
|
46
46
|
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/master_data_tool/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "master_data_tool"
|
7
|
+
spec.version = MasterDataTool::VERSION
|
8
|
+
spec.authors = ["Takahiro Ooishi"]
|
9
|
+
spec.email = ["taka0125@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "マスタデータの管理ツール"
|
12
|
+
spec.description = "システムが稼働する上で最初から必要なデータ(マスタデータ)を管理するツールです。"
|
13
|
+
spec.homepage = "https://github.com/taka0125/master_data_tool"
|
14
|
+
spec.required_ruby_version = ">= 2.6.0"
|
15
|
+
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
18
|
+
|
19
|
+
# Specify which files should be added to the gem when it is released.
|
20
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
21
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
22
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
23
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
24
|
+
end
|
25
|
+
end
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
|
30
|
+
spec.add_development_dependency 'rspec'
|
31
|
+
spec.add_development_dependency 'mysql2'
|
32
|
+
spec.add_development_dependency 'psych', '~> 3.1'
|
33
|
+
spec.add_development_dependency 'appraisal'
|
34
|
+
spec.add_development_dependency 'ridgepole'
|
35
|
+
spec.add_development_dependency 'database_cleaner-active_record'
|
36
|
+
|
37
|
+
spec.add_dependency 'activerecord', '>= 5.1.7'
|
38
|
+
spec.add_dependency 'activesupport'
|
39
|
+
spec.add_dependency 'thor'
|
40
|
+
spec.add_dependency 'activerecord-import'
|
41
|
+
end
|
data/scripts/setup.sh
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
set -ex
|
3
|
+
|
4
|
+
CURRENT=$(cd $(dirname $0);pwd)
|
5
|
+
|
6
|
+
mysql \
|
7
|
+
-u ${DB_USERNAME} \
|
8
|
+
-h ${DB_HOST} \
|
9
|
+
-p${DB_PASSWORD} \
|
10
|
+
--port ${DB_PORT} \
|
11
|
+
-e "CREATE DATABASE IF NOT EXISTS ${DB_NAME}"
|
12
|
+
|
13
|
+
bundle exec ridgepole \
|
14
|
+
-c ${CURRENT}/../spec/dummy-common/config/database.yml \
|
15
|
+
--apply \
|
16
|
+
-f ${CURRENT}/../spec/dummy-common/db/Schemafile \
|
17
|
+
-E test
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: master_data_tool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takahiro Ooishi
|
@@ -11,7 +11,7 @@ cert_chain: []
|
|
11
11
|
date: 2022-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: rspec
|
14
|
+
name: rspec
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -67,7 +67,35 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: ridgepole
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: database_cleaner-active_record
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: activerecord
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
101
|
- - ">="
|
@@ -80,6 +108,20 @@ dependencies:
|
|
80
108
|
- - ">="
|
81
109
|
- !ruby/object:Gem::Version
|
82
110
|
version: 5.1.7
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: activesupport
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
83
125
|
- !ruby/object:Gem::Dependency
|
84
126
|
name: thor
|
85
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,9 +168,9 @@ files:
|
|
126
168
|
- docker-compose.yml
|
127
169
|
- exe/master_data_tool
|
128
170
|
- gemfiles/.bundle/config
|
129
|
-
- gemfiles/
|
130
|
-
- gemfiles/
|
131
|
-
- gemfiles/
|
171
|
+
- gemfiles/activerecord52.gemfile
|
172
|
+
- gemfiles/activerecord61.gemfile
|
173
|
+
- gemfiles/activerecord70.gemfile
|
132
174
|
- lib/generators/master_data_tool/install/install_generator.rb
|
133
175
|
- lib/generators/master_data_tool/install/templates/create_master_data_statuses.rb.erb
|
134
176
|
- lib/master_data_tool.rb
|
@@ -148,6 +190,8 @@ files:
|
|
148
190
|
- lib/master_data_tool/report/verify_report.rb
|
149
191
|
- lib/master_data_tool/version.rb
|
150
192
|
- log/test.log
|
193
|
+
- master_data_tool.gemspec
|
194
|
+
- scripts/setup.sh
|
151
195
|
- sig/master_data_tool.rbs
|
152
196
|
homepage: https://github.com/taka0125/master_data_tool
|
153
197
|
licenses: []
|
@@ -169,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
213
|
- !ruby/object:Gem::Version
|
170
214
|
version: '0'
|
171
215
|
requirements: []
|
172
|
-
rubygems_version: 3.
|
216
|
+
rubygems_version: 3.2.22
|
173
217
|
signing_key:
|
174
218
|
specification_version: 4
|
175
219
|
summary: マスタデータの管理ツール
|