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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d1d227252c4cc504490c93a8bf9f853570819ab559c64b3ed92a9956b17b563
4
- data.tar.gz: 3804862c04007ad362fe4bac3c42c7f32f6f84434c1a6cdc7951cc23600b92ac
3
+ metadata.gz: '086ad42b02c7892a35f650ea63686128bc378ba0db488b68b5bcdc3ad30bfc85'
4
+ data.tar.gz: 807fc24717d0d85237aaef95d5309a133302d927e2c64e390913fc4614a49072
5
5
  SHA512:
6
- metadata.gz: 1b96020b5c0e293ac990ed9b41cd5d6c86d7dc5eedabda1ad9e66f456772762d45443eec0a6dc31f6d66af9a9de9319fcd280667b178815f530345c1dbee468f
7
- data.tar.gz: cbe00994a14bbf1c3b6a776003e5ca295549214669bb21d1b6448406b5387dabc75afb5a86d486beeb16b8ab1fbf847d5b2534d4e50d6644e98864ee46820c33
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
- other_views:[])
67
- log!(enter: __method__, args: [title, teaser, body, pubdate, other_views])
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] + other_views
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, other_views: [])
340
- log!(enter: __method__, args: [title, testing, teaser, body, other_views])
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, other_views: other_views)
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)
@@ -2,7 +2,7 @@
2
2
  if ! (Object.constants.include?(:RuneBlog) && RuneBlog.constants.include?(:Path))
3
3
 
4
4
  class RuneBlog
5
- VERSION = "0.2.29"
5
+ VERSION = "0.2.30"
6
6
 
7
7
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
8
8
  Path = File.dirname(path)
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, other_views: views)
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)}"
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.29
4
+ version: 0.2.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton