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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b3bb05b97d4cafa4e797207698eeaee05e5560d8
4
- data.tar.gz: 35bcedcc1a2a0e1eaa409a320670a2996751f340
3
+ metadata.gz: 63b2015bac465bf45fda996dd4083d2fdd738590
4
+ data.tar.gz: 35e06282c3114af9a6831a7efb88e2e2565a0e85
5
5
  SHA512:
6
- metadata.gz: e66ffa09b5bf5fda11d53fea7c87d3b5e84ddb30692eebb9d1ac1988cafc70c8ea86183783594878bca0359c845d1be030faa127dbf08964c2567ec473b85064
7
- data.tar.gz: ed9bd78ae02413fb11b24cd7bcd873cd1764090cc75bf1722759fb1331d1aa1f286aee04d0c5909fba092308230bdc44244e0d19558ba28e9f2bae3cd5b68718
6
+ metadata.gz: d14b828699e8adae1ef20eb925e15ef61e60fd80f7077e09fc3a7fab5c459217571c14a65e43892c97c190ab04c4a9f996bfbae4f7ed41ed4e6c1b07e55daec9
7
+ data.tar.gz: a90f1e0022c7da8d3d8a7fc2692d885765c5b855a981b212c9368f3bf5173f7d82ce31f6702b49037f626859ef11727f7fcb79522e776c9b1f75c7da76fa5e88
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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 ||= 'liveblog.conf'
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.6
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-27 00:00:00.000000000 Z
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.2
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.2
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.0
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.0
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