runeblog 0.1.28 → 0.1.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/post.rb +1 -1
- data/lib/repl.rb +4 -1
- data/lib/runeblog.rb +13 -12
- data/lib/runeblog_version.rb +1 -1
- data/test/make_blog.rb +4 -0
- 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: bf2ac993dd2684a92af0a2db233e9d7ed03144dae12839c1b7e21f5562309eda
|
4
|
+
data.tar.gz: 1b8454157280f73784b33837e635b19b74b887e230d11897b8bb54943eda8ed3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75f8c7ab5323645d06cd479d9fac68ba4937624ea3464a9d01ad3062ddf008506d48c2aa91ba4d8d7fe6f8eec8047131781cc89d2cda5d0d4a8c4ab1fc31de97
|
7
|
+
data.tar.gz: d30725e010bbc96f6a7f449405c06f0ad629007fe03a2844a468515f5e59492336bb993d39a2343a07bf8a7ee3c012003bef1ecaf94f0e1ecb977f907871a4ea
|
data/lib/post.rb
CHANGED
@@ -119,7 +119,7 @@ class RuneBlog::Post
|
|
119
119
|
debug "=== build"
|
120
120
|
views = @meta.views
|
121
121
|
text = File.read(@draft)
|
122
|
-
Livetext.parameters = [@blog, @meta]
|
122
|
+
Livetext.parameters = [@blog, @meta.num]
|
123
123
|
livetext = Livetext.new(STDOUT)
|
124
124
|
meta = livetext.process_text(text)
|
125
125
|
raise LivetextError(@draft) if meta.nil?
|
data/lib/repl.rb
CHANGED
@@ -109,7 +109,10 @@ module RuneBlog::REPL
|
|
109
109
|
check_empty(arg)
|
110
110
|
puts unless testing
|
111
111
|
files = @blog.find_src_slugs
|
112
|
-
files.each
|
112
|
+
files.each do |file|
|
113
|
+
@blog.rebuild_post(file)
|
114
|
+
end
|
115
|
+
File.write("last_rebuild", Time.now)
|
113
116
|
[true, @out]
|
114
117
|
end
|
115
118
|
|
data/lib/runeblog.rb
CHANGED
@@ -150,7 +150,7 @@ class RuneBlog
|
|
150
150
|
end
|
151
151
|
|
152
152
|
def view_files
|
153
|
-
vdir =
|
153
|
+
vdir = self.viewdir
|
154
154
|
files = ["#{vdir}/index.html"]
|
155
155
|
files += posts.map {|x| "#{vdir}/#{x}" }
|
156
156
|
# Huh?
|
@@ -212,18 +212,14 @@ class RuneBlog
|
|
212
212
|
raise ArgumentError unless file.is_a?(String)
|
213
213
|
path = @root + "/src/#{file}"
|
214
214
|
raise FileNotFound(path) unless File.exist?(path)
|
215
|
-
|
215
|
+
num = file.to_i # e.g. 0098-this-is-a-title
|
216
|
+
Livetext.parameters = [self, num]
|
216
217
|
live = Livetext.new(STDOUT) # (nil)
|
217
|
-
text = File.read(
|
218
|
-
live.process_text(
|
219
|
-
rescue => err
|
220
|
-
error(err)
|
221
|
-
end
|
222
|
-
|
223
|
-
def build_post_view(view)
|
224
|
-
generate_index(view)
|
218
|
+
text = File.read(path)
|
219
|
+
live.process_text(text)
|
225
220
|
rescue => err
|
226
221
|
error(err)
|
222
|
+
getch
|
227
223
|
end
|
228
224
|
|
229
225
|
def generate_index(view)
|
@@ -296,10 +292,15 @@ class RuneBlog
|
|
296
292
|
debug "Called rebuild_post(#{file.inspect})"
|
297
293
|
raise ArgumentError unless file.is_a?(String)
|
298
294
|
process_post(file)
|
299
|
-
# FIXME this is broken now
|
300
|
-
|
295
|
+
# FIXME this is broken now
|
296
|
+
self.views.each do |view|
|
297
|
+
p view.inspect
|
298
|
+
getch
|
299
|
+
generate_index(view)
|
300
|
+
end
|
301
301
|
rescue => err
|
302
302
|
error(err)
|
303
|
+
getch
|
303
304
|
end
|
304
305
|
|
305
306
|
def remove_post(num)
|
data/lib/runeblog_version.rb
CHANGED
data/test/make_blog.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.29
|
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-01-
|
11
|
+
date: 2019-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|