runeblog 0.0.79 → 0.0.81
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 +4 -4
- data/{data/views/_default/custom/post_template.html → lib/default.rb} +40 -1
- data/lib/post.rb +1 -1
- data/lib/runeblog.rb +21 -25
- data/lib/skeleton.rb +3 -0
- data/lib/version.rb +1 -1
- data/runeblog.gemspec +2 -3
- metadata +3 -14
- data/data/VERSION +0 -1
- data/data/_default/custom/blog_header.html +0 -24
- data/data/_default/custom/blog_trailer.html +0 -0
- data/data/_default/custom/post_template.html +0 -71
- data/data/_default/deploy +0 -0
- data/data/_default/last_deployed +0 -1
- data/data/sequence +0 -1
- data/data/views/_default/custom/blog_header.html +0 -24
- data/data/views/_default/custom/blog_trailer.html +0 -0
- data/data/views/_default/deploy +0 -0
- data/data/views/_default/last_deployed +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ad0ac59c820b552c49a9b5bddd5834e7cc6304f
|
4
|
+
data.tar.gz: 48bf95d2249de54d88cc9cf68a64c370c20c0a6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb0ea9ec99450aee211bf5a7896efc121237864ca58174d26df4afa6fbe83ea3bdd51e86912204da13ba15fa0e3fdda601b1a85bb33efc347aabcb7f89ec79d9
|
7
|
+
data.tar.gz: f1ac88ad0e372483897f290f52f278d31f3221ee8e71e65c233a4b1b2a747c783e985693c2b137378fa69e34f40b105b2a5492d0c9645838492bf865fca7b906
|
@@ -1,6 +1,42 @@
|
|
1
|
+
class RuneBlog::Default
|
2
|
+
|
3
|
+
# This will all become much more generic later.
|
4
|
+
|
5
|
+
BlogHeader = <<-TEXT
|
6
|
+
<html>
|
7
|
+
<body>
|
8
|
+
|
9
|
+
<title>Ruby, Elixir, and More</title>
|
10
|
+
|
11
|
+
<table>
|
12
|
+
<tr>
|
13
|
+
<td>
|
14
|
+
<img src=blog3a.jpg width=400 height=300>
|
15
|
+
</td>
|
16
|
+
<td>
|
17
|
+
<h3>Yet another blog by Hal Fulton</h3>
|
18
|
+
<br>
|
19
|
+
<br>
|
20
|
+
<b>Note</b>: I can never find a blogging engine I like! <br>
|
21
|
+
For now, this will just be a set of static pages.
|
22
|
+
<br>
|
23
|
+
<br>
|
24
|
+
If you want to comment, just <a href=mailto:rubyhacker@gmail.com>email me</a>.
|
25
|
+
</td>
|
26
|
+
</tr>
|
27
|
+
</table>
|
28
|
+
|
29
|
+
<hr>
|
30
|
+
TEXT
|
31
|
+
|
32
|
+
BlogTrailer = <<-TEXT
|
33
|
+
<!-- no trailer -->
|
34
|
+
TEXT
|
35
|
+
|
36
|
+
PostTemplate = <<-'TEXT'
|
1
37
|
<html>
|
2
38
|
|
3
|
-
<body
|
39
|
+
<body>
|
4
40
|
|
5
41
|
<script>
|
6
42
|
window.fbAsyncInit = function() {
|
@@ -69,3 +105,6 @@
|
|
69
105
|
<hr>
|
70
106
|
<a href="http://rubyhacker.com/blog2" style="text-decoration: none">Back</a>
|
71
107
|
<a href="http://rubyhacker.com" style="text-decoration: none">Home</a>
|
108
|
+
TEXT
|
109
|
+
|
110
|
+
end
|
data/lib/post.rb
CHANGED
@@ -72,7 +72,7 @@ class RuneBlog::Post
|
|
72
72
|
File.write("metadata.yaml", @meta.to_yaml)
|
73
73
|
File.write("teaser.txt", @meta.teaser)
|
74
74
|
File.write("remainder.txt", @meta.remainder)
|
75
|
-
template =
|
75
|
+
template = RuneBlog::Default::PostTemplate
|
76
76
|
text = interpolate(template)
|
77
77
|
File.write("index.html", text)
|
78
78
|
end
|
data/lib/runeblog.rb
CHANGED
@@ -2,6 +2,7 @@ require 'find'
|
|
2
2
|
require 'yaml' # get rid of YAML later
|
3
3
|
require 'livetext'
|
4
4
|
require 'skeleton'
|
5
|
+
require 'default'
|
5
6
|
require 'view'
|
6
7
|
require 'deploy'
|
7
8
|
require 'post'
|
@@ -15,32 +16,17 @@ class RuneBlog
|
|
15
16
|
attr_accessor :blog
|
16
17
|
end
|
17
18
|
|
18
|
-
DefaultData = Path + "/../data/views/_default"
|
19
|
-
|
20
|
-
BlogHeaderPath = DefaultData + "/custom/blog_header.html"
|
21
|
-
BlogTrailerPath = DefaultData + "/custom/blog_trailer.html"
|
22
|
-
PostTemplatePath = DefaultData + "/custom/post_template.html"
|
23
|
-
|
24
|
-
BlogHeader = File.read(BlogHeaderPath) rescue "not found"
|
25
|
-
BlogTrailer = File.read(BlogTrailerPath) rescue "not found"
|
26
|
-
PostTemplate = File.read(PostTemplatePath) rescue "not found"
|
27
|
-
|
28
19
|
attr_reader :root, :views, :sequence
|
29
20
|
attr_accessor :view # overridden
|
30
21
|
|
31
22
|
def self.create_new_blog(dir = "data")
|
32
|
-
File.write(".blog", "#{dir}\nno_default\n")
|
33
|
-
# .blog lives above the entire subtree
|
23
|
+
File.write(".blog", "#{dir}\nno_default\n") # .blog lives above subtree
|
34
24
|
create_dir(dir)
|
35
25
|
Dir.chdir(dir) do
|
36
26
|
create_dir("views")
|
37
27
|
create_dir("assets")
|
38
28
|
create_dir("src")
|
39
29
|
File.write("sequence", 0)
|
40
|
-
|
41
|
-
result = system("cp -r #{RuneBlog::DefaultData} .")
|
42
|
-
raise "Error copying default data" unless result
|
43
|
-
|
44
30
|
File.write("VERSION", "#{RuneBlog::VERSION}\nBlog created: " + Time.now.to_s )
|
45
31
|
end
|
46
32
|
end
|
@@ -109,13 +95,20 @@ class RuneBlog
|
|
109
95
|
|
110
96
|
dir = "#@root/views/#{arg}/"
|
111
97
|
create_dir(dir)
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
File.write(
|
117
|
-
File.write(
|
118
|
-
|
98
|
+
up = Dir.pwd
|
99
|
+
Dir.chdir(dir)
|
100
|
+
create_dir('custom')
|
101
|
+
create_dir('assets')
|
102
|
+
File.write("deploy", "")
|
103
|
+
File.write("custom/blog_header.html",
|
104
|
+
RuneBlog::Default::BlogHeader)
|
105
|
+
File.write("custom/blog_trailer.html",
|
106
|
+
RuneBlog::Default::BlogTrailer)
|
107
|
+
File.write("custom/post_template.html",
|
108
|
+
RuneBlog::Default::PostTemplate)
|
109
|
+
File.write("last_deployed",
|
110
|
+
"Initial creation")
|
111
|
+
Dir.chdir(up)
|
119
112
|
@views << RuneBlog::View.new(arg)
|
120
113
|
end
|
121
114
|
|
@@ -221,8 +214,11 @@ class RuneBlog
|
|
221
214
|
posts = posts.sort.reverse
|
222
215
|
|
223
216
|
# Add view header/trailer
|
224
|
-
head =
|
225
|
-
|
217
|
+
head = tail = nil
|
218
|
+
Dir.chdir(vdir) do
|
219
|
+
head = File.read("custom/blog_header.html")
|
220
|
+
tail = File.read("custom/blog_trailer.html")
|
221
|
+
end
|
226
222
|
@bloghead = interpolate(head)
|
227
223
|
@blogtail = interpolate(tail)
|
228
224
|
|
data/lib/skeleton.rb
CHANGED
data/lib/version.rb
CHANGED
data/runeblog.gemspec
CHANGED
@@ -19,10 +19,9 @@ Gem::Specification.new do |s|
|
|
19
19
|
|
20
20
|
# Files...
|
21
21
|
main = Find.find("bin").to_a +
|
22
|
-
Find.find("lib").to_a
|
23
|
-
Find.find("data").to_a
|
22
|
+
Find.find("lib").to_a
|
24
23
|
|
25
|
-
misc = %w[./README.lt3 ./README.md runeblog.gemspec]
|
24
|
+
misc = %w[./README.lt3 ./README.md ./runeblog.gemspec]
|
26
25
|
test = Find.find("test").to_a
|
27
26
|
|
28
27
|
s.files = main + misc + test
|
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.81
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
@@ -39,19 +39,9 @@ extra_rdoc_files: []
|
|
39
39
|
files:
|
40
40
|
- "./README.lt3"
|
41
41
|
- "./README.md"
|
42
|
+
- "./runeblog.gemspec"
|
42
43
|
- bin/blog
|
43
|
-
-
|
44
|
-
- data/_default/custom/blog_header.html
|
45
|
-
- data/_default/custom/blog_trailer.html
|
46
|
-
- data/_default/custom/post_template.html
|
47
|
-
- data/_default/deploy
|
48
|
-
- data/_default/last_deployed
|
49
|
-
- data/sequence
|
50
|
-
- data/views/_default/custom/blog_header.html
|
51
|
-
- data/views/_default/custom/blog_trailer.html
|
52
|
-
- data/views/_default/custom/post_template.html
|
53
|
-
- data/views/_default/deploy
|
54
|
-
- data/views/_default/last_deployed
|
44
|
+
- lib/default.rb
|
55
45
|
- lib/deploy.rb
|
56
46
|
- lib/helpers-blog.rb
|
57
47
|
- lib/helpers-repl.rb
|
@@ -61,7 +51,6 @@ files:
|
|
61
51
|
- lib/skeleton.rb
|
62
52
|
- lib/version.rb
|
63
53
|
- lib/view.rb
|
64
|
-
- runeblog.gemspec
|
65
54
|
- test/general.rb
|
66
55
|
- test/make_blog.rb
|
67
56
|
- test/test
|
data/data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
RuneBlog v 0.0.79 2018-10-05
|
@@ -1,24 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<body background=speckle-texture-vector.jpg>
|
3
|
-
|
4
|
-
<title>Ruby, Elixir, and More</title>
|
5
|
-
|
6
|
-
<table>
|
7
|
-
<tr>
|
8
|
-
<td>
|
9
|
-
<img src=blog3a.jpg width=400 height=300>
|
10
|
-
</td>
|
11
|
-
<td>
|
12
|
-
<h3>Yet another blog by Hal Fulton</h3>
|
13
|
-
<br>
|
14
|
-
<br>
|
15
|
-
<b>Note</b>: I can never find a blogging engine I like! <br>
|
16
|
-
For now, this will just be a set of static pages.
|
17
|
-
<br>
|
18
|
-
<br>
|
19
|
-
If you want to comment, just <a href=mailto:rubyhacker@gmail.com>email me</a>.
|
20
|
-
</td>
|
21
|
-
</tr>
|
22
|
-
</table>
|
23
|
-
|
24
|
-
<hr>
|
File without changes
|
@@ -1,71 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
|
3
|
-
<body background='speckle-texture-vector.jpg'>
|
4
|
-
|
5
|
-
<script>
|
6
|
-
window.fbAsyncInit = function() {
|
7
|
-
FB.init({
|
8
|
-
appId : '1176481582378716',
|
9
|
-
xfbml : true,
|
10
|
-
version : 'v2.4'
|
11
|
-
});
|
12
|
-
};
|
13
|
-
|
14
|
-
(function(d, s, id){
|
15
|
-
var js, fjs = d.getElementsByTagName(s)[0];
|
16
|
-
if (d.getElementById(id)) {return;}
|
17
|
-
js = d.createElement(s); js.id = id;
|
18
|
-
js.src = '//connect.facebook.net/en_US/sdk.js';
|
19
|
-
fjs.parentNode.insertBefore(js, fjs);
|
20
|
-
}(document, 'script', 'facebook-jssdk'));
|
21
|
-
</script>
|
22
|
-
|
23
|
-
<!-- meta property='fb:admins' content='767352779' /> -->
|
24
|
-
<meta property='og:url' content='http://rubyhacker.com/blog2/#{@meta.slug}.html'/>
|
25
|
-
<meta property='og:type' content='article'/>
|
26
|
-
<meta property='og:title' content='#{@meta.title}'/>
|
27
|
-
<meta property='og:image' content='http://rubyhacker.com/blog2/blog3b.gif'/>
|
28
|
-
<meta property='og:description' content='#{@meta.teaser}'/>
|
29
|
-
|
30
|
-
<table bgcolor=#eeeeee cellspacing=5>
|
31
|
-
<tr>
|
32
|
-
<td valign=top>
|
33
|
-
<br> <font size=+2 color=red>#{@meta.title.chomp}</font> <br> #{@meta.pubdate.chomp}
|
34
|
-
</td>
|
35
|
-
|
36
|
-
<td width=2% bgcolor=red></td>
|
37
|
-
|
38
|
-
<td valign=top>
|
39
|
-
<a href='https://twitter.com/share'
|
40
|
-
class='twitter-share-button'
|
41
|
-
data-text='#{@meta.title}'
|
42
|
-
data-url='#{'url'}'
|
43
|
-
data-via='hal_fulton'
|
44
|
-
data-related='hal_fulton'>Tweet</a>
|
45
|
-
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
46
|
-
<br>
|
47
|
-
<a href='https://twitter.com/hal_fulton' class='twitter-follow-button' data-show-count='false'>Follow @hal_fulton</a>
|
48
|
-
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
49
|
-
|
50
|
-
<br>
|
51
|
-
<div
|
52
|
-
class='fb-like'
|
53
|
-
data-share='true'
|
54
|
-
data-width='450'
|
55
|
-
data-show-faces='true'>
|
56
|
-
</div>
|
57
|
-
|
58
|
-
</td>
|
59
|
-
|
60
|
-
</tr>
|
61
|
-
</table>
|
62
|
-
|
63
|
-
|
64
|
-
<hr>
|
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/data/_default/deploy
DELETED
File without changes
|
data/data/_default/last_deployed
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Initial creation
|
data/data/sequence
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0
|
@@ -1,24 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<body background=speckle-texture-vector.jpg>
|
3
|
-
|
4
|
-
<title>Ruby, Elixir, and More</title>
|
5
|
-
|
6
|
-
<table>
|
7
|
-
<tr>
|
8
|
-
<td>
|
9
|
-
<img src=blog3a.jpg width=400 height=300>
|
10
|
-
</td>
|
11
|
-
<td>
|
12
|
-
<h3>Yet another blog by Hal Fulton</h3>
|
13
|
-
<br>
|
14
|
-
<br>
|
15
|
-
<b>Note</b>: I can never find a blogging engine I like! <br>
|
16
|
-
For now, this will just be a set of static pages.
|
17
|
-
<br>
|
18
|
-
<br>
|
19
|
-
If you want to comment, just <a href=mailto:rubyhacker@gmail.com>email me</a>.
|
20
|
-
</td>
|
21
|
-
</tr>
|
22
|
-
</table>
|
23
|
-
|
24
|
-
<hr>
|
File without changes
|
data/data/views/_default/deploy
DELETED
File without changes
|
@@ -1 +0,0 @@
|
|
1
|
-
Initial creation
|