livetext 0.8.14 → 0.8.15
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.
- checksums.yaml +4 -4
- data/dsl/liveblog.rb +1 -1
- data/lib/livetext.rb +21 -6
- data/lib/standard.rb +0 -2
- data/lib/userapi.rb +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e44ca44839bea451faf98e8a23e03d66fb2dc46
|
4
|
+
data.tar.gz: da201962e5e112258585bbbf88b44c4e07411d56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a79501d765ac7999e359faef6126ed90b2b1e2753c10a84c2e313da012f66bf9fdcec993662a1b7322b845f2e5dc32b2bc9ac9d96529c79e505dfd5affc51573
|
7
|
+
data.tar.gz: fe0b06836e1c99984670c60cbbb52094d8cb484f52a141a36642069f8dbd15fce4d8ae41dfd273c623461e01d9619d103e346cf89dab04f49f0bcdbedd718116
|
data/dsl/liveblog.rb
CHANGED
data/lib/livetext.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class Livetext
|
2
|
-
VERSION = "0.8.
|
2
|
+
VERSION = "0.8.15"
|
3
3
|
end
|
4
4
|
|
5
5
|
require 'fileutils'
|
@@ -20,6 +20,8 @@ TTY = ::File.open("/dev/tty", "w")
|
|
20
20
|
class Livetext
|
21
21
|
Vars = {}
|
22
22
|
|
23
|
+
attr_reader :main
|
24
|
+
|
23
25
|
class Processor
|
24
26
|
include Livetext::Standard
|
25
27
|
include Livetext::UserAPI
|
@@ -45,6 +47,10 @@ class Livetext
|
|
45
47
|
@sources = []
|
46
48
|
end
|
47
49
|
|
50
|
+
def output=(io)
|
51
|
+
@output = io
|
52
|
+
end
|
53
|
+
|
48
54
|
def _error!(err, abort=true, trace=false)
|
49
55
|
where = @sources.last || @save_location
|
50
56
|
STDERR.puts "Error: #{err} (at #{where[1]} line #{where[2]})"
|
@@ -94,8 +100,6 @@ class Livetext
|
|
94
100
|
@main = Processor.new(self, output)
|
95
101
|
end
|
96
102
|
|
97
|
-
attr_reader :main
|
98
|
-
|
99
103
|
def process_line(line, sigil=".")
|
100
104
|
nomarkup = true
|
101
105
|
# FIXME inefficient
|
@@ -120,9 +124,20 @@ class Livetext
|
|
120
124
|
break if line.nil?
|
121
125
|
process_line(line)
|
122
126
|
end
|
123
|
-
|
124
|
-
|
125
|
-
|
127
|
+
@main.finalize if @main.respond_to? :finalize
|
128
|
+
end
|
129
|
+
|
130
|
+
def process_file!(fname, backtrace=false)
|
131
|
+
raise "No such file '#{fname}' to process" unless File.exist?(fname)
|
132
|
+
@main.output = StringIO.new
|
133
|
+
enum = File.readlines(fname).each
|
134
|
+
@backtrace = backtrace
|
135
|
+
@main.source(enum, fname, 0)
|
136
|
+
loop do
|
137
|
+
line = @main.nextline
|
138
|
+
break if line.nil?
|
139
|
+
process_line(line)
|
140
|
+
end
|
126
141
|
@main.finalize if @main.respond_to? :finalize
|
127
142
|
end
|
128
143
|
|
data/lib/standard.rb
CHANGED
@@ -178,7 +178,6 @@ module Livetext::Standard
|
|
178
178
|
end
|
179
179
|
|
180
180
|
def mixin
|
181
|
-
STDERR.puts "Got into mixin..."
|
182
181
|
name = @_args.first # Expect a module name
|
183
182
|
file = "#{Plugins}/" + name.downcase + ".rb"
|
184
183
|
return if @_mixins.include?(name)
|
@@ -194,7 +193,6 @@ STDERR.puts "Got into mixin..."
|
|
194
193
|
self.extend(newmod)
|
195
194
|
init = "init_#{name}"
|
196
195
|
self.send(init) if self.respond_to? init
|
197
|
-
STDERR.puts "mixin: self = #{self} @meta = #@meta"
|
198
196
|
_optional_blank_line
|
199
197
|
end
|
200
198
|
|
data/lib/userapi.rb
CHANGED
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.
|
4
|
+
version: 0.8.15
|
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-
|
11
|
+
date: 2017-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A smart text processor extensible in Ruby
|
14
14
|
email: rubyhacker@gmail.com
|
@@ -148,8 +148,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
148
|
version: '0'
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.
|
151
|
+
rubygems_version: 2.4.2
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: A smart processor for text
|
155
155
|
test_files: []
|
156
|
+
has_rdoc:
|