runeblog 0.3.22 → 0.3.23

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  if !defined?(RuneBlog::Path)
2
2
 
3
3
  class RuneBlog
4
- VERSION = "0.3.22"
4
+ VERSION = "0.3.23"
5
5
 
6
6
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
7
7
  Path = File.dirname(path)
@@ -13,17 +13,36 @@ class RuneBlog::View
13
13
  @name = name
14
14
  @publisher = RuneBlog::Publishing.new(name)
15
15
  @can_publish = true # FIXME
16
- @blog.view = self
16
+ # @blog.view = self # NOOOO??
17
17
  get_globals
18
18
  end
19
19
 
20
- def get_globals
21
- gfile = @blog.root/"views/#{name}/themes/standard/global.lt3"
20
+ def dump_globals_stderr
21
+ log!(enter: __method__, args: [list], level: 2)
22
+ list2 = list.select(&block)
23
+ STDERR.puts "-- globals = "
24
+ log!(str: "-- globals = ")
25
+ @globals.each_pair do |k, v|
26
+ msg = sprintf " %-10s %s\n", k, v if k.is_a? Symbol
27
+ STDERR.puts msg
28
+ log!(str: msg)
29
+ end
30
+ STDERR.puts
31
+ log!(str: "")
32
+ end
33
+
34
+ def get_globals(force = false)
35
+ return if @globals && !force
36
+ # gfile = @blog.root/"views/#@name/themes/standard/global.lt3"
37
+ gfile = @blog.root/"views/#@name/data/global.lt3"
22
38
  return unless File.exist?(gfile) # Hackish!! how is View.new called from create_view??
23
39
 
24
40
  live = Livetext.customize(call: ".nopara")
25
41
  live.xform_file(gfile)
42
+ live._setvar("ViewDir", @blog.root/:views/@name)
43
+ live._setvar("View", @name)
26
44
  @globals = live.vars
45
+ # dump_globals_stderr
27
46
  end
28
47
 
29
48
  def dir
@@ -20,7 +20,7 @@ spec = Gem::Specification.new do |s|
20
20
  s.authors = ["Hal Fulton"]
21
21
  s.email = 'rubyhacker@gmail.com'
22
22
  s.executables << "blog"
23
- s.add_runtime_dependency 'livetext', '~> 0.9', '>= 0.9.04'
23
+ s.add_runtime_dependency 'livetext', '~> 0.9', '>= 0.9.09'
24
24
  s.add_runtime_dependency 'rubytext', '~> 0.1', '>= 0.1.23'
25
25
 
26
26
  s.add_development_dependency 'minitest', '~> 5.10', '>= 5.10.0'
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.3.22
4
+ version: 0.3.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-15 00:00:00.000000000 Z
11
+ date: 2020-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '0.9'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 0.9.04
22
+ version: 0.9.09
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '0.9'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.9.04
32
+ version: 0.9.09
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rubytext
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -109,6 +109,7 @@ files:
109
109
  - empty_view/config/twitter/tw.html
110
110
  - empty_view/config/twitter/tw.js
111
111
  - empty_view/config/twitter/twitter.rb
112
+ - empty_view/data/GIT_IS_DUMB
112
113
  - empty_view/posts/GIT_IS_DUMB
113
114
  - empty_view/remote/assets/GIT_IS_DUMB
114
115
  - empty_view/remote/banner/navbar/GIT_IS_DUMB
@@ -235,8 +236,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
236
  - !ruby/object:Gem::Version
236
237
  version: '0'
237
238
  requirements: []
238
- rubygems_version: 3.0.4
239
- signing_key:
239
+ rubygems_version: 3.0.8
240
+ signing_key:
240
241
  specification_version: 4
241
242
  summary: A command-line blogging system
242
243
  test_files: []