runeblog 0.0.38 → 0.0.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/data/VERSION +1 -1
  3. data/lib/repl.rb +24 -7
  4. data/lib/runeblog.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfdf2ff420c85dec55444c49adf90bcc575345b9
4
- data.tar.gz: b9db8a419d34258d9d0321227b1c9fade6bb1412
3
+ metadata.gz: 13e5816d13e56bec56d8f38765ca1dca6ac5c885
4
+ data.tar.gz: bb6b1e35a640510c882bd0418bca4ce93913058f
5
5
  SHA512:
6
- metadata.gz: fb48c9b8af0fcb48c2024b23daffef23172e1b9676f47fc3b9e5389d328e54d2197f6c296251edd6df9d4c9aa5b9e81757053ba907435ef4a8c026ed0d05a449
7
- data.tar.gz: 06789ea1030dfb724d4be0f86c035f6a0cb2123695b35dd8b252f57bfcc9b4621953473582b9eb0a06367d31064fce13202b1f0d13d35fcbc3bf0fb9d0f1a213
6
+ metadata.gz: 8ae70634081c13bb5314817a9db0d24539b1d4141519e2af3b7d5c41fdf1d8b4c068f75ae4e807a692a5275f2ba9ac3dbc18f7929e5c0ccb6f6852f5218554eb
7
+ data.tar.gz: 49213ee9ecf827f8b42c7e05db7cbdc5a79c5269a93d5b603182792a0b6c2d26c5bccc8165026758b78f38f30b10ff276160c59f23700fa3a457f02e00ef0ad3
data/data/VERSION CHANGED
@@ -1 +1 @@
1
- RuneBlog v 0.0.38 2017-05-17
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
- STDERR.puts " Search #{@meta.slug}"
285
- views.each {|view| STDERR.puts " Search #{view}" }
286
- STDERR.puts " Search #@root"
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 find_assets with #{list.inspect}"
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 = find_assets(@meta.assets, views)
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
@@ -3,7 +3,7 @@ require 'yaml'
3
3
  require 'livetext'
4
4
 
5
5
  class RuneBlog
6
- VERSION = "0.0.38"
6
+ VERSION = "0.0.39"
7
7
 
8
8
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
9
9
  DefaultData = Path + "/../data"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runeblog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.38
4
+ version: 0.0.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton