livetext 0.8.17 → 0.8.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/dsl/liveblog.rb +14 -15
  3. data/lib/livetext.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64880c48fdc91e208f904395035e3061a27dc772
4
- data.tar.gz: 3439183ca5dd6cc1a6b20db6652f941ccd024b05
3
+ metadata.gz: f1f5704323c6fccda88a23e4ed02cf444bd0daf3
4
+ data.tar.gz: 665f664a8c6942aeef3a19058f8489b7248915ae
5
5
  SHA512:
6
- metadata.gz: e5b369a8fcb35402b799ca49553a914e4f6fcba9a8caf08ab3adda5b57862d88f41826812a494f68d511dcd5c27d787599c8f791c355874003387183b9dfd41f
7
- data.tar.gz: 4a551d6691dc8467a854391d1f028aea7dab1056e5cea7f8f1e13c544d41839512321e6f1686cad48f009832adfd481a3b40e0c8fe70b4e47115a523600f5421
6
+ metadata.gz: 6c4ecd396c05dccc154faa358956710481c3264d301f4e9907c56f80fefe165d4699d19669a2b2dea59f79ec35a3ddf1edf649de2a2cd59c9bd1bcd2c278b4d8
7
+ data.tar.gz: 19573b24eb4e401138d4991a5ac7b14e462283c84974465db04fb3a32e59dbd20b6389605460ec8ee5cf63f36165fdd962c7a11003c8e5b343b762171f32f089
data/dsl/liveblog.rb CHANGED
@@ -4,7 +4,7 @@ require 'yaml'
4
4
  def init_liveblog
5
5
  @teaser = ""
6
6
  @body = ""
7
- @dest = ""
7
+ @body = ""
8
8
  @meta = ::OpenStruct.new
9
9
  end
10
10
 
@@ -14,14 +14,14 @@ end
14
14
 
15
15
  def _passthru(line)
16
16
  return if line.nil?
17
- @dest << "<p>" if line == "\n" and ! @_nopara
17
+ @body << "<p>" if line == "\n" and ! @_nopara
18
18
  line = _formatting(line)
19
- @dest << line + "\n"
19
+ @body << line + "\n"
20
20
  end
21
21
 
22
22
  def title
23
23
  @meta.title = @_data
24
- @dest << "<h1>#{@meta.title}</h1>"
24
+ @body << "<h1>#{@meta.title}</h1>"
25
25
  end
26
26
 
27
27
  def pubdate
@@ -47,34 +47,33 @@ def liveblog_version
47
47
  end
48
48
 
49
49
  def list
50
- @dest << "<ul>"
51
- _body {|line| @dest << "<li>#{line}</li>" }
52
- @dest << "</ul>"
50
+ @body << "<ul>"
51
+ _body {|line| @body << "<li>#{line}</li>" }
52
+ @body << "</ul>"
53
53
  end
54
54
 
55
55
  def list!
56
- @dest << "<ul>"
57
- lines = _body.each # {|line| @dest << "<li>#{line}</li>" }
56
+ @body << "<ul>"
57
+ lines = _body.each # {|line| @body << "<li>#{line}</li>" }
58
58
  loop do
59
59
  line = lines.next
60
60
  line = _formatting(line)
61
61
  if line[0] == " "
62
- @dest << line
62
+ @body << line
63
63
  else
64
- @dest << "<li>#{line}</li>"
64
+ @body << "<li>#{line}</li>"
65
65
  end
66
66
  end
67
- @dest << "</ul>"
67
+ @body << "</ul>"
68
68
  end
69
69
 
70
70
  def finalize
71
- # STDERR.puts "finalize: @meta = #{@meta.inspect}"
72
- # @meta.slug = make_slug(@meta.title)
73
- @meta.body = @dest
71
+ @meta.body = @body
74
72
  @meta
75
73
  end
76
74
 
77
75
  def teaser
78
76
  @meta.teaser = _body_text
77
+ @body << @meta.teaser + "\n"
79
78
  # FIXME
80
79
  end
data/lib/livetext.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Livetext
2
- VERSION = "0.8.17"
2
+ VERSION = "0.8.18"
3
3
  end
4
4
 
5
5
  require 'fileutils'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: livetext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.17
4
+ version: 0.8.18
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-10 00:00:00.000000000 Z
11
+ date: 2017-05-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A smart text processor extensible in Ruby
14
14
  email: rubyhacker@gmail.com