runeblog 0.1.13 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36cbc21ab4f6f91bd7a64ce69394afee995e95450702aaedb39b0fc6ce2987f3
4
- data.tar.gz: 9973a1a4cba61e6578ef2255993ddf104023f56b3281a789098daf85f7ed7c10
3
+ metadata.gz: 9df4d097a916e87657334636794487cf42fa6b5aa3bb64c44416a1b9dcbc55d3
4
+ data.tar.gz: a937e9119d2281b681029467b7e1b370dec2061ae10de36037587e2d503f4895
5
5
  SHA512:
6
- metadata.gz: 222962f37116d5517ac776b6010d314a5d69e61f32858859b67b0f498d479e1dac339ac83289d0017613b1e8acdac541bd136922db163092a9dec5d03a0205dd
7
- data.tar.gz: ffa549c4d4227724ccefda65d969b3a526b24d9882c3d6b4f5a123b0b847b3ad03e3929741823ff9f50260cec94d461b8c81f9512a5d18975a5ac27a44bca435
6
+ metadata.gz: 4dd70a0555714d75210c586cbcdc97b7156e58b26e8538d76af63d5bdf51c34e597ef205dd831569665f05f82650baf0ce31d2932aef2e65d4e16c0b12e059c5
7
+ data.tar.gz: ede1d080d1b2992b9416587cd71da7692f3751ee82d1a5e33647dcf5bd1ff31cb904a463144ebbf273d359fbc496503e7ceee7fcd9cdf23e3ebd138054946dcc
@@ -141,10 +141,10 @@ module RuneBlog::REPL
141
141
  [meth, params]
142
142
  end
143
143
 
144
- def error(err)
145
- str = "\n Error: #{red(err)}"
146
- puts str # CHANGE_FOR_CURSES?
147
- puts err.backtrace[0] # CHANGE_FOR_CURSES?
144
+ def error(err) # Hmm, this is duplicated
145
+ str = "\n Error: #{err}"
146
+ puts str
147
+ puts err.backtrace.join("\n")
148
148
  end
149
149
 
150
150
  def ask(prompt, meth = :to_s)
@@ -78,6 +78,7 @@ module RuneBlog::REPL
78
78
  return [false, @out]
79
79
  end
80
80
  RubyText.spinner { @blog.view.publish }
81
+ vdir = @blog.view.dir
81
82
  dump("fix this later", "#{vdir}/last_published")
82
83
  puts " ...finished" unless testing
83
84
  output! "...finished.\n"
@@ -53,7 +53,6 @@ class RuneBlog
53
53
  rescue => err
54
54
  puts "Can't create blog: '#{dir}' - #{err}" # CHANGE_FOR_CURSES?
55
55
  puts err.backtrace.join("\n") # CHANGE_FOR_CURSES?
56
- sleep 5
57
56
  end
58
57
 
59
58
  def initialize # assumes existing blog
@@ -185,7 +184,6 @@ debug "cnp title = #{title.inspect}"
185
184
  rescue => err
186
185
  puts err
187
186
  puts err.backtrace.join("\n")
188
- sleep 5
189
187
  end
190
188
 
191
189
  def edit_initial_post(file, testing = false)
@@ -195,7 +193,6 @@ debug "cnp title = #{title.inspect}"
195
193
  nil
196
194
  rescue => err
197
195
  error(err)
198
- sleep 5
199
196
  end
200
197
 
201
198
  def posts
@@ -218,23 +215,14 @@ debug "cnp title = #{title.inspect}"
218
215
  end
219
216
 
220
217
  def process_post(file)
221
- debug "procpost 1: file = #{file.inspect}"
222
218
  raise ArgumentError unless file.is_a?(String)
223
219
  path = @root + "/src/#{file}"
224
220
  raise FileNotFound(path) unless File.exist?(path)
225
- livetext = Livetext.new(STDOUT) # (nil)
226
- @meta2 = livetext.process_file(path, binding)
227
- @meta2.num = file.to_i # dumb af
228
- check_meta(@meta2, "procpost1")
229
- raise LivetextError(path) if @meta2.nil?
230
-
231
- self.make_slug(@meta2) # RuneBlog#process_post
232
- # slug = file.sub(/.lt3$/, "")
233
- # @meta.slug = slug
234
- @meta2
221
+ live = Livetext.new(STDOUT) # (nil)
222
+ text = File.read(file)
223
+ live.process_text(path, binding)
235
224
  rescue => err
236
225
  error(err)
237
- sleep 5
238
226
  end
239
227
 
240
228
  def build_post_view(view)
@@ -254,7 +242,6 @@ debug "procpost 1: file = #{file.inspect}"
254
242
  generate_index(view)
255
243
  rescue => err
256
244
  error(err)
257
- sleep 5
258
245
  end
259
246
 
260
247
  def generate_index(view)
@@ -293,7 +280,6 @@ debug "procpost 1: file = #{file.inspect}"
293
280
  end
294
281
  rescue => err
295
282
  error(err)
296
- sleep 5
297
283
  exit
298
284
  end
299
285
 
@@ -325,13 +311,11 @@ debug "procpost 1: file = #{file.inspect}"
325
311
  def rebuild_post(file)
326
312
  debug "Called rebuild_post(#{file.inspect})"
327
313
  raise ArgumentError unless file.is_a?(String)
328
- @meta2 = process_post(file)
329
- check_meta(@meta2, "rebuild_post")
330
- debug "rebuild_post: @meta2 = #{@meta2.inspect}"
314
+ process_post(file)
315
+ # FIXME this is broken now
331
316
  @meta2.views.each {|view| build_post_view(view) }
332
317
  rescue => err
333
318
  error(err)
334
- sleep 5
335
319
  end
336
320
 
337
321
  def remove_post(num)
@@ -1,6 +1,6 @@
1
1
 
2
2
  class RuneBlog
3
- VERSION = "0.1.13"
3
+ VERSION = "0.1.14"
4
4
 
5
5
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
6
6
  end
@@ -174,7 +174,6 @@ class TestREPL < Minitest::Test
174
174
  end
175
175
 
176
176
  def test_013_slug_tests
177
- puts __method__
178
177
  hash = { "abcxyz" => "abcxyz", # 0-based
179
178
  "abc'xyz" => "abcxyz",
180
179
  'abc"xyz' => "abcxyz",
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.13
4
+ version: 0.1.14
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-12-24 00:00:00.000000000 Z
11
+ date: 2018-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext