runeblog 0.0.33 → 0.0.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/VERSION +1 -1
- data/lib/repl.rb +13 -22
- data/lib/runeblog.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1c3862fcc73f275a83aaf2ed74d2854369dbf06
|
4
|
+
data.tar.gz: cc69705accd20ad19063232ca568662349ccc7ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d63974c8b8559484495eb707ff94f9d59c3fe166c1fc246444542abed4639a029311575ce306d024f2ab61ece9f3dd53bbee3019ca9c5dcb07f378d3c736930
|
7
|
+
data.tar.gz: e9a021880a10d93ab957c549342929fb9be912395be844c223c4abdcf9c54da606305c533162d85a1efad5fd8af710ed6013ee7e8fd55514189ff7305f02792a
|
data/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
RuneBlog v 0.0.
|
1
|
+
RuneBlog v 0.0.34 2017-05-15
|
data/lib/repl.rb
CHANGED
@@ -80,7 +80,7 @@ module RuneBlog::REPL
|
|
80
80
|
# Crude - FIXME later
|
81
81
|
cfg_file = ".blog"
|
82
82
|
new_blog! unless File.exist?(cfg_file)
|
83
|
-
@config = RuneBlog::Config.new(
|
83
|
+
@config = RuneBlog::Config.new(cfg_file)
|
84
84
|
|
85
85
|
@view = @config.view # current view
|
86
86
|
@sequence = @config.sequence
|
@@ -120,10 +120,8 @@ module RuneBlog::REPL
|
|
120
120
|
|
121
121
|
def open_remote
|
122
122
|
@deploy ||= {}
|
123
|
-
unless @deploy[@view]
|
124
|
-
|
125
|
-
return
|
126
|
-
end
|
123
|
+
return puts red("\n Deploy first.") unless @deploy[@view]
|
124
|
+
|
127
125
|
lines = @deploy[@view]
|
128
126
|
user, server, sroot, spath = *lines
|
129
127
|
system("open 'http://#{server}/#{spath}'")
|
@@ -226,8 +224,9 @@ module RuneBlog::REPL
|
|
226
224
|
# Create dir using slug (index.html, metadata?)
|
227
225
|
vdir = @config.viewdir(view)
|
228
226
|
dir = vdir + @meta.slug + "/"
|
229
|
-
cmd = "mkdir -p #{dir}"
|
230
|
-
system(cmd)
|
227
|
+
cmd = "mkdir -p #{dir}"
|
228
|
+
system(cmd) unless File.exist?(dir) and File.directory?(dir)
|
229
|
+
|
231
230
|
File.write("#{dir}/metadata.yaml", @meta.to_yaml)
|
232
231
|
template = File.read(vdir + "custom/post_template.html")
|
233
232
|
post = interpolate(template)
|
@@ -372,10 +371,8 @@ module RuneBlog::REPL
|
|
372
371
|
tag = "#{'%04d' % id}-"
|
373
372
|
files = Find.find(@root).to_a
|
374
373
|
files = files.grep(/#{tag}/)
|
375
|
-
if files.empty?
|
376
|
-
|
377
|
-
return
|
378
|
-
end
|
374
|
+
return puts red("\n No such post found") if files.empty?
|
375
|
+
|
379
376
|
puts
|
380
377
|
files.each {|f| puts " #{f}" }
|
381
378
|
ques = files.size > 1 ? "\n Delete all these? " : "\n Delete? "
|
@@ -401,14 +398,8 @@ module RuneBlog::REPL
|
|
401
398
|
files = Find.find(@root+"/src").to_a
|
402
399
|
files = files.grep(/#{tag}/)
|
403
400
|
files = files.map {|f| File.basename(f) }
|
404
|
-
if files.size > 1
|
405
|
-
|
406
|
-
return
|
407
|
-
end
|
408
|
-
if files.empty?
|
409
|
-
puts red("\n No such post found")
|
410
|
-
return
|
411
|
-
end
|
401
|
+
return puts red("Multiple files: #{files}") if files.size > 1
|
402
|
+
return puts red("\n No such post found") if files.empty?
|
412
403
|
|
413
404
|
file = files.first
|
414
405
|
system("vi #@root/src/#{file}")
|
@@ -424,10 +415,10 @@ module RuneBlog::REPL
|
|
424
415
|
dir = @config.viewdir(@view)
|
425
416
|
Dir.chdir(dir) do
|
426
417
|
posts = Dir.entries(".").grep(/^0.*/)
|
427
|
-
puts
|
428
418
|
if posts.empty?
|
429
|
-
puts " No posts"
|
419
|
+
puts "\n " + @view + ":" + red(" No posts")
|
430
420
|
else
|
421
|
+
puts "\n " + @view + ":\n "
|
431
422
|
posts.each {|post| puts " #{colored_slug(post)}" }
|
432
423
|
end
|
433
424
|
end
|
@@ -444,7 +435,7 @@ module RuneBlog::REPL
|
|
444
435
|
posts = Dir.entries(".").grep(/^0.*.lt3/)
|
445
436
|
puts
|
446
437
|
if posts.empty?
|
447
|
-
puts " No posts"
|
438
|
+
puts red(" No posts")
|
448
439
|
else
|
449
440
|
posts.each {|post| puts " #{colored_slug(post.sub(/.lt3$/, ""))}" }
|
450
441
|
end
|
data/lib/runeblog.rb
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.0.
|
4
|
+
version: 0.0.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|