runeblog 0.2.46 → 0.2.51

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.
@@ -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.46"
5
+ VERSION = "0.2.51"
6
6
 
7
7
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
8
8
  Path = File.dirname(path)
@@ -59,6 +59,5 @@ class RuneBlog::View
59
59
  rescue
60
60
  true
61
61
  end
62
-
63
62
  end
64
63
 
@@ -1,42 +1,48 @@
1
1
 
2
2
  LEXT = ".lt3"
3
3
 
4
- def stale?(src, dst, force = false)
5
- log!(enter: __method__, args: [src, dst], level: 3)
6
- raise "Source #{src} not found in #{Dir.pwd}" unless File.exist?(src)
7
- return true if force
8
- return true unless File.exist?(dst)
9
- return true if File.mtime(src) > File.mtime(dst)
10
- return false
11
- end
4
+ def newer?(f1, f2)
5
+ File.mtime(f1) > File.mtime(f2)
6
+ end
7
+
8
+ def stale?(src, dst, deps, force = false)
9
+ meh = File.new("/tmp/dammit-#{src.gsub(/\//, "-")}", "w")
10
+ log!(enter: __method__, args: [src, dst], level: 3)
11
+ raise "Source #{src} not found in #{Dir.pwd}" unless File.exist?(src)
12
+ return true if force
13
+ return true unless File.exist?(dst)
14
+ return true if newer?(src, dst)
15
+ deps.each {|dep| return true if newer?(dep, dst) }
16
+ return false
17
+ end
12
18
 
13
- def xlate(cwd: Dir.pwd, src:,
14
- dst: (strip = true; src.sub(/.lt3$/,"")),
15
- copy: nil, debug: false, force: false)
16
- src += LEXT unless src.end_with?(LEXT)
17
- dst += ".html" unless dst.end_with?(".html") || strip
18
- indent = " "*12
19
- Dir.chdir(cwd) do
20
- if debug
21
- STDERR.puts "#{indent} -- xlate #{src} >#{dst}"
22
- STDERR.puts "#{indent} in: #{Dir.pwd}"
23
- STDERR.puts "#{indent} from: #{caller[0]}"
24
- STDERR.puts "#{indent} copy: #{copy}" if copy
25
- end
26
- if stale?(src, dst, force)
27
- # do nothing
28
- else
29
- STDERR.puts "#{indent} -- ^ Already up to date!" if debug
30
- return
31
- end
19
+ def xlate(cwd: Dir.pwd, src:,
20
+ dst: (strip = true; src.sub(/.lt3$/,"")),
21
+ deps: [], copy: nil, debug: false, force: false)
22
+ src += LEXT unless src.end_with?(LEXT)
23
+ dst += ".html" unless dst.end_with?(".html") || strip
24
+ indent = " "*12
25
+ Dir.chdir(cwd) do
26
+ if debug
27
+ STDERR.puts "#{indent} -- xlate #{src} >#{dst}"
28
+ STDERR.puts "#{indent} in: #{Dir.pwd}"
29
+ STDERR.puts "#{indent} from: #{caller[0]}"
30
+ STDERR.puts "#{indent} copy: #{copy}" if copy
31
+ end
32
+ stale = stale?(src, dst, deps, force)
33
+ if stale
32
34
  rc = system("livetext #{src} >#{dst}")
33
35
  STDERR.puts "...completed (shell returned #{rc})" if debug
34
36
  system!("cp #{dst} #{copy}") if copy
37
+ else
38
+ STDERR.puts "#{indent} -- ^ Already up to date!" if debug
39
+ return
35
40
  end
36
41
  end
42
+ end
37
43
 
38
- def xlate!(cwd: Dir.pwd, src:, copy: nil, debug: false, force: false)
39
- output = "/tmp/xlate-#{File.basename(src).sub(/.lt3$/, "")}"
40
- xlate cwd: cwd, src: src, dst: output, debug: debug, force: force
41
- File.read(output + ".html") # return all content as string
42
- end
44
+ def xlate!(cwd: Dir.pwd, src:, copy: nil, debug: false, force: false)
45
+ output = "/tmp/xlate-#{File.basename(src).sub(/.lt3$/, "")}"
46
+ xlate cwd: cwd, src: src, dst: output, debug: debug, force: force
47
+ File.read(output + ".html") # return all content as string
48
+ end
@@ -119,6 +119,8 @@ Contact light. Houston, this is Tranquility Base. The Eagle has
119
119
  landed. That's one small step for (a) man, one giant leap for
120
120
  mankind.
121
121
 
122
+ Here's the PDF of $$link["Ruby for the Old-Time C Programmer"|http://rubyhacker.com/blog2/rubydino.pdf]
123
+
122
124
  Pity this busy monster, manunkind, not. Pity rather... Listen:
123
125
  There's a hell of a universe next door; let's go.
124
126
  BODY
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.46
4
+ version: 0.2.51
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-10-17 00:00:00.000000000 Z
11
+ date: 2019-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext
@@ -62,12 +62,18 @@ files:
62
62
  - "./runeblog.gemspec"
63
63
  - bin/blog
64
64
  - bin/mkwidget
65
+ - empty_view/assets/austin-pano.jpg
65
66
  - empty_view/assets/sky2.jpg
66
67
  - empty_view/remote/assets/GIT_IS_DUMB
67
68
  - empty_view/remote/etc/GIT_IS_DUMB
68
69
  - empty_view/remote/navbar/GIT_IS_DUMB
69
70
  - empty_view/remote/permalink/GIT_IS_DUMB
70
71
  - empty_view/themes/standard/README
72
+ - empty_view/themes/standard/banner/about.lt3
73
+ - empty_view/themes/standard/banner/blog-banner.jpg
74
+ - empty_view/themes/standard/banner/contact.lt3
75
+ - empty_view/themes/standard/banner/faq.lt3
76
+ - empty_view/themes/standard/banner/navbar.lt3
71
77
  - empty_view/themes/standard/blog/generate.lt3
72
78
  - empty_view/themes/standard/blog/head.lt3
73
79
  - empty_view/themes/standard/blog/index.lt3