runeblog 0.2.92 → 0.2.93

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
  SHA256:
3
- metadata.gz: 5a01afc10ad3439db402e06d8c0d5674d247485fe82c63c29160ca70d8e43a6d
4
- data.tar.gz: 50df27f119a4df78b1c366dc119e4b84c8fb45a9707a02d43e1e20e8caa32e01
3
+ metadata.gz: 51a1371a11eb69a62ff435090be403f586c0bddfd8c62ef7dc3e4f97020fee12
4
+ data.tar.gz: 4d1e82de93ebb0d408964b5d06e6dc4a42f450e064b7174eecd4cb8328054f4a
5
5
  SHA512:
6
- metadata.gz: 8f3ffe63bab275d26f14c516f24b48c127fc8bd4a661c32b17528a9d0bd399a85294fbb33af24436984a0dfe749d7a7651acc37b096819a71dbb763375d2ef3f
7
- data.tar.gz: 6ee5c12a07c7f493b71352ca0aa0bd633810222efda55e19925ed8dc71b4ee42a27b58a352bfce2d1bd815768513c9e9c6216178278995f26cf2188aae8bca93
6
+ metadata.gz: 8e27ae9cb582a3a84746db31ce664b1ed3a5ed8c47fff9178de4ff5a55e9c41687390b655a13b8df533e498edfe5ffb16af2f3f832c9d9c082353409e2dd17bb
7
+ data.tar.gz: 73e512eb67281d74c141ecda0de9f75aec04e64402b5ef23a3552d0798e681b3b43aefa2a88fdb9b23bfda95f00b37938a6455599be11a665bcf182ff2b60659
@@ -4,7 +4,7 @@
4
4
 
5
5
  class ::RuneBlog::Widget
6
6
  class Pages
7
- Type, Title = "pages", "Pages"
7
+ Type, Title = "pages", "My Pages"
8
8
 
9
9
  def initialize(repo)
10
10
  @blog = repo
@@ -7,6 +7,9 @@ require 'runeblog'
7
7
  require 'pathmagic'
8
8
  require 'processing'
9
9
 
10
+ # top = Livetext::Path + "/../plugin/liveblog/"
11
+ # eval(File.read("#{top}/testing.rb"))
12
+
10
13
 
11
14
  def init_liveblog # FIXME - a lot of this logic sucks
12
15
  dir = Dir.pwd.sub(/\.blogs.*/, "")
@@ -44,7 +47,7 @@ end
44
47
 
45
48
  def post_trailer
46
49
  perma = _var("publish.proto") + "://" + _var("publish.server") +
47
- "/" + _var("publish.path") + "/permalink/" + _var("post.aslug") +
50
+ "/" + _var("publish.path") + "/" + _var("post.aslug") +
48
51
  ".html"
49
52
  tags = _var("post.tags")
50
53
  if tags.empty?
@@ -100,9 +103,6 @@ def banner
100
103
  navbar = nil
101
104
  vdir = @blog.root/:views/@blog.view
102
105
  lines = _body.to_a
103
- TTY.puts "-"*30
104
- lines.each {|x| TTY.puts x }
105
- TTY.puts "-"*30
106
106
 
107
107
  lines.each do |line|
108
108
  count += 1
@@ -43,24 +43,14 @@ class RuneBlog::Publishing
43
43
  rc
44
44
  end
45
45
 
46
- def publish(files, assets=[])
47
- log!(enter: __method__, args: [files, assets], level: 1)
46
+ def publish
47
+ log!(enter: __method__, level: 1)
48
48
  dir = @docroot/@path
49
49
  view_name = @blog.view.name
50
50
  viewpath = dir # /view_name
51
- result = system!("ssh #@user@#@server -x mkdir -p #{viewpath}/assets")
52
- files.each do |file|
53
- dest = "#@user@#@server:" + dir # /view_name
54
- file.gsub!(/\/\//, "/") # weird... :-/
55
- cmd = "scp -r #{file} #{dest} >/dev/null 2>/tmp/wtf"
56
- debug "cmd = #{cmd.inspect} - see /tmp/wtf"
57
- result = system!(cmd) || puts("\n Could not copy #{file} to #{dest}")
58
- end
59
- unless assets.empty?
60
- cmd = "scp #{assets.join(' ')} #@user@#@server:#{viewpath}/assets >/dev/null 2>/tmp/wtf2"
61
- result = system!(cmd)
62
- raise PublishError if !result
63
- end
51
+ # FIXME rsync doesn't work
52
+ cmd = "rsync -a -r -z #{@blog.root}/views/#{@blog.view}/remote/ #@user@#@server:#{viewpath}/"
53
+ system!(cmd)
64
54
  dump(files, "#{@blog.view.dir}/last_published")
65
55
  true
66
56
  end
@@ -193,17 +193,6 @@ module RuneBlog::REPL
193
193
  return @out
194
194
  end
195
195
 
196
- # Need to check dirty/clean status first
197
- dirty, all, assets = @blog.view.publishable_files
198
- files = dirty
199
- if dirty.empty?
200
- puts fx("\n No files are out of date." + " "*20, :bold)
201
- print " Publish anyway? "
202
- yn = RubyText.gets.chomp
203
- files = all if yn == "y"
204
- end
205
- return @out if files.empty?
206
-
207
196
  ret = RubyText.spinner(label: " Publishing... ") do
208
197
  @blog.view.publisher.publish(files, assets) # FIXME weird?
209
198
  end
@@ -229,7 +218,6 @@ module RuneBlog::REPL
229
218
  debug "Starting cmd_rebuild..."
230
219
  reset_output
231
220
  puts unless testing
232
- TTY.puts "rebuilding #{@blog.view.inspect}"
233
221
  @blog.generate_view(@blog.view)
234
222
  @blog.generate_index(@blog.view)
235
223
  @out
@@ -94,8 +94,6 @@ class RuneBlog
94
94
  write_repo_config(root: @root)
95
95
  get_repo_config
96
96
  @views = retrieve_views
97
- puts @views.inspect
98
- system("cat #@root/data/VIEW")
99
97
  self.view = File.read(@root/"data/VIEW").chomp
100
98
  md = Dir.pwd.match(%r[.*/views/(.*?)/])
101
99
  if md
@@ -463,7 +461,6 @@ system("cat #@root/data/VIEW")
463
461
 
464
462
  def generate_view(view) # huh?
465
463
  log!(enter: __method__, args: [view])
466
- puts "gv: view = #{view}"
467
464
  vdir = @root/:views/view
468
465
  @theme = @root/:views/view/:themes/:standard
469
466
  depend = [vdir/"remote/etc/blog.css.lt3", @theme/"global.lt3",
@@ -478,6 +475,7 @@ puts "gv: view = #{view}"
478
475
  call: ".nopara"
479
476
  copy!("#{vdir}/themes/standard/banner/*", "#{vdir}/remote/banner/") # includes navbar/
480
477
  copy("#{vdir}/assets/*", "#{vdir}/remote/assets/")
478
+ # rebuild widgets
481
479
  copy_widget_html(view)
482
480
  rescue => err
483
481
  STDERR.puts err
@@ -598,10 +596,11 @@ puts "gv: view = #{view}"
598
596
  preprocess cwd: @theme/:post, src: "generate.lt3", force: true,
599
597
  dst: remote/ahtml, copy: @theme/:post,
600
598
  call: ".nopara" # , debug: true
599
+ # copy(remote/ahtml, remote/permalink/ahtml)
601
600
  # FIXME dependencies?
602
- preprocess cwd: @theme/:post, src: "permalink.lt3",
603
- dst: remote/:permalink/ahtml,
604
- mix: "liveblog" # , debug: true
601
+ # preprocess cwd: @theme/:post, src: "permalink.lt3",
602
+ # dst: remote/:permalink/ahtml,
603
+ # mix: "liveblog" # , debug: true
605
604
  copy_widget_html(view_name)
606
605
  rescue => err
607
606
  _tmp_error(err)
@@ -3,7 +3,7 @@ if !defined?(RuneBlog::Path)
3
3
  # if ! (Object.constants.include?(:RuneBlog) && RuneBlog.constants.include?(:Path))
4
4
 
5
5
  class RuneBlog
6
- VERSION = "0.2.92"
6
+ VERSION = "0.2.93"
7
7
 
8
8
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
9
9
  Path = File.dirname(path)
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.2.92
4
+ version: 0.2.93
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton