runeblog 0.0.98 → 0.0.99

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: 53c0e653db6e10ed2f71f8ac53e0a11db10016625a641cb89439e1e46a6a73b7
4
- data.tar.gz: 15b4190adbc3fb7f5663a156ef6618028ff426bf728b3e9d6d828a002c8af1e1
3
+ metadata.gz: 8ca7a1a5515f21e6880a0cdff3e457f011cb4ca6ea7f0ec23993eb97dfd702ad
4
+ data.tar.gz: aaf0eb76d040a016b770b172b46ae86e8aefb7a472c774ad3e13c9f0e8a2674e
5
5
  SHA512:
6
- metadata.gz: f04edc96b75a7366c10413309548ab0cd51cd3a5d789dbb0c75053f83c52fbaf65a624479d0300b7e083587293ac5c2a6ff27db7766f8b7217482cc562bbf127
7
- data.tar.gz: 15edb112620cc240823395a33876ac353760ef8bae8fa865d9baa185ed9a894a1d80bf0f809b1b6c2604378505d1e5a2e39f477e38604154b73f538b3a7a00ee
6
+ metadata.gz: f9f7555b55d88811979ac194df82d099c614dcecf50b3462417599e66dc4b7b48487d0de38aa0fba6d9b5910f66751b504799cc37135091ee738900735c2c568
7
+ data.tar.gz: 42117eccfeb07b905eab195eaebd6e9313c69ffb79ffbee1978e765f7de74648e09ab9c2c15084abd0e0dc84b2c2c14c9ead35c1e7d8041c4718cff0a1028767
data/lib/helpers-repl.rb CHANGED
@@ -25,6 +25,8 @@ module RuneBlog::REPL
25
25
  "cv $name" => :cmd_change_view,
26
26
  "cv" => :cmd_change_view, # 0-arity must come second
27
27
 
28
+ "config" => :cmd_config,
29
+
28
30
  "list posts" => :cmd_list_posts,
29
31
  "lsp" => :cmd_list_posts,
30
32
 
@@ -211,25 +213,25 @@ module RuneBlog::REPL
211
213
  RuneBlog::Publishing.new(user, server, root, path, proto)
212
214
  end
213
215
 
214
- def dumb_menu(hash)
216
+ def dumb_menu(array)
215
217
  # { string => :meth, ... }
216
- max = hash.size
218
+ max = array.size
217
219
  puts "\n Select from:" # CHANGE_FOR_CURSES?
218
- hash.each_pair.with_index do |pair, i|
219
- string, meth = *pair
220
+ array.each.with_index do |string, i|
220
221
  puts " #{red('%2d' % (i+1))} #{string}" # CHANGE_FOR_CURSES?
221
222
  end
223
+ picked = nil
222
224
  loop do
223
225
  print red("> ") # CHANGE_FOR_CURSES?
224
226
  num = gets.to_i
225
227
  if num.between?(1, max)
226
- picked = hash.values[num-1]
227
- puts "Calling number #{num} (#{picked})..." # CHANGE_FOR_CURSES?
228
+ picked = array[num-1]
228
229
  break
229
230
  else
230
231
  puts "Huh? Must be 1 to #{max}" # CHANGE_FOR_CURSES?
231
232
  end
232
233
  end
234
+ picked
233
235
  end
234
236
 
235
237
  ### find_asset
data/lib/repl.rb CHANGED
@@ -20,7 +20,19 @@ module RuneBlog::REPL
20
20
  return @out
21
21
  end
22
22
 
23
- def cmd_browse
23
+ def cmd_config(arg)
24
+ check_empty(arg)
25
+ dir = @blog.view.dir
26
+ items = ["publish",
27
+ "custom/blog_header.html",
28
+ "custom/blog_trailer.html",
29
+ "custom/post_template.html"]
30
+ puts "\nEdit which file?" # FIXME use @out for testing later
31
+ fname = dumb_menu(items)
32
+ system("#{@blog.editor} #{dir}/#{fname}")
33
+ end
34
+
35
+ def cmd_browse(arg)
24
36
  reset_output
25
37
  check_empty(arg)
26
38
  url = @blog.view.publisher.url
data/lib/runeblog.rb CHANGED
@@ -31,7 +31,7 @@ class RuneBlog
31
31
  include Helpers
32
32
  end
33
33
 
34
- attr_reader :root, :views, :sequence
34
+ attr_reader :root, :views, :sequence, :editor
35
35
  attr_accessor :view # overridden
36
36
 
37
37
  include Helpers
data/lib/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  class RuneBlog
3
- VERSION = "0.0.98"
3
+ VERSION = "0.0.99"
4
4
 
5
5
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
6
6
  end
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.0.98
4
+ version: 0.0.99
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton