runeblog 0.2.25 → 0.2.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/empty_view.tgz +0 -0
- data/lib/helpers-blog.rb +15 -15
- data/lib/liveblog.rb +1 -1
- data/lib/runeblog.rb +2 -5
- data/lib/runeblog_version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d72cd82f9c7134b97443bf105553f82e4520ecc3fee581a9a0543c1ea91cf82b
|
4
|
+
data.tar.gz: 31db4f83710a441e5a27305edba5c198e6e62138e2b40ae4c87131229b7033b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a74945ef0c5a2bed46e70987895e1a5bd2886de6dde5a433a03b7e827f94aa6d5c2e16f577ee8f04edb76938b1285acb5f9236ebe970146524ab62e1c03504b
|
7
|
+
data.tar.gz: ef357bcfe3df3a79fe91dfc0287b319327bf403a6f26d402975a5b65a67febf72756cbd04a75c7e2489cc9ad3a54859f9e8576094236f147824f5de1450424da
|
data/empty_view.tgz
CHANGED
Binary file
|
data/lib/helpers-blog.rb
CHANGED
@@ -19,21 +19,21 @@ module RuneBlog::Helpers
|
|
19
19
|
puts " Failed: #{cmd} - from #{caller[0]}" unless rc
|
20
20
|
end
|
21
21
|
|
22
|
-
def get_root
|
23
|
-
log!(enter: __method__)
|
24
|
-
if $_blog
|
25
|
-
if $_blog.root
|
26
|
-
puts "0. Returned: #{$_blog.root}/"
|
27
|
-
return $_blog.root + "/"
|
28
|
-
else
|
29
|
-
puts "1. Returned: ./"
|
30
|
-
return "./"
|
31
|
-
end
|
32
|
-
else
|
33
|
-
puts "2. Returned: ./"
|
34
|
-
return "./"
|
35
|
-
end
|
36
|
-
end
|
22
|
+
# def get_root
|
23
|
+
# log!(enter: __method__)
|
24
|
+
# if $_blog
|
25
|
+
# if $_blog.root
|
26
|
+
# puts "0. Returned: #{$_blog.root}/"
|
27
|
+
# return $_blog.root + "/"
|
28
|
+
# else
|
29
|
+
# puts "1. Returned: ./"
|
30
|
+
# return "./"
|
31
|
+
# end
|
32
|
+
# else
|
33
|
+
# puts "2. Returned: ./"
|
34
|
+
# return "./"
|
35
|
+
# end
|
36
|
+
# end
|
37
37
|
|
38
38
|
def read_config(file, *syms)
|
39
39
|
log!(enter: __method__, args: [file, *syms])
|
data/lib/liveblog.rb
CHANGED
@@ -14,7 +14,7 @@ def init_liveblog # FIXME - a lot of this logic sucks
|
|
14
14
|
dir = here
|
15
15
|
loop { dir = Dir.pwd; break if File.exist?("config"); Dir.chdir("..") }
|
16
16
|
Dir.chdir(here)
|
17
|
-
@blog =
|
17
|
+
@blog = RuneBlog.new(dir)
|
18
18
|
@root = @blog.root
|
19
19
|
@view = @blog.view
|
20
20
|
@view_name = @blog.view.name
|
data/lib/runeblog.rb
CHANGED
@@ -56,7 +56,6 @@ class RuneBlog
|
|
56
56
|
log!(enter: __method__, args: [root])
|
57
57
|
# Crude - FIXME later - # What views are there? Publishing, etc.
|
58
58
|
self.blog = self # Weird. Like a singleton - dumbass circular dependency?
|
59
|
-
$_blog = self # Dumber still?
|
60
59
|
root = Dir.pwd/root
|
61
60
|
raise BlogRepoAlreadyExists if Dir.exist?(root)
|
62
61
|
create_dirs(root)
|
@@ -75,7 +74,6 @@ class RuneBlog
|
|
75
74
|
log!(enter: __method__, args: [root])
|
76
75
|
# Crude - FIXME later - # What views are there? Publishing, etc.
|
77
76
|
self.blog = self # Weird. Like a singleton - dumbass circular dependency?
|
78
|
-
$_blog = self # Dumber still?
|
79
77
|
root = Dir.pwd/root
|
80
78
|
blog = self.new(root)
|
81
79
|
end
|
@@ -84,7 +82,6 @@ class RuneBlog
|
|
84
82
|
log!(enter: "initialize", args: [root_dir])
|
85
83
|
# Crude - FIXME later - # What views are there? Publishing, etc.
|
86
84
|
self.class.blog = self # Weird. Like a singleton - dumbass circular dependency?
|
87
|
-
$_blog = self # Dumber still?
|
88
85
|
|
89
86
|
@root = root_dir
|
90
87
|
file = @root/ConfigFile
|
@@ -447,8 +444,8 @@ STDERR.puts "--- retrieve: key = #{key.inspect}"
|
|
447
444
|
Dir.chdir(pdraft) do
|
448
445
|
excerpt = File.read("teaser.txt")
|
449
446
|
title = _retrieve_metadata(:title)
|
450
|
-
vars = %[.heredoc title\n
|
451
|
-
%[.heredoc teaser\n
|
447
|
+
vars = %[.heredoc title\n#{title.chomp}\n.end\n] +
|
448
|
+
%[.heredoc teaser\n#{excerpt.chomp}\n.end\n]
|
452
449
|
File.open(pdraft/"vars.lt3", "w") {|f| f.puts vars }
|
453
450
|
end
|
454
451
|
end
|
data/lib/runeblog_version.rb
CHANGED