runeblog 0.0.28 → 0.0.29

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: 547f18b29a540d3c7dab31ac0ffc3dc1a5aac9b8
4
- data.tar.gz: 1296071d218746ea5001eaf3264fa7e339c75441
3
+ metadata.gz: 2c82a9c5e7df6b702d233dfb00327811b395e010
4
+ data.tar.gz: 18512ccba91d2c1edf35dd66cdd74ea2518b8a7e
5
5
  SHA512:
6
- metadata.gz: 5a4bf4fcd77a8f1b861814e219386d1d294c128e33556de5b1c25bd3a82771caad57b0c67e096d0b9cf4d0345815623e14150304e1feb6ae69a2510335d13b9f
7
- data.tar.gz: b39cc9d2648300e5d3d3f9b6ef8116d9a95f451b60d68e543dcc299ab6440a83a9980b845f0ca946a1601c35df1d1b0f820d755377ca39aa0ead8d4266a4c941
6
+ metadata.gz: 4386f8ec0aa09faeda0649193e7af2e9e514b50b124446d459a66dec4aef542b6515df95d7475401e7a99c947b02e9ae72efeef21a5a488233e99712207618b5
7
+ data.tar.gz: 3717b99dfbd2eb7352912f5f5b72eead0ccd7a76e6c4f7a8eada1a57b16745d698c6c6f03c62d50394c188ed729d2b5164f4e1b1964f26176b0ee4af01e70902
data/data/VERSION CHANGED
@@ -1 +1 @@
1
- RuneBlog v 0.0.28 2017-05-10
1
+ RuneBlog v 0.0.29 2017-05-10
@@ -63,3 +63,9 @@
63
63
 
64
64
  <hr>
65
65
 
66
+ #{@meta.body}
67
+
68
+
69
+ <hr>
70
+ <a href="http://rubyhacker.com/blog2" style="text-decoration: none">Back</a>
71
+ <a href="http://rubyhacker.com" style="text-decoration: none">Home</a>
data/lib/runeblog.rb CHANGED
@@ -1,14 +1,12 @@
1
1
 
2
2
  class RuneBlog
3
- VERSION = "0.0.28"
3
+ VERSION = "0.0.29"
4
4
 
5
5
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
6
6
  DefaultData = Path + "/../data"
7
7
 
8
- BlogHeader = File.read(DefaultData + "/blog_header.html") rescue "not found"
9
- BlogTrailer = File.read(DefaultData + "/blog_trailer.html") rescue "not found"
10
- PostHeader = File.read(DefaultData + "/post_header.html") rescue "not found"
11
- PostTrailer = File.read(DefaultData + "/post_trailer.html") rescue "not found"
8
+ BlogHeader = File.read(DefaultData + "/custom/blog_header.html") rescue "not found"
9
+ BlogTrailer = File.read(DefaultData + "/custom/blog_trailer.html") rescue "not found"
12
10
  end
13
11
 
14
12
  class RuneBlog::Config
@@ -191,8 +189,8 @@ def deploy
191
189
  files = ["#{vdir}/index.html"]
192
190
  files += Dir.entries(vdir).grep(/^\d\d\d\d/).map {|x| "#{vdir}/#{x}" }
193
191
  files.reject! {|f| File.mtime(f) < File.mtime("#{vdir}/last_deployed") }
194
- puts "Files:"
195
- files.each {|f| puts " " + f }
192
+ puts "\n Files:"
193
+ files.each {|f| puts " " + f }
196
194
  puts
197
195
  dir = "#{sroot}/#{spath}"
198
196
  cmd = "scp -r #{files.join(' ')} root@#{server}:#{dir} >/dev/null 2>&1"
@@ -272,20 +270,11 @@ def link_post_view(view)
272
270
  vdir = @config.viewdir(view)
273
271
  dir = vdir + @meta.slug + "/"
274
272
  cmd = "mkdir -p #{dir}" #-- FIXME what if this exists??
275
- # puts " Running: #{cmd}"
276
273
  system(cmd)
277
274
  File.write("#{dir}/metadata.yaml", @meta.to_yaml)
278
- # Add header/trailer to post index
279
- head = File.read(vdir + "custom/post_header.html") rescue RuneBlog::PostHeader
280
- tail = File.read(vdir + "custom/post_trailer.html") rescue RuneBlog::PostTrailer
281
- # STDERR.puts "lpv: meta = #{@meta.teaser.inspect}"
282
- @posthead = interpolate(head)
283
- @posttail = interpolate(tail)
284
- File.open(dir + "index.html", "w") do |f|
285
- f.puts @posthead
286
- f.puts @meta.body
287
- f.puts @posttail
288
- end
275
+ template = File.read(vdir + "custom/post_template.html")
276
+ post = interpolate(template)
277
+ File.write(dir + "index.html", post)
289
278
  generate_index(view)
290
279
  end
291
280
 
@@ -373,8 +362,6 @@ def new_view(arg = nil)
373
362
  system(cmd)
374
363
  File.write(dir + "custom/blog_header.html", RuneBlog::BlogHeader)
375
364
  File.write(dir + "custom/blog_trailer.html", RuneBlog::BlogTrailer)
376
- File.write(dir + "custom/post_header.html", RuneBlog::PostHeader)
377
- File.write(dir + "custom/post_trailer.html", RuneBlog::PostTrailer)
378
365
  File.write(dir + "last_deployed", "Initial creation")
379
366
  @config.views << arg
380
367
  end
data/runeblog.gemspec CHANGED
@@ -25,6 +25,4 @@ Gem::Specification.new do |s|
25
25
  s.files = main + misc + test
26
26
  s.homepage = 'https://github.com/Hal9000/runeblog'
27
27
  s.license = "Ruby's license"
28
- puts "Files:"
29
- puts s.files
30
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runeblog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.28
4
+ version: 0.0.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
@@ -22,11 +22,10 @@ files:
22
22
  - bin/blog
23
23
  - data/VERSION
24
24
  - data/sequence
25
- - data/views/_default/blog_header.html
26
- - data/views/_default/blog_trailer.html
25
+ - data/views/_default/custom/blog_header.html
26
+ - data/views/_default/custom/blog_trailer.html
27
+ - data/views/_default/custom/post_template.html
27
28
  - data/views/_default/last_deployed
28
- - data/views/_default/post_header.html
29
- - data/views/_default/post_trailer.html
30
29
  - lib/runeblog.rb
31
30
  - runeblog.gemspec
32
31
  homepage: https://github.com/Hal9000/runeblog
@@ -1,3 +0,0 @@
1
- <hr>
2
- <a href="http://rubyhacker.com/blog2" style="text-decoration: none">Back</a>
3
- <a href="http://rubyhacker.com" style="text-decoration: none">Home</a>