flist 0.1.30 → 0.1.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/main.yml +31 -0
  3. data/.gitignore +5 -0
  4. data/.rubocop.yml +12 -0
  5. data/.rubocop_todo.yml +129 -0
  6. data/Gemfile +22 -0
  7. data/Rakefile +50 -3
  8. data/SECURITY.md +21 -0
  9. data/bin/console +4 -3
  10. data/bin/setup +2 -0
  11. data/config/.gitkeep +0 -0
  12. data/config/config.yml +14 -0
  13. data/config/config_sample.yml +15 -0
  14. data/config/config_yml.sample +15 -0
  15. data/config/db_scheme.yml +71 -0
  16. data/config/db_scheme.yml.sample +48 -0
  17. data/config/dbsetup.rb +56 -0
  18. data/config/opts.rb +9 -0
  19. data/config/opts.rb.sample +7 -0
  20. data/config/setting.yml +2 -0
  21. data/config/sqlite3.yml +26 -0
  22. data/config/tmp/db_scheme.yml +71 -0
  23. data/db/migrate/010_create_countdatetime.rb +11 -0
  24. data/db/migrate/020_create_flistz.rb +22 -0
  25. data/db/migrate/030_create_invalidflistz.rb +13 -0
  26. data/db/migrate/040_create_currentflistz.rb +15 -0
  27. data/db/migrate/050_create_dirz.rb +12 -0
  28. data/db/migrate/060_create_invaliddirz.rb +13 -0
  29. data/db/migrate/070_create_currentdirz.rb +15 -0
  30. data/exe/flist +80 -27
  31. data/flist.gemspec +33 -20
  32. data/lib/dbacrecord.rb +36 -0
  33. data/lib/flist/cli.rb +49 -0
  34. data/lib/flist/config.rb +16 -0
  35. data/lib/flist/csvx.rb +29 -0
  36. data/lib/flist/dbutil/dbmgr.rb +25 -24
  37. data/lib/flist/dbutil/dirzmgr.rb +75 -12
  38. data/lib/flist/dbutil/flistzmgr.rb +81 -34
  39. data/lib/flist/dbutil.rb +4 -4
  40. data/lib/flist/flist/filelist.rb +219 -168
  41. data/lib/flist/flist.rb +282 -101
  42. data/lib/flist/version.rb +3 -1
  43. data/lib/flist.rb +51 -5
  44. data/lib/template/config_yml.erb +15 -0
  45. metadata +128 -33
  46. data/exe/makemigrate +0 -52
  47. data/lib/flist/flist/store.rb +0 -79
metadata CHANGED
@@ -1,31 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.30
4
+ version: 0.1.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - yasuo kominami
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-06 00:00:00.000000000 Z
11
+ date: 2022-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rake
14
+ name: arxutils_sqlite3
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '10.0'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '10.0'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: activerecord
28
+ name: encx
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: sqlite3
42
+ name: ykutils
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -53,49 +53,119 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: arxutils
56
+ name: ykxutils
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 0.1.0
61
+ version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 0.1.0
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: ykutils
70
+ name: evernote_oauth
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 0.1.0
75
+ version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 0.1.0
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '1.9'
90
- type: :development
89
+ version: '0'
90
+ type: :runtime
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: rake
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - "~>"
108
+ - - ">="
95
109
  - !ruby/object:Gem::Version
96
- version: '1.9'
110
+ version: '0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: rspec
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'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop-rake
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rubocop-rspec
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: yard
99
169
  requirement: !ruby/object:Gem::Requirement
100
170
  requirements:
101
171
  - - ">="
@@ -113,33 +183,60 @@ email:
113
183
  - ykominami@gmail.com
114
184
  executables:
115
185
  - flist
116
- - makemigrate
117
186
  extensions: []
118
187
  extra_rdoc_files: []
119
188
  files:
189
+ - ".github/workflows/main.yml"
120
190
  - ".gitignore"
121
191
  - ".rspec"
192
+ - ".rubocop.yml"
193
+ - ".rubocop_todo.yml"
122
194
  - ".travis.yml"
123
195
  - Gemfile
124
196
  - README.md
125
197
  - Rakefile
198
+ - SECURITY.md
126
199
  - bin/console
127
200
  - bin/setup
201
+ - config/.gitkeep
202
+ - config/config.yml
203
+ - config/config_sample.yml
204
+ - config/config_yml.sample
205
+ - config/db_scheme.yml
206
+ - config/db_scheme.yml.sample
207
+ - config/dbsetup.rb
208
+ - config/opts.rb
209
+ - config/opts.rb.sample
210
+ - config/setting.yml
211
+ - config/sqlite3.yml
212
+ - config/tmp/db_scheme.yml
213
+ - db/migrate/010_create_countdatetime.rb
214
+ - db/migrate/020_create_flistz.rb
215
+ - db/migrate/030_create_invalidflistz.rb
216
+ - db/migrate/040_create_currentflistz.rb
217
+ - db/migrate/050_create_dirz.rb
218
+ - db/migrate/060_create_invaliddirz.rb
219
+ - db/migrate/070_create_currentdirz.rb
128
220
  - exe/flist
129
- - exe/makemigrate
130
221
  - flist.gemspec
222
+ - lib/dbacrecord.rb
131
223
  - lib/flist.rb
224
+ - lib/flist/cli.rb
225
+ - lib/flist/config.rb
226
+ - lib/flist/csvx.rb
132
227
  - lib/flist/dbutil.rb
133
228
  - lib/flist/dbutil/dbmgr.rb
134
229
  - lib/flist/dbutil/dirzmgr.rb
