liveblog 1.2.6 → 1.2.7

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
  SHA1:
3
- metadata.gz: 16b9a2c95d507d7c72338f3217fb615776ca6add
4
- data.tar.gz: 78912e7acad0b24715b235abf4f379eb324db8bf
3
+ metadata.gz: c9b4c601782793ef79622d878d4629196b163e34
4
+ data.tar.gz: 19e0a307826c4c5e28e5ccd78a4b1f3fe8aeeea6
5
5
  SHA512:
6
- metadata.gz: 5aca5be1503e67a99373d49fdf5947516f6790a31092ac8fd057c8e2eb34b94e73f4cbcf92297d2a43b67801e63351dbdcc48d022806306a3497c31c3449eabe
7
- data.tar.gz: c43195fb17ad32ab0210c146add4bdc75eba5f3a0f8d59dc1b4f395a5059663b78c2309014258ade199347bf11799c21a32f17bb4122bfd774b97caf826b18be
6
+ metadata.gz: c94f74a5a3bf8ac1b5cd4585f278afe3bab31e30843e6581968d59b66e35ef2f67442328523bd3c3d7b7b8d234aefe08fe0a0c1e7a26fc1dae85b5d1454824d1
7
+ data.tar.gz: 7e35c014f8988fdcd0ccc33dc4c83e1ac253bb98712d37d5a5f9f5d0d10781f2a6f3b5b76d15a48b0967885ccd88a612ee74fc8d43e36b5c28a583cddbd44a29
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/liveblog.rb CHANGED
@@ -43,7 +43,7 @@ class LiveBlog
43
43
  Dir.chdir @dir
44
44
 
45
45
  @d = date
46
- dxfile = File.join(path(), 'index.xml')
46
+ dxfile = File.join(@dir, path(), 'index.xml')
47
47
 
48
48
  @plugins = initialize_plugins(plugins || [])
49
49
 
@@ -128,7 +128,7 @@ class LiveBlog
128
128
  #
129
129
  def link_today()
130
130
 
131
- raw_formatted_filepath = File.join(path(@d-1), 'formatted.xml')
131
+ raw_formatted_filepath = File.join(@dir, path(@d-1), 'formatted.xml')
132
132
 
133
133
  return unless File.exists? raw_formatted_filepath
134
134
 
@@ -148,7 +148,7 @@ class LiveBlog
148
148
  def new_day(date: Date.today)
149
149
 
150
150
  @d = date
151
- dxfile = File.join(path(), 'index.xml')
151
+ dxfile = File.join(@dir, path(), 'index.xml')
152
152
 
153
153
  new_file()
154
154
  link_today()
@@ -157,7 +157,7 @@ class LiveBlog
157
157
 
158
158
  if x.respond_to? :on_new_day then
159
159
 
160
- yesterdays_index_file = File.join(path(@d-1), 'index.xml')
160
+ yesterdays_index_file = File.join(@dir, path(@d-1), 'index.xml')
161
161
 
162
162
  x.on_new_day(yesterdays_index_file, urlpath(@d-1))
163
163
 
@@ -168,7 +168,7 @@ class LiveBlog
168
168
 
169
169
  def new_file(x=nil)
170
170
 
171
- s, _ = RXFHelper.read(x)
171
+ s, _ = RXFHelper.read(x) if x
172
172
 
173
173
  s ||= <<EOF
174
174
  <?dynarex schema="sections[title]/section(x)"?>
@@ -199,7 +199,7 @@ EOF
199
199
  s.gsub!(/(?:^|\s)!t\s/, '\1' + time(t))
200
200
 
201
201
 
202
- FileUtils.mkdir_p File.join(path())
202
+ FileUtils.mkdir_p File.join(@dir, path())
203
203
 
204
204
  @dx = Dynarex.new
205
205
 
@@ -227,14 +227,14 @@ EOF
227
227
 
228
228
  def save()
229
229
 
230
- @dx.save File.join(path(), 'index.xml')
230
+ @dx.save File.join(@dir, path(), 'index.xml')
231
231
 
232
- File.write File.join(path(), 'index.txt'), @dx.to_s
232
+ File.write File.join(@dir, path(), 'index.txt'), @dx.to_s
233
233
  save_html()
234
234
  save_rss()
235
235
  save_frontpage()
236
- FileUtils.cp File.join(path(),'raw_formatted.xml'), \
237
- File.join(path(),'raw_formatted.xml.bak')
236
+ FileUtils.cp File.join(@dir, path(),'raw_formatted.xml'), \
237
+ File.join(@dir, path(),'raw_formatted.xml.bak')
238
238
 
239
239
  end
240
240
 
@@ -386,8 +386,8 @@ EOF
386
386
 
387
387
  def save_html()
388
388
 
389
- formatted2_filepath = File.join(path(), 'formatted2.xml')
390
- FileUtils.cp File.join(path(), 'index.xml'), formatted2_filepath
389
+ formatted2_filepath = File.join(@dir, path(), 'formatted2.xml')
390
+ FileUtils.cp File.join(@dir, path(), 'index.xml'), formatted2_filepath
391
391
 
392
392
  doc = Rexle.new File.read(formatted2_filepath)
393
393
 
@@ -430,8 +430,8 @@ EOF
430
430
  'liveblog.css'
431
431
  end
432
432
 
433
- raw_formatted_filepath = File.join(path(), 'raw_formatted.xml')
434
- formatted_filepath = File.join(path(), 'formatted.xml')
433
+ raw_formatted_filepath = File.join(@dir, path(), 'raw_formatted.xml')
434
+ formatted_filepath = File.join(@dir, path(), 'formatted.xml')
435
435
 
436
436
  unless File.exists? raw_formatted_filepath then
437
437
 
@@ -479,7 +479,7 @@ EOF
479
479
  end
480
480
  end
481
481
 
482
- related_links_filepath = File.join(path(), 'related_links.xml')
482
+ related_links_filepath = File.join(@dir, path(), 'related_links.xml')
483
483
 
484
484
  if File.exists? related_links_filepath then
485
485
 
@@ -533,7 +533,7 @@ EOF
533
533
 
534
534
  def save_rss()
535
535
 
536
- buffer = File.read File.join(path(), 'raw_formatted.xml')
536
+ buffer = File.read File.join(@dir, path(), 'raw_formatted.xml')
537
537
  doc = Rexle.new buffer
538
538
 
539
539
  summary = doc.root.element 'summary'
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: 1.2.6
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  5s8qc8N6iJi3jGcarS1hVkhlWGshAZx1T0n/Q27m1S0GoVUebJYFJxqaZqL5FO/v
32
32
  NonZ4ByUi+SaTg==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-01-19 00:00:00.000000000 Z
34
+ date: 2017-01-20 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: dxsectionx
metadata.gz.sig CHANGED
Binary file