runeblog 0.0.41 → 0.0.42

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 +27 -7
  4. data/lib/runeblog.rb +2 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 068c100b2678bf2eaf04350f6c510bc20bfe0f6d
4
- data.tar.gz: b52b14af7e01c51cfc55cd33b054cebd45a9aeb1
3
+ metadata.gz: e8aae622425a4dd36621308f9e25b45993de18ab
4
+ data.tar.gz: c8a7fec0e40174b163f2bf103dbbf7ec7ab4e834
5
5
  SHA512:
6
- metadata.gz: b047f8e0c9a7aaf36d7e534accdd9e1c1b157910c6e94018c15ba79aef387a50207bd0c28c748edf91a502910efe9d1c0e3dc61bf2d23a0e35d60a933bf6b12d
7
- data.tar.gz: a404dadda112df68f3daabdd9844a7b5edc20afccb7e9373d79c2281aa1af7aa165396801dd9014377001c134cc9a56374cd632ecc81beb31ccf36816e0451e7
6
+ metadata.gz: c44b9c023d1bafbdf235bb15d203553e33db157ac0c7b0e493060ca8a2d11bc322747d92fe149681a19f51fb5c4145e8bb0ab343400c734488229d5f51ffedd0
7
+ data.tar.gz: d864da3195902099465f376e6c7fe6dd9c04f2d4c18861cde2ad5c8896b985204a377835efcac5bcebfa375235054e77169f1dc1c864f8bc555b4bdb19a04631
data/data/VERSION CHANGED
@@ -1 +1 @@
1
- RuneBlog v 0.0.41 2017-05-22
1
+ RuneBlog v 0.0.42 2017-05-26
data/lib/repl.rb CHANGED
@@ -68,6 +68,7 @@ module RuneBlog::REPL
68
68
  end
69
69
  rescue => err
70
70
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
71
+ puts err.backtrace
71
72
  end
72
73
 
73
74
  ### make_slug
@@ -92,6 +93,7 @@ module RuneBlog::REPL
92
93
  @config
93
94
  rescue => err
94
95
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
96
+ puts err.backtrace
95
97
  end
96
98
 
97
99
  ### create_empty_post
@@ -100,8 +102,6 @@ module RuneBlog::REPL
100
102
  @template = <<-EOS
101
103
  .mixin liveblog
102
104
 
103
- .liveblog_version
104
-
105
105
  .title #@title
106
106
  .pubdate #@date
107
107
  .views #@view
@@ -118,6 +118,7 @@ Remainder of post goes here.
118
118
  @fname
119
119
  rescue => err
120
120
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
121
+ puts err.backtrace
121
122
  end
122
123
 
123
124
  ### edit_initial_post
@@ -127,6 +128,7 @@ Remainder of post goes here.
127
128
  raise "Problem editing #@root/src/#{file}" unless result
128
129
  rescue => err
129
130
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
131
+ puts err.backtrace
130
132
  end
131
133
 
132
134
  ### open_remote
@@ -141,6 +143,7 @@ Remainder of post goes here.
141
143
  raise "Problem opening http://#{server}/#{spath}" unless result
142
144
  rescue => err
143
145
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
146
+ puts err.backtrace
144
147
  end
145
148
 
146
149
  ### open_local
@@ -150,6 +153,7 @@ Remainder of post goes here.
150
153
  raise "Problem opening #{@config.viewdir(@view)}/index.html" unless result
151
154
  rescue => err
152
155
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
156
+ puts err.backtrace
153
157
  end
154
158
 
155
159
  def deploy
@@ -183,6 +187,7 @@ Remainder of post goes here.
183
187
  puts red("finished.")
184
188
  rescue => err
185
189
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
190
+ puts err.backtrace
186
191
  end
187
192
 
188
193
  ### process_post
@@ -190,9 +195,8 @@ Remainder of post goes here.
190
195
  def process_post(file)
191
196
  @main ||= Livetext.new
192
197
  @main.main.output = File.new("/tmp/WHOA","w")
193
- # puts " Processing: #{Dir.pwd} :: #{file}"
194
198
  path = @root + "/src/#{file}"
195
- @meta = @main.process_file(path)
199
+ @meta = @main.process_file(path, binding)
196
200
  raise "process_file returned nil" if @meta.nil?
197
201
 
198
202
  @meta.slug = make_slug(@meta.title, @config.sequence)
@@ -255,6 +259,7 @@ Remainder of post goes here.
255
259
  end
256
260
  rescue => err
257
261
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
262
+ puts err.backtrace
258
263
  end
259
264
 
260
265
  ### create_dir
@@ -279,11 +284,14 @@ Remainder of post goes here.
279
284
  generate_index(view)
280
285
  rescue => err
281
286
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
287
+ puts err.backtrace
282
288
  end
283
289
 
284
290
  ### find_asset
285
291
 
