liveblog 0.8.6 → 0.8.7
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/liveblog.rb +29 -1
- metadata +6 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63b2015bac465bf45fda996dd4083d2fdd738590
|
|
4
|
+
data.tar.gz: 35e06282c3114af9a6831a7efb88e2e2565a0e85
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d14b828699e8adae1ef20eb925e15ef61e60fd80f7077e09fc3a7fab5c459217571c14a65e43892c97c190ab04c4a9f996bfbae4f7ed41ed4e6c1b07e55daec9
|
|
7
|
+
data.tar.gz: a90f1e0022c7da8d3d8a7fc2692d885765c5b855a981b212c9368f3bf5173f7d82ce31f6702b49037f626859ef11727f7fcb79522e776c9b1f75c7da76fa5e88
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/liveblog.rb
CHANGED
|
@@ -11,11 +11,24 @@ require 'rexle-diff'
|
|
|
11
11
|
|
|
12
12
|
class LiveBlog
|
|
13
13
|
|
|
14
|
+
# the config can either be a hash, a config filepath, or nil
|
|
15
|
+
#
|
|
14
16
|
def initialize(config: nil)
|
|
15
17
|
|
|
16
18
|
|
|
17
|
-
config
|
|
19
|
+
config = unless config then
|
|
20
|
+
|
|
21
|
+
if File.exists? 'liveblog.conf' then
|
|
22
|
+
'liveblog.conf'
|
|
23
|
+
else
|
|
24
|
+
sc = SimpleConfig.new(new_config())
|
|
25
|
+
File.write 'liveblog.conf', sc.write
|
|
26
|
+
sc
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
18
30
|
h = SimpleConfig.new(config).to_h
|
|
31
|
+
|
|
19
32
|
dir, @urlbase, @edit_url, @css_url, @xsl_path, @xsl_url, @bannertext = \
|
|
20
33
|
%i(dir urlbase edit_url css_url xsl_path xsl_url bannertext).map{|x| h[x]}
|
|
21
34
|
|
|
@@ -150,6 +163,20 @@ EOF
|
|
|
150
163
|
[true, 'section added']
|
|
151
164
|
end
|
|
152
165
|
|
|
166
|
+
def new_config()
|
|
167
|
+
|
|
168
|
+
dir = Dir.pwd
|
|
169
|
+
|
|
170
|
+
{
|
|
171
|
+
dir: dir,
|
|
172
|
+
urlbase: 'http://www.yourwebsitehere.org/liveblog/',
|
|
173
|
+
edit_url: 'http://www.yourwebsitehere.org/do/liveblog/edit',
|
|
174
|
+
css_url: '/liveblog/liveblog.css',
|
|
175
|
+
xsl_path: File.join(dir, 'liveblog.xsl'),
|
|
176
|
+
xsl_url: '/liveblog/liveblog.xsl',
|
|
177
|
+
bannertext: ''
|
|
178
|
+
}
|
|
179
|
+
end
|
|
153
180
|
|
|
154
181
|
def path(d=@d)
|
|
155
182
|
[d.year.to_s, Date::MONTHNAMES[d.month].downcase[0..2], d.day.to_s]
|
|
@@ -205,6 +232,7 @@ EOF
|
|
|
205
232
|
doc.root.xpath('records/section/x') do |x|
|
|
206
233
|
|
|
207
234
|
s = "=%s\n%s\n=" % [x.text.lines.first[/#\w+$/], x.text.unescape]
|
|
235
|
+
|
|
208
236
|
html = Martile.new(s, ignore_domainlabel: domain).to_html
|
|
209
237
|
|
|
210
238
|
e = x.parent
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: liveblog
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
|
31
31
|
WoOSxvsTN7qoA8F0W4mkDpf+HhHxBOLTPykcHMIlx2gILLnNraaZ1rJlZAqWABGj
|
|
32
32
|
v8lGgeeqqjd5QA==
|
|
33
33
|
-----END CERTIFICATE-----
|
|
34
|
-
date: 2015-03-
|
|
34
|
+
date: 2015-03-29 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: dynarex
|
|
@@ -62,7 +62,7 @@ dependencies:
|
|
|
62
62
|
version: '0.5'
|
|
63
63
|
- - ">="
|
|
64
64
|
- !ruby/object:Gem::Version
|
|
65
|
-
version: 0.5.
|
|
65
|
+
version: 0.5.10
|
|
66
66
|
type: :runtime
|
|
67
67
|
prerelease: false
|
|
68
68
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -72,7 +72,7 @@ dependencies:
|
|
|
72
72
|
version: '0.5'
|
|
73
73
|
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: 0.5.
|
|
75
|
+
version: 0.5.10
|
|
76
76
|
- !ruby/object:Gem::Dependency
|
|
77
77
|
name: simple-config
|
|
78
78
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -82,7 +82,7 @@ dependencies:
|
|
|
82
82
|
version: '0.3'
|
|
83
83
|
- - ">="
|
|
84
84
|
- !ruby/object:Gem::Version
|
|
85
|
-
version: 0.3.
|
|
85
|
+
version: 0.3.1
|
|
86
86
|
type: :runtime
|
|
87
87
|
prerelease: false
|
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -92,7 +92,7 @@ dependencies:
|
|
|
92
92
|
version: '0.3'
|
|
93
93
|
- - ">="
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: 0.3.
|
|
95
|
+
version: 0.3.1
|
|
96
96
|
- !ruby/object:Gem::Dependency
|
|
97
97
|
name: subunit
|
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
|
Binary file
|