runeblog 0.1.67 → 0.1.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.lt3 +9 -6
- data/README.md +12 -6
- data/lib/helpers-blog.rb +7 -7
- data/lib/helpers-repl.rb +2 -2
- data/lib/liveblog.rb +1 -1
- data/lib/post.rb +4 -3
- data/lib/publish.rb +5 -4
- data/lib/repl.rb +6 -6
- data/lib/runeblog.rb +79 -23
- data/lib/runeblog_version.rb +1 -1
- data/lib/view.rb +2 -2
- data/runeblog.gemspec +1 -1
- data/test/general_test.rb +2 -2
- data/test/make_blog.rb +11 -5
- data/test/test +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb2582c242a2e3130d14dad7b484d96b7703258fbdd0d59212b993df72c3c55c
|
4
|
+
data.tar.gz: 0fcac65738ecc1dec58168ddf348292cc091d4408bf8a6590e2a76c984c4bef9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a519a50fb120971d3fb2115b43d1857657f63fc8617894d3589c810ecb0a9b6c9d838e91fb09d09724669d518672fef9b27964d57b34b368cdbd0cabe4a83cc3
|
7
|
+
data.tar.gz: 44be5e4a8c726655c634817f171fc73a759ac8bf0dc5aaf95d452a6df7efc9c9868635cd137ef66551182b76e5363f9bcd13388b2cacf0adbc514aef4479b0f5
|
data/README.lt3
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
.mixin markdown
|
2
|
+
<div float="left" align="left">
|
2
3
|
|
3
|
-
|
4
|
+
|
5
|
+
<img src="raido.png" width="196" height="275" align="left"></img>
|
6
|
+
</div>
|
4
7
|
|
5
8
|
.h1 runeblog
|
6
9
|
|
@@ -43,7 +46,7 @@ Each view can be hosted in a different location and/or a different server and do
|
|
43
46
|
Any post can be in more than one view
|
44
47
|
.end
|
45
48
|
|
46
|
-
.h2 The `blog environment
|
49
|
+
.h2 The `[blog] environment
|
47
50
|
|
48
51
|
There is a command-line tool called `blog which is a REPL (read-eval-print loop).
|
49
52
|
Note that this tool is a curses-based environment (mainly so it can display menus
|
@@ -80,10 +83,10 @@ The help message looks like this:
|
|
80
83
|
|
81
84
|
.h2 Getting started
|
82
85
|
|
83
|
-
But when you first run the REPL, it checks for an existing blog under
|
84
|
-
directory. If it doesn't find one, it asks whether you want to create
|
85
|
-
If you enter `y for yes, it creates a sort of "skeleton" with a
|
86
|
-
called
|
86
|
+
But when you first run the REPL, it checks for an existing blog repository under
|
87
|
+
the `[.blog] directory. If it doesn't find one, it asks whether you want to create
|
88
|
+
a new blog repo. If you enter `y for yes, it creates a sort of "skeleton" with a
|
89
|
+
single view called `[test_view].
|
87
90
|
|
88
91
|
The next thing you should do is to create at least one view of your own. Use the
|
89
92
|
`[new view] command for this.
|
data/README.md
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
-
<div float="left"
|
1
|
+
<div float="left" align="left">
|
2
|
+
<p>
|
3
|
+
|
4
|
+
<p>
|
5
|
+
|
6
|
+
<img src="raido.png" width="196" height="275" align="left"></img>
|
7
|
+
</div>
|
2
8
|
<p>
|
3
9
|
|
4
10
|
# runeblog
|
@@ -39,7 +45,7 @@ But the important points are these:
|
|
39
45
|
* Each view can have its own look and feel, and it can be linked/published separately from the others.
|
40
46
|
* Each view can be hosted in a different location and/or a different server and domain
|
41
47
|
* Any post can be in more than one view
|
42
|
-
## The `blog environment
|
48
|
+
## The `[blog] environment
|
43
49
|
There is a command-line tool called <font size=+1><tt>blog</tt></font> which is a REPL (read-eval-print loop).
|
44
50
|
Note that this tool is a curses-based environment (mainly so it can display menus
|
45
51
|
and such to the user).
|
@@ -75,10 +81,10 @@ The help message looks like this:
|
|
75
81
|
deploy Deploy (current view)
|
76
82
|
</pre>
|
77
83
|
## Getting started
|
78
|
-
But when you first run the REPL, it checks for an existing blog under
|
79
|
-
directory. If it doesn't find one, it asks whether you want to create
|
80
|
-
If you enter <font size=+1><tt>y</tt></font> for yes, it creates a sort of "skeleton" with a
|
81
|
-
called <font size=+1><tt>
|
84
|
+
But when you first run the REPL, it checks for an existing blog repository under
|
85
|
+
the <font size=+1><tt>.blog</tt></font> directory. If it doesn't find one, it asks whether you want to create
|
86
|
+
a new blog repo. If you enter <font size=+1><tt>y</tt></font> for yes, it creates a sort of "skeleton" with a
|
87
|
+
single view called <font size=+1><tt>test_view</tt></font>.
|
82
88
|
<p>
|
83
89
|
|
84
90
|
The next thing you should do is to create at least one view of your own. Use the
|
data/lib/helpers-blog.rb
CHANGED
@@ -50,9 +50,9 @@ module RuneBlog::Helpers
|
|
50
50
|
dirs.map {|name| RuneBlog::View.new(name) }
|
51
51
|
end
|
52
52
|
|
53
|
-
def new_dotfile(root: "./.
|
54
|
-
raise BlogAlreadyExists if Dir.exist?(".
|
55
|
-
Dir.mkdir(".
|
53
|
+
def new_dotfile(root: "./.blogs/data", current_view: "no_default", editor: "vi")
|
54
|
+
raise BlogAlreadyExists if Dir.exist?(".blogs")
|
55
|
+
Dir.mkdir(".blogs")
|
56
56
|
x = OpenStruct.new
|
57
57
|
x.root, x.current_view, x.editor = root, current_view, editor
|
58
58
|
write_config(x, RuneBlog::ConfigFile)
|
@@ -71,12 +71,12 @@ module RuneBlog::Helpers
|
|
71
71
|
dirs
|
72
72
|
end
|
73
73
|
|
74
|
-
def
|
74
|
+
def find_draft_slugs
|
75
75
|
verify(@root => "#@root is nil",
|
76
76
|
Dir.exist?(@root) => "#@root doesn't exist",
|
77
|
-
Dir.exist?("#@root/
|
78
|
-
files = Dir["#@root/
|
79
|
-
flagfile = "#@root/
|
77
|
+
Dir.exist?("#@root/drafts") => "#@root/drafts doesn't exist")
|
78
|
+
files = Dir["#@root/drafts/**"].grep /\d{4}.*.lt3$/
|
79
|
+
flagfile = "#@root/drafts/last_rebuild"
|
80
80
|
last = File.exist?(flagfile) ? File.mtime(flagfile) : (Time.now - 86_400)
|
81
81
|
files.reject! {|f| File.mtime(f) > last }
|
82
82
|
files.map! {|f| File.basename(f) }
|
data/lib/helpers-repl.rb
CHANGED
@@ -197,8 +197,8 @@ module RuneBlog::REPL
|
|
197
197
|
@title = grep.sub(/^.title /, "")
|
198
198
|
@slug = @blog.make_slug(@title) # import (not impl)
|
199
199
|
@fname = @slug + ".lt3"
|
200
|
-
result = system("cp #{name} #@root/
|
201
|
-
raise CantCopy(name, "#@root/
|
200
|
+
result = system("cp #{name} #@root/drafts/#@fname")
|
201
|
+
raise CantCopy(name, "#@root/drafts/#@fname") unless result
|
202
202
|
|
203
203
|
edit_initial_post(@fname)
|
204
204
|
process_post(@fname)
|
data/lib/liveblog.rb
CHANGED
data/lib/post.rb
CHANGED
@@ -103,7 +103,7 @@ class RuneBlog::Post
|
|
103
103
|
html = RuneBlog.post_template(title: @meta.title, date: @meta.pubdate,
|
104
104
|
view: @meta.view, teaser: @meta.teaser, body: @meta.body,
|
105
105
|
views: @meta.views, tags: @meta.tags, home: viewhome)
|
106
|
-
srcdir = "#{@blog.root}/
|
106
|
+
srcdir = "#{@blog.root}/drafts/"
|
107
107
|
verify(Dir.exist?(srcdir) => "#{srcdir} not found",
|
108
108
|
@meta.slug.is_a?(String) => "slug #{@meta.slug.inspect} is invalid")
|
109
109
|
fname = @meta.slug + ".lt3"
|
@@ -121,13 +121,14 @@ class RuneBlog::Post
|
|
121
121
|
end
|
122
122
|
|
123
123
|
def build
|
124
|
+
STDERR.puts "BUILD: #{RuneBlog.constants.sort.inspect}"
|
124
125
|
debug "=== build"
|
125
126
|
views = @meta.views
|
126
127
|
text = File.read(@draft)
|
127
|
-
livetext = Livetext.new(STDOUT)
|
128
|
+
livetext = Livetext::Livetext.new(STDOUT)
|
128
129
|
Livetext.parameters = [@blog, @meta.num, livetext]
|
129
130
|
meta = livetext.process_text(text)
|
130
|
-
raise LivetextError(@draft) if meta.nil?
|
131
|
+
raise RuneBlog::LivetextError(@draft) if meta.nil?
|
131
132
|
|
132
133
|
meta.num = File.basename(@draft).to_i
|
133
134
|
# FIXME what if title changes? slug should change?
|
data/lib/publish.rb
CHANGED
@@ -26,7 +26,7 @@ class RuneBlog::Publishing
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def url
|
29
|
-
vname = @blog.view.name.gsub(/_/, "\\_")
|
29
|
+
vname = @blog.view.name # .gsub(/_/, "\\_")
|
30
30
|
url = "#@proto://#@server/#@path/#{vname}"
|
31
31
|
end
|
32
32
|
|
@@ -40,8 +40,9 @@ debug "Failed!\n " if ! rc
|
|
40
40
|
def publish(files, assets=[])
|
41
41
|
dir = "#@docroot/#@path"
|
42
42
|
view_name = @blog.view.name
|
43
|
-
|
44
|
-
result = system!("ssh #@user@#@server -x mkdir -p #{
|
43
|
+
viewpath = "#{dir}/#{view_name}"
|
44
|
+
result = system!("ssh #@user@#@server -x mkdir -p #{viewpath}")
|
45
|
+
# result = system!("ssh #@user@#@server -x mkdir -p #{dir}/assets")
|
45
46
|
files.each do |file|
|
46
47
|
dest = "#@user@#@server:#{dir}/#{view_name}"
|
47
48
|
file.gsub!(/\/\//, "/") # weird... :-/
|
@@ -51,7 +52,7 @@ debug "Failed!\n " if ! rc
|
|
51
52
|
result = system!(cmd) || puts("\n Could not copy #{file} to #{dest}")
|
52
53
|
end
|
53
54
|
unless assets.empty?
|
54
|
-
cmd = "scp #{assets.join(' ')} #@user@#@server:#{
|
55
|
+
cmd = "scp #{assets.join(' ')} #@user@#@server:#{viewpath}/assets >/dev/null 2>/tmp/wtf2"
|
55
56
|
result = system!(cmd)
|
56
57
|
raise PublishError if !result
|
57
58
|
end
|
data/lib/repl.rb
CHANGED
@@ -39,8 +39,8 @@ module RuneBlog::REPL
|
|
39
39
|
check_empty(arg)
|
40
40
|
dir = @blog.view.dir
|
41
41
|
items = ["publish",
|
42
|
-
"
|
43
|
-
"
|
42
|
+
"themes/standard/blogview.lt3",
|
43
|
+
"themes/standard/post/index.lt3"]
|
44
44
|
num, fname = STDSCR.menu(title: "Edit file:", items: items)
|
45
45
|
edit_file("#{dir}/#{fname}")
|
46
46
|
end
|
@@ -128,7 +128,7 @@ module RuneBlog::REPL
|
|
128
128
|
reset_output
|
129
129
|
check_empty(arg)
|
130
130
|
puts unless testing
|
131
|
-
files = @blog.
|
131
|
+
files = @blog.find_draft_slugs
|
132
132
|
if files.empty?
|
133
133
|
msg = "No files changed"
|
134
134
|
output! msg
|
@@ -137,7 +137,7 @@ module RuneBlog::REPL
|
|
137
137
|
end
|
138
138
|
files.each {|file| @blog.rebuild_post(file) }
|
139
139
|
@blog.dirty_views.each {|view| generate_index(view) } # All views for now?
|
140
|
-
File.write("#{@blog.root}/
|
140
|
+
File.write("#{@blog.root}/drafts/last_rebuild", Time.now)
|
141
141
|
@out
|
142
142
|
end
|
143
143
|
|
@@ -227,7 +227,7 @@ module RuneBlog::REPL
|
|
227
227
|
id = get_integer(arg)
|
228
228
|
# Simplify this
|
229
229
|
tag = "#{'%04d' % id}"
|
230
|
-
files = Find.find(@blog.root+"/
|
230
|
+
files = Find.find(@blog.root+"/drafts").to_a
|
231
231
|
files = files.grep(/#{tag}-/)
|
232
232
|
files = files.map {|f| File.basename(f) }
|
233
233
|
if files.size > 1
|
@@ -244,7 +244,7 @@ module RuneBlog::REPL
|
|
244
244
|
end
|
245
245
|
|
246
246
|
file = files.first
|
247
|
-
result = edit_file("#{@blog.root}/
|
247
|
+
result = edit_file("#{@blog.root}/drafts/#{file}")
|
248
248
|
@blog.rebuild_post(file)
|
249
249
|
sleep 5
|
250
250
|
@out
|
data/lib/runeblog.rb
CHANGED
@@ -13,11 +13,12 @@ require 'post'
|
|
13
13
|
|
14
14
|
class RuneBlog
|
15
15
|
|
16
|
-
DotDir
|
16
|
+
DotDir = ".blogs"
|
17
17
|
ConfigFile = "#{DotDir}/config"
|
18
|
+
GemData = RuneBlog::Path + "/../data"
|
18
19
|
|
19
20
|
make_exception(:FileNotFound, "File $1 was not found")
|
20
|
-
make_exception(:
|
21
|
+
make_exception(:BlogRepoAlreadyExists, "Blog repo $1 already exists")
|
21
22
|
make_exception(:CantAssignView, "$1 is not a view")
|
22
23
|
make_exception(:ViewAlreadyExists, "View $1 already exists")
|
23
24
|
make_exception(:DirAlreadyExists, "Directory $1 already exists")
|
@@ -38,22 +39,53 @@ class RuneBlog
|
|
38
39
|
|
39
40
|
include Helpers
|
40
41
|
|
41
|
-
|
42
|
+
=begin
|
43
|
+
timestamps
|
44
|
+
filename (cf with real file)
|
45
|
+
|
46
|
+
themes
|
47
|
+
standard
|
48
|
+
head.lt3
|
49
|
+
meta.lt3
|
50
|
+
global.lt3
|
51
|
+
assets/
|
52
|
+
blog/
|
53
|
+
[kill assets?]
|
54
|
+
sidebar/
|
55
|
+
ad.lt3
|
56
|
+
calendar.lt3
|
57
|
+
news.lt3
|
58
|
+
tag_cloud.lt3
|
59
|
+
_postentry
|
60
|
+
generate.lt3
|
61
|
+
index.lt3
|
62
|
+
meta.lt3
|
63
|
+
navbar.lt3
|
64
|
+
post/
|
65
|
+
generate.lt3
|
66
|
+
head.lt3
|
67
|
+
index.lt3
|
68
|
+
=end
|
69
|
+
|
70
|
+
def self.create_new_blog_repo(repo_filename, dir = ".blogs/data")
|
42
71
|
raise ArgumentError unless dir.is_a?(String) && ! dir.empty?
|
43
72
|
root_dir = Dir.pwd + "/" + dir
|
44
|
-
raise
|
45
|
-
new_dotfile(root: root_dir, current_view:
|
73
|
+
raise BlogRepoAlreadyExists if Dir.exist?(root_dir)
|
74
|
+
new_dotfile(root: root_dir, current_view: repo_filename)
|
46
75
|
create_dir(dir)
|
76
|
+
# New code goes here!
|
47
77
|
Dir.chdir(dir) do
|
78
|
+
create_dir("drafts")
|
48
79
|
create_dir("views")
|
49
|
-
|
50
|
-
|
80
|
+
#??? create_dir("generated")
|
81
|
+
#? create_dir("assets")
|
51
82
|
new_sequence
|
52
83
|
end
|
53
84
|
blog = self.new
|
54
|
-
|
85
|
+
STDERR.puts :cp021
|
86
|
+
blog.create_view(repo_filename)
|
55
87
|
rescue => err
|
56
|
-
puts "Can't create blog: '#{dir}' - #{err}"
|
88
|
+
puts "Can't create blog repo: '#{dir}' - #{err}"
|
57
89
|
puts err.backtrace.join("\n")
|
58
90
|
end
|
59
91
|
|
@@ -122,32 +154,60 @@ class RuneBlog
|
|
122
154
|
end
|
123
155
|
|
124
156
|
def create_view(arg)
|
157
|
+
STDERR.puts :cp029
|
125
158
|
debug "=== create_view #{arg.inspect}"
|
159
|
+
STDERR.puts :cp029a
|
126
160
|
raise ArgumentError unless arg.is_a?(String) && ! arg.empty?
|
127
161
|
|
162
|
+
STDERR.puts :cp029b
|
128
163
|
names = self.views.map(&:to_s)
|
164
|
+
STDERR.puts :cp029c
|
129
165
|
raise ViewAlreadyExists(arg) if names.include?(arg)
|
130
166
|
|
167
|
+
STDERR.puts :cp029d
|
131
168
|
dir = "#@root/views/#{arg}/"
|
169
|
+
STDERR.puts :cp029e
|
132
170
|
raise DirAlreadyExists(dir) if Dir.exist?(dir)
|
171
|
+
STDERR.puts :cp029f
|
133
172
|
create_dir(dir)
|
173
|
+
STDERR.puts :cp029g
|
134
174
|
up = Dir.pwd
|
175
|
+
STDERR.puts :cp029h
|
135
176
|
Dir.chdir(dir)
|
177
|
+
STDERR.puts :cp029i
|
136
178
|
x = RuneBlog::Default
|
137
|
-
|
179
|
+
STDERR.puts :cp029j
|
180
|
+
create_dir('themes')
|
181
|
+
STDERR.puts :cp029k
|
182
|
+
create_dir("local")
|
183
|
+
STDERR.puts :cp029l
|
184
|
+
create_dir("generated")
|
185
|
+
STDERR.puts :cp029m
|
186
|
+
## new code...
|
187
|
+
Dir.chdir("themes") { system("tar zxvf #{GemData}/standard.tgz 2>/dev/null") }
|
188
|
+
STDERR.puts :cp029n
|
138
189
|
create_dir('assets')
|
190
|
+
STDERR.puts :cp029o
|
191
|
+
## add default stuff to assets?
|
139
192
|
pub = "user: xxx\nserver: xxx\ndocroot: xxx\npath: xxx\nproto: xxx\n"
|
140
193
|
dump(pub, "publish")
|
141
|
-
|
194
|
+
#? dump("", "tagpool")
|
142
195
|
view = RuneBlog::View.new(arg)
|
143
196
|
self.view = view
|
197
|
+
# Rewrite this! think: livetext themes/standard/generate.lt3
|
198
|
+
# (output goes elsewhere)
|
199
|
+
# This is just all wrong now?
|
200
|
+
STDERR.puts :cp029p
|
144
201
|
live = Livetext.new(nil)
|
202
|
+
STDERR.puts :cp029q
|
145
203
|
Livetext.parameters = [RuneBlog.blog, 0, live]
|
204
|
+
STDERR.puts :cp029r
|
146
205
|
meta = live.transform(x::BlogTemplate)
|
147
|
-
|
148
|
-
|
149
|
-
|
206
|
+
STDERR.puts :cp029s
|
207
|
+
dump(meta, "themes/standard/blogview.lt3")
|
208
|
+
STDERR.puts :cp029t
|
150
209
|
dump("Initial creation", "last_published")
|
210
|
+
STDERR.puts :cp029u
|
151
211
|
Dir.chdir(up)
|
152
212
|
@views << view
|
153
213
|
@views
|
@@ -192,7 +252,7 @@ class RuneBlog
|
|
192
252
|
|
193
253
|
def edit_initial_post(file, testing = false)
|
194
254
|
debug "=== edit_initial_post #{file.inspect} => #{sourcefile}"
|
195
|
-
sourcefile = "#@root/
|
255
|
+
sourcefile = "#@root/drafts/#{file}"
|
196
256
|
result = system("#@editor #{sourcefile} +8") unless testing
|
197
257
|
raise EditorProblem(sourcefile) unless result
|
198
258
|
nil
|
@@ -207,7 +267,7 @@ class RuneBlog
|
|
207
267
|
end
|
208
268
|
|
209
269
|
def drafts
|
210
|
-
dir = "#@root/
|
270
|
+
dir = "#@root/drafts"
|
211
271
|
drafts = Dir.entries(dir).grep(/^\d{4}.*/)
|
212
272
|
end
|
213
273
|
|
@@ -223,7 +283,7 @@ class RuneBlog
|
|
223
283
|
# puts " process_post #{file.inspect} pwd = #{Dir.pwd}"
|
224
284
|
debug "=== process_post #{file.inspect} pwd = #{Dir.pwd}"
|
225
285
|
raise ArgumentError unless file.is_a?(String)
|
226
|
-
path = @root + "/
|
286
|
+
path = @root + "/drafts/#{file}"
|
227
287
|
raise FileNotFound(path) unless File.exist?(path)
|
228
288
|
num = file.to_i # e.g. 0098-this-is-a-title
|
229
289
|
live = Livetext.new # (STDOUT) # (nil)
|
@@ -248,12 +308,8 @@ class RuneBlog
|
|
248
308
|
head = tail = nil
|
249
309
|
@blogview = nil
|
250
310
|
Dir.chdir(vdir) do
|
251
|
-
@blogview = File.read("
|
252
|
-
# head = File.read("templates/blog_header.html")
|
253
|
-
# tail = File.read("templates/blog_trailer.html")
|
311
|
+
@blogview = File.read("themes/standard/blogview.lt3")
|
254
312
|
end
|
255
|
-
# @bloghead = interpolate(head)
|
256
|
-
# @blogtail = interpolate(tail)
|
257
313
|
|
258
314
|
# Output view
|
259
315
|
posts.map! do |post|
|
@@ -352,7 +408,7 @@ class RuneBlog
|
|
352
408
|
def delete_draft(num)
|
353
409
|
raise ArgumentError unless num.is_a?(Integer)
|
354
410
|
tag = prefix(num)
|
355
|
-
system("rm -rf #@root/
|
411
|
+
system("rm -rf #@root/drafts/#{tag}-*")
|
356
412
|
end
|
357
413
|
|
358
414
|
def post_exists?(num)
|
data/lib/runeblog_version.rb
CHANGED
data/lib/view.rb
CHANGED
@@ -35,8 +35,8 @@ class RuneBlog::View
|
|
35
35
|
vdir = dir()
|
36
36
|
files = [index()]
|
37
37
|
others = Dir.entries(vdir).grep(/^\d\d\d\d/).map {|x| "#{vdir}/#{x}" }
|
38
|
-
assets = Dir.entries("#{
|
39
|
-
assets.map! {|x| "#{
|
38
|
+
assets = Dir.entries("#{vdir}/assets") - %w[. ..]
|
39
|
+
assets.map! {|x| "#{vdir}/assets/#{x}" }
|
40
40
|
assets.reject! {|x| File.directory?(x) }
|
41
41
|
# assets.reject! {|x| ! recent?(x) }
|
42
42
|
files = files + others
|
data/runeblog.gemspec
CHANGED
@@ -20,7 +20,7 @@ spec = Gem::Specification.new do |s|
|
|
20
20
|
s.authors = ["Hal Fulton"]
|
21
21
|
s.email = 'rubyhacker@gmail.com'
|
22
22
|
s.executables << "blog"
|
23
|
-
s.add_runtime_dependency 'livetext', '~> 0.8', '>= 0.8.
|
23
|
+
s.add_runtime_dependency 'livetext', '~> 0.8', '>= 0.8.84'
|
24
24
|
s.add_runtime_dependency 'rubytext', '~> 0.1', '>= 0.1.16'
|
25
25
|
|
26
26
|
# Files...
|
data/test/general_test.rb
CHANGED
@@ -32,7 +32,7 @@ class TestREPL < Minitest::Test
|
|
32
32
|
@blog = RuneBlog.new
|
33
33
|
end
|
34
34
|
|
35
|
-
# Note: "Bang" methods depend on the
|
35
|
+
# Note: "Bang" methods depend on the data subtree
|
36
36
|
|
37
37
|
def test_001_cmd_help
|
38
38
|
# puts __method__
|
@@ -286,7 +286,7 @@ end # conditional tests
|
|
286
286
|
def xtest_024_exception_livetext_error # FIXME Doesn't work! Change Livetext
|
287
287
|
# puts __method__
|
288
288
|
testfile = "testfile.lt3"
|
289
|
-
path = @blog.root + "/
|
289
|
+
path = @blog.root + "/drafts/" + testfile
|
290
290
|
cmd = "echo .no_such_command > #{path}"
|
291
291
|
system(cmd)
|
292
292
|
# system("ls -l #{path}")
|
data/test/make_blog.rb
CHANGED
@@ -29,18 +29,24 @@ def show_lines(text)
|
|
29
29
|
str
|
30
30
|
end
|
31
31
|
|
32
|
-
|
33
|
-
|
32
|
+
STDERR.puts :cp01
|
33
|
+
|
34
|
+
system("rm -rf .blogs")
|
35
|
+
STDERR.puts :cp02
|
36
|
+
RuneBlog.create_new_blog_repo('test_view', ".blogs/data")
|
37
|
+
STDERR.puts :cp03
|
34
38
|
x = RuneBlog.new
|
39
|
+
STDERR.puts :cp04
|
35
40
|
x.create_view("alpha_view")
|
41
|
+
STDERR.puts :cp05
|
36
42
|
|
37
43
|
# Hack:
|
38
44
|
if File.exist?("publish")
|
39
|
-
system("cp publish .
|
45
|
+
system("cp publish .blogs/data/views/alpha_view/publish")
|
40
46
|
end
|
41
47
|
# puts "inside make_blog: pwd = #{Dir.pwd}"
|
42
|
-
system("cp test/fakeimage.jpg .
|
43
|
-
system("cp test/fakeimage.jpg .
|
48
|
+
system("cp test/fakeimage.jpg .blogs/data/assets/")
|
49
|
+
system("cp test/fakeimage.jpg .blogs/data/views/alpha_view/assets/")
|
44
50
|
|
45
51
|
x.create_view("beta_view")
|
46
52
|
x.create_view("gamma_view")
|
data/test/test
CHANGED
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.
|
4
|
+
version: 0.1.68
|
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-05-
|
11
|
+
date: 2019-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '0.8'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.8.
|
22
|
+
version: 0.8.84
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '0.8'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.8.
|
32
|
+
version: 0.8.84
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rubytext
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|