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 +4 -4
- data/data/VERSION +1 -1
- data/data/views/_default/{blog_header.html → custom/blog_header.html} +0 -0
- data/data/views/_default/{blog_trailer.html → custom/blog_trailer.html} +0 -0
- data/data/views/_default/{post_header.html → custom/post_template.html} +6 -0
- data/lib/runeblog.rb +8 -21
- data/runeblog.gemspec +0 -2
- metadata +4 -5
- data/data/views/_default/post_trailer.html +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c82a9c5e7df6b702d233dfb00327811b395e010
|
4
|
+
data.tar.gz: 18512ccba91d2c1edf35dd66cdd74ea2518b8a7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4386f8ec0aa09faeda0649193e7af2e9e514b50b124446d459a66dec4aef542b6515df95d7475401e7a99c947b02e9ae72efeef21a5a488233e99712207618b5
|
7
|
+
data.tar.gz: 3717b99dfbd2eb7352912f5f5b72eead0ccd7a76e6c4f7a8eada1a57b16745d698c6c6f03c62d50394c188ed729d2b5164f4e1b1964f26176b0ee4af01e70902
|
data/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
RuneBlog v 0.0.
|
1
|
+
RuneBlog v 0.0.29 2017-05-10
|
File without changes
|
File without changes
|
data/lib/runeblog.rb
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
|
2
2
|
class RuneBlog
|
3
|
-
VERSION = "0.0.
|
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 "
|
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
|
-
|
279
|
-
|
280
|
-
|
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
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.
|
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
|