runeblog 0.1.48 → 0.1.49

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: b7003582f1c4947b7532fd8c1a5d0f24a612c82b7155d964e7aa6743e9a001a9
4
- data.tar.gz: cba71bbbdb8acdf60808cfdcbf2739492d7860af94ea1ffaa1b02637119d6ced
3
+ metadata.gz: ccc94cf9570d980b4c875a9f5fe14f460908ef012413870a6c4f5355c466dd9e
4
+ data.tar.gz: 9565db943428d23a11578c210a84ccfcd5d15e3f6385d29c1566e236c67f52ef
5
5
  SHA512:
6
- metadata.gz: 6dbb6585d71b3581540580f14ad08893e3515d884d7c57bc793aa7c98cd77a71b0bd9f6dec81950472f54c40ab65688a488770ffca34b0e139044165f4dd1dda
7
- data.tar.gz: dce427ba96b4c1b4f5b3e2fab1dc737f371926888c5db98d102032f7ab229d3d0bf646f8f506e0dea041c7b1d32c5bc4dcb1f0f5c2488c423034f36dc9d88091
6
+ metadata.gz: affb0a9a3bb0ee8587f59d4cfed56fbd743864815da3dbb76c085aba6223a64efa48b83ca698a83bd35ae9ad724c47ff77a55cd4ea88c4868cfc5f46807d81f3
7
+ data.tar.gz: fd6e4ce30b7ed46d17872cc105e98a7c518a92efd3d91d3906b5075794f1c803b6c8f934a1a1a0d130289b3f1cdd0de307c8ae24496f1cf12313f9f96a57a3d3
data/bin/blog CHANGED
@@ -35,7 +35,8 @@ home = ENV['HOME']
35
35
  @fg = @fg.downcase.to_sym
36
36
  @bg = @bg.downcase.to_sym
37
37
 
38
- RubyText.start(:_echo, :keypad, scroll: true, log: "blogcmd.txt", fg: @fg, bg: @bg)
38
+ RubyText.start(:_echo, :keypad, scroll: true, log: "binblog.txt",
39
+ fg: @fg, bg: @bg)
39
40
 
40
41
  if ! RuneBlog.exist?
41
42
  print "No blog found. Create new one? (y/n) "
data/lib/helpers-blog.rb CHANGED
@@ -81,6 +81,7 @@ module RuneBlog::Helpers
81
81
  files.reject! {|f| File.mtime(f) > last }
82
82
  files.map! {|f| File.basename(f) }
83
83
  files = files.sort.reverse
84
+ debug "fss: #{files.inspect}"
84
85
  files
85
86
  end
86
87
 
data/lib/post.rb CHANGED
@@ -98,7 +98,7 @@ class RuneBlog::Post
98
98
  def create_draft
99
99
  html = RuneBlog.post_template(title: @meta.title, date: @meta.pubdate,
100
100
  view: @meta.view, teaser: @meta.teaser, body: @meta.body,
101
- views: @blog.post_views, tags: @blog.post_tags)
101
+ views: @meta.views, tags: @meta.tags)
102
102
  srcdir = "#{@blog.root}/src/"
103
103
  verify(Dir.exist?(srcdir) => "#{srcdir} not found",
104
104
  @meta.slug.is_a?(String) => "slug #{@meta.slug.inspect} is invalid")
data/lib/repl.rb CHANGED
@@ -16,7 +16,6 @@ module RuneBlog::REPL
16
16
 
17
17
  def cmd_quit(arg, testing = false)
18
18
  check_empty(arg)
19
- # system("tput rmcup")
20
19
  RubyText.stop
21
20
  system("tput clear")
22
21
  exit
@@ -131,6 +130,7 @@ module RuneBlog::REPL
131
130
  puts unless testing
132
131
  files = @blog.find_src_slugs
133
132
  files.each {|file| @blog.rebuild_post(file) }
133
+ @blog.dirty_views.each {|view| generate_index(view) } # All views for now?
134
134
  File.write("#{@blog.root}/src/last_rebuild", Time.now)
135
135
  @out
136
136
  end
@@ -178,7 +178,7 @@ module RuneBlog::REPL
178
178
  check_empty(arg)
179
179
  title = ask("\nTitle: ")
180
180
  @blog.create_new_post(title)
181
- STDSCR.clear
181
+ # STDSCR.clear
182
182
  @out
183
183
  rescue => err
184
184
  puts err
data/lib/runeblog.rb CHANGED
@@ -34,7 +34,7 @@ class RuneBlog
34
34
  attr_reader :root, :views, :sequence, :editor
35
35
  attr_accessor :view # overridden
36
36
 
37
- attr_accessor :post_views, :post_tags
37
+ attr_accessor :post_views, :post_tags, :dirty_views
38
38
 
39
39
  include Helpers
40
40
 
@@ -215,6 +215,8 @@ class RuneBlog
215
215
  end
216
216
 
217
217
  def process_post(file)
218
+ sleep 3
219
+ puts " process_post #{file.inspect} pwd = #{Dir.pwd}"
218
220
  debug "=== process_post #{file.inspect} pwd = #{Dir.pwd}"
219
221
  raise ArgumentError unless file.is_a?(String)
220
222
  path = @root + "/src/#{file}"
@@ -230,7 +232,8 @@ class RuneBlog
230
232
  end
231
233
 
232
234
  def generate_index(view)
233
- debug "=== generate_index view = #{view.inspect}"
235
+ puts " generate_index view = #{view.to_s}"
236
+ debug "=== generate_index view = #{view.to_s}"
234
237
  raise ArgumentError unless view.is_a?(String) || view.is_a?(RuneBlog::View)
235
238
  # Gather all posts, create list
236
239
  vdir = "#@root/views/#{view}"
@@ -298,7 +301,10 @@ class RuneBlog
298
301
  debug "Called rebuild_post(#{file.inspect})"
299
302
  raise ArgumentError unless file.is_a?(String)
300
303
  meta = process_post(file)
301
- self.views.each {|view| generate_index(view) } # All views for now?
304
+ @views_dirty ||= []
305
+ @views_dirty << meta.views
306
+ @views_dirty.flatten!
307
+ @views_dirty.uniq!
302
308
  rescue => err
303
309
  error(err)
304
310
  getch
@@ -1,6 +1,6 @@
1
1
 
2
2
  class RuneBlog
3
- VERSION = "0.1.48"
3
+ VERSION = "0.1.49"
4
4
 
5
5
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
6
6
  end
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.1.48
4
+ version: 0.1.49
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
@@ -67,7 +67,6 @@ files:
67
67
  - lib/helpers-repl.rb
68
68
  - lib/post.rb
69
69
  - lib/publish.rb
70
- - lib/reek.html
71
70
  - lib/repl.rb
72
71
  - lib/runeblog.rb
73
72
  - lib/runeblog_version.rb