arxutils_sqlite3 0.1.50 → 0.1.51

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: 48882ff671e3e3a1b2f79122ec37c8c3ba805cb85f8acbf06c58dbba0f27bf00
4
- data.tar.gz: 96acf17a98b0537c6847ede32081306f3a73ad783d38b2e7b52b1ffbf0b64f73
3
+ metadata.gz: 6651609533fa181147b0b4c538aa3c45bd85934fde386311095d3994514964cb
4
+ data.tar.gz: 670aa9b9e25355c36b9108a31b378dd8cae74cae60d20ef64ca290980b4b3a6f
5
5
  SHA512:
6
- metadata.gz: '094045bcdb07d355014b294da9c182d469534ec77f8040902540f2c3205495367149a249675997cb4f7ca396fca04776a8475ede705241ad3b74af9b44e23704'
7
- data.tar.gz: 361a7a847edbb2e9d4e8e0f338b81ced67badea6c427b9feaa178250b7e1fca350a6679a6abce9ab833f3f2438e2b58d44e8fda1c514ff73dc46a657df7dc240
6
+ metadata.gz: 8513dfaafef1f79c1ec93871dddf4f85dfb3845d6ff1fc3b14dc0568dfa7346faff62f500176fdce2dfdb87806110fdffd84efda453ef8b8e3369f22b5b5b647
7
+ data.tar.gz: cacf3262387b35efcafc367e3f1bc5ec61221be180cc49eb8b5e6f7b0e7ddabcb1de1b417ef12aac5465d480425b17768a6b926e80d6e89fb25d6107fa815261
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- arxutils_sqlite3 (0.1.50)
4
+ arxutils_sqlite3 (0.1.51)
5
5
  activerecord (~> 6.1)
6
6
  activesupport
7
7
  simpleoptparse
data/Rakefile CHANGED
@@ -18,4 +18,4 @@ RuboCop::RakeTask.new
18
18
 
19
19
  # task default: %i[spec rubocop]
20
20
 
21
- require "arxutils_sqlite3_rake_task"
21
+ require "arxutils_sqlite3/rake_task"
@@ -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?( fname )
263
- EXCLUDE_FILES.index( fname ) != nil
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
- if @migrate_dir
60
- Dir.glob(File.join(@migrate_dir, "*")).each do |x|
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?( basename )
63
+ ret = !@config.exclude_file?(basename)
67
64
  ret_file = File.file?(x)
68
- ret2 = (ret_file && ret)
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
- if @migrate_dir
80
- Dir.glob(File.join(@migrate_dir, "*")).each do |x|
81
- FileUtils.rm(x) if File.file?(x)
82
- end
83
- end
84
- Dir.glob(File.join(@db_dir, "*")).each do |x|
85
- # puts x
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 default: %w[setup copy_db_scheme copy_opts makeconfig make_migrate_script migrate acr]
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 setup copy_db_scheme copy_opts makeconfig make_migrate_script migrate acr]
13
+ task bootstrap: %w[delete arxutil_sqlite3]
14
14
 
15
15
  desc "migrate acr"
16
16
  task ma: %w[migrate acr]
@@ -1,4 +1,4 @@
1
1
  module Arxutils_Sqlite3
2
2
  # バージョン番号
3
- VERSION = "0.1.50".freeze
3
+ VERSION = "0.1.51".freeze
4
4
  end
@@ -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 , count: count, tag_count: tag_count , start_datetime: @register_time )
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.50
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