runeblog 0.1.52 → 0.1.53

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: 68431b4dabdcbd923cc32a39ae2af7b37aa3edecdf504833b7dc1e158e85461a
4
- data.tar.gz: c94f6b7b46705d2d62e65bc878c678d5458a026ada06a5e4bcfdc5d7dfbc91f6
3
+ metadata.gz: 82dd37d9d95f3c8dfb6d17aeff9defd7dbe8644689817a6649837a3e32c16c9d
4
+ data.tar.gz: ab76bedb259c41af954c54c292d8db6805daa85752cae9bfdc06c4c9112deb0c
5
5
  SHA512:
6
- metadata.gz: 30b76cf75e197692895c5d4a81de067cb60b78014ea690c80f38a224e229f0c231faca20432ac4d49b64319f233559932600e3db64311f133715234f1947fe26
7
- data.tar.gz: 2d899faa807453ae54097d786f21b54dc138140f8587a0054816867d892074016b35f70b1eaf4f5e2357045542557941a7be5b9b5dd35fc34a2bf21b186dcf5c
6
+ metadata.gz: 58ab51e75bcc71e899e622197688ad2eff89a1b22b6c5af92d504f580f08743e64ec93a187557e8429c55b50adc8ab5caa906f4e26445dda1835503460010226
7
+ data.tar.gz: 78c9a59cdd406aadbb5d43ee6108c1b9d47b372dc8af706c11d297b17abb7b685e5b44cfc8cf00e58dfda716eb398d94ec650275b35182df76643e7d78f411df
data/bin/blog CHANGED
@@ -23,6 +23,7 @@ end
23
23
  def mainloop
24
24
  print fx("blog> ", Red, :bold)
25
25
  cmd = STDSCR.gets(history: @cmdhist, tab: @tabcom)
26
+ puts cmd.inspect
26
27
  cmd_quit(nil) if cmd.nil? # ^D
27
28
  cmd.chomp!
28
29
  return if cmd.empty? # CR does nothing
@@ -65,8 +66,9 @@ end
65
66
  puts fx("\n RuneBlog", :bold), fx(" v #{RuneBlog::VERSION}\n", Red)
66
67
 
67
68
  @cmdhist = []
68
- @tabcom = RuneBlog::REPL::Patterns.keys
69
- @tabcom.map! {|x| x.sub(/ \$.*/, " ") }
69
+ @tabcom = RuneBlog::REPL::Patterns.keys.uniq - RuneBlog::REPL::Abbr.keys
70
+ @tabcom.map! {|x| x.sub(/ [\$\>].*/, "") + " " }
71
+ @tabcom.sort!
70
72
 
71
73
  loop { mainloop }
72
74
 
data/lib/helpers-repl.rb CHANGED
@@ -52,8 +52,6 @@ module RuneBlog::REPL
52
52
 
53
53
  "preview" => :cmd_preview,
54
54
 
55
- "pre" => :cmd_preview,
56
-
57
55
  "browse" => :cmd_browse,
58
56
 
59
57
  "relink" => :cmd_relink,
@@ -67,6 +65,24 @@ module RuneBlog::REPL
67
65
  "q" => :cmd_quit,
68
66
  "quit" => :cmd_quit
69
67
  }
68
+
69
+ Abbr = {
70
+ "h" => :cmd_help,
71
+ "v" => :cmd_version,
72
+ "lsv" => :cmd_list_views,
73
+ "p" => :cmd_new_post,
74
+ "cv $name" => :cmd_change_view,
75
+ "cv" => :cmd_change_view, # 0-arity must come second
76
+ "config" => :cmd_config,
77
+ "lsp" => :cmd_list_posts,
78
+ "lsd" => :cmd_list_drafts,
79
+ "list assets" => :cmd_list_assets,
80
+ "lsa" => :cmd_list_assets,
81
+ "rm $postid" => :cmd_remove_post,
82
+ "ed $postid" => :cmd_edit_post,
83
+ "e $postid" => :cmd_edit_post,
84
+ "q" => :cmd_quit
85
+ }
70
86
 
71
87
  Regexes = {}
72
88
  Patterns.each_pair do |pat, meth|
data/lib/repl.rb CHANGED
@@ -129,6 +129,12 @@ module RuneBlog::REPL
129
129
  check_empty(arg)
130
130
  puts unless testing
131
131
  files = @blog.find_src_slugs
132
+ if files.empty?
133
+ msg = "No files changed"
134
+ output! msg
135
+ puts "\n #{msg}\n " unless testing
136
+ return @out
137
+ end
132
138
  files.each {|file| @blog.rebuild_post(file) }
133
139
  @blog.dirty_views.each {|view| generate_index(view) } # All views for now?
134
140
  File.write("#{@blog.root}/src/last_rebuild", Time.now)
@@ -199,8 +205,7 @@ module RuneBlog::REPL
199
205
 
200
206
  #-- FIXME affects linking, building, publishing...
201
207
 
202
- def cmd_remove_post(arg, testing = false, safe=true)
203
- # FIXME - 'safe' is no longer a thing
208
+ def cmd_remove_post(arg, testing = false)
204
209
  reset_output
205
210
  id = get_integer(arg)
206
211
  result = @blog.remove_post(id)
data/lib/runeblog.rb CHANGED
@@ -215,8 +215,7 @@ class RuneBlog
215
215
  end
216
216
 
217
217
  def process_post(file)
218
- sleep 3
219
- puts " process_post #{file.inspect} pwd = #{Dir.pwd}"
218
+ # puts " process_post #{file.inspect} pwd = #{Dir.pwd}"
220
219
  debug "=== process_post #{file.inspect} pwd = #{Dir.pwd}"
221
220
  raise ArgumentError unless file.is_a?(String)
222
221
  path = @root + "/src/#{file}"
@@ -1,6 +1,6 @@
1
1
 
2
2
  class RuneBlog
3
- VERSION = "0.1.52"
3
+ VERSION = "0.1.53"
4
4
 
5
5
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
6
6
  end
data/test/general_test.rb CHANGED
@@ -114,7 +114,6 @@ class TestREPL < Minitest::Test
114
114
  "ed 105" => [:cmd_edit_post, "105"],
115
115
  "e 106" => [:cmd_edit_post, "106"],
116
116
  "preview" => [:cmd_preview, nil],
117
- "pre" => [:cmd_preview, nil],
118
117
  "browse" => [:cmd_browse, nil],
119
118
  "relink" => [:cmd_relink, nil],
120
119
  "rebuild" => [:cmd_rebuild, nil],
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.52
4
+ version: 0.1.53
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-03-25 00:00:00.000000000 Z
11
+ date: 2019-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext