runeblog 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/empty_view.tgz +0 -0
- data/lib/BAD.liveblog.rb +724 -0
- data/lib/KEEP.liveblog +646 -0
- data/lib/NEW-liveblog.rb +757 -0
- data/lib/OLD-liveblog.rb +661 -0
- data/lib/default.rb +1 -0
- data/lib/global.rb +5 -0
- data/lib/helpers-blog.rb +40 -14
- data/lib/liveblog.rb +7 -3
- data/lib/logging.rb +58 -0
- data/lib/post.rb +9 -0
- data/lib/publish.rb +7 -0
- data/lib/runeblog.rb +112 -43
- data/lib/runeblog_version.rb +1 -1
- data/lib/view.rb +8 -0
- data/runeblog.gemspec +1 -1
- data/test/make_blog.rb +8 -2
- data/themes/standard/blog/index.lt3 +3 -4
- data/themes/standard/blog/recent.lt3 +2 -0
- data/themes/standard/widgets/news/news.lt3 +1 -2
- data/themes/standard/widgets/pages/disclaim.html +6 -0
- data/themes/standard/widgets/pages/disclaim.lt3 +2 -3
- data/themes/standard/widgets/pages/faq.html +7 -0
- data/themes/standard/widgets/pages/faq.lt3 +1 -1
- data/themes/standard/widgets/pages/lifestory.html +7 -0
- data/themes/standard/widgets/pages/lifestory.lt3 +1 -1
- data/themes/standard/widgets/pages/like-dislike.html +7 -0
- data/themes/standard/widgets/pages/like-dislike.lt3 +1 -1
- data/themes/standard/widgets/pages/list.data +4 -4
- data/themes/standard/widgets/pages/pages.lt3 +2 -0
- metadata +14 -3
- data/themes/standard/widgets/pages/main.lt3 +0 -18
data/lib/runeblog_version.rb
CHANGED
data/lib/view.rb
CHANGED
@@ -9,6 +9,7 @@ class RuneBlog::View
|
|
9
9
|
include RuneBlog::Helpers
|
10
10
|
|
11
11
|
def initialize(name)
|
12
|
+
log!(enter: __method__, args: [name])
|
12
13
|
raise NoBlogAccessor if RuneBlog.blog.nil?
|
13
14
|
@blog = RuneBlog.blog
|
14
15
|
@name = name
|
@@ -21,22 +22,27 @@ class RuneBlog::View
|
|
21
22
|
end
|
22
23
|
|
23
24
|
def dir
|
25
|
+
# log!(enter: __method__)
|
24
26
|
@blog.root + "/views/#@name/"
|
25
27
|
end
|
26
28
|
|
27
29
|
def local_index
|
30
|
+
log!(enter: __method__)
|
28
31
|
dir + "/remote/index.html"
|
29
32
|
end
|
30
33
|
|
31
34
|
def index
|
35
|
+
log!(enter: __method__)
|
32
36
|
dir + "index.html"
|
33
37
|
end
|
34
38
|
|
35
39
|
def to_s
|
40
|
+
log!(enter: __method__)
|
36
41
|
@name
|
37
42
|
end
|
38
43
|
|
39
44
|
def publishable_files
|
45
|
+
log!(enter: __method__)
|
40
46
|
vdir = dir()
|
41
47
|
remote = local_index()
|
42
48
|
files = [remote]
|
@@ -53,10 +59,12 @@ class RuneBlog::View
|
|
53
59
|
end
|
54
60
|
|
55
61
|
def can_publish?
|
62
|
+
log!(enter: __method__)
|
56
63
|
@can_publish
|
57
64
|
end
|
58
65
|
|
59
66
|
def recent?(file)
|
67
|
+
log!(enter: __method__, args: [file])
|
60
68
|
File.mtime(file) > File.mtime("#{dir()}/last_published")
|
61
69
|
rescue
|
62
70
|
true
|
data/runeblog.gemspec
CHANGED
@@ -30,7 +30,7 @@ spec = Gem::Specification.new do |s|
|
|
30
30
|
test = Find.find("test").to_a
|
31
31
|
misc = %w[./README.lt3 ./README.md ./runeblog.gemspec]
|
32
32
|
|
33
|
-
s.files = main + misc + test
|
33
|
+
s.files = main + misc + test + ["empty_view.tgz"]
|
34
34
|
s.homepage = 'https://github.com/Hal9000/runeblog'
|
35
35
|
s.license = "Ruby"
|
36
36
|
end
|
data/test/make_blog.rb
CHANGED
@@ -22,6 +22,7 @@ def make_post(x, title, teaser, body, views=[])
|
|
22
22
|
# STDERR.puts "\n========= make_post '#{title}'"
|
23
23
|
print "."
|
24
24
|
num = x.create_new_post(title, true, teaser: teaser, body: body, other_views: views)
|
25
|
+
views.each {|view| x.generate_index(view) } # recent.html
|
25
26
|
end
|
26
27
|
|
27
28
|
def show_lines(text)
|
@@ -31,9 +32,9 @@ def show_lines(text)
|
|
31
32
|
str
|
32
33
|
end
|
33
34
|
|
35
|
+
# "Main"...
|
34
36
|
|
35
|
-
|
36
|
-
puts
|
37
|
+
puts Time.now
|
37
38
|
|
38
39
|
system("rm -rf .blogs")
|
39
40
|
RuneBlog.create_new_blog_repo(".blogs")
|
@@ -41,6 +42,10 @@ x = RuneBlog.new(".blogs")
|
|
41
42
|
|
42
43
|
x.create_view("around_austin") # FIXME remember view title!
|
43
44
|
|
45
|
+
# puts "=== about to call: x.generate_view('around_austin')"
|
46
|
+
x.generate_view("around_austin")
|
47
|
+
# puts "=== ...returned"
|
48
|
+
|
44
49
|
# Hack:
|
45
50
|
if File.exist?("publish")
|
46
51
|
system("cp publish .blogs/views/around_austin/publish")
|
@@ -127,4 +132,5 @@ BODY
|
|
127
132
|
|
128
133
|
x.change_view("around_austin")
|
129
134
|
|
135
|
+
puts Time.now
|
130
136
|
puts
|
@@ -1,4 +1,4 @@
|
|
1
|
-
faq.
|
2
|
-
like-dislike.
|
3
|
-
disclaim.
|
4
|
-
lifestory.
|
1
|
+
faq.html,Frequently Asked Questions
|
2
|
+
like-dislike.html,Likes and Dislikes
|
3
|
+
disclaim.html,Disclaimer
|
4
|
+
lifestory.html,My Life Story
|
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.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|
@@ -61,12 +61,18 @@ files:
|
|
61
61
|
- "./README.md"
|
62
62
|
- "./runeblog.gemspec"
|
63
63
|
- bin/blog
|
64
|
+
- empty_view.tgz
|
65
|
+
- lib/BAD.liveblog.rb
|
64
66
|
- lib/Javascript.stuff
|
67
|
+
- lib/KEEP.liveblog
|
68
|
+
- lib/NEW-liveblog.rb
|
69
|
+
- lib/OLD-liveblog.rb
|
65
70
|
- lib/default.rb
|
66
71
|
- lib/global.rb
|
67
72
|
- lib/helpers-blog.rb
|
68
73
|
- lib/helpers-repl.rb
|
69
74
|
- lib/liveblog.rb
|
75
|
+
- lib/logging.rb
|
70
76
|
- lib/post.rb
|
71
77
|
- lib/publish.rb
|
72
78
|
- lib/repl.rb
|
@@ -548,6 +554,7 @@ files:
|
|
548
554
|
- themes/standard/blog/head.lt3
|
549
555
|
- themes/standard/blog/index.lt3
|
550
556
|
- themes/standard/blog/post_entry.lt3
|
557
|
+
- themes/standard/blog/recent.lt3
|
551
558
|
- themes/standard/etc/blog.css.lt3
|
552
559
|
- themes/standard/etc/externals.lt3
|
553
560
|
- themes/standard/etc/favicon.ico
|
@@ -567,14 +574,18 @@ files:
|
|
567
574
|
- themes/standard/widgets/news/list.data
|
568
575
|
- themes/standard/widgets/news/news.lt3
|
569
576
|
- themes/standard/widgets/pages/README
|
577
|
+
- themes/standard/widgets/pages/disclaim.html
|
570
578
|
- themes/standard/widgets/pages/disclaim.lt3
|
579
|
+
- themes/standard/widgets/pages/faq.html
|
571
580
|
- themes/standard/widgets/pages/faq.lt3
|
572
581
|
- themes/standard/widgets/pages/generated.lt3
|
582
|
+
- themes/standard/widgets/pages/lifestory.html
|
573
583
|
- themes/standard/widgets/pages/lifestory.lt3
|
584
|
+
- themes/standard/widgets/pages/like-dislike.html
|
574
585
|
- themes/standard/widgets/pages/like-dislike.lt3
|
575
586
|
- themes/standard/widgets/pages/list.data
|
576
587
|
- themes/standard/widgets/pages/main.html
|
577
|
-
- themes/standard/widgets/pages/
|
588
|
+
- themes/standard/widgets/pages/pages.lt3
|
578
589
|
- themes/standard/widgets/tag-cloud/tag-cloud.lt3
|
579
590
|
homepage: https://github.com/Hal9000/runeblog
|
580
591
|
licenses:
|
@@ -1,18 +0,0 @@
|
|
1
|
-
.card_iframe
|
2
|
-
<h1>Pages</h1>
|
3
|
-
|
4
|
-
.def make_links
|
5
|
-
pairs = File.readlines("list.data").map {|line| line.chomp.split(" ", 2) }
|
6
|
-
File.open("generated.lt3", "w") do |f|
|
7
|
-
pairs.each do |file, title|
|
8
|
-
f.puts <<-EOS
|
9
|
-
<a href="#{file}">#{title}</a> <br>
|
10
|
-
EOS
|
11
|
-
end
|
12
|
-
end
|
13
|
-
.end
|
14
|
-
|
15
|
-
.make_links
|
16
|
-
|
17
|
-
.include generated.lt3
|
18
|
-
.end
|