135
230
  - lib/flist/dbutil/flistzmgr.rb
136
231
  - lib/flist/flist.rb
137
232
  - lib/flist/flist/filelist.rb
138
- - lib/flist/flist/store.rb
139
233
  - lib/flist/version.rb
234
+ - lib/template/config_yml.erb
140
235
  homepage: ''
141
- licenses: []
142
- metadata: {}
236
+ licenses:
237
+ - MIT
238
+ metadata:
239
+ rubygems_mfa_required: 'true'
143
240
  post_install_message:
144
241
  rdoc_options: []
145
242
  require_paths:
@@ -148,17 +245,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
245
  requirements:
149
246
  - - ">="
150
247
  - !ruby/object:Gem::Version
151
- version: '0'
248
+ version: 2.7.0
152
249
  required_rubygems_version: !ruby/object:Gem::Requirement
153
250
  requirements:
154
251
  - - ">="
155
252
  - !ruby/object:Gem::Version
156
253
  version: '0'
157
254
  requirements: []
158
- rubyforge_project:
159
- rubygems_version: 2.4.8
255
+ rubygems_version: 3.1.6
160
256
  signing_key:
161
257
  specification_version: 4
162
258
  summary: get flie listing in local machine.
163
259
  test_files: []
164
- has_rdoc:
data/exe/makemigrate DELETED
@@ -1,52 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # -*- coding: utf-8 -*-
3
- require 'arxutils'
4
- require 'flist'
5
-
6
- data_ary = [
7
- {
8
- :flist => %W!base!,
9
- :classname => "Dirz",
10
- :classname_downcase => "dirz",
11
- :items => [
12
- ["path" , "string", "false"],
13
- ["desc" , "string", "true"],
14
- ],
15
- :plural => "dirzs"
16
- },
17
-
18
- {
19
- :flist => %W!base invalid current!,
20
- :classname => "Flistz",
21
- :classname_downcase => "flistz",
22
-
23
- :items => [
24
- ["dir_id" , "integer", "false"],
25
- ["level" , "integer", "false"],
26
- ["kind" , "string", "false"],
27
- ["repo" , "string", "false"],
28
- ["path" , "string", "false"],
29
- ["project" , "integer", "false"],
30
- ["desc" , "string", "true"],
31
- ["comment" , "string", "true"],
32
- ["atime" , "datetime", "false"],
33
- ["ctime" , "datetime", "false"],
34
- ["mtime" , "datetime", "false"],
35
- ],
36
- :plural => "flistzs"
37
- },
38
- ]
39
-
40
- forced = true
41
- dbconfig = Arxutils::DBCONFIG_SQLITE3
42
- if ARGV[0] == "-mysql"
43
- dbconfig = Arxutils::DBCONFIG_MYSQL
44
- end
45
- idx = 1
46
- Arxutils::Migrate.migrate(
47
- data_ary ,
48
- idx,
49
- dbconfig ,
50
- forced
51
- )
52
-
@@ -1,79 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- require 'forwardable'
3
- require 'csv'
4
-
5
- require 'arxutils'
6
- require 'flist/dbutil/dbmgr'
7
- require 'ykutils/debugutils'
8
-
9
- module Flist
10
- class Flist
11
- class Store
12
- extend Forwardable
13
-
14
- include Ykutils::DebugUtils
15
-
16
- def_delegators( :@dbmgr, :dirz_add )
17
-
18
- def initialize( kind, hs )
19
-
20
- debug=false
21
-
22
- @dbmgr = Arxutils::Store.init(kind , hs ){ | register_time |
23
- Dbutil::DbMgr.new( register_time )
24
- }
25
-
26
- @csv_fname = hs["csv_fname"]
27
- @csvin_fname = hs["csvin_fname"]
28
-
29
- debug_utils_init
30
- d_puts("csv_fname=#{@csv_fname}")
31
-
32
- if @csv_fname
33
- @csv = CSV.open( @csv_fname , "w" ,
34
- { :encoding => 'UTF-8',
35
- :headers => @headers_s,
36
- :force_quotes => true,
37
- :write_headers => true,
38
-
39
- } )
40
- end
41
-
42
- if @csvin_fname
43
- @csvin = CSV.open( @csvin_fname , "r" ,
44
- { :encoding => 'UTF-8',
45
- :headers => @headers_s,
46
- } )
47
- end
48
-
49
- d_puts "default_external=#{Encoding.default_external}"
50
- Encoding.default_external=Encoding::UTF_8
51
- d_puts "default_external=#{Encoding.default_external}"
52
- d_puts "default_internal=#{Encoding.default_internal}"
53
- Encoding.default_internal=Encoding::UTF_8
54
- d_puts "default_internal=#{Encoding.default_internal}"
55
- end
56
-
57
- def finish
58
- @csv.close if @csv
59
- @csv_in.close if @csv_in
60
- end
61
-
62
- def post_process
63
- @dbmgr.flistz_post_process(@dir_id) if @dbmgr
64
- end
65
-
66
- def output(items , dir_id)
67
- d_puts "In output"
68
-
69
- items.each do |k,v|
70
- d_puts "v.path.encoding=#{v.path.encoding}"
71
-
72
- @csv << [v.level, v.kind, v.repo, v.path, v.project, v.comment, v.atime, v.ctime, v.mtime] if @csv
73
- @dbmgr.flistz_add( dir_id, v.level, v.kind, v.repo, v.path, v.project, "", v.comment, v.atime, v.ctime, v.mtime) if @dbmgr
74
-
75
- end
76
- end
77
- end
78
- end
79
- end