runeblog 0.1.28 → 0.1.29

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: e69a25448bd180d09f5f43db4d7b7358c0edd213733215c9b12adadb7a5cfd47
4
- data.tar.gz: 33a72baebb4483faac20840907a9dab54637a36f81f70d432795f90073a2a21e
3
+ metadata.gz: bf2ac993dd2684a92af0a2db233e9d7ed03144dae12839c1b7e21f5562309eda
4
+ data.tar.gz: 1b8454157280f73784b33837e635b19b74b887e230d11897b8bb54943eda8ed3
5
5
  SHA512:
6
- metadata.gz: b5a8f0b9bcfe12b3a4c05de80404e94e3ff5db566ea95dc507780ccb593fa6bcba60e33be1b80a0ba3677d9d5bf69d2ad3cdac3333ad59c5b2b04404f25b7094
7
- data.tar.gz: 667416db12ff237579bb81655464c3fa66e8784b72d0f791eac4e92650340e98530d68a55516e4ffb3d8e0cc95fd26c20780ac0a2be2f9b30512b2f7db7a9524
6
+ metadata.gz: 75f8c7ab5323645d06cd479d9fac68ba4937624ea3464a9d01ad3062ddf008506d48c2aa91ba4d8d7fe6f8eec8047131781cc89d2cda5d0d4a8c4ab1fc31de97
7
+ data.tar.gz: d30725e010bbc96f6a7f449405c06f0ad629007fe03a2844a468515f5e59492336bb993d39a2343a07bf8a7ee3c012003bef1ecaf94f0e1ecb977f907871a4ea
data/lib/post.rb CHANGED
@@ -119,7 +119,7 @@ class RuneBlog::Post
119
119
  debug "=== build"
120
120
  views = @meta.views
121
121
  text = File.read(@draft)
122
- Livetext.parameters = [@blog, @meta]
122
+ Livetext.parameters = [@blog, @meta.num]
123
123
  livetext = Livetext.new(STDOUT)
124
124
  meta = livetext.process_text(text)
125
125
  raise LivetextError(@draft) if meta.nil?
data/lib/repl.rb CHANGED
@@ -109,7 +109,10 @@ module RuneBlog::REPL
109
109
  check_empty(arg)
110
110
  puts unless testing
111
111
  files = @blog.find_src_slugs
112
- files.each {|file| @blog.rebuild_post(file) }
112
+ files.each do |file|
113
+ @blog.rebuild_post(file)
114
+ end
115
+ File.write("last_rebuild", Time.now)
113
116
  [true, @out]
114
117
  end
115
118
 
data/lib/runeblog.rb CHANGED
@@ -150,7 +150,7 @@ class RuneBlog
150
150
  end
151
151
 
152
152
  def view_files
153
- vdir = @blog.viewdir
153
+ vdir = self.viewdir
154
154
  files = ["#{vdir}/index.html"]
155
155
  files += posts.map {|x| "#{vdir}/#{x}" }
156
156
  # Huh?
@@ -212,18 +212,14 @@ class RuneBlog
212
212
  raise ArgumentError unless file.is_a?(String)
213
213
  path = @root + "/src/#{file}"
214
214
  raise FileNotFound(path) unless File.exist?(path)
215
- Livetext.parameters = [@blog, @meta]
215
+ num = file.to_i # e.g. 0098-this-is-a-title
216
+ Livetext.parameters = [self, num]
216
217
  live = Livetext.new(STDOUT) # (nil)
217
- text = File.read(file)
218
- live.process_text(path, binding)
219
- rescue => err
220
- error(err)
221
- end
222
-
223
- def build_post_view(view)
224
- generate_index(view)
218
+ text = File.read(path)
219
+ live.process_text(text)
225
220
  rescue => err
226
221
  error(err)
222
+ getch
227
223
  end
228
224
 
229
225
  def generate_index(view)
@@ -296,10 +292,15 @@ class RuneBlog
296
292
  debug "Called rebuild_post(#{file.inspect})"
297
293
  raise ArgumentError unless file.is_a?(String)
298
294
  process_post(file)
299
- # FIXME this is broken now
300
- @meta2.views.each {|view| build_post_view(view) }
295
+ # FIXME this is broken now
296
+ self.views.each do |view|
297
+ p view.inspect
298
+ getch
299
+ generate_index(view)
300
+ end
301
301
  rescue => err
302
302
  error(err)
303
+ getch
303
304
  end
304
305
 
305
306
  def remove_post(num)
@@ -1,6 +1,6 @@
1
1
 
2
2
  class RuneBlog
3
- VERSION = "0.1.28"
3
+ VERSION = "0.1.29"
4
4
 
5
5
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
6
6
  end
data/test/make_blog.rb CHANGED
@@ -8,6 +8,10 @@ require 'global'
8
8
  # require 'rubytext'
9
9
  require 'repl'
10
10
 
11
+ def getch
12
+ # sleep 5
13
+ end
14
+
11
15
  def debug(str)
12
16
  # STDERR.puts str
13
17
  end
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.28
4
+ version: 0.1.29
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-01-10 00:00:00.000000000 Z
11
+ date: 2019-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext