runeblog 0.0.11 → 0.0.12

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: 4439d9b6decff859ceca058c7023af75a3430014
4
- data.tar.gz: 8dfd8b42db5a36c37a05d08bacba2c2a2687ecfd
3
+ metadata.gz: 9d9723f2b1c66529aa4845502907669a7262b10f
4
+ data.tar.gz: 8f341eb35ff430168a7ea467a7d380381bad3985
5
5
  SHA512:
6
- metadata.gz: 33d056f81b0d16d9403e9e12ab7205cbed5a3257e498b8ef6af8303a0a8a4ca27675b4cb1bd405ac2a8d66f852fd510e932c6e04776659e40b470510275bdb00
7
- data.tar.gz: bead7cb3f4d6fb1eaf48afb351ae2e2580daf47d3d99518a39a46682d05ca9c9c8de632c8b881a8bf60e6429a66828ffb97c4712ae7ed27f575752b2cdb972ff
6
+ metadata.gz: 2ff01b349c131f3dffb73d2378d9e47cebe7fc787acfcba6423abdd752f916275599258eb28f5fa28fbaac88aacd8f4ba5e99829c26f62d3258e187c97e5d9e3
7
+ data.tar.gz: 635ca6938d17a179a152d08b4fcbfdab8188186379d7671d627376ed74d658279635ea450beff87bff73fc0ae2cf057ab64b5b1df62df1754cfc87800478b9b4
data/data/VERSION ADDED
@@ -0,0 +1 @@
1
+ RuneBlog v 0.0.12 2017-05-05 00:00:00 UTC
data/data/sequence ADDED
@@ -0,0 +1 @@
1
+ 0
@@ -0,0 +1,24 @@
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
@@ -0,0 +1,64 @@
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
+ <head>
24
+ <title>#{title}</title>
25
+ <meta property="fb:admins" content="767352779" />
26
+
27
+ <meta property="og:url" content="http://rubyhacker.com/blog2/#{slug}.html"/>
28
+ <meta property="og:type" content="article"/>
29
+ <meta property="og:title" content="#{title}"/>
30
+ <meta property="og:image" content="http://rubyhacker.com/blog2/blog3b.gif"/>
31
+ <meta property="og:description" content="#{teaser}"/>
32
+ </head>
33
+
34
+ <body background="speckle-texture-vector.jpg">
35
+
36
+ <table bgcolor=#eeeeee>
37
+ <tr height=5>
38
+ <tr>
39
+ <td width=2%></td>
40
+ <td align=top>
41
+ <br>
42
+ <font size=+2 color=red>#{title}</font>
43
+ <br>
44
+ #{meta['pubdate']}
45
+ </td>
46
+ <td width=5%></td>
47
+ <td align=top>
48
+ <a href="https://twitter.com/share" class="twitter-share-button" data-text="#{tweet}" data-url="#{url}" data-via="hal_fulton" data-related="hal_fulton">Tweet</a>
49
+ <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>
50
+ <br>
51
+ <a href="https://twitter.com/hal_fulton" class="twitter-follow-button" data-show-count="false">Follow @hal_fulton</a>
52
+ <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>
53
+
54
+
55
+ <body>
56
+ <div
57
+ class="fb-like"
58
+ data-share="true"
59
+ data-width="450"
60
+ data-show-faces="true">
61
+ </div>
62
+
63
+ <hr>
64
+
@@ -0,0 +1,3 @@
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>
data/lib/runeblog.rb CHANGED
@@ -1,8 +1,14 @@
1
1
 
2
2
  class RuneBlog
3
- VERSION = "0.0.11"
3
+ VERSION = "0.0.12"
4
4
 
5
5
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
6
+ DefaultData = Path + "/../data"
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"
6
12
  end
7
13
 
8
14
  # FIXME lots of structure changes
@@ -47,9 +53,9 @@ def new_blog!
47
53
  unless File.exist?(".blog")
48
54
  yn = ask("No .blog found. Create new blog?")
49
55
  if yn.upcase == "Y"
50
- system("mkdir data")
51
- File.open(".blog", "w") {|f| f.puts data }
52
- File.open("data/sequence", "w") {|f| f.puts 0 }
56
+ #-- what if data already exists?
57
+ system("cp -r #{DefaultData} .")
58
+ File.open(".blog", "w") {|f| f.puts "data" }
53
59
  end
54
60
  end
55
61
  end
@@ -316,7 +322,9 @@ end
316
322
  ### list_posts
317
323
 
318
324
  def list_posts
