runeblog 0.2.86 → 0.2.87

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/blog +37 -9
  3. data/lib/runeblog_version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9fbecc77f77bf8c80aaba35e60ba800c81576bdb17b2ea14e2e2f9a5e87e8f03
4
- data.tar.gz: 3dd8e585304e748d150fe95a735a187c890517a347df413ed3e860d5fb705400
3
+ metadata.gz: 4d2b3a57f2fb7313fe43607e4f36e8533d588fc52384903412fa8dc6221b3de0
4
+ data.tar.gz: a5c313b268869b95886e5bfb31e8ee1d7aa960cc5cf93697a11bfaacf5923cc1
5
5
  SHA512:
6
- metadata.gz: c2b4a8e13d9c0e507a331125815f0d7321a2dd9dabcee8b9955e7fbdd45c70ad80854b134adbcce0acabc6e41bb91f6aff73b1d1250b18f55544f30a88eba646
7
- data.tar.gz: 45400556fb87ed962227d6d91aca474b016bb7680c9b48af7b97b697b47b369748efb85c3a5e974c70db8cc8fe0d376e4ab78a6036ffb28ee26152e86cb6b22f
6
+ metadata.gz: 0a0299d5f038467742a54c128fc5694019ee84008eb03cd77be9dc15aa07706bf8dcce899d0abb098324e8673c6fcdc1036097ee215fedcce14aa9a23e27ca61
7
+ data.tar.gz: c9a49a17819683e6b69431a701039bc947e022c4b138d61273f31a4256b3c7721247dffd0fda075bba65c544debbe7e9f7e2aeaa0278a6d65e0d21650b967807
data/bin/blog CHANGED
@@ -24,29 +24,57 @@ def pick_editor
24
24
  file = `which #{name}`.chomp
25
25
  end
26
26
 
27
+ def get_universal
28
+ univ = "#{@blog.root}/data/universal.lt3"
29
+ if yesno("Faster initial setup? (no: edit universal.lt3)")
30
+ author = ask("Author name: ")
31
+ site = ask("Site/domain: ")
32
+ # Now stash it...
33
+ str = File.read(univ)
34
+ str = str.gsub(/AUTHOR/, author)
35
+ str = str.gsub(/SITE_DOMAIN/, site)
36
+ else
37
+ vim_params = '-c ":set hlsearch" -c ":hi Search ctermfg=2 ctermbg=6" +/"\(AUTHOR.*\|SITE.*\)"'
38
+ edit_file(univ, vim: vim_params)
39
+ end
40
+ end
41
+
42
+ def get_global
43
+ if yesno("Faster view setup? (no: edit global.lt3)")
44
+ view_name = ask("\nFilename: ")
45
+ @blog.create_view(view_name) # call change_view??
46
+ title = ask("View title: ")
47
+ subtitle = ask("Subtitle : ")
48
+ gname = "#{@blog.root}/views/#{view_name}/themes/standard/global.lt3"
49
+ text = File.read(gname)
50
+ text = text.gsub(/VIEW_NAME/, view_name)
51
+ text = text.gsub(/VIEW_TITLE/, title)
52
+ text = text.gsub(/VIEW_SUBTITLE/, subtitle)
53
+ File.write(gname, text)
54
+ else
55
+ view_name = ask("\nFilename: ")
56
+ @blog.create_view(view_name) # call change_view??
57
+ vim_params = '-c ":set hlsearch" -c ":hi Search ctermfg=2 ctermbg=6" +/"\(VIEW_.*\|SITE.*\)"'
58
+ edit_file(@blog.view.dir/"themes/standard/global.lt3", vim: vim_params)
59
+ end
60
+ end
61
+
27
62
  def get_started
28
63
  if yesno("Do you want to qo a quick setup?")
29
64
  puts " First choose your editor."
30
65
  @blog.editor = pick_editor
31
66
  File.write("#{@blog.root}/data/EDITOR", @blog.editor)
32
67
 
33
- if yesno("Edit settings now?")
34
- fname = "#{@blog.root}/data/universal.lt3"
35
- vim_params = '-c ":set hlsearch" -c ":hi Search ctermfg=2 ctermbg=6" +/"\(AUTHOR.*\|SITE.*\)"'
36
- edit_file(fname, vim: vim_params)
37
- end
68
+ get_universal
38
69
  # Now create a custom global.lt3
39
70
  @blog._generate_global
40
- noview = true
41
71
  puts fx("\n Quick setup complete!", :bold)
42
72
  if yesno("Create your first view now?")
43
- cmd_new_view(nil)
44
- noview = false
73
+ get_global
45
74
  puts "\n View #{@blog.view} created!\n "
46
75
  end
47
76
  end
48
77
 
49
-
50
78
  puts
51
79
  print fx(" For help", :bold)
52
80
  puts " type h or help."
@@ -2,7 +2,7 @@
2
2
  if ! (Object.constants.include?(:RuneBlog) && RuneBlog.constants.include?(:Path))
3
3
 
4
4
  class RuneBlog
5
- VERSION = "0.2.86"
5
+ VERSION = "0.2.87"
6
6
 
7
7
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
8
8
  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.86
4
+ version: 0.2.87
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton