runeblog 0.3.20 → 0.3.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/repl.rb +17 -9
- data/lib/runeblog_version.rb +1 -1
- data/runeblog.gemspec +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: f946568cd1dd92fc6c3f7bfbb605b02eedf12b8725103b617320b564241494d4
|
4
|
+
data.tar.gz: 120d8f2af493052ece7fc811f37d08bc175521a9838109cec2671053f6ec4532
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5c951593ebf282712c37fdeb315507233febabae2bb13abbf7d21e491a58bfb9b8a7f8f2d78dafb1877286a35bccacac55df32b84bc4bab3b12ea0eb3f64604
|
7
|
+
data.tar.gz: 0ae1ec7ecb6d1f6b6465a534965d0741963f1da3a76c687be6bafb672ee6a3bab801756f84aa116d284989bf943fa3e772df9a186eac8ce89893c2216f125818
|
data/lib/repl.rb
CHANGED
@@ -239,14 +239,19 @@ module RuneBlog::REPL
|
|
239
239
|
|
240
240
|
def cmd_change_view(arg = nil)
|
241
241
|
if arg.nil?
|
242
|
-
viewnames =
|
243
|
-
|
242
|
+
viewnames = {}
|
243
|
+
@blog.views.each do |v|
|
244
|
+
name = v.to_s
|
245
|
+
title = view2title(name)
|
246
|
+
string = "#{'%-25s' % title} #{name}"
|
247
|
+
viewnames[string] = name
|
248
|
+
end
|
249
|
+
n = viewnames.values.find_index(@blog.view.name)
|
244
250
|
name = @blog.view.name
|
245
|
-
# TODO: Add view description
|
246
251
|
k, name = STDSCR.menu(title: "Views", items: viewnames, curr: n)
|
247
252
|
return if name.nil?
|
248
253
|
@blog.view = name
|
249
|
-
|
254
|
+
# puts "\n ", fx(name, :bold), "\n"
|
250
255
|
return
|
251
256
|
else
|
252
257
|
if @blog.view?(arg)
|
@@ -330,16 +335,19 @@ module RuneBlog::REPL
|
|
330
335
|
_tmp_error(err)
|
331
336
|
end
|
332
337
|
|
338
|
+
def view2title(name) # FIXME: crufty as hell
|
339
|
+
lines = File.readlines(@blog.root/"views/#{name}/settings/view.txt")
|
340
|
+
lines.map!(&:chomp)
|
341
|
+
lines = lines.select {|x| x =~ /^title / && x !~ /VIEW_/ }
|
342
|
+
title = lines.first.split(" ", 2)[1]
|
343
|
+
end
|
344
|
+
|
333
345
|
def cmd_list_views
|
334
346
|
puts
|
335
347
|
@blog.views.each do |v|
|
336
348
|
v = v.to_s
|
349
|
+
title = view2title(v)
|
337
350
|
v = fx(v, :bold) if v == @blog.view.name
|
338
|
-
# FIXME: next 3 lines are crufty as hell
|
339
|
-
lines = File.readlines(@blog.root/"views/#{v}/settings/view.txt")
|
340
|
-
lines.map!(&:chomp)
|
341
|
-
lines = lines.select {|x| x =~ /^title / && x !~ /VIEW_/ }
|
342
|
-
title = lines.first.split(" ", 2)[1]
|
343
351
|
print " ", ('%15s' % v)
|
344
352
|
puts " ", fx(title, Black)
|
345
353
|
end
|
data/lib/runeblog_version.rb
CHANGED
data/runeblog.gemspec
CHANGED
@@ -21,7 +21,7 @@ spec = Gem::Specification.new do |s|
|
|
21
21
|
s.email = 'rubyhacker@gmail.com'
|
22
22
|
s.executables << "blog"
|
23
23
|
s.add_runtime_dependency 'livetext', '~> 0.9', '>= 0.9.04'
|
24
|
-
s.add_runtime_dependency 'rubytext', '~> 0.1', '>= 0.1.
|
24
|
+
s.add_runtime_dependency 'rubytext', '~> 0.1', '>= 0.1.23'
|
25
25
|
|
26
26
|
s.add_development_dependency 'minitest', '~> 5.10', '>= 5.10.0'
|
27
27
|
|
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.3.
|
4
|
+
version: 0.3.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '0.1'
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.1.
|
42
|
+
version: 0.1.23
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '0.1'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 0.1.
|
52
|
+
version: 0.1.23
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: minitest
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|