runeblog 0.2.3 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
  if ! (Object.constants.include?(:RuneBlog) && RuneBlog.constants.include?(:Path))
3
3
 
4
4
  class RuneBlog
5
- VERSION = "0.2.3"
5
+ VERSION = "0.2.5"
6
6
 
7
7
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
8
8
  Path = File.dirname(path)
@@ -9,6 +9,7 @@ class RuneBlog::View
9
9
  include RuneBlog::Helpers
10
10
 
11
11
  def initialize(name)
12
+ log!(enter: __method__, args: [name])
12
13
  raise NoBlogAccessor if RuneBlog.blog.nil?
13
14
  @blog = RuneBlog.blog
14
15
  @name = name
@@ -21,22 +22,27 @@ class RuneBlog::View
21
22
  end
22
23
 
23
24
  def dir
25
+ # log!(enter: __method__)
24
26
  @blog.root + "/views/#@name/"
25
27
  end
26
28
 
27
29
  def local_index
30
+ log!(enter: __method__)
28
31
  dir + "/remote/index.html"
29
32
  end
30
33
 
31
34
  def index
35
+ log!(enter: __method__)
32
36
  dir + "index.html"
33
37
  end
34
38
 
35
39
  def to_s
40
+ log!(enter: __method__)
36
41
  @name
37
42
  end
38
43
 
39
44
  def publishable_files
45
+ log!(enter: __method__)
40
46
  vdir = dir()
41
47
  remote = local_index()
42
48
  files = [remote]
@@ -53,10 +59,12 @@ class RuneBlog::View
53
59
  end
54
60
 
55
61
  def can_publish?
62
+ log!(enter: __method__)
56
63
  @can_publish
57
64
  end
58
65
 
59
66
  def recent?(file)
67
+ log!(enter: __method__, args: [file])
60
68
  File.mtime(file) > File.mtime("#{dir()}/last_published")
61
69
  rescue
62
70
  true
@@ -30,7 +30,7 @@ spec = Gem::Specification.new do |s|
30
30
  test = Find.find("test").to_a
31
31
  misc = %w[./README.lt3 ./README.md ./runeblog.gemspec]
32
32
 
33
- s.files = main + misc + test
33
+ s.files = main + misc + test + ["empty_view.tgz"]
34
34
  s.homepage = 'https://github.com/Hal9000/runeblog'
35
35
  s.license = "Ruby"
36
36
  end
@@ -22,6 +22,7 @@ def make_post(x, title, teaser, body, views=[])
22
22
  # STDERR.puts "\n========= make_post '#{title}'"
23
23
  print "."
24
24
  num = x.create_new_post(title, true, teaser: teaser, body: body, other_views: views)
25
+ views.each {|view| x.generate_index(view) } # recent.html
25
26
  end
26
27
 
27
28
  def show_lines(text)
@@ -31,9 +32,9 @@ def show_lines(text)
31
32
  str
32
33
  end
33
34
 
35
+ # "Main"...
34
36
 
35
-
36
- puts
37
+ puts Time.now
37
38
 
38
39
  system("rm -rf .blogs")
39
40
  RuneBlog.create_new_blog_repo(".blogs")
@@ -41,6 +42,10 @@ x = RuneBlog.new(".blogs")
41
42
 
42
43
  x.create_view("around_austin") # FIXME remember view title!
43
44
 
45
+ # puts "=== about to call: x.generate_view('around_austin')"
46
+ x.generate_view("around_austin")
47
+ # puts "=== ...returned"
48
+
44
49
  # Hack:
45
50
  if File.exist?("publish")
46
51
  system("cp publish .blogs/views/around_austin/publish")
@@ -127,4 +132,5 @@ BODY
127
132
 
128
133
  x.change_view("around_austin")
129
134
 
135
+ puts Time.now
130
136
  puts
@@ -1,6 +1,5 @@
1
- .recent_posts
2
-
3
- .sidebar news tag-cloud ad
1
+ .mixin liveblog
4
2
 
5
- . for now, skip: calendar
3
+ .recent_posts
4
+ .sidebar ad
6
5
 
@@ -0,0 +1,2 @@
1
+ .mixin liveblog
2
+ .recent_posts
@@ -1,3 +1,2 @@
1
1
  .mixin liveblog
2
- .nopara
3
- .make_news_links list.data card-news main-news Recent News
2
+ .make_main_links news Recent News
@@ -0,0 +1,6 @@
1
+ <h2>Disclaimer</h2>
2
+ <p>
3
+
4
+ This is just a
5
+ dummy file
6
+ for now
@@ -1,6 +1,5 @@
1
- .page_title Disclaimer
1
+ <h2>Disclaimer</h2>
2
2
 
3
- This is
4
- just a
3
+ This is just a
5
4
  dummy file
6
5
  for now
@@ -0,0 +1,7 @@
1
+ <h2>Frequently Asked Questions</h2>
2
+ <p>
3
+
4
+ This is
5
+ just a
6
+ dummy file
7
+ for now
@@ -1,4 +1,4 @@
1
- .page_title Freqently Asked Questions
1
+ <h2>Frequently Asked Questions</h2>
2
2
 
3
3
  This is
4
4
  just a
@@ -0,0 +1,7 @@
1
+ <h2>My Life Story</h2>
2
+ <p>
3
+
4
+ This is
5
+ just a
6
+ dummy file
7
+ for now
@@ -1,4 +1,4 @@
1
- .page_title My Life Story
1
+ <h2>My Life Story</h2>
2
2
 
3
3
  This is
4
4
  just a
@@ -0,0 +1,7 @@
1
+ <h2>My Likes and Dislikes</h2>
2
+ <p>
3
+
4
+ This is
5
+ just a
6
+ dummy file
7
+ for now
@@ -1,4 +1,4 @@
1
- .page_title Likes and Dislikes
1
+ <h2>My Likes and Dislikes</h2>
2
2
 
3
3
  This is
4
4
  just a
@@ -1,4 +1,4 @@
1
- faq.lt3 Frequently Asked Questions
2
- like-dislike.lt3 Likes and Dislikes
3
- disclaim.lt3 Disclaimer
4
- lifestory.lt3 My Life Story
1
+ faq.html,Frequently Asked Questions
2
+ like-dislike.html,Likes and Dislikes
3
+ disclaim.html,Disclaimer
4
+ lifestory.html,My Life Story
@@ -0,0 +1,2 @@
1
+ .mixin liveblog
2
+ .make_main_links pages Pages
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.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-20 00:00:00.000000000 Z
11
+ date: 2019-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext
@@ -61,12 +61,18 @@ files:
61
61
  - "./README.md"
62
62
  - "./runeblog.gemspec"
63
63
  - bin/blog
64
+ - empty_view.tgz
65
+ - lib/BAD.liveblog.rb
64
66
  - lib/Javascript.stuff
67
+ - lib/KEEP.liveblog
68
+ - lib/NEW-liveblog.rb
69
+ - lib/OLD-liveblog.rb
65
70
  - lib/default.rb
66
71
  - lib/global.rb
67
72
  - lib/helpers-blog.rb
68
73
  - lib/helpers-repl.rb
69
74
  - lib/liveblog.rb
75
+ - lib/logging.rb
70
76
  - lib/post.rb
71
77
  - lib/publish.rb
72
78
  - lib/repl.rb
@@ -548,6 +554,7 @@ files:
548
554
  - themes/standard/blog/head.lt3
549
555
  - themes/standard/blog/index.lt3
550
556
  - themes/standard/blog/post_entry.lt3
557
+ - themes/standard/blog/recent.lt3
551
558
  - themes/standard/etc/blog.css.lt3
552
559
  - themes/standard/etc/externals.lt3
553
560
  - themes/standard/etc/favicon.ico
@@ -567,14 +574,18 @@ files:
567
574
  - themes/standard/widgets/news/list.data
568
575
  - themes/standard/widgets/news/news.lt3
569
576
  - themes/standard/widgets/pages/README
577
+ - themes/standard/widgets/pages/disclaim.html
570
578
  - themes/standard/widgets/pages/disclaim.lt3
579
+ - themes/standard/widgets/pages/faq.html
571
580
  - themes/standard/widgets/pages/faq.lt3
572
581
  - themes/standard/widgets/pages/generated.lt3
582
+ - themes/standard/widgets/pages/lifestory.html
573
583
  - themes/standard/widgets/pages/lifestory.lt3
584
+ - themes/standard/widgets/pages/like-dislike.html
574
585
  - themes/standard/widgets/pages/like-dislike.lt3
575
586
  - themes/standard/widgets/pages/list.data
576
587
  - themes/standard/widgets/pages/main.html
577
- - themes/standard/widgets/pages/main.lt3
588
+ - themes/standard/widgets/pages/pages.lt3
578
589
  - themes/standard/widgets/tag-cloud/tag-cloud.lt3
579
590
  homepage: https://github.com/Hal9000/runeblog
580
591
  licenses:
@@ -1,18 +0,0 @@
1
- .card_iframe
2
- <h1>Pages</h1>
3
-
4
- .def make_links
5
- pairs = File.readlines("list.data").map {|line| line.chomp.split(" ", 2) }
6
- File.open("generated.lt3", "w") do |f|
7
- pairs.each do |file, title|
8
- f.puts <<-EOS
9
- <a href="#{file}">#{title}</a> <br>
10
- EOS
11
- end
12
- end
13
- .end
14
-
15
- .make_links
16
-
17
- .include generated.lt3
18
- .end