runeblog 0.2.29 → 0.2.30
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/post.rb +4 -3
- data/lib/runeblog.rb +6 -3
- data/lib/runeblog_version.rb +1 -1
- data/test/make_blog.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '086ad42b02c7892a35f650ea63686128bc378ba0db488b68b5bcdc3ad30bfc85'
|
4
|
+
data.tar.gz: 807fc24717d0d85237aaef95d5309a133302d927e2c64e390913fc4614a49072
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd52ccaadf34f3b8def644bd8e44c626d4b9fe16475f75d10fbf596258821c3e216df62a2fc6deea69e9c1b77e6458c4ce992a601bb21cfa8c9750c46fe3f0d7
|
7
|
+
data.tar.gz: 3057408282565272df97cc797197324f00c116fffed9a76de3cd9a27a444d7dca0ed4ae9a5860ad6131fdf840e11b9d8e5f7fe2fe92249176d6a4b27a2ab40c7
|
data/empty_view.tgz
CHANGED
Binary file
|
data/lib/post.rb
CHANGED
@@ -63,8 +63,8 @@ class RuneBlog::Post
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def self.create(title:, teaser:, body:, pubdate: Time.now.strftime("%Y-%m-%d"),
|
66
|
-
|
67
|
-
log!(enter: __method__, args: [title, teaser, body, pubdate,
|
66
|
+
views:[])
|
67
|
+
log!(enter: __method__, args: [title, teaser, body, pubdate, views])
|
68
68
|
post = self.new
|
69
69
|
# NOTE: This is the ONLY place next_sequence is called!
|
70
70
|
num = post.meta.num = post.blog.next_sequence
|
@@ -72,7 +72,8 @@ class RuneBlog::Post
|
|
72
72
|
# new_metadata
|
73
73
|
post.meta.title, post.meta.teaser, post.meta.body, post.meta.pubdate =
|
74
74
|
title, teaser, body, pubdate
|
75
|
-
post.meta.views = [post.blog.view.to_s] +
|
75
|
+
post.meta.views = [post.blog.view.to_s] + views
|
76
|
+
# STDERR.puts "Post.create: views = #{views.inspect}"
|
76
77
|
post.meta.tags = []
|
77
78
|
post.blog.make_slug(post.meta) # adds to meta
|
78
79
|
|
data/lib/runeblog.rb
CHANGED
@@ -336,11 +336,12 @@ class RuneBlog
|
|
336
336
|
File.write(@vdir/:remote/file, text)
|
337
337
|
end
|
338
338
|
|
339
|
-
def create_new_post(title, testing = false, teaser: nil, body: nil,
|
340
|
-
log!(enter: __method__, args: [title, testing, teaser, body,
|
339
|
+
def create_new_post(title, testing = false, teaser: nil, body: nil, views: [])
|
340
|
+
log!(enter: __method__, args: [title, testing, teaser, body, views])
|
341
341
|
meta = nil
|
342
|
+
views = views + [self.view.to_s]
|
342
343
|
Dir.chdir(@root/:posts) do
|
343
|
-
post = Post.create(title: title, teaser: teaser, body: body,
|
344
|
+
post = Post.create(title: title, teaser: teaser, body: body, views: views)
|
344
345
|
post.edit unless testing
|
345
346
|
post.build
|
346
347
|
meta = post.meta
|
@@ -400,6 +401,8 @@ class RuneBlog
|
|
400
401
|
src: "blog.css.lt3", copy: vdir/"remote/etc/blog.css" # , debug: true
|
401
402
|
xlate cwd: vdir/"themes/standard",
|
402
403
|
src: "blog/generate.lt3", dst: vdir/:remote/"index.html"
|
404
|
+
copy("#{vdir}/assets/*", "#{vdir}/remote/assets/")
|
405
|
+
|
403
406
|
end
|
404
407
|
|
405
408
|
def _get_views(draft)
|
data/lib/runeblog_version.rb
CHANGED
data/test/make_blog.rb
CHANGED
@@ -29,7 +29,7 @@ end
|
|
29
29
|
|
30
30
|
def make_post(x, title, teaser, body, views=[])
|
31
31
|
debug " make_post #{bold(title)}"
|
32
|
-
x.create_new_post(title, true, teaser: teaser, body: body,
|
32
|
+
x.create_new_post(title, true, teaser: teaser, body: body, views: views)
|
33
33
|
views.each do |view|
|
34
34
|
debug
|
35
35
|
debug "** generate_index #{bold(view)}"
|