arxutils_sqlite3 0.1.50 → 0.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/Rakefile +1 -1
- data/lib/arxutils_sqlite3/config.rb +4 -3
- data/lib/arxutils_sqlite3/migrate.rb +14 -19
- data/lib/{arxutils_sqlite3_rake_task.rb → arxutils_sqlite3/rake_task.rb} +2 -2
- data/lib/arxutils_sqlite3/version.rb +1 -1
- data/lib/template/acrecord/db_scheme/dbsetup.tmpl +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6651609533fa181147b0b4c538aa3c45bd85934fde386311095d3994514964cb
|
4
|
+
data.tar.gz: 670aa9b9e25355c36b9108a31b378dd8cae74cae60d20ef64ca290980b4b3a6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8513dfaafef1f79c1ec93871dddf4f85dfb3845d6ff1fc3b14dc0568dfa7346faff62f500176fdce2dfdb87806110fdffd84efda453ef8b8e3369f22b5b5b647
|
7
|
+
data.tar.gz: cacf3262387b35efcafc367e3f1bc5ec61221be180cc49eb8b5e6f7b0e7ddabcb1de1b417ef12aac5465d480425b17768a6b926e80d6e89fb25d6107fa815261
|
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -4,7 +4,6 @@ module Arxutils_Sqlite3
|
|
4
4
|
##
|
5
5
|
# migrateに必要なファイルをテンプレートから作成し、migarteを実行する
|
6
6
|
class Config
|
7
|
-
EXCLUDE_FILES = %W!setting.yml!
|
8
7
|
# DB格納ディレクトリ名
|
9
8
|
DB_DIR = "db".freeze
|
10
9
|
# migrate用スクリプト格納ディレクトリ名
|
@@ -59,6 +58,8 @@ module Arxutils_Sqlite3
|
|
59
58
|
# migrateディレクトリへのパス
|
60
59
|
MIGRATE_DIR = DB_PN.join(MIGRATE_BASE_DIR)
|
61
60
|
|
61
|
+
EXCLUDE_FILES = %w[SETTING_YAML_FILE_NAME].freeze
|
62
|
+
|
62
63
|
# DB構成ファイル格納ディレクトリの作成
|
63
64
|
def make_config_directory
|
64
65
|
# p "config make_config_directory"
|
@@ -259,8 +260,8 @@ module Arxutils_Sqlite3
|
|
259
260
|
File.write(dest_dbsetup_file, result_content)
|
260
261
|
end
|
261
262
|
|
262
|
-
def exclude_file?(
|
263
|
-
EXCLUDE_FILES.index(
|
263
|
+
def exclude_file?(fname)
|
264
|
+
EXCLUDE_FILES.index(fname) != nil
|
264
265
|
end
|
265
266
|
end
|
266
267
|
end
|
@@ -56,33 +56,28 @@ module Arxutils_Sqlite3
|
|
56
56
|
|
57
57
|
# マイグレート用スクリプト、DB構成情報ファイル、DBファイルの削除
|
58
58
|
def delete_migrate_and_config_and_db
|
59
|
-
|
60
|
-
|
61
|
-
FileUtils.rm(x) if File.file?(x)
|
62
|
-
end
|
63
|
-
end
|
59
|
+
# def delete_migrate_and_config
|
60
|
+
delete_migrate
|
64
61
|
Dir.glob(File.join(@dest_config_dir, "*")).each do |x|
|
65
62
|
basename = File.basename(x)
|
66
|
-
ret = !@config.exclude_file?(
|
63
|
+
ret = !@config.exclude_file?(basename)
|
67
64
|
ret_file = File.file?(x)
|
68
|
-
|
69
|
-
FileUtils.rm(x) if ret2
|
70
|
-
end
|
71
|
-
Dir.glob(File.join(@db_dir, "*")).each do |x|
|
72
|
-
# puts x
|
73
|
-
FileUtils.rm(x) if File.file?(x)
|
65
|
+
FileUtils.rm(x) if ret_file && ret
|
74
66
|
end
|
67
|
+
delete_db
|
75
68
|
end
|
76
69
|
|
77
70
|
# マイグレート用スクリプト、DBファイルの削除
|
78
71
|
def delete_migrate_and_db
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
72
|
+
delete_migrate
|
73
|
+
delete_db
|
74
|
+
end
|
75
|
+
|
76
|
+
# マイグレート用スクリプトの削除
|
77
|
+
def delete_migrate
|
78
|
+
return unless @migrate_dir
|
79
|
+
|
80
|
+
Dir.glob(File.join(@migrate_dir, "*")).each do |x|
|
86
81
|
FileUtils.rm(x) if File.file?(x)
|
87
82
|
end
|
88
83
|
end
|
@@ -7,10 +7,10 @@ setting = config.load_setting_yaml_file
|
|
7
7
|
klass = setting[:klass]
|
8
8
|
|
9
9
|
desc "setup copy_db_scheme copy_opts makeconfig make_migrate_script migrate acr"
|
10
|
-
task
|
10
|
+
task arxutil_sqlite3: %w[setup copy_db_scheme copy_opts makeconfig make_migrate_script migrate acr]
|
11
11
|
|
12
12
|
desc "delete setup copy_db_scheme copy_opts makeconfig make_migrate_script migrate acr"
|
13
|
-
task bootstrap: %w[delete
|
13
|
+
task bootstrap: %w[delete arxutil_sqlite3]
|
14
14
|
|
15
15
|
desc "migrate acr"
|
16
16
|
task ma: %w[migrate acr]
|
@@ -13,7 +13,9 @@ class Dbsetup
|
|
13
13
|
cur_ennblist = Currentennblist.where( notebook: notebook ).limit(1)
|
14
14
|
if cur_ennblist.size == 0
|
15
15
|
begin
|
16
|
-
ennblist = Ennblist.create( stack: stack, notebook: notebook ,
|
16
|
+
ennblist = Ennblist.create( stack: stack, notebook: notebook ,
|
17
|
+
count: count, tag_count: tag_count ,
|
18
|
+
start_datetime: @register_time )
|
17
19
|
evnb = Evnb.create( time_id: @ct.id , ennb_id: ennblist.id )
|
18
20
|
rescue => ex
|
19
21
|
p ex.class
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arxutils_sqlite3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.51
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yasuo kominami
|
@@ -224,10 +224,10 @@ files:
|
|
224
224
|
- lib/arxutils_sqlite3/dbutil/dbconnect.rb
|
225
225
|
- lib/arxutils_sqlite3/hier.rb
|
226
226
|
- lib/arxutils_sqlite3/migrate.rb
|
227
|
+
- lib/arxutils_sqlite3/rake_task.rb
|
227
228
|
- lib/arxutils_sqlite3/transactstate.rb
|
228
229
|
- lib/arxutils_sqlite3/util.rb
|
229
230
|
- lib/arxutils_sqlite3/version.rb
|
230
|
-
- lib/arxutils_sqlite3_rake_task.rb
|
231
231
|
- lib/dbacrecord.rb
|
232
232
|
- lib/template/acrecord/acrecord.tmpl
|
233
233
|
- lib/template/acrecord/acrecord_count.tmpl
|