runeblog 0.2.74 → 0.2.75
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/liveblog.rb +3 -3
- data/lib/runeblog.rb +7 -7
- data/lib/runeblog_version.rb +1 -1
- data/lib/xlate.rb +13 -9
- data/runeblog.gemspec +1 -1
- metadata +7 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30280ea49b4f2f3da058889fb7cabd535ee55a8a5321a12bd5fc105d5ed74302
|
4
|
+
data.tar.gz: e0310e08c54c0f0cae977596221b710dfb700f5416547cebe0f57a1375e95482
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83b9df4e7179689012a1eb1b24d2cb26a2295735099331badd450ea08d6ca2b2944cb5f2af0b4ccdf79d7d2bff75665852bc08997c7795c92c63762351242248
|
7
|
+
data.tar.gz: cd4d4717ab5bfe99532d7f3be3f1aa512725c4fbd6cfa1a24f1639a631c0d196237be04b15f7d72b1376feb214623fb22f9b13a97844de23918554f3833c267a
|
data/lib/liveblog.rb
CHANGED
@@ -5,7 +5,7 @@ require 'find'
|
|
5
5
|
|
6
6
|
require 'runeblog'
|
7
7
|
require 'pathmagic'
|
8
|
-
require 'xlate'
|
8
|
+
# require 'xlate'
|
9
9
|
|
10
10
|
|
11
11
|
def init_liveblog # FIXME - a lot of this logic sucks
|
@@ -636,7 +636,7 @@ def sidebar
|
|
636
636
|
File.open(wtag/"vars.lt3", "w") do |f|
|
637
637
|
f.puts ".set ad.image = #{img}"
|
638
638
|
end
|
639
|
-
|
639
|
+
preprocess cwd: wtag, src: tag, dst: tcard, force: true # , deps: depend # , debug: true
|
640
640
|
end
|
641
641
|
|
642
642
|
_include_file wtag/tcard
|
@@ -776,7 +776,7 @@ def _make_navbar(orient = :horiz)
|
|
776
776
|
output.puts %[<li class="nav-item active"> <a class="nav-link" href="index.html">#{cdata}<span class="sr-only">(current)</span></a> </li>]
|
777
777
|
else
|
778
778
|
dir = @blog.root/:views/@blog.view/"themes/standard/banner"
|
779
|
-
|
779
|
+
preprocess cwd: dir, src: basename, dst: vdir/"remote/banner"/basename+".html" # , debug: true
|
780
780
|
output.puts %[<li class="nav-item"> <a class="nav-link" #{href_main}>#{cdata}</a> </li>]
|
781
781
|
end
|
782
782
|
end
|
data/lib/runeblog.rb
CHANGED
@@ -147,7 +147,7 @@ class RuneBlog
|
|
147
147
|
dir = @root/:posts/nslug
|
148
148
|
create_dirs(dir)
|
149
149
|
# FIXME dependencies?
|
150
|
-
|
150
|
+
preprocess cwd: dir, src: @root/:drafts/sourcefile # , debug: true
|
151
151
|
_deploy_local(dir)
|
152
152
|
rescue => err
|
153
153
|
_tmp_error(err)
|
@@ -319,7 +319,7 @@ class RuneBlog
|
|
319
319
|
@theme = @view.dir/"themes/standard"
|
320
320
|
post_entry_name = @theme/"blog/post_entry.lt3"
|
321
321
|
depend = [post_entry_name]
|
322
|
-
|
322
|
+
preprocess src: post_entry_name, dst: "/tmp/post_entry.html" # , deps: depend # , debug: true
|
323
323
|
@_post_entry ||= File.read("/tmp/post_entry.html")
|
324
324
|
vp = post_lookup(id)
|
325
325
|
nslug, aslug, title, date, teaser_text =
|
@@ -435,9 +435,9 @@ class RuneBlog
|
|
435
435
|
@theme/"blog/head.lt3",
|
436
436
|
# @theme/"navbar/navbar.lt3",
|
437
437
|
@theme/"blog/index.lt3"] # FIXME what about assets?
|
438
|
-
|
438
|
+
preprocess cwd: vdir/"themes/standard/etc", deps: depend,
|
439
439
|
src: "blog.css.lt3", copy: vdir/"remote/etc/" # , debug: true
|
440
|
-
|
440
|
+
preprocess cwd: vdir/"themes/standard", deps: depend, force: true,
|
441
441
|
src: "blog/generate.lt3", dst: vdir/:remote/"index.html"
|
442
442
|
copy("#{vdir}/assets/*", "#{vdir}/remote/assets/")
|
443
443
|
copy_widget_html(view)
|
@@ -546,7 +546,7 @@ class RuneBlog
|
|
546
546
|
# Step 1...
|
547
547
|
create_dirs(pdraft)
|
548
548
|
# FIXME dependencies?
|
549
|
-
|
549
|
+
preprocess cwd: pdraft, src: draft, dst: "guts.html" # , debug: true
|
550
550
|
_post_metadata(draft, pdraft)
|
551
551
|
# Step 2...
|
552
552
|
vposts = @root/:views/view_name/:posts
|
@@ -556,10 +556,10 @@ class RuneBlog
|
|
556
556
|
copy(pdraft/"vars.lt3", @theme/:post)
|
557
557
|
# Step 4...
|
558
558
|
# FIXME dependencies?
|
559
|
-
|
559
|
+
preprocess cwd: @theme/:post, src: "generate.lt3", force: true,
|
560
560
|
dst: remote/ahtml, copy: @theme/:post # , debug: true
|
561
561
|
# FIXME dependencies?
|
562
|
-
|
562
|
+
preprocess cwd: @theme/:post, src: "permalink.lt3",
|
563
563
|
dst: remote/:permalink/ahtml # , debug: true
|
564
564
|
copy_widget_html(view_name)
|
565
565
|
rescue => err
|
data/lib/runeblog_version.rb
CHANGED
data/lib/xlate.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
+
require 'livetext'
|
1
2
|
|
3
|
+
LIVE = Livetext.new
|
2
4
|
LEXT = ".lt3"
|
3
5
|
|
4
6
|
def newer?(f1, f2)
|
@@ -16,26 +18,28 @@ def stale?(src, dst, deps, force = false)
|
|
16
18
|
return false
|
17
19
|
end
|
18
20
|
|
19
|
-
def
|
21
|
+
def preprocess(cwd: Dir.pwd, src:,
|
20
22
|
dst: (strip = true; File.basename(src).sub(/.lt3$/,"")),
|
21
23
|
deps: [], copy: nil, debug: false, force: false)
|
22
24
|
src += LEXT unless src.end_with?(LEXT)
|
23
25
|
dst += ".html" unless (dst.end_with?(".html")) # || strip)
|
24
|
-
|
26
|
+
sp = " "*12
|
25
27
|
Dir.chdir(cwd) do
|
26
28
|
if debug
|
27
|
-
puts "#{
|
28
|
-
puts "#{
|
29
|
-
puts "#{
|
30
|
-
puts "#{
|
29
|
+
puts "#{sp} -- preprocess
|
30
|
+
puts "#{sp} src: #{src}"
|
31
|
+
puts "#{sp} dst: #{dst}"
|
32
|
+
puts "#{sp} in: #{Dir.pwd}"
|
33
|
+
puts "#{sp} from: #{caller[0]}"
|
34
|
+
puts "#{sp} copy: #{copy}" if copy
|
31
35
|
end
|
32
36
|
stale = stale?(src, dst, deps, force)
|
33
37
|
if stale
|
34
|
-
|
35
|
-
|
38
|
+
out = LIVE.xform_file(src)
|
39
|
+
File.write(dst, out)
|
36
40
|
system!("cp #{dst} #{copy}") if copy
|
37
41
|
else
|
38
|
-
puts "#{
|
42
|
+
puts "#{sp} -- ^ Already up to date!" if debug
|
39
43
|
return
|
40
44
|
end
|
41
45
|
end
|
data/runeblog.gemspec
CHANGED
@@ -23,7 +23,7 @@ spec = Gem::Specification.new do |s|
|
|
23
23
|
s.add_runtime_dependency 'livetext', '~> 0.8', '>= 0.8.95'
|
24
24
|
s.add_runtime_dependency 'rubytext', '~> 0.1', '>= 0.1.16'
|
25
25
|
|
26
|
-
s.add_development_dependency 'minitest', '>= 5.10.0'
|
26
|
+
s.add_development_dependency 'minitest', '~> 5.10', '>= 5.10.0'
|
27
27
|
|
28
28
|
# Files...
|
29
29
|
main = Find.find("bin").to_a +
|
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.2.
|
4
|
+
version: 0.2.75
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
@@ -57,6 +57,9 @@ dependencies:
|
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: 5.10.0
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '5.10'
|
60
63
|
type: :development
|
61
64
|
prerelease: false
|
62
65
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -64,6 +67,9 @@ dependencies:
|
|
64
67
|
- - ">="
|
65
68
|
- !ruby/object:Gem::Version
|
66
69
|
version: 5.10.0
|
70
|
+
- - "~>"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '5.10'
|
67
73
|
description: A blog system based on Ruby and Livetext
|
68
74
|
email: rubyhacker@gmail.com
|
69
75
|
executables:
|