286
- def find_asset(asset, views)
292
+ def find_asset(asset) # , views)
293
+ # STDERR.puts "repl find_asset: @meta = #{@meta.inspect}"
294
+ views = @meta.views
287
295
  views.each do |view|
288
296
  vdir = @config.viewdir(view)
289
297
  post_dir = "#{vdir}#{@meta.slug}/assets/"
@@ -308,7 +316,7 @@ Remainder of post goes here.
308
316
  ### find_all_assets
309
317
 
310
318
  def find_all_assets(list, views)
311
- STDERR.puts "\n Called find_all_assets with #{list.inspect}"
319
+ # STDERR.puts "\n Called find_all_assets with #{list.inspect}"
312
320
  list ||= []
313
321
  list.each {|asset| puts "#{asset} => #{find_asset(asset, views)}" }
314
322
  end
@@ -338,6 +346,7 @@ Remainder of post goes here.
338
346
  publish_post(@meta) # FIXME ??
339
347
  rescue => err
340
348
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
349
+ puts err.backtrace
341
350
  end
342
351
 
343
352
  ### rebuild
@@ -350,6 +359,7 @@ Remainder of post goes here.
350
359
  files.each {|file| rebuild_post(file) }
351
360
  rescue => err
352
361
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
362
+ puts err.backtrace
353
363
  end
354
364
 
355
365
  ### relink
@@ -358,6 +368,7 @@ Remainder of post goes here.
358
368
  @config.views.each {|view| generate_index(view) }
359
369
  rescue => err
360
370
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
371
+ puts err.backtrace
361
372
  end
362
373
 
363
374
  # ### publish?
@@ -375,6 +386,7 @@ Remainder of post goes here.
375
386
  @config.views.each {|v| puts " #{v}" }
376
387
  rescue => err
377
388
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
389
+ puts err.backtrace
378
390
  end
379
391
 
380
392
  ### change_view
@@ -385,7 +397,7 @@ Remainder of post goes here.
385
397
  else
386
398
  list = @config.views.grep /^#{arg}/
387
399
  if list.size == 1
388
- @view = list.first
400
+ @view = @config.view = list.first
389
401
  puts red("\n View: #{@view}") if arg != @view
390
402
  else
391
403
  puts "view #{arg.inspect} does not exist"
@@ -393,6 +405,7 @@ Remainder of post goes here.
393
405
  end
394
406
  rescue => err
395
407
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
408
+ puts err.backtrace
396
409
  end
397
410
 
398
411
  ### new_view
@@ -413,6 +426,7 @@ Remainder of post goes here.
413
426
  @config.views << arg
414
427
  rescue => err
415
428
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
429
+ puts err.backtrace
416
430
  end
417
431
 
418
432
  ### import
@@ -434,6 +448,7 @@ Remainder of post goes here.
434
448
  publish_post(@meta) # if publish?
435
449
  rescue => err
436
450
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
451
+ puts err.backtrace
437
452
  end
438
453
 
439
454
  ### new_post
@@ -451,6 +466,7 @@ Remainder of post goes here.
451
466
  publish_post(@meta) # if publish?
452
467
  rescue => err
453
468
  puts red("\n Error: (line #{__LINE__} of #{File.basename(__FILE__)}) ") + err.to_s
469
+ puts err.backtrace
454
470
  end
455
471
 
456
472
  ### remove_multiple_posts
@@ -491,6 +507,7 @@ Remainder of post goes here.
491
507
  end
492
508
  rescue => err
493
509
  puts err
510
+ puts err.backtrace
494
511
  puts
495
512
  end
496
513
 
@@ -514,6 +531,7 @@ Remainder of post goes here.
514
531
  rebuild_post(file)
515
532
  rescue => err
516
533
  puts err
534
+ puts err.backtrace
517
535
  puts
518
536
  end
519
537
 
@@ -532,6 +550,7 @@ Remainder of post goes here.
532
550
  end
533
551
  rescue
534
552
  puts "Oops? cwd = #{Dir.pwd} dir = #{dir}"
553
+ puts err.backtrace
535
554
  exit
536
555
  end
537
556
 
@@ -550,6 +569,7 @@ Remainder of post goes here.
550
569
  end
551
570
  rescue
552
571
  puts "Oops? cwd = #{Dir.pwd} dir = #{dir}"
572
+ puts err.backtrace
553
573
  exit
554
574
  end
555
575
 
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.41"
6
+ VERSION = "0.0.42"
7
7
 
8
8
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
9
9
  DefaultData = Path + "/../data"
@@ -14,6 +14,7 @@ end
14
14
 
15
15
  class RuneBlog::Config
16
16
  attr_reader :root, :views, :view, :sequence
17
+ attr_writer :view # FIXME
17
18
 
18
19
  def initialize(cfg_file = ".blog")
19
20
  # What views are there? Deployment, etc.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runeblog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.41
4
+ version: 0.0.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-22 00:00:00.000000000 Z
11
+ date: 2017-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext