runeblog 0.0.97 → 0.0.98
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/helpers-blog.rb +5 -5
- data/lib/helpers-repl.rb +13 -13
- data/lib/post.rb +2 -2
- data/lib/repl.rb +1 -1
- data/lib/runeblog.rb +3 -3
- data/lib/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 53c0e653db6e10ed2f71f8ac53e0a11db10016625a641cb89439e1e46a6a73b7
|
4
|
+
data.tar.gz: 15b4190adbc3fb7f5663a156ef6618028ff426bf728b3e9d6d828a002c8af1e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f04edc96b75a7366c10413309548ab0cd51cd3a5d789dbb0c75053f83c52fbaf65a624479d0300b7e083587293ac5c2a6ff27db7766f8b7217482cc562bbf127
|
7
|
+
data.tar.gz: 15edb112620cc240823395a33876ac353760ef8bae8fa865d9baa185ed9a894a1d80bf0f809b1b6c2604378505d1e5a2e39f477e38604154b73f538b3a7a00ee
|
data/lib/helpers-blog.rb
CHANGED
@@ -18,8 +18,8 @@ module RuneBlog::Helpers
|
|
18
18
|
end
|
19
19
|
return vals
|
20
20
|
rescue => err
|
21
|
-
puts "Something hit the fan: #{err}"
|
22
|
-
puts err.backtrace
|
21
|
+
puts "Something hit the fan: #{err}" # CHANGE_FOR_CURSES?
|
22
|
+
puts err.backtrace # CHANGE_FOR_CURSES?
|
23
23
|
exit
|
24
24
|
end
|
25
25
|
|
@@ -56,7 +56,7 @@ module RuneBlog::Helpers
|
|
56
56
|
dirs.reject! {|x| ! File.directory?("#@root/views/#{x}") }
|
57
57
|
dirs
|
58
58
|
rescue
|
59
|
-
STDERR.puts "Can't find dir '#{dir}'"
|
59
|
+
STDERR.puts "Can't find dir '#{dir}'" # CHANGE_FOR_CURSES?
|
60
60
|
exit
|
61
61
|
end
|
62
62
|
|
@@ -81,8 +81,8 @@ module RuneBlog::Helpers
|
|
81
81
|
|
82
82
|
def error(err) # Hmm, this is duplicated
|
83
83
|
str = "\n Error: #{err}"
|
84
|
-
puts str
|
85
|
-
puts err.backtrace
|
84
|
+
puts str # CHANGE_FOR_CURSES?
|
85
|
+
puts err.backtrace # CHANGE_FOR_CURSES?
|
86
86
|
end
|
87
87
|
|
88
88
|
def dump(obj, name)
|
data/lib/helpers-repl.rb
CHANGED
@@ -87,8 +87,8 @@ module RuneBlog::REPL
|
|
87
87
|
|
88
88
|
def error(err)
|
89
89
|
str = "\n Error: #{red(err)}"
|
90
|
-
puts str
|
91
|
-
puts err.backtrace[0]
|
90
|
+
puts str # CHANGE_FOR_CURSES?
|
91
|
+
puts err.backtrace[0] # CHANGE_FOR_CURSES?
|
92
92
|
end
|
93
93
|
|
94
94
|
def ask(prompt, meth = :to_s)
|
@@ -110,7 +110,7 @@ module RuneBlog::REPL
|
|
110
110
|
|
111
111
|
def flush_output(initial = "")
|
112
112
|
@out ||= ""
|
113
|
-
puts @out
|
113
|
+
puts @out # CHANGE_FOR_CURSES?
|
114
114
|
reset_output
|
115
115
|
end
|
116
116
|
|
@@ -159,23 +159,23 @@ module RuneBlog::REPL
|
|
159
159
|
end
|
160
160
|
|
161
161
|
def clear
|
162
|
-
puts "\e[H\e[2J" # clear screen
|
162
|
+
puts "\e[H\e[2J" # clear screen # CHANGE_FOR_CURSES?
|
163
163
|
end
|
164
164
|
|
165
165
|
def red(text)
|
166
|
-
"\e[31m#{text}\e[0m"
|
166
|
+
"\e[31m#{text}\e[0m" # CHANGE_FOR_CURSES?
|
167
167
|
end
|
168
168
|
|
169
169
|
def blue(text)
|
170
|
-
"\e[34m#{text}\e[0m"
|
170
|
+
"\e[34m#{text}\e[0m" # CHANGE_FOR_CURSES?
|
171
171
|
end
|
172
172
|
|
173
173
|
def bold(str)
|
174
|
-
"\e[1m#{str}\e[22m"
|
174
|
+
"\e[1m#{str}\e[22m" # CHANGE_FOR_CURSES?
|
175
175
|
end
|
176
176
|
|
177
177
|
def colored_slug(slug)
|
178
|
-
red(slug[0..3])+blue(slug[4..-1])
|
178
|
+
red(slug[0..3])+blue(slug[4..-1]) # CHANGE_FOR_CURSES?
|
179
179
|
end
|
180
180
|
|
181
181
|
def import(arg = nil)
|
@@ -214,20 +214,20 @@ module RuneBlog::REPL
|
|
214
214
|
def dumb_menu(hash)
|
215
215
|
# { string => :meth, ... }
|
216
216
|
max = hash.size
|
217
|
-
puts "\n Select from:"
|
217
|
+
puts "\n Select from:" # CHANGE_FOR_CURSES?
|
218
218
|
hash.each_pair.with_index do |pair, i|
|
219
219
|
string, meth = *pair
|
220
|
-
puts " #{red('%2d' % (i+1))} #{string}"
|
220
|
+
puts " #{red('%2d' % (i+1))} #{string}" # CHANGE_FOR_CURSES?
|
221
221
|
end
|
222
222
|
loop do
|
223
|
-
print red("> ")
|
223
|
+
print red("> ") # CHANGE_FOR_CURSES?
|
224
224
|
num = gets.to_i
|
225
225
|
if num.between?(1, max)
|
226
226
|
picked = hash.values[num-1]
|
227
|
-
puts "Calling number #{num} (#{picked})..."
|
227
|
+
puts "Calling number #{num} (#{picked})..." # CHANGE_FOR_CURSES?
|
228
228
|
break
|
229
229
|
else
|
230
|
-
puts "Huh? Must be 1 to #{max}"
|
230
|
+
puts "Huh? Must be 1 to #{max}" # CHANGE_FOR_CURSES?
|
231
231
|
end
|
232
232
|
end
|
233
233
|
end
|
data/lib/post.rb
CHANGED
data/lib/repl.rb
CHANGED
data/lib/runeblog.rb
CHANGED
@@ -51,8 +51,8 @@ class RuneBlog
|
|
51
51
|
blog = self.new
|
52
52
|
blog.create_view("test_view")
|
53
53
|
rescue => err
|
54
|
-
puts "Can't create blog: '#{dir}' - #{err}"
|
55
|
-
puts err.backtrace
|
54
|
+
puts "Can't create blog: '#{dir}' - #{err}" # CHANGE_FOR_CURSES?
|
55
|
+
puts err.backtrace # CHANGE_FOR_CURSES?
|
56
56
|
end
|
57
57
|
|
58
58
|
def initialize # assumes existing blog
|
@@ -172,7 +172,7 @@ class RuneBlog
|
|
172
172
|
post.build
|
173
173
|
post.num
|
174
174
|
rescue => err
|
175
|
-
puts err # error(err)
|
175
|
+
puts err # error(err) # CHANGE_FOR_CURSES?
|
176
176
|
end
|
177
177
|
|
178
178
|
def edit_initial_post(file, testing = false)
|
data/lib/version.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.98
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
76
|
rubyforge_project:
|
77
|
-
rubygems_version: 2.
|
77
|
+
rubygems_version: 2.7.7
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: A command-line blogging system
|