yaml-vfs 0.0.2 → 0.0.5
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/lib/yaml-vfs/command/yaml_vfs_writer.rb +56 -2
- data/lib/yaml-vfs/file_collector.rb +85 -34
- data/lib/yaml-vfs/utils.rb +3 -3
- data/lib/yaml-vfs/version.rb +1 -1
- data/lib/yaml-vfs/yaml_vfs.rb +157 -39
- data/lib/yaml_vfs.rb +2 -2
- metadata +9 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e4890cc09e0ec81ac2207d17794117c63e5a75b11119df87560083c0affb2b6
|
4
|
+
data.tar.gz: c863931919a9d44647d17ce9612668f89aba9392c00cf515c4b5f5f97e7074c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72ee57fdaff9d9a559a7af00fae9be99355f3cffbde3ea6d88580609f8298153fcc383352b3a15bc268694be005697abfad10b53ecd83a02bc881ff9096bab00
|
7
|
+
data.tar.gz: c5acbf1325db6cf85bdaea38c7950e00ff057d6e5fef90d836a4bd770842b63e61c895251a42cd29e0e1e94c7dc9e5087886237852b5c5fd15323a822e233572
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module VFS
|
4
4
|
class Command
|
5
5
|
# vfs yaml file gen cmd
|
6
|
-
class
|
6
|
+
class Framework < Command
|
7
7
|
# summary
|
8
8
|
self.summary = 'Virtual the framework and modules dir, and map to real path'
|
9
9
|
|
@@ -51,7 +51,61 @@ module VFS
|
|
51
51
|
def run
|
52
52
|
require 'yaml_vfs'
|
53
53
|
|
54
|
-
VFS::
|
54
|
+
entrys = VFS::FileCollectorEntry.entrys_from_framework_dir(@framework_path, @real_header_dir, @real_modules_dir)
|
55
|
+
VFS::FileCollector.new(entrys).write_mapping(@output_path)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
class Target < Command
|
59
|
+
# summary
|
60
|
+
self.summary = 'Virtual the target public and private headers, and map to real path'
|
61
|
+
|
62
|
+
self.description = <<-DESC
|
63
|
+
Gen VFS Yaml file. To map target virtual path to real path.
|
64
|
+
DESC
|
65
|
+
|
66
|
+
self.arguments = [
|
67
|
+
# target_p, public_header, private_header
|
68
|
+
CLAide::Argument.new('--target-path', true),
|
69
|
+
CLAide::Argument.new('--public-headers-dir', true),
|
70
|
+
CLAide::Argument.new('--private-headers-dir', true),
|
71
|
+
CLAide::Argument.new('--output-path', false)
|
72
|
+
]
|
73
|
+
|
74
|
+
def initialize(argv)
|
75
|
+
super
|
76
|
+
|
77
|
+
target_path = argv.option('target-path')
|
78
|
+
@target_path = Pathname(target_path) unless target_path.nil?
|
79
|
+
public_headers_dir = argv.option('public-headers-dir')
|
80
|
+
@public_headers_dir = Pathname(public_headers_dir) unless public_headers_dir.nil?
|
81
|
+
private_headers_dir = argv.option('private-headers-dir')
|
82
|
+
@private_headers_dir = Pathname(private_headers_dir) unless private_headers_dir.nil?
|
83
|
+
output_path = argv.option('output-path')
|
84
|
+
@output_path = output_path.nil? ? Pathname('.') : Pathname(output_path)
|
85
|
+
end
|
86
|
+
|
87
|
+
def validate!
|
88
|
+
super
|
89
|
+
help! 'must set --target-path' if @target_path.nil?
|
90
|
+
help! 'must set --public-headers-dir' if @public_headers_dir.nil?
|
91
|
+
help! 'must set --private-headers-dir' if @private_headers_dir.nil?
|
92
|
+
end
|
93
|
+
|
94
|
+
# help
|
95
|
+
def self.options
|
96
|
+
[
|
97
|
+
['--target-pathh=<path>', 'target path'],
|
98
|
+
['--public-headers-dir=<path>', 'real public headers path'],
|
99
|
+
['--private-headers-dir=<path>', 'real private headers path'],
|
100
|
+
['--output-path=<path>', 'vfs yaml file output path']
|
101
|
+
].concat(super)
|
102
|
+
end
|
103
|
+
|
104
|
+
def run
|
105
|
+
require 'yaml_vfs'
|
106
|
+
|
107
|
+
entrys = VFS::FileCollectorEntry.entrys_from_target_dir(@target_path, @public_headers_dir, @private_headers_dir)
|
108
|
+
VFS::FileCollector.new(entrys).write_mapping(@output_path)
|
55
109
|
end
|
56
110
|
end
|
57
111
|
end
|
@@ -1,58 +1,109 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'set'
|
4
|
-
require 'yaml-vfs/yaml_vfs'
|
5
4
|
|
6
5
|
module VFS
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
HEADER_FILES_EXTENSIONS = %w[.h .hh .hpp .ipp .tpp .hxx .def .inl .inc].freeze
|
7
|
+
VFS_FILES_EXTENSIONS = %w[.yaml .yml .json].freeze
|
8
|
+
# vfs file collector entry
|
9
|
+
class FileCollectorEntry
|
10
|
+
attr_reader :real_path, :virtual_path
|
11
|
+
|
12
|
+
def initialize(real_path, virtual_path)
|
13
|
+
raise ArgumentError, 'real_path or virtual_path must set' if real_path.nil? || virtual_path.empty?
|
14
|
+
|
15
|
+
@real_path = Pathname(real_path)
|
16
|
+
@virtual_path = Pathname(virtual_path)
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.entrys_from_framework(framework_path, public_headers, private_headers, real_modules)
|
20
|
+
entrys = {}
|
21
|
+
entrys['Headers'] = public_headers unless public_headers.empty?
|
22
|
+
entrys['PrivateHeaders'] = private_headers unless private_headers.empty?
|
23
|
+
entrys['Modules'] = real_modules unless real_modules.empty?
|
24
|
+
|
25
|
+
entrys.flat_map do |key, values|
|
26
|
+
values.map do |path|
|
27
|
+
v_p = File.join(framework_path, key, File.basename(path))
|
28
|
+
new(path, v_p)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
10
32
|
|
11
|
-
|
33
|
+
def self.entrys_from_framework_dir(framework_path, real_header_dir, real_modules_dir)
|
34
|
+
raise ArgumentError, 'real_header must set and exist' unless File.exist?(real_header_dir || '')
|
35
|
+
raise ArgumentError, 'real_modules must set and exist' unless File.exist?(real_header_dir || '')
|
36
|
+
|
37
|
+
real_header_dir = File.join(real_header_dir, '**', '*')
|
38
|
+
real_headers = Pathname.glob(real_header_dir).select { |file| HEADER_FILES_EXTENSIONS.include?(file.extname) }
|
39
|
+
real_modules = Pathname(real_modules_dir).glob('module*.modulemap') || []
|
40
|
+
entrys_from_framework(framework_path, real_headers, real_modules)
|
41
|
+
end
|
12
42
|
|
13
|
-
def self.
|
14
|
-
|
43
|
+
def self.entrys_from_target(target_path, public_headers, private_headers)
|
44
|
+
entrys = {}
|
45
|
+
entrys['Headers'] = public_headers unless public_headers.empty?
|
46
|
+
entrys['PrivateHeaders'] = private_headers unless private_headers.empty?
|
15
47
|
|
16
|
-
|
17
|
-
|
48
|
+
entrys.flat_map do |key, values|
|
49
|
+
values.map do |path|
|
50
|
+
v_p = File.join(target_path, key, File.basename(path))
|
51
|
+
new(path, v_p)
|
52
|
+
end
|
18
53
|
end
|
19
|
-
real_modules = Pathname(real_modules_dir).glob('module*.modulemap')
|
20
|
-
new(framework_path, real_modules, files)
|
21
54
|
end
|
22
55
|
|
23
|
-
def
|
24
|
-
|
56
|
+
def self.entrys_from_target_dir(target_path, public_dir, private_dir)
|
57
|
+
headers = lambda do |dir|
|
58
|
+
unless dir.nil? && File.exist?(dir)
|
59
|
+
Pathname.glob(File.join(dir, '**', '*')).select do |file|
|
60
|
+
HEADER_FILES_EXTENSIONS.include?(file.extname)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
private_headers = headers.call(private_dir) || []
|
65
|
+
public_headers = headers.call(public_dir) || []
|
66
|
+
entrys_from_target(target_path, public_headers, private_headers)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# vfs gen
|
71
|
+
class FileCollector
|
72
|
+
EMPTY_VFS_FILE = '{"case-sensitive":"false","roots":[],"version":0}'
|
73
|
+
private_constant :EMPTY_VFS_FILE
|
74
|
+
def initialize(entrys)
|
75
|
+
@entrys = entrys || []
|
25
76
|
@vfs_writer = YAMLVFSWriter.new
|
26
|
-
@real_headers = real_headers
|
27
|
-
@framework_path = Pathname(framework_path)
|
28
|
-
@real_modules = real_modules
|
29
77
|
end
|
30
78
|
|
31
79
|
def write_mapping(name)
|
32
|
-
|
33
|
-
raise ArgumentError, 'real_headers or real_header_dir one of them must set' if @real_headers.empty?
|
34
|
-
|
35
|
-
add_write_file
|
36
|
-
@vfs_writer.case_sensitive = false
|
80
|
+
stream = add_write_file
|
37
81
|
path = Pathname(name).expand_path
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
82
|
+
unless VFS_FILES_EXTENSIONS.include?(File.extname(path))
|
83
|
+
path.mkpath unless path.exist?
|
84
|
+
path = path.join('all-product-headers.yaml')
|
85
|
+
end
|
86
|
+
update_changed_file(path, stream)
|
42
87
|
end
|
43
88
|
|
44
89
|
private
|
45
90
|
|
91
|
+
def update_changed_file(path, contents)
|
92
|
+
if path.exist?
|
93
|
+
content_stream = StringIO.new(contents)
|
94
|
+
identical = File.open(path, 'rb') { |f| FileUtils.compare_stream(f, content_stream) }
|
95
|
+
return if identical
|
96
|
+
end
|
97
|
+
path.dirname.mkpath
|
98
|
+
File.open(path, 'w') { |f| f.write(contents) }
|
99
|
+
end
|
100
|
+
|
46
101
|
def add_write_file
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
end
|
53
|
-
}
|
54
|
-
wirte_f.call('Headers', real_headers) unless real_headers.empty?
|
55
|
-
wirte_f.call('Modules', real_modules) unless real_modules.empty?
|
102
|
+
return EMPTY_VFS_FILE if @entrys.empty?
|
103
|
+
|
104
|
+
@entrys.each { |entry| @vfs_writer.add_file_mapping(entry.virtual_path, entry.real_path) }
|
105
|
+
@vfs_writer.case_sensitive = false
|
106
|
+
@vfs_writer.write
|
56
107
|
end
|
57
108
|
end
|
58
109
|
end
|
data/lib/yaml-vfs/utils.rb
CHANGED
@@ -12,11 +12,11 @@ end
|
|
12
12
|
String.class_eval do
|
13
13
|
def indent(count, char = ' ')
|
14
14
|
gsub(/([^\n]*)(\n|$)/) do
|
15
|
-
last_iteration = (
|
15
|
+
last_iteration = (Regexp.last_match(1) == '' && Regexp.last_match(2) == '')
|
16
16
|
line = ''
|
17
17
|
line << (char * count) unless last_iteration
|
18
|
-
line <<
|
19
|
-
line <<
|
18
|
+
line << Regexp.last_match(1)
|
19
|
+
line << Regexp.last_match(2)
|
20
20
|
line
|
21
21
|
end
|
22
22
|
end
|
data/lib/yaml-vfs/version.rb
CHANGED
data/lib/yaml-vfs/yaml_vfs.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# frozen_string_literal:
|
1
|
+
# frozen_string_literal: false
|
2
2
|
|
3
3
|
require 'pathname'
|
4
4
|
require 'json'
|
@@ -82,14 +82,6 @@ module VFS
|
|
82
82
|
|
83
83
|
private
|
84
84
|
|
85
|
-
def dir_indent
|
86
|
-
@dir_stack.length * 4
|
87
|
-
end
|
88
|
-
|
89
|
-
def file_indent
|
90
|
-
(@dir_stack.length + 1) * 4
|
91
|
-
end
|
92
|
-
|
93
85
|
def contained_in?(parent, path)
|
94
86
|
path.ascend { |p| break true if parent == p } || false
|
95
87
|
end
|
@@ -104,27 +96,24 @@ module VFS
|
|
104
96
|
def start_directory(path)
|
105
97
|
name = @dir_stack.empty? ? path : contained_part(@dir_stack.last, path)
|
106
98
|
@dir_stack << path
|
107
|
-
|
108
|
-
@stream
|
109
|
-
@stream
|
110
|
-
@stream
|
111
|
-
@stream += "'contents': [\n".indent(indent + 2)
|
99
|
+
@stream << '{'
|
100
|
+
@stream << "'type':'directory',"
|
101
|
+
@stream << "'name':\"#{name}\","
|
102
|
+
@stream << "'contents':["
|
112
103
|
end
|
113
104
|
|
114
105
|
def end_directory
|
115
|
-
|
116
|
-
@stream
|
117
|
-
@stream += '}'.indent(indent)
|
106
|
+
@stream << ']'
|
107
|
+
@stream << '}'
|
118
108
|
@dir_stack.pop
|
119
109
|
end
|
120
110
|
|
121
111
|
def write_entry(v_path, r_path)
|
122
|
-
|
123
|
-
@stream
|
124
|
-
@stream
|
125
|
-
@stream
|
126
|
-
@stream
|
127
|
-
@stream += '}'.indent(file_indent)
|
112
|
+
@stream << '{'
|
113
|
+
@stream << "'type':'file',"
|
114
|
+
@stream << "'name':\"#{v_path}\","
|
115
|
+
@stream << "'external-contents':\"#{r_path}\""
|
116
|
+
@stream << '}'
|
128
117
|
end
|
129
118
|
|
130
119
|
def overlay_dir_sub_rpath(use, overlay_dir, rpath)
|
@@ -137,24 +126,18 @@ module VFS
|
|
137
126
|
end
|
138
127
|
|
139
128
|
def write_yaml_header(use_external_names, case_sensitive, overlay_relative, _overlay_dir)
|
140
|
-
@stream = "{
|
141
|
-
@stream
|
142
|
-
@stream
|
129
|
+
@stream = "{'version':0,"
|
130
|
+
@stream << "'case-sensitive':'#{case_sensitive}'," unless case_sensitive.nil?
|
131
|
+
@stream << "'use-external-names':'#{use_external_names}'," unless use_external_names.nil?
|
143
132
|
use_overlay_relative = !overlay_relative.nil?
|
144
|
-
@stream
|
145
|
-
@stream
|
133
|
+
@stream << "'overlay_relative':'#{overlay_relative}'," if use_overlay_relative
|
134
|
+
@stream << "'roots':["
|
146
135
|
use_overlay_relative
|
147
136
|
end
|
148
137
|
|
149
138
|
def write_yaml_footer(entries)
|
150
|
-
unless entries.empty?
|
151
|
-
|
152
|
-
@stream += "\n"
|
153
|
-
end_directory
|
154
|
-
end
|
155
|
-
@stream += "\n"
|
156
|
-
end
|
157
|
-
@stream += " ]\n}\n"
|
139
|
+
end_directory until @dir_stack.empty? unless entries.empty?
|
140
|
+
@stream << ']}'
|
158
141
|
@stream
|
159
142
|
end
|
160
143
|
|
@@ -170,7 +153,6 @@ module VFS
|
|
170
153
|
def until_end_directory(dir)
|
171
154
|
dir_popped_from_stack = false
|
172
155
|
until @dir_stack.empty? || contained_in?(@dir_stack.last, dir)
|
173
|
-
@stream += "\n"
|
174
156
|
end_directory
|
175
157
|
dir_popped_from_stack = true
|
176
158
|
end
|
@@ -188,13 +170,149 @@ module VFS
|
|
188
170
|
|
189
171
|
def start_directory_or_return(dir, current_dir_empty, use_overlay_relative, overlay_dir, entry)
|
190
172
|
if dir == @dir_stack.last
|
191
|
-
@stream
|
173
|
+
@stream << ',' unless current_dir_empty
|
192
174
|
else
|
193
|
-
@stream
|
175
|
+
@stream << ',' if until_end_directory(dir) || !current_dir_empty
|
194
176
|
start_directory(dir)
|
195
177
|
current_dir_empty = true
|
196
178
|
end
|
197
179
|
use_overlay_relative_and_write_entry(use_overlay_relative, overlay_dir, current_dir_empty, entry)
|
198
180
|
end
|
199
181
|
end
|
182
|
+
# class JSONWriter
|
183
|
+
# attr_reader :dir_stack
|
184
|
+
|
185
|
+
# def write(entries, use_external_names, case_sensitive, overlay_relative, overlay_dir)
|
186
|
+
# use_overlay_relative = write_yaml_header(use_external_names, case_sensitive, overlay_relative, overlay_dir)
|
187
|
+
# unless entries.empty?
|
188
|
+
# current_dir_empty = write_root_entry(entries, use_overlay_relative, overlay_dir)
|
189
|
+
# entries.drop(1).reduce(current_dir_empty) do |empty, entry|
|
190
|
+
# dir = entry.directory? ? entry.v_path : entry.v_path.dirname
|
191
|
+
# start_directory_or_return(dir, empty, use_overlay_relative, overlay_dir, entry)
|
192
|
+
# end
|
193
|
+
# end
|
194
|
+
# write_yaml_footer(entries)
|
195
|
+
# end
|
196
|
+
|
197
|
+
# def initialize
|
198
|
+
# @dir_stack = []
|
199
|
+
# end
|
200
|
+
|
201
|
+
# private
|
202
|
+
|
203
|
+
# def dir_indent
|
204
|
+
# @dir_stack.length * 4
|
205
|
+
# end
|
206
|
+
|
207
|
+
# def file_indent
|
208
|
+
# (@dir_stack.length + 1) * 4
|
209
|
+
# end
|
210
|
+
|
211
|
+
# def contained_in?(parent, path)
|
212
|
+
# path.ascend { |p| break true if parent == p } || false
|
213
|
+
# end
|
214
|
+
|
215
|
+
# def contained_part(parent, path)
|
216
|
+
# raise ArgumentError if parent.nil?
|
217
|
+
# raise ArgumentError unless contained_in?(parent, path)
|
218
|
+
|
219
|
+
# path.relative_path_from(parent)
|
220
|
+
# end
|
221
|
+
|
222
|
+
# def start_directory(path)
|
223
|
+
# name = @dir_stack.empty? ? path : contained_part(@dir_stack.last, path)
|
224
|
+
# @dir_stack << path
|
225
|
+
# indent = dir_indent
|
226
|
+
# @stream += "{\n"
|
227
|
+
# @stream += "'type': 'directory',\n".indent(indent + 2)
|
228
|
+
# @stream += "'name': \"#{name}\",\n".indent(indent + 2)
|
229
|
+
# @stream += "'contents': [\n".indent(indent + 2)
|
230
|
+
# end
|
231
|
+
|
232
|
+
# def end_directory
|
233
|
+
# indent = dir_indent
|
234
|
+
# @stream += "]\n".indent(indent + 2)
|
235
|
+
# @stream += '}'
|
236
|
+
# @dir_stack.pop
|
237
|
+
# end
|
238
|
+
|
239
|
+
# def write_entry(v_path, r_path)
|
240
|
+
# indent = file_indent
|
241
|
+
# @stream += "{\n"
|
242
|
+
# @stream += "'type': 'file',\n".indent(indent + 2)
|
243
|
+
# @stream += "'name': \"#{v_path}\",\n".indent(indent + 2)
|
244
|
+
# @stream += "'external-contents': \"#{r_path}\"\n".indent(indent + 2)
|
245
|
+
# @stream += '}'.indent(file_indent)
|
246
|
+
# end
|
247
|
+
|
248
|
+
# def overlay_dir_sub_rpath(use, overlay_dir, rpath)
|
249
|
+
# if use
|
250
|
+
# raise ArgumentError, 'Overlay dir must be contained in RPath' unless rpath.fnmatch?("#{overlay_dir}*")
|
251
|
+
|
252
|
+
# rpath = rpath.relative_path_from(overlay_dir).expand_path
|
253
|
+
# end
|
254
|
+
# rpath
|
255
|
+
# end
|
256
|
+
|
257
|
+
# def write_yaml_header(use_external_names, case_sensitive, overlay_relative, _overlay_dir)
|
258
|
+
# @stream = "{\n 'version': 0,\n"
|
259
|
+
# @stream += " 'case-sensitive': '#{case_sensitive}',\n" unless case_sensitive.nil?
|
260
|
+
# @stream += " 'use-external-names': '#{use_external_names}',\n" unless use_external_names.nil?
|
261
|
+
# use_overlay_relative = !overlay_relative.nil?
|
262
|
+
# @stream += " 'overlay_relative': '#{overlay_relative}',\n" if use_overlay_relative
|
263
|
+
# @stream += " 'roots': [\n"
|
264
|
+
# use_overlay_relative
|
265
|
+
# end
|
266
|
+
|
267
|
+
# def write_yaml_footer(entries)
|
268
|
+
# unless entries.empty?
|
269
|
+
# until @dir_stack.empty?
|
270
|
+
# @stream += "\n"
|
271
|
+
# end_directory
|
272
|
+
# end
|
273
|
+
# @stream += "\n"
|
274
|
+
# end
|
275
|
+
# @stream += " ]\n}\n"
|
276
|
+
# @stream
|
277
|
+
# end
|
278
|
+
|
279
|
+
# def write_root_entry(entries, use_overlay_relative, overlay_dir)
|
280
|
+
# return true if entries.empty?
|
281
|
+
|
282
|
+
# f_entry = entries.first
|
283
|
+
# start_directory(f_entry.directory? ? f_entry.v_path : f_entry.v_path.dirname)
|
284
|
+
# current_dir_empty = f_entry.directory?
|
285
|
+
# use_overlay_relative_and_write_entry(use_overlay_relative, overlay_dir, current_dir_empty, f_entry)
|
286
|
+
# end
|
287
|
+
|
288
|
+
# def until_end_directory(dir)
|
289
|
+
# dir_popped_from_stack = false
|
290
|
+
# until @dir_stack.empty? || contained_in?(@dir_stack.last, dir)
|
291
|
+
# @stream += "\n"
|
292
|
+
# end_directory
|
293
|
+
# dir_popped_from_stack = true
|
294
|
+
# end
|
295
|
+
# dir_popped_from_stack
|
296
|
+
# end
|
297
|
+
|
298
|
+
# def use_overlay_relative_and_write_entry(use_overlay_relative, overlay_dir, current_dir_empty, entry)
|
299
|
+
# rpath = overlay_dir_sub_rpath(use_overlay_relative, overlay_dir, entry.r_path)
|
300
|
+
# unless entry.directory?
|
301
|
+
# write_entry(entry.v_path.basename, rpath)
|
302
|
+
# current_dir_empty = false
|
303
|
+
# end
|
304
|
+
# current_dir_empty
|
305
|
+
# end
|
306
|
+
|
307
|
+
# def start_directory_or_return(dir, current_dir_empty, use_overlay_relative, overlay_dir, entry)
|
308
|
+
# if dir == @dir_stack.last
|
309
|
+
# @stream += ",\n" unless current_dir_empty
|
310
|
+
# else
|
311
|
+
# @stream += ",\n" if until_end_directory(dir) || !current_dir_empty
|
312
|
+
# start_directory(dir)
|
313
|
+
# current_dir_empty = true
|
314
|
+
# end
|
315
|
+
# use_overlay_relative_and_write_entry(use_overlay_relative, overlay_dir, current_dir_empty, entry)
|
316
|
+
# end
|
317
|
+
# end
|
200
318
|
end
|
data/lib/yaml_vfs.rb
CHANGED
@@ -16,10 +16,10 @@ module VFS
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
+
require_relative 'yaml-vfs/yaml_vfs'
|
19
20
|
require_relative 'yaml-vfs/version'
|
20
21
|
require_relative 'yaml-vfs/utils'
|
22
|
+
require_relative 'yaml-vfs/file_collector'
|
21
23
|
|
22
|
-
|
23
|
-
autoload :FileCollector, 'yaml-vfs/file_collector'
|
24
24
|
autoload :Command, 'yaml-vfs/command'
|
25
25
|
end
|
metadata
CHANGED
@@ -1,43 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaml-vfs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cat1237
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.1'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3.0'
|
20
23
|
type: :development
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '2.1'
|
27
|
-
-
|
28
|
-
name: coveralls
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
30
|
+
- - "<"
|
39
31
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
32
|
+
version: '3.0'
|
41
33
|
- !ruby/object:Gem::Dependency
|
42
34
|
name: rake
|
43
35
|
requirement: !ruby/object:Gem::Requirement
|