gollum 2.5.0 → 2.5.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of gollum might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/bin/gollum +2 -2
- data/gollum.gemspec +8 -5
- data/lib/gollum/app.rb +4 -5
- data/lib/gollum/public/gollum/javascript/gollum.dialog.js +5 -1
- data/lib/gollum/public/gollum/javascript/gollum.js +4 -3
- data/lib/gollum/templates/layout.mustache +1 -1
- data/lib/gollum/uri_encode_component.rb +1 -1
- data/lib/gollum/views/edit.rb +3 -3
- data/lib/gollum.rb +1 -2
- data/openrc/conf.d/gollum +3 -0
- data/openrc/init.d/gollum +36 -0
- data/templates/helper_wiki.rb +3 -2
- metadata +47 -47
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d82df1b3771fa7a798a7c1f7be6615897a00ffed
|
4
|
+
data.tar.gz: e5214c9186591b345b68614ec135082e779075a0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1b5604f61243620cc9c7fad363c074d0deef153701647b913afaa17d7fb0d2a0d0f141334d11e157413e6d66c76c476c12c47bd510547b7429d10a182c5bdc9d
|
7
|
+
data.tar.gz: 08774f4a7599911a76fcdcbf205912f987dce00c444a1410e9f31303b6cb922c79e60c205d5d7d141a80c5cc0179207f5fe82f9b902fb1a89984e18e1373e580
|
data/bin/gollum
CHANGED
@@ -146,7 +146,7 @@ if options['irb']
|
|
146
146
|
begin
|
147
147
|
require 'gollum-lib'
|
148
148
|
wiki = Gollum::Wiki.new(gollum_path, wiki_options)
|
149
|
-
if !wiki.exist? then raise
|
149
|
+
if !wiki.exist? then raise Gollum::InvalidGitRepositoryError end
|
150
150
|
puts "Loaded Gollum wiki at #{File.expand_path(gollum_path).inspect}."
|
151
151
|
puts
|
152
152
|
puts %( page = wiki.page('page-name'))
|
@@ -160,7 +160,7 @@ if options['irb']
|
|
160
160
|
puts
|
161
161
|
puts "Check out the Gollum README for more."
|
162
162
|
IRB.start_session(binding)
|
163
|
-
rescue
|
163
|
+
rescue Gollum::InvalidGitRepositoryError, Gollum::NoSuchPathError
|
164
164
|
puts "Invalid Gollum wiki at #{File.expand_path(gollum_path).inspect}"
|
165
165
|
exit 0
|
166
166
|
end
|
data/gollum.gemspec
CHANGED
@@ -5,8 +5,8 @@ Gem::Specification.new do |s|
|
|
5
5
|
s.required_ruby_version = ">= 1.9"
|
6
6
|
|
7
7
|
s.name = 'gollum'
|
8
|
-
s.version = '2.5.
|
9
|
-
s.date = '2013-
|
8
|
+
s.version = '2.5.1'
|
9
|
+
s.date = '2013-10-15'
|
10
10
|
s.rubyforge_project = 'gollum'
|
11
11
|
s.license = 'MIT'
|
12
12
|
|
@@ -24,10 +24,11 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.rdoc_options = ["--charset=UTF-8"]
|
25
25
|
s.extra_rdoc_files = %w[README.md LICENSE]
|
26
26
|
|
27
|
-
s.add_dependency 'gollum-lib', '~> 1.0.
|
28
|
-
s.add_dependency '
|
27
|
+
s.add_dependency 'gollum-lib', '~> 1.0.8'
|
28
|
+
s.add_dependency 'github-markdown', '~> 0.5.5'
|
29
|
+
s.add_dependency 'sinatra', '~> 1.4.3'
|
29
30
|
s.add_dependency 'mustache', ['>= 0.99.4', '< 1.0.0']
|
30
|
-
s.add_dependency 'useragent', '~> 0.
|
31
|
+
s.add_dependency 'useragent', '~> 0.8.2'
|
31
32
|
|
32
33
|
s.add_development_dependency 'rack-test', '~> 0.6.2'
|
33
34
|
s.add_development_dependency 'shoulda', ['>= 3.4.0', '< 3.5.0']
|
@@ -529,6 +530,8 @@ Gem::Specification.new do |s|
|
|
529
530
|
licenses/css_tree_menu_thecssninja/license.txt
|
530
531
|
licenses/licenses.txt
|
531
532
|
licenses/unity_asset_pool/COPYRIGHT
|
533
|
+
openrc/conf.d/gollum
|
534
|
+
openrc/init.d/gollum
|
532
535
|
templates/formatting.html
|
533
536
|
templates/helper_wiki.rb
|
534
537
|
]
|
data/lib/gollum/app.rb
CHANGED
@@ -14,8 +14,8 @@ require 'gollum/views/has_page'
|
|
14
14
|
require File.expand_path '../helpers', __FILE__
|
15
15
|
|
16
16
|
#required to upload bigger binary files
|
17
|
-
|
18
|
-
|
17
|
+
Gollum::set_git_timeout(120)
|
18
|
+
Gollum::set_git_max_filesize(190 * 10**6)
|
19
19
|
|
20
20
|
# Fix to_url
|
21
21
|
class String
|
@@ -23,7 +23,7 @@ class String
|
|
23
23
|
# _Header => header which causes errors
|
24
24
|
def to_url
|
25
25
|
return nil if self.nil?
|
26
|
-
upstream_to_url :exclude => ['_Header', '_Footer', '_Sidebar']
|
26
|
+
upstream_to_url :exclude => ['_Header', '_Footer', '_Sidebar'], :force_downcase => false
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -141,8 +141,7 @@ module Precious
|
|
141
141
|
else
|
142
142
|
@page = page
|
143
143
|
@page.version = wiki.repo.log(wiki.ref, @page.path).first
|
144
|
-
|
145
|
-
@content = raw_data.respond_to?(:force_encoding) ? raw_data.force_encoding('UTF-8') : raw_data
|
144
|
+
@content = page.text_data
|
146
145
|
mustache :edit
|
147
146
|
end
|
148
147
|
else
|
@@ -95,13 +95,17 @@
|
|
95
95
|
|
96
96
|
var id = fieldAttributes.id || 'upload';
|
97
97
|
var name = fieldAttributes.name || 'file';
|
98
|
-
var action = fieldAttributes.action || 'uploadFile';
|
98
|
+
var action = fieldAttributes.action || '/uploadFile';
|
99
99
|
|
100
100
|
html += '<form method=post enctype="multipart/form-data" ' +
|
101
101
|
'action="' + action + '" ' + 'id="' + id + '">';
|
102
102
|
html += '<input type=file name="' + name + '">';
|
103
103
|
html += '</form>';
|
104
104
|
|
105
|
+
if( fieldAttributes.context ){
|
106
|
+
html += '<span class="context">' + fieldAttributes.context + '</span>';
|
107
|
+
}
|
108
|
+
|
105
109
|
return html;
|
106
110
|
},
|
107
111
|
|
@@ -154,7 +154,8 @@ $(document).ready(function() {
|
|
154
154
|
title: 'Upload File',
|
155
155
|
fields: [
|
156
156
|
{
|
157
|
-
type: 'file'
|
157
|
+
type: 'file',
|
158
|
+
context: 'Your uploaded file will be accessible at /uploads/[filename]'
|
158
159
|
}
|
159
160
|
],
|
160
161
|
OK: function( res ) {
|
@@ -171,7 +172,7 @@ $(document).ready(function() {
|
|
171
172
|
|
172
173
|
var path = pagePath();
|
173
174
|
var oldName = pageName();
|
174
|
-
var context_blurb =
|
175
|
+
var context_blurb =
|
175
176
|
"Renamed page will be under " +
|
176
177
|
"<span class='path'>" + htmlEscape('/' + path) + "</span>" +
|
177
178
|
" unless an absolute path is given."
|
@@ -225,7 +226,7 @@ $(document).ready(function() {
|
|
225
226
|
// For consistency remove the trailing /
|
226
227
|
path = path.replace(/\/$/,'')
|
227
228
|
}
|
228
|
-
var context_blurb =
|
229
|
+
var context_blurb =
|
229
230
|
"Page will be created under " +
|
230
231
|
"<span class='path'>" + htmlEscape('/' + path) + "</span>" +
|
231
232
|
" unless an absolute path is given."
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<script>
|
16
16
|
var baseUrl = '{{base_url}}';
|
17
17
|
{{#page}}
|
18
|
-
var pageFullPath = '{{
|
18
|
+
var pageFullPath = '{{url_path_display}}';
|
19
19
|
{{/page}}
|
20
20
|
</script>
|
21
21
|
<script type="text/javascript" src="{{base_url}}/javascript/jquery-1.7.2.min.js"></script>
|
data/lib/gollum/views/edit.rb
CHANGED
@@ -22,7 +22,7 @@ module Precious
|
|
22
22
|
def header
|
23
23
|
if @header.nil?
|
24
24
|
if page = @page.header
|
25
|
-
@header = page.
|
25
|
+
@header = page.text_data
|
26
26
|
else
|
27
27
|
@header = false
|
28
28
|
end
|
@@ -33,7 +33,7 @@ module Precious
|
|
33
33
|
def footer
|
34
34
|
if @footer.nil?
|
35
35
|
if page = @page.footer
|
36
|
-
@footer = page.
|
36
|
+
@footer = page.text_data
|
37
37
|
else
|
38
38
|
@footer = false
|
39
39
|
end
|
@@ -44,7 +44,7 @@ module Precious
|
|
44
44
|
def sidebar
|
45
45
|
if @sidebar.nil?
|
46
46
|
if page = @page.sidebar
|
47
|
-
@sidebar = page.
|
47
|
+
@sidebar = page.text_data
|
48
48
|
else
|
49
49
|
@sidebar = false
|
50
50
|
end
|
data/lib/gollum.rb
CHANGED
@@ -5,7 +5,6 @@ require 'digest/sha1'
|
|
5
5
|
require 'ostruct'
|
6
6
|
|
7
7
|
# external
|
8
|
-
require 'grit'
|
9
8
|
require 'github/markup'
|
10
9
|
require 'sanitize'
|
11
10
|
|
@@ -17,7 +16,7 @@ require File.expand_path('../gollum/uri_encode_component', __FILE__)
|
|
17
16
|
$KCODE = 'U' if RUBY_VERSION[0,3] == '1.8'
|
18
17
|
|
19
18
|
module Gollum
|
20
|
-
VERSION = '2.5.
|
19
|
+
VERSION = '2.5.1'
|
21
20
|
|
22
21
|
def self.assets_path
|
23
22
|
::File.expand_path('gollum/public', ::File.dirname(__FILE__))
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#!/sbin/runscript
|
2
|
+
# Distributed under the terms of the MIT License
|
3
|
+
|
4
|
+
NAME=gollum
|
5
|
+
PID=/var/run/${NAME}.pid
|
6
|
+
EXEC=/usr/local/bin/gollum
|
7
|
+
LOG=/var/log/gollum.log
|
8
|
+
|
9
|
+
depend() {
|
10
|
+
need net
|
11
|
+
}
|
12
|
+
|
13
|
+
start() {
|
14
|
+
# Change log file to be owned by GOLLUM_USER
|
15
|
+
touch "${LOG}"
|
16
|
+
chown "${GOLLUM_USER}" "${LOG}"
|
17
|
+
|
18
|
+
ebegin "Starting Gollum"
|
19
|
+
start-stop-daemon --start \
|
20
|
+
--name "${NAME}" \
|
21
|
+
--user "${GOLLUM_USER}" \
|
22
|
+
--pidfile "${PID}" \
|
23
|
+
--make-pidfile --background \
|
24
|
+
--stderr "${LOG}" \
|
25
|
+
--exec "${EXEC}" -- $GOLLUM_OPTS "$GOLLUM_BASE"
|
26
|
+
eend $?
|
27
|
+
}
|
28
|
+
|
29
|
+
stop() {
|
30
|
+
ebegin "Stopping Gollum"
|
31
|
+
start-stop-daemon --stop \
|
32
|
+
--name "${NAME}" \
|
33
|
+
--user "${GOLLUM_USER}" \
|
34
|
+
--pidfile "${PID}"
|
35
|
+
eend $?
|
36
|
+
}
|
data/templates/helper_wiki.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
class WikiFactory
|
2
2
|
def self.create p
|
3
|
-
|
4
|
-
|
3
|
+
examples = testpath "examples"
|
4
|
+
path = File.join(examples, "test.git")
|
5
|
+
FileUtils.cp_r File.join(examples, "empty.git"), path, :remove_destination => true
|
5
6
|
Gollum::Wiki.default_options = {:universal_toc => false}
|
6
7
|
cleanup = Proc.new { FileUtils.rm_r File.join(File.dirname(__FILE__), *%w[examples test.git]) }
|
7
8
|
Gollum::Wiki.new(@path), @path, cleanup
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gollum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
5
|
-
prerelease:
|
4
|
+
version: 2.5.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Tom Preston-Werner
|
@@ -10,130 +9,130 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2013-
|
12
|
+
date: 2013-10-15 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: gollum-lib
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- - ~>
|
18
|
+
- - "~>"
|
21
19
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.0.
|
20
|
+
version: 1.0.8
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- - ~>
|
25
|
+
- - "~>"
|
29
26
|
- !ruby/object:Gem::Version
|
30
|
-
version: 1.0.
|
27
|
+
version: 1.0.8
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: github-markdown
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 0.5.5
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 0.5.5
|
31
42
|
- !ruby/object:Gem::Dependency
|
32
43
|
name: sinatra
|
33
44
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
45
|
requirements:
|
36
|
-
- - ~>
|
46
|
+
- - "~>"
|
37
47
|
- !ruby/object:Gem::Version
|
38
|
-
version: 1.4.
|
48
|
+
version: 1.4.3
|
39
49
|
type: :runtime
|
40
50
|
prerelease: false
|
41
51
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
52
|
requirements:
|
44
|
-
- - ~>
|
53
|
+
- - "~>"
|
45
54
|
- !ruby/object:Gem::Version
|
46
|
-
version: 1.4.
|
55
|
+
version: 1.4.3
|
47
56
|
- !ruby/object:Gem::Dependency
|
48
57
|
name: mustache
|
49
58
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
59
|
requirements:
|
52
|
-
- -
|
60
|
+
- - ">="
|
53
61
|
- !ruby/object:Gem::Version
|
54
62
|
version: 0.99.4
|
55
|
-
- - <
|
63
|
+
- - "<"
|
56
64
|
- !ruby/object:Gem::Version
|
57
65
|
version: 1.0.0
|
58
66
|
type: :runtime
|
59
67
|
prerelease: false
|
60
68
|
version_requirements: !ruby/object:Gem::Requirement
|
61
|
-
none: false
|
62
69
|
requirements:
|
63
|
-
- -
|
70
|
+
- - ">="
|
64
71
|
- !ruby/object:Gem::Version
|
65
72
|
version: 0.99.4
|
66
|
-
- - <
|
73
|
+
- - "<"
|
67
74
|
- !ruby/object:Gem::Version
|
68
75
|
version: 1.0.0
|
69
76
|
- !ruby/object:Gem::Dependency
|
70
77
|
name: useragent
|
71
78
|
requirement: !ruby/object:Gem::Requirement
|
72
|
-
none: false
|
73
79
|
requirements:
|
74
|
-
- - ~>
|
80
|
+
- - "~>"
|
75
81
|
- !ruby/object:Gem::Version
|
76
|
-
version: 0.
|
82
|
+
version: 0.8.2
|
77
83
|
type: :runtime
|
78
84
|
prerelease: false
|
79
85
|
version_requirements: !ruby/object:Gem::Requirement
|
80
|
-
none: false
|
81
86
|
requirements:
|
82
|
-
- - ~>
|
87
|
+
- - "~>"
|
83
88
|
- !ruby/object:Gem::Version
|
84
|
-
version: 0.
|
89
|
+
version: 0.8.2
|
85
90
|
- !ruby/object:Gem::Dependency
|
86
91
|
name: rack-test
|
87
92
|
requirement: !ruby/object:Gem::Requirement
|
88
|
-
none: false
|
89
93
|
requirements:
|
90
|
-
- - ~>
|
94
|
+
- - "~>"
|
91
95
|
- !ruby/object:Gem::Version
|
92
96
|
version: 0.6.2
|
93
97
|
type: :development
|
94
98
|
prerelease: false
|
95
99
|
version_requirements: !ruby/object:Gem::Requirement
|
96
|
-
none: false
|
97
100
|
requirements:
|
98
|
-
- - ~>
|
101
|
+
- - "~>"
|
99
102
|
- !ruby/object:Gem::Version
|
100
103
|
version: 0.6.2
|
101
104
|
- !ruby/object:Gem::Dependency
|
102
105
|
name: shoulda
|
103
106
|
requirement: !ruby/object:Gem::Requirement
|
104
|
-
none: false
|
105
107
|
requirements:
|
106
|
-
- -
|
108
|
+
- - ">="
|
107
109
|
- !ruby/object:Gem::Version
|
108
110
|
version: 3.4.0
|
109
|
-
- - <
|
111
|
+
- - "<"
|
110
112
|
- !ruby/object:Gem::Version
|
111
113
|
version: 3.5.0
|
112
114
|
type: :development
|
113
115
|
prerelease: false
|
114
116
|
version_requirements: !ruby/object:Gem::Requirement
|
115
|
-
none: false
|
116
117
|
requirements:
|
117
|
-
- -
|
118
|
+
- - ">="
|
118
119
|
- !ruby/object:Gem::Version
|
119
120
|
version: 3.4.0
|
120
|
-
- - <
|
121
|
+
- - "<"
|
121
122
|
- !ruby/object:Gem::Version
|
122
123
|
version: 3.5.0
|
123
124
|
- !ruby/object:Gem::Dependency
|
124
125
|
name: minitest-reporters
|
125
126
|
requirement: !ruby/object:Gem::Requirement
|
126
|
-
none: false
|
127
127
|
requirements:
|
128
|
-
- - ~>
|
128
|
+
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: 0.14.16
|
131
131
|
type: :development
|
132
132
|
prerelease: false
|
133
133
|
version_requirements: !ruby/object:Gem::Requirement
|
134
|
-
none: false
|
135
134
|
requirements:
|
136
|
-
- - ~>
|
135
|
+
- - "~>"
|
137
136
|
- !ruby/object:Gem::Version
|
138
137
|
version: 0.14.16
|
139
138
|
description: A simple, Git-powered wiki with a sweet API and local frontend.
|
@@ -639,31 +638,32 @@ files:
|
|
639
638
|
- licenses/css_tree_menu_thecssninja/license.txt
|
640
639
|
- licenses/licenses.txt
|
641
640
|
- licenses/unity_asset_pool/COPYRIGHT
|
641
|
+
- openrc/conf.d/gollum
|
642
|
+
- openrc/init.d/gollum
|
642
643
|
- templates/formatting.html
|
643
644
|
- templates/helper_wiki.rb
|
644
645
|
homepage: http://github.com/gollum/gollum
|
645
646
|
licenses:
|
646
647
|
- MIT
|
648
|
+
metadata: {}
|
647
649
|
post_install_message:
|
648
650
|
rdoc_options:
|
649
|
-
- --charset=UTF-8
|
651
|
+
- "--charset=UTF-8"
|
650
652
|
require_paths:
|
651
653
|
- lib
|
652
654
|
required_ruby_version: !ruby/object:Gem::Requirement
|
653
|
-
none: false
|
654
655
|
requirements:
|
655
|
-
- -
|
656
|
+
- - ">="
|
656
657
|
- !ruby/object:Gem::Version
|
657
658
|
version: '1.9'
|
658
659
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
659
|
-
none: false
|
660
660
|
requirements:
|
661
|
-
- -
|
661
|
+
- - ">="
|
662
662
|
- !ruby/object:Gem::Version
|
663
663
|
version: '0'
|
664
664
|
requirements: []
|
665
665
|
rubyforge_project: gollum
|
666
|
-
rubygems_version: 1.
|
666
|
+
rubygems_version: 2.1.9
|
667
667
|
signing_key:
|
668
668
|
specification_version: 2
|
669
669
|
summary: A simple, Git-powered wiki.
|