review-retrovert 0.2.0 → 0.3.2
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/lib/review/retrovert/converter.rb +17 -10
- data/lib/review/retrovert/version.rb +1 -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: e40dda814381806e0927906afc41f12020c6208c5dae0dcddd8ac764bd641fd0
|
4
|
+
data.tar.gz: 43a77d50400f9241a8a3186bd1f243a9efc3a564151d2ed14779d80a30cc052a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94d70f7740602edc84f8e87fa0d9317481e61f179fa054a55267b8635f5b89f9fa2d506e6b99ed453c3babed9e1c1a20001cb6998fdb88c0eb749035520a03df
|
7
|
+
data.tar.gz: 6afa54492f1a57f1b5cf5d9066e173cd7113ce5e5d7a3544656c7464cf8393b8709468ebe50e558d488b18da198c71e924384b9cbd752631f174d4f1d5c28885
|
data/Gemfile.lock
CHANGED
@@ -9,6 +9,7 @@ module ReVIEW
|
|
9
9
|
|
10
10
|
def initialize
|
11
11
|
@basedir = nil
|
12
|
+
@srccontentsdir = nil
|
12
13
|
@outimagedir = nil
|
13
14
|
@logger = ReVIEW.logger
|
14
15
|
@configs = YamlConfig.new
|
@@ -37,10 +38,9 @@ module ReVIEW
|
|
37
38
|
end
|
38
39
|
|
39
40
|
def copy_contents(outdir)
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
FileUtils.mkdir_p(outpath)
|
41
|
+
path = File.join(@basedir, @srccontentsdir)
|
42
|
+
# outpath = File.join(outdir, srccontentsdir)
|
43
|
+
# FileUtils.mkdir_p(outpath)
|
44
44
|
# FileUtils.cp_r(Dir.glob(File.join(path, '*.re')), outpath)
|
45
45
|
FileUtils.cp_r(Dir.glob(File.join(path, '*.re')), outdir)
|
46
46
|
end
|
@@ -52,8 +52,13 @@ module ReVIEW
|
|
52
52
|
outpath = File.join(outdir, outimagedir)
|
53
53
|
FileUtils.mkdir_p(outpath)
|
54
54
|
image_ext = @config['image_ext']
|
55
|
+
srcroot = Pathname.new(srcpath)
|
55
56
|
image_ext.each { |ext|
|
56
|
-
|
57
|
+
Dir.glob(File.join(srcpath, "**/*.#{ext}")).each { |srcimg|
|
58
|
+
outimg = File.join(outpath, Pathname.new(srcimg).relative_path_from(srcroot))
|
59
|
+
FileUtils.makedirs(File.dirname(outimg))
|
60
|
+
FileUtils.cp(srcimg, outimg)
|
61
|
+
}
|
57
62
|
}
|
58
63
|
@configs.rewrite_yml('imagedir', outimagedir)
|
59
64
|
end
|
@@ -103,8 +108,9 @@ module ReVIEW
|
|
103
108
|
files = contentfiles.is_a?(String) ? contentfiles.split(/\R/) : contentfiles
|
104
109
|
files.each do |content|
|
105
110
|
contentpath = File.join(contentdir, content)
|
106
|
-
unless
|
107
|
-
srcpath = File.join(@basedir, content)
|
111
|
+
unless File.exist?(contentpath)
|
112
|
+
srcpath = File.join(File.join(@basedir, @srccontentsdir), content)
|
113
|
+
# info srcpath
|
108
114
|
if File.exist?(srcpath)
|
109
115
|
FileUtils.cp(srcpath, contentdir)
|
110
116
|
end
|
@@ -116,7 +122,6 @@ module ReVIEW
|
|
116
122
|
def update_contents(outdir, options)
|
117
123
|
yamlfile = @config['catalogfile']
|
118
124
|
abspath = File.absolute_path(outdir)
|
119
|
-
# contentdir = File.join(abspath, @config['contentdir'])
|
120
125
|
contentdir = abspath
|
121
126
|
info 'replace //sideimage to //image'
|
122
127
|
info 'replace starter inline command'
|
@@ -127,8 +132,9 @@ module ReVIEW
|
|
127
132
|
update_content_files(outdir, contentdir, catalog.appendix())
|
128
133
|
update_content_files(outdir, contentdir, catalog.postdef())
|
129
134
|
else
|
130
|
-
copy_contents(outdir)
|
131
|
-
|
135
|
+
# copy_contents(outdir)
|
136
|
+
contentsfiles = Pathname.glob(File.join(File.join(@basedir, @srccontentsdir), '*.re')).map(&:basename)
|
137
|
+
update_content_files(outdir, contentdir, contentsfiles)
|
132
138
|
end
|
133
139
|
end
|
134
140
|
|
@@ -143,6 +149,7 @@ module ReVIEW
|
|
143
149
|
@configs.open(yamlfile)
|
144
150
|
@config = @configs.config
|
145
151
|
@basedir = @configs.basedir
|
152
|
+
@srccontentsdir = @config['contentdir']
|
146
153
|
end
|
147
154
|
|
148
155
|
def create_initial_project(outdir, options)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: review-retrovert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- srz_zumix
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|