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 +4 -4
- data/bin/blog +2 -1
- data/lib/helpers-blog.rb +1 -0
- data/lib/post.rb +1 -1
- data/lib/repl.rb +2 -2
- data/lib/runeblog.rb +9 -3
- data/lib/runeblog_version.rb +1 -1
- metadata +1 -2
- data/lib/reek.html +0 -2463
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccc94cf9570d980b4c875a9f5fe14f460908ef012413870a6c4f5355c466dd9e
|
4
|
+
data.tar.gz: 9565db943428d23a11578c210a84ccfcd5d15e3f6385d29c1566e236c67f52ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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: "
|
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
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: @
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
data/lib/runeblog_version.rb
CHANGED
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.
|
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
|