runeblog 0.1.36 → 0.1.37
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/default.rb +7 -1
- data/lib/helpers-blog.rb +4 -1
- data/lib/repl.rb +2 -4
- data/lib/runeblog.rb +2 -7
- data/lib/runeblog_version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60d9e5ba52166249940872138964cfb36d14fe33cd3ceab91ddaa261847d90de
|
4
|
+
data.tar.gz: 47421cf7b74e916afdf41a90f11a58ce1a8cc80961c839889a2eb8c9e3b17f4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8530c46a67945e93ce24e23924c1abc84ba5452c70d7a65375423f8129e361062bf99d13040387205eff8861a73f7927765fef1454d25de5e38207ddb46062a3
|
7
|
+
data.tar.gz: 3b0b6c80b1e757c76fb95207d6021aee7d174ac9bd9f14e66ad0f1af342aa6cde9d60e4d925527164e1ca036c82d1958741a286d81d3b65283d35f408e7df334
|
data/lib/default.rb
CHANGED
@@ -56,7 +56,8 @@ BlogTrailer = <<-TEXT
|
|
56
56
|
TEXT
|
57
57
|
|
58
58
|
def RuneBlog.post_template(title: "No title", date: nil, view: "test_view",
|
59
|
-
teaser: "No teaser", body: "No body", tags: [], views: []
|
59
|
+
teaser: "No teaser", body: "No body", tags: [], views: [],
|
60
|
+
back: "no url", home: "no url")
|
60
61
|
viewlist = (views + [view.to_s]).join(" ")
|
61
62
|
taglist = tags.empty? ? "" : (".tags " + tags.join(" "))
|
62
63
|
<<-TEXT
|
@@ -71,7 +72,12 @@ def RuneBlog.post_template(title: "No title", date: nil, view: "test_view",
|
|
71
72
|
#{teaser}
|
72
73
|
.end
|
73
74
|
#{body}
|
75
|
+
<hr>
|
76
|
+
<a href='#{back}' style='text-decoration: none'>Back</a>
|
77
|
+
<br>
|
78
|
+
<a href='#{home}' style='text-decoration: none'>Home</a>
|
74
79
|
TEXT
|
80
|
+
|
75
81
|
end
|
76
82
|
|
77
83
|
def RuneBlog.teaser_template(title: "No title", date:, view: "test_view",
|
data/lib/helpers-blog.rb
CHANGED
@@ -69,7 +69,10 @@ module RuneBlog::Helpers
|
|
69
69
|
verify(@root => "#@root is nil",
|
70
70
|
Dir.exist?(@root) => "#@root doesn't exist",
|
71
71
|
Dir.exist?("#@root/src") => "#@root/src doesn't exist")
|
72
|
-
files = Dir
|
72
|
+
files = Dir["#@root/src/**"].grep /\d{4}.*.lt3$/
|
73
|
+
flagfile = "#@root/src/last_rebuild"
|
74
|
+
last = File.exist?(flagfile) ? File.mtime(flagfile) : (Time.now - 86_400)
|
75
|
+
files.reject! {|f| File.mtime(f) > last }
|
73
76
|
files.map! {|f| File.basename(f) }
|
74
77
|
files = files.sort.reverse
|
75
78
|
files
|
data/lib/repl.rb
CHANGED
@@ -133,10 +133,8 @@ module RuneBlog::REPL
|
|
133
133
|
check_empty(arg)
|
134
134
|
puts unless testing
|
135
135
|
files = @blog.find_src_slugs
|
136
|
-
files.each
|
137
|
-
|
138
|
-
end
|
139
|
-
File.write("last_rebuild", Time.now)
|
136
|
+
files.each {|file| @blog.rebuild_post(file) }
|
137
|
+
File.write("#{@blog.root}/src/last_rebuild", Time.now)
|
140
138
|
[true, @out]
|
141
139
|
end
|
142
140
|
|
data/lib/runeblog.rb
CHANGED
@@ -297,13 +297,8 @@ class RuneBlog
|
|
297
297
|
def rebuild_post(file)
|
298
298
|
debug "Called rebuild_post(#{file.inspect})"
|
299
299
|
raise ArgumentError unless file.is_a?(String)
|
300
|
-
process_post(file)
|
301
|
-
#
|
302
|
-
self.views.each do |view|
|
303
|
-
# p view.inspect
|
304
|
-
# getch
|
305
|
-
generate_index(view)
|
306
|
-
end
|
300
|
+
meta = process_post(file)
|
301
|
+
self.views.each {|view| generate_index(view) } # All views for now?
|
307
302
|
rescue => err
|
308
303
|
error(err)
|
309
304
|
getch
|
data/lib/runeblog_version.rb
CHANGED
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.1.
|
4
|
+
version: 0.1.37
|
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-02-
|
11
|
+
date: 2019-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|