review-retrovert 0.2.2 → 0.3.0

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: 973904fbc954f18f83b83e0a1cd86919956cc8870537be8adaebf24171627f29
4
- data.tar.gz: b40c3c061df07976c422af9d872e6c2da60ff7f2ee3ebad0ea09a75ef491b6e0
3
+ metadata.gz: c8c6ad831811a8b43789da95255704662ae982c5f8650223a10ec0b56629452d
4
+ data.tar.gz: c6db66340797c549a48df210fc17e5685503f6bdf26eeb2636b37ee66f9ebc3c
5
5
  SHA512:
6
- metadata.gz: 1d1ac6401a6c5dda48030a466568f4487ef90f0fa98496117843b89b95697227788587da3c42cedae0ff6ab02f9f9b817c21ef4a26c2aa8ad372804f52cea7de
7
- data.tar.gz: e1c1319edf9624385c3187f1cd7b2f0066fc18ea29f1a75ded426b1392dcb53c2cd30accc4c10e6e3cbc1266acf0af3336ae2f43b831bd9bc1d258b8453583ce
6
+ metadata.gz: f98a2df0d44baf883acd3697195b6145a5ec53d8ba3159036e39f065b60c478a617859f71099d1e36d3a3c659506f45f67538e3f540ce9c5a6ea17654b578b01
7
+ data.tar.gz: 81fbcbda5a0bd596a8eee846db5f3fe77e694cfe88d43e956564f2a9412c77e486be2c4ed508943499a76b2f07eef9f20ef8bddbe691146a4cddcade50d63ae3
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- review-retrovert (0.2.2)
4
+ review-retrovert (0.3.0)
5
5
  review (>= 3.2.0, < 4.0)
6
6
  thor
7
7
 
@@ -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
- contentdir = @config['contentdir']
41
- path = File.join(@basedir, contentdir)
42
- outpath = File.join(outdir, contentdir)
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
@@ -104,7 +104,8 @@ module ReVIEW
104
104
  files.each do |content|
105
105
  contentpath = File.join(contentdir, content)
106
106
  unless File.exist?(contentpath)
107
- srcpath = File.join(File.join(@basedir, @config['contentdir']), content)
107
+ srcpath = File.join(File.join(@basedir, @srccontentsdir), content)
108
+ # info srcpath
108
109
  if File.exist?(srcpath)
109
110
  FileUtils.cp(srcpath, contentdir)
110
111
  end
@@ -116,7 +117,6 @@ module ReVIEW
116
117
  def update_contents(outdir, options)
117
118
  yamlfile = @config['catalogfile']
118
119
  abspath = File.absolute_path(outdir)
119
- # contentdir = File.join(abspath, @config['contentdir'])
120
120
  contentdir = abspath
121
121
  info 'replace //sideimage to //image'
122
122
  info 'replace starter inline command'
@@ -127,8 +127,10 @@ module ReVIEW
127
127
  update_content_files(outdir, contentdir, catalog.appendix())
128
128
  update_content_files(outdir, contentdir, catalog.postdef())
129
129
  else
130
- copy_contents(outdir)
131
- update_content_files(outdir, contentdir, Dir.glob(File.join(abspath, '*.re')))
130
+ # copy_contents(outdir)
131
+ Dir.chdir(File.join(@basedir, @srccontentsdir)) do
132
+ update_content_files(outdir, contentdir, Dir.glob('*.re'))
133
+ end
132
134
  end
133
135
  end
134
136
 
@@ -143,6 +145,7 @@ module ReVIEW
143
145
  @configs.open(yamlfile)
144
146
  @config = @configs.config
145
147
  @basedir = @configs.basedir
148
+ @srccontentsdir = @config['contentdir']
146
149
  end
147
150
 
148
151
  def create_initial_project(outdir, options)
@@ -1,5 +1,5 @@
1
1
  module ReVIEW
2
2
  module Retrovert
3
- VERSION = "0.2.2"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: review-retrovert
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - srz_zumix