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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa66020851fb773a6764093fad7e20cd9dbfbe9ec851943a987a0d86181299ad
4
- data.tar.gz: ea4616bbd6c9888e4f8e3901b3a6b6b42f26d25758162f0e9db657204e4fe537
3
+ metadata.gz: 60d9e5ba52166249940872138964cfb36d14fe33cd3ceab91ddaa261847d90de
4
+ data.tar.gz: 47421cf7b74e916afdf41a90f11a58ce1a8cc80961c839889a2eb8c9e3b17f4d
5
5
  SHA512:
6
- metadata.gz: 01e7204506d8dba5fed0a34fc50e2b35818d17ed51d4161323ba784129ed51ecd7680f60842121ee2be8d3a7767210577d11f67c8a4e32d17ed43cf03abcab63
7
- data.tar.gz: bba39977de72401929cd24e83c8dc97919b6da2f290739c399bb116733a1e4b2fb3091ee871d8e1667fb2d7611b25ba04bc9c861f64866379b1ce28259e96a4b
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.entries("#@root/src/").grep /\d{4}.*.lt3$/
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 do |file|
137
- @blog.rebuild_post(file)
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
- # FIXME this is broken now
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
@@ -1,6 +1,6 @@
1
1
 
2
2
  class RuneBlog
3
- VERSION = "0.1.36"
3
+ VERSION = "0.1.37"
4
4
 
5
5
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
6
6
  end
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.36
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-04 00:00:00.000000000 Z
11
+ date: 2019-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext