livetext 0.8.39 → 0.8.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/dsl/liveblog.rb +14 -8
  3. data/lib/livetext.rb +3 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9a957d26d1bc8d47573d9bcc0153578c982ff92
4
- data.tar.gz: 743d0a747e38ef7fa03837128a0baa02898a1e22
3
+ metadata.gz: 2b59edfa7e3a7f8234168f33682526d016d80722
4
+ data.tar.gz: 14a0a67ee59bbcc55e59fd042f78f65bfad211a5
5
5
  SHA512:
6
- metadata.gz: 187058ad5762dc26aae88997ca19387b3e1cd4ac1596eb2dc163bf261ebda33fc7067212d964d563b0d7029dc8a8da266fb5982c18899234a46e948091ca5e47
7
- data.tar.gz: cc9c078bd1e89fc6cb3c55d721ceb7a6f1ac7e8dba93e83bcb7abec540ed14ff2e99e8c101af8f01c4cfb68a3184af8e9b02d4cefa97b51ba3d0cb75b4b44ee8
6
+ metadata.gz: be1e7f1b53e6dd291864ac3f51ccae36d8d57f1505fd8da5b955cd5cdf4534994f63b2f9f87672ba90f86f699ed535c8a4504a8d586bb7ddb88d2d11b2bdcf81
7
+ data.tar.gz: 353193ecee4ab8c2748cdbeb556a0cc28066e1757c5e80c8cbf35f359993dcad1ce9d13bae237038f66ee89ecbdd489db77c470c325339a532b2a0ddd3998f07
data/dsl/liveblog.rb CHANGED
@@ -74,12 +74,12 @@ def init_liveblog # FIXME - a lot of this logic sucks
74
74
  @body = ""
75
75
  @meta = ::OpenStruct.new
76
76
 
77
- @deploy ||= {}
77
+ @publish ||= {}
78
78
  @config.views.each do |view|
79
- deployment = @config.viewdir(view) + "deploy"
80
- raise "File '#{deployment}' not found" unless File.exist?(deployment)
81
- lines = File.readlines(deployment).map {|x| x.chomp }
82
- @deploy[view] = lines
79
+ publish = @config.viewdir(view) + "publish"
80
+ raise "File '#{publish}' not found" unless File.exist?(publish)
81
+ lines = File.readlines(publish).map {|x| x.chomp }
82
+ @publish[view] = lines
83
83
  end
84
84
  end
85
85
 
@@ -105,12 +105,18 @@ def pubdate
105
105
  junk, y, m, d = match.to_a
106
106
  y, m, d = y.to_i, m.to_i, d.to_i
107
107
  @meta.date = ::Date.new(y, m, d)
108
- @meta.pubdate = "%04d%02d%02d" % [y, m, d]
108
+ @meta.pubdate = "%04d-%02d-%02d" % [y, m, d]
109
109
  end
110
110
 
111
- def categories
111
+ def categories # now: tags
112
112
  _debug "args = #{_args}"
113
- @meta.categories = _args
113
+ @meta.categories = _args # phase out
114
+ @meta.tags = _args
115
+ end
116
+
117
+ def tags
118
+ _debug "args = #{_args}"
119
+ @meta.tags = _args
114
120
  end
115
121
 
116
122
  def views
data/lib/livetext.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Livetext
2
- VERSION = "0.8.39"
2
+ VERSION = "0.8.40"
3
3
  end
4
4
 
5
5
  $Livetext = Livetext
@@ -184,7 +184,8 @@ class Livetext
184
184
  @main._error! "Name '#{name}' is unknown"
185
185
  return
186
186
  end
187
- @main.send(name)
187
+ result = @main.send(name)
188
+ result
188
189
  rescue => err
189
190
  @main._error!(err)
190
191
  end
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.39
4
+ version: 0.8.40
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-10-04 00:00:00.000000000 Z
11
+ date: 2018-10-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A smart text processor extensible in Ruby
14
14
  email: rubyhacker@gmail.com