runeblog 0.1.63 → 0.1.64

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: 6024acfe51b40d3f82d058f775eec5227435bf3618f22a31585eaac762ab1790
4
- data.tar.gz: e41dd46176ce2fbe0682c9d1aff22e7bde4f4681f271846ce43812acff51ec1b
3
+ metadata.gz: d85a387a7a63973609a0478487fc2b7bf4d674539a0807af49e51a514de9f891
4
+ data.tar.gz: bdf57fc642dd302abe853079cb51edba3baaf26b1287ea44438a58b21d4393a5
5
5
  SHA512:
6
- metadata.gz: c747fa33eda75eb642de4bd7208c7a13999f4e7b4ac879f095dd82086ad1ced05f5df10f10fa9419a09b0060455b4045d9d5b0a63a6b0a00d1155e937995aa45
7
- data.tar.gz: 6146598bb4643be209c6a86c81ec976892917b73c757fac7b1ef85556a91247dc875f4be4dca546afffa42146604dac3146a3e2b70f1a6966e2725596b20d99e
6
+ metadata.gz: eab5ed71e645cd06e4010b679d98cf4d5d22d0eaffe62c419cbf811afb3fbf190087cb85fccbecc1e84fbd1c68854698a9c322e3a608e2412f8a8856d695aa6d
7
+ data.tar.gz: bdad671fc1b0bdedc9c53138aa2b5a7d1efea3a14558bb22f77d40aceb3524f7ecf724d244408ebda01213d0994fc0acdb3a2d3cfbc901d8c91f8e06e6b40a56
data/lib/liveblog.rb CHANGED
@@ -14,24 +14,29 @@ end
14
14
  def categories # does nothing right now
15
15
  end
16
16
 
17
-
18
17
  def style
19
18
  fname = _args[0]
20
- _out %[<link rel="stylesheet" href="???/assets/#{fname}')">]
19
+ _passthru %[<link rel="stylesheet" href="???/assets/#{fname}')">]
21
20
  end
22
21
 
23
22
  # Move elsewhere later!
24
23
 
25
- def h1; _out "<h1>#{@_data}</h1>"; end
26
-
27
- def h2; _out "<h2>#{@_data}</h2>"; end
28
- def h3; _out "<h3>#{@_data}</h3>"; end
29
- def h4; _out "<h4>#{@_data}</h4>"; end
30
- def h5; _out "<h5>#{@_data}</h5>"; end
31
- def h6; _out "<h6>#{@_data}</h6>"; end
24
+ def h1; _passthru "<h1>#{@_data}</h1>"; end
25
+ def h2; _passthru "<h2>#{@_data}</h2>"; end
26
+ def h3; _passthru "<h3>#{@_data}</h3>"; end
27
+ def h4; _passthru "<h4>#{@_data}</h4>"; end
28
+ def h5; _passthru "<h5>#{@_data}</h5>"; end
29
+ def h6; _passthru "<h6>#{@_data}</h6>"; end
32
30
 
33
- def hr; _out "<hr>"; end
31
+ def hr; _passthru "<hr>"; end
34
32
 
33
+ def emit # send to STDOUT?
34
+ @emit = true
35
+ case _args.first
36
+ when "off"; @emit = false
37
+ when "on"; @emit = true
38
+ end
39
+ end
35
40
 
36
41
  ### inset
37
42
 
@@ -77,6 +82,7 @@ end
77
82
 
78
83
  def init_liveblog # FIXME - a lot of this logic sucks
79
84
  @blog, num, @live = Livetext.parameters # live is Livetext instance
85
+ @live ||= Livetext.new(nil)
80
86
  @meta = OpenStruct.new
81
87
  @meta.num = num
82
88
  @root = @blog.root rescue nil
@@ -219,6 +225,7 @@ end
219
225
 
220
226
  def finalize
221
227
  if @blog.nil?
228
+ puts @live.body if @emit
222
229
  return @live.body
223
230
  end
224
231
  @slug = @blog.make_slug(@meta)
@@ -242,8 +249,19 @@ class Livetext::Functions
242
249
  "<br>"*n
243
250
  end
244
251
 
252
+ def h1; "<h1>#{self.class.param}</h1>"; end
253
+ def h2; "<h2>#{self.class.param}</h2>"; end
254
+ def h3; "<h3>#{self.class.param}</h3>"; end
255
+ def h4; "<h4>#{self.class.param}</h4>"; end
256
+ def h5; "<h5>#{self.class.param}</h5>"; end
257
+ def h6; "<h6>#{self.class.param}</h6>"; end
258
+
245
259
  def hr
246
260
  Dot.hr
247
261
  end
248
262
 
263
+ def image
264
+ "<img src='#{self.class.param}'></img>"
265
+ end
266
+
249
267
  end
@@ -1,6 +1,6 @@
1
1
 
2
2
  class RuneBlog
3
- VERSION = "0.1.63"
3
+ VERSION = "0.1.64"
4
4
 
5
5
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
6
6
  end
data/runeblog.gemspec CHANGED
@@ -20,7 +20,7 @@ spec = Gem::Specification.new do |s|
20
20
  s.authors = ["Hal Fulton"]
21
21
  s.email = 'rubyhacker@gmail.com'
22
22
  s.executables << "blog"
23
- s.add_runtime_dependency 'livetext', '~> 0.8', '>= 0.8.76'
23
+ s.add_runtime_dependency 'livetext', '~> 0.8', '>= 0.8.82'
24
24
  s.add_runtime_dependency 'rubytext', '~> 0.1', '>= 0.1.16'
25
25
 
26
26
  # Files...
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.63
4
+ version: 0.1.64
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-04-20 00:00:00.000000000 Z
11
+ date: 2019-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '0.8'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 0.8.76
22
+ version: 0.8.82
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '0.8'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.8.76
32
+ version: 0.8.82
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rubytext
35
35
  requirement: !ruby/object:Gem::Requirement