319
- system("ls -l #{@config.root}/views/#@view/")
325
+ Dir.chdir("#{@config.root}/views/#@view/")
326
+ system("ls -d 0*")
327
+ puts
320
328
  end
321
329
 
322
330
 
@@ -324,80 +332,5 @@ end
324
332
 
325
333
  class RuneBlog
326
334
 
327
- # Default BlogHeader: TITLE, IMAGE
328
-
329
- BlogHeader = <<-EOF
330
- <html>
331
- <body background=speckle-texture-vector.jpg>
332
-
333
- <title>TITLE</title>
334
-
335
- <table>
336
- <tr>
337
- <td>
338
- <img src=IMAGE.jpg width=400 height=300>
339
- </td>
340
- <td>
341
- <h3>Yet another blog by Hal Fulton</h3>
342
- <br>
343
- <br>
344
- <b>Note</b>: I can never find a blogging engine I like! <br>
345
- For now, this will just be a set of static pages.
346
- <br>
347
- <br>
348
- If you want to comment, just <a href=mailto:rubyhacker@gmail.com>email me</a>.
349
- </td>
350
- </tr>
351
- </table>
352
-
353
- <hr>
354
- EOF
355
-
356
- # Default BlogTrailer
357
-
358
- BlogTrailer = <<-EOF
359
- EOF
360
-
361
- # Default PostHeader
362
-
363
- PostHeader = <<-EOF
364
- <html>
365
-
366
- <script>
367
- window.fbAsyncInit = function() {
368
- FB.init({
369
- appId : '1176481582378716',
370
- xfbml : true,
371
- version : 'v2.4'
372
- });
373
- };
374
-
375
- (function(d, s, id){
376
- var js, fjs = d.getElementsByTagName(s)[0];
377
- if (d.getElementById(id)) {return;}
378
- js = d.createElement(s); js.id = id;
379
- js.src = "//connect.facebook.net/en_US/sdk.js";
380
- fjs.parentNode.insertBefore(js, fjs);
381
- }(document, 'script', 'facebook-jssdk'));
382
- </script>
383
-
384
- <body>
385
- <div
386
- class="fb-like"
387
- data-share="true"
388
- data-width="450"
389
- data-show-faces="true">
390
- </div>
391
-
392
- <hr>
393
- EOF
394
-
395
- # Default PostTrailer: BACK, HOME
396
-
397
- PostTrailer = <<-EOF
398
- <hr>
399
- <a href="http://rubyhacker.com/BACK" style="text-decoration: none">Back</a>
400
- <a href="http://rubyhacker.com/HOME" style="text-decoration: none">Home</a>
401
- EOF
402
335
  end
403
336
 
data/runeblog.gemspec CHANGED
@@ -14,9 +14,13 @@ Gem::Specification.new do |s|
14
14
  s.authors = ["Hal Fulton"]
15
15
  s.email = 'rubyhacker@gmail.com'
16
16
  s.executables << "blog"
17
+
18
+ File.write("data/VERSION", "RuneBlog v #{s.version} #{s.date}")
17
19
 
18
20
  # Files...
19
- main = Find.find("bin").to_a + Find.find("lib").to_a
21
+ main = Find.find("bin").to_a +
22
+ Find.find("lib").to_a +
23
+ Find.find("data").to_a
20
24
  misc = %w[./README.lt3 ./README.md runeblog.gemspec]
21
25
  test = Find.find("test").to_a
22
26
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runeblog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-03 00:00:00.000000000 Z
11
+ date: 2017-05-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A blog system based on Ruby and Livetext
14
14
  email: rubyhacker@gmail.com
@@ -20,6 +20,12 @@ files:
20
20
  - "./README.lt3"
21
21
  - "./README.md"
22
22
  - bin/blog
23
+ - data/VERSION
24
+ - data/sequence
25
+ - data/views/_default/blog_header.html
26
+ - data/views/_default/blog_trailer.html
27
+ - data/views/_default/post_header.html
28
+ - data/views/_default/post_trailer.html
23
29
  - lib/runeblog.rb
24
30
  - runeblog.gemspec
25
31
  homepage: https://github.com/Hal9000/runeblog
@@ -42,8 +48,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
48
  version: '0'
43
49
  requirements: []
44
50
  rubyforge_project:
45
- rubygems_version: 2.2.2
51
+ rubygems_version: 2.4.2
46
52
  signing_key:
47
53
  specification_version: 4
48
54
  summary: A command-line blogging system
49
55
  test_files: []
56
+ has_rdoc: