runeblog 0.0.38 → 0.0.39
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/data/VERSION +1 -1
- data/lib/repl.rb +24 -7
- data/lib/runeblog.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13e5816d13e56bec56d8f38765ca1dca6ac5c885
|
4
|
+
data.tar.gz: bb6b1e35a640510c882bd0418bca4ce93913058f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ae70634081c13bb5314817a9db0d24539b1d4141519e2af3b7d5c41fdf1d8b4c068f75ae4e807a692a5275f2ba9ac3dbc18f7929e5c0ccb6f6852f5218554eb
|
7
|
+
data.tar.gz: 49213ee9ecf827f8b42c7e05db7cbdc5a79c5269a93d5b603182792a0b6c2d26c5bccc8165026758b78f38f30b10ff276160c59f23700fa3a457f02e00ef0ad3
|
data/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
RuneBlog v 0.0.
|
1
|
+
RuneBlog v 0.0.39 2017-05-17
|
data/lib/repl.rb
CHANGED
@@ -256,7 +256,7 @@ Remainder of post goes here.
|
|
256
256
|
|
257
257
|
### create_dir
|
258
258
|
|
259
|
-
def create_dir
|
259
|
+
def create_dir(dir)
|
260
260
|
cmd = "mkdir -p #{dir} >/dev/null 2>&1"
|
261
261
|
result = system(cmd)
|
262
262
|
raise "Can't create #{dir}" unless result
|
@@ -281,17 +281,33 @@ Remainder of post goes here.
|
|
281
281
|
### find_asset
|
282
282
|
|
283
283
|
def find_asset(asset, views)
|
284
|
-
|
285
|
-
|
286
|
-
|
284
|
+
views.each do |view|
|
285
|
+
vdir = @config.viewdir(view)
|
286
|
+
post_dir = "#{vdir}#{@meta.slug}/assets/"
|
287
|
+
path = post_dir + asset
|
288
|
+
STDERR.puts " Seeking #{path}"
|
289
|
+
return path if File.exist?(path)
|
290
|
+
end
|
291
|
+
views.each do |view|
|
292
|
+
dir = @config.viewdir(view) + "/assets/"
|
293
|
+
path = dir + asset
|
294
|
+
STDERR.puts " Seeking #{path}"
|
295
|
+
return path if File.exist?(path)
|
296
|
+
end
|
297
|
+
top = @root + "/assets/"
|
298
|
+
path = top + asset
|
299
|
+
STDERR.puts " Seeking #{path}"
|
300
|
+
return path if File.exist?(path)
|
301
|
+
|
302
|
+
return nil
|
287
303
|
end
|
288
304
|
|
289
305
|
### find_all_assets
|
290
306
|
|
291
307
|
def find_all_assets(list, views)
|
292
|
-
STDERR.puts "\n Called
|
308
|
+
STDERR.puts "\n Called find_all_assets with #{list.inspect}"
|
293
309
|
list ||= []
|
294
|
-
list.each {|asset| find_asset(asset, views) }
|
310
|
+
list.each {|asset| puts "#{asset} => #{find_asset(asset, views)}" }
|
295
311
|
end
|
296
312
|
|
297
313
|
### publish_post
|
@@ -305,10 +321,11 @@ Remainder of post goes here.
|
|
305
321
|
print "#{view} "
|
306
322
|
link_post_view(view)
|
307
323
|
end
|
308
|
-
assets =
|
324
|
+
assets = find_all_assets(@meta.assets, views)
|
309
325
|
puts
|
310
326
|
rescue => err
|
311
327
|
puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
|
328
|
+
puts err.backtrace
|
312
329
|
end
|
313
330
|
|
314
331
|
### rebuild_post
|
data/lib/runeblog.rb
CHANGED