soywiki 0.8.2 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/soywiki/html.rb +10 -6
- data/lib/soywiki.rb +1 -1
- data/lib/soywiki.vim +1 -1
- data/plugin/soywiki_starter.vim +16 -0
- metadata +21 -30
data/lib/soywiki/html.rb
CHANGED
@@ -32,15 +32,19 @@ module Soywiki
|
|
32
32
|
PAGE_TEMPLATE = File.read(File.join(File.dirname(__FILE__), '..', 'page_template.html.haml'))
|
33
33
|
|
34
34
|
def self.generate_page(text, namespace, pages, namespaces)
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
text = text.split("\n")
|
36
|
+
|
37
|
+
title = text.shift || ''
|
38
|
+
body = if text.empty?
|
39
|
+
''
|
40
|
+
elsif @markdown
|
41
|
+
RDiscount.new(text.join("\n").strip)
|
38
42
|
else
|
39
|
-
process(text.
|
43
|
+
process(text.join("\n").strip)
|
40
44
|
end
|
41
45
|
|
42
|
-
Haml::Engine.new(PAGE_TEMPLATE).render(nil, :body => body,
|
43
|
-
:title => title,
|
46
|
+
Haml::Engine.new(PAGE_TEMPLATE).render(nil, :body => body,
|
47
|
+
:title => title,
|
44
48
|
:namespace => namespace,
|
45
49
|
:namespaces => namespaces,
|
46
50
|
:pages => pages,
|
data/lib/soywiki.rb
CHANGED
data/lib/soywiki.vim
CHANGED
@@ -259,7 +259,7 @@ func! s:rename_page(page_path_or_title)
|
|
259
259
|
write!
|
260
260
|
call system("mkdir -p " . s:namespace_of_title(page_title))
|
261
261
|
let original_file = bufname('')
|
262
|
-
if executable("git"
|
262
|
+
if executable("git")
|
263
263
|
echo system("git mv " . original_file . " " . newfile)
|
264
264
|
else
|
265
265
|
echo system("mv " . original_file . " " . newfile)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
" Vim script that turns Vim into a personal wiki
|
2
|
+
" Maintainer: Daniel Choi <dhchoi@gmail.com>
|
3
|
+
" License: MIT License (c) 2011 Daniel Choi
|
4
|
+
|
5
|
+
if exists("g:SoyWikiStarterLoaded") || &cp || version < 700
|
6
|
+
finish
|
7
|
+
endif
|
8
|
+
let g:SoyWikiStarterLoaded = 1
|
9
|
+
|
10
|
+
|
11
|
+
func! Soywiki()
|
12
|
+
source /Users/misha/.rvm/gems/ruby-1.9.2-p136/gems/soywiki-0.7.2/lib/soywiki.vim
|
13
|
+
endfunc
|
14
|
+
|
15
|
+
command! -bar -nargs=0 Soywiki :call Soywiki()
|
16
|
+
|
metadata
CHANGED
@@ -1,33 +1,28 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: soywiki
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.8.4
|
4
5
|
prerelease:
|
5
|
-
version: 0.8.2
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Daniel Choi
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
date: 2011-07-16 00:00:00 -04:00
|
14
|
-
default_executable:
|
12
|
+
date: 2011-11-06 00:00:00.000000000Z
|
15
13
|
dependencies: []
|
16
|
-
|
17
14
|
description: A personal and collaborative wiki for Vim users
|
18
|
-
email:
|
15
|
+
email:
|
19
16
|
- dhchoi@gmail.com
|
20
|
-
executables:
|
17
|
+
executables:
|
21
18
|
- soywiki
|
22
19
|
- soywiki-expand
|
23
20
|
- soywiki-ls-t
|
24
21
|
- soywiki-pages-linking-in
|
25
22
|
- soywiki-rename
|
26
23
|
extensions: []
|
27
|
-
|
28
24
|
extra_rdoc_files: []
|
29
|
-
|
30
|
-
files:
|
25
|
+
files:
|
31
26
|
- .gitignore
|
32
27
|
- Gemfile
|
33
28
|
- Gemfile.lock
|
@@ -46,34 +41,30 @@ files:
|
|
46
41
|
- lib/soywiki.vim
|
47
42
|
- lib/soywiki/html.rb
|
48
43
|
- lib/string_ext.rb
|
44
|
+
- plugin/soywiki_starter.vim
|
49
45
|
- soywiki.gemspec
|
50
|
-
has_rdoc: true
|
51
46
|
homepage: http://danielchoi.com/software/soywiki.html
|
52
47
|
licenses: []
|
53
|
-
|
54
48
|
post_install_message:
|
55
49
|
rdoc_options: []
|
56
|
-
|
57
|
-
require_paths:
|
50
|
+
require_paths:
|
58
51
|
- lib
|
59
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
60
53
|
none: false
|
61
|
-
requirements:
|
62
|
-
- -
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
version:
|
65
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ! '>='
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0'
|
58
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
59
|
none: false
|
67
|
-
requirements:
|
68
|
-
- -
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version:
|
60
|
+
requirements:
|
61
|
+
- - ! '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
71
64
|
requirements: []
|
72
|
-
|
73
65
|
rubyforge_project: soywiki
|
74
|
-
rubygems_version: 1.
|
66
|
+
rubygems_version: 1.8.11
|
75
67
|
signing_key:
|
76
68
|
specification_version: 3
|
77
69
|
summary: Wiki with Vim interface and Git repo
|
78
70
|
test_files: []
|
79
|
-
|