runeblog 0.1.9 → 0.1.10

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
- SHA256:
3
- metadata.gz: 903a192d7c6250629c88805d13c5425c200ae4c101df861dfa2f93aaae1bb790
4
- data.tar.gz: e118df95348763d884228f1751c6e56864270d7c04b83e6ab6f9aefe1bacf9df
2
+ SHA1:
3
+ metadata.gz: 21d34358a671bd5d76eb77221154ff63e0097f92
4
+ data.tar.gz: 6585054baeba0918d35409a3eb138762ab6ab670
5
5
  SHA512:
6
- metadata.gz: da576e0118e7c99d4e74a2a4d39a982d07cfbb4bb5f276856c81bb365911d3413092850c0210825283728442037eb1b772619edaff7ada44307bb71dbe3be93f
7
- data.tar.gz: 00b79b7b5dc8cff0411b2c1566fa0f341cff4f2ad82fe15ee8ee1687fee6f480c86c4c33deddc0cdf31308ad85c03903d4ed5b75a135f9d6deaf76b985ca0d1c
6
+ metadata.gz: 62d64be14fb9b1eef47120d1c06c410eb97a3d4ee7c44c8ca70a3bb2424f84367312886e0b6cd100286e23a84089ce52968b43f2ab470bb686f508f909963d12
7
+ data.tar.gz: 87a791aa34b235ebe3220a0f0d57950ddde4dfda73b14e937afff644b96d7e6dbb514c009bda2676176bf6731630a52a7aa96e2611104354f91728176efa0224
data/bin/blog CHANGED
@@ -3,8 +3,7 @@
3
3
  # $LOAD_PATH << "./lib"
4
4
 
5
5
  require 'global'
6
- require 'rubytext' if curses?
7
- require 'readline'
6
+ require 'rubytext'
8
7
 
9
8
  require 'repl'
10
9
 
@@ -20,12 +19,8 @@ def get_argv
20
19
  end
21
20
 
22
21
  def mainloop
23
- if curses?
24
- print fx("blog> ", Red)
25
- cmd = STDSCR.gets
26
- else
27
- cmd = Readline.readline(red("\nblog> "), true)
28
- end
22
+ print fx("blog> ", Red)
23
+ cmd = STDSCR.gets
29
24
  cmd_quit(nil) if cmd.nil? # ^D
30
25
  cmd.chomp!
31
26
  return if cmd.empty? # CR does nothing
@@ -60,12 +55,9 @@ end
60
55
  # STDSCR.clear if curses?
61
56
 
62
57
  if cmd.nil? # REPL
63
- # system("tput smcup") # see: tput rmcup in cmd_quit
64
-
65
- puts fx("\n RuneBlog", :bold), fx(" v #{RuneBlog::VERSION}", Red)
58
+ puts fx("\n RuneBlog", :bold), fx(" v #{RuneBlog::VERSION}\n", Red)
66
59
  loop { mainloop }
67
- # STDSCR.clear
68
- # RubyText.stop
60
+ sleep 0.2
69
61
  system("tput clear")
70
62
  puts
71
63
  else # one command
data/lib/publish.rb CHANGED
@@ -33,7 +33,7 @@ class RuneBlog::Publishing
33
33
  debug "files = #{files.inspect}"
34
34
  reset_output
35
35
  dir = "#@docroot/#@path"
36
- result = system("ssh #@user@#@server -x mkdir #{dir}")
36
+ result = system("ssh #@user@#@server -x mkdir -p #{dir}")
37
37
  list = files.join(' ')
38
38
  cmd = "scp -r #{list} #@user@#@server:#{dir} >/dev/null 2>/tmp/wtf"
39
39
  output! "Publishing #{files.size} files...\n"
data/lib/repl.rb CHANGED
@@ -42,7 +42,7 @@ module RuneBlog::REPL
42
42
  "custom/blog_header.html",
43
43
  "custom/blog_trailer.html",
44
44
  "custom/post_template.html"]
45
- num, fname = RubyText.menu(title: "Edit file:", items: items)
45
+ num, fname = STDSCR.menu(title: "Edit file:", items: items)
46
46
  edit_file("#{dir}/#{fname}")
47
47
  end
48
48
 
@@ -87,8 +87,7 @@ module RuneBlog::REPL
87
87
  output_newline
88
88
  dir = "#{sroot}/#{spath}"
89
89
  # FIXME - may or may not already exist
90
- result = system("ssh root@#{server} mkdir #{dir}")
91
- # ^ needs -c??
90
+ result = system("ssh root@#{server} mkdir -p #{dir}")
92
91
 
93
92
  cmd = "scp -r #{files.join(' ')} root@#{server}:#{dir} >/dev/null 2>&1"
94
93
  output! "Publishing #{files.size} files...\n"
@@ -122,7 +121,7 @@ module RuneBlog::REPL
122
121
  if arg.nil?
123
122
  viewnames = @blog.views.map {|x| x.name }
124
123
  n = viewnames.find_index(@blog.view.name)
125
- k, name = RubyText.menu(title: "Views", items: viewnames, curr: n)
124
+ k, name = STDSCR.menu(title: "Views", items: viewnames, curr: n)
126
125
  @blog.view = name
127
126
  output bold(@blog.view)
128
127
  puts "\n ", fx(name, :bold), "\n"
data/lib/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  class RuneBlog
3
- VERSION = "0.1.9"
3
+ VERSION = "0.1.10"
4
4
 
5
5
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
6
6
  end
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.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-15 00:00:00.000000000 Z
11
+ date: 2018-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  version: '0'
75
75
  requirements: []
76
76
  rubyforge_project:
77
- rubygems_version: 2.7.7
77
+ rubygems_version: 2.2.2
78
78
  signing_key:
79
79
  specification_version: 4
80
80
  summary: A command-line blogging system