gollum 3.1.1 → 3.1.2
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 +5 -13
- data/HISTORY.md +4 -0
- data/README.md +1 -0
- data/bin/gollum +4 -0
- data/gollum.gemspec +2 -2
- data/lib/gollum.rb +1 -1
- data/lib/gollum/app.rb +12 -3
- data/lib/gollum/editing_auth.rb +2 -2
- data/lib/gollum/helpers.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MTIzYjg2ZmZiZmQwZWNlOWIzNGE2YzU2MDZkY2MwN2MxZmYwZjUxOA==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e43f23eb19c3070aec9fc7723537000b565289ea
|
4
|
+
data.tar.gz: e9451a5abaf169f6df0e9d3fda64654625cadaf8
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
NTAwYjQ5NjI5NDgzOGU4M2QyMDM3NjE3ZDdmMzFiNjBiOGY4NzNmYzAxY2Vi
|
11
|
-
Y2VmNTUzNmQxMGEwZmE5OWI5YzFhYTY5NTc0NzVmNGEwZGYyZjU=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MGFjZWFjODgwMmM0MDAxNWYwMzhlYjRkZTc4MWI2ODhlNjU0MDQzMDA5NGRh
|
14
|
-
ZTU3ODkwYmY2ZTM3NjFmYjkxOGYxY2RkYjExMDNiNzRjNWVhZTkwNWZiY2Rl
|
15
|
-
MGFmZjUyOTk5OTc4MTljNTc3OTI1ODdjMmNlODk3ZTY0NDIxNTQ=
|
6
|
+
metadata.gz: 8e57862aa0d272111c091e911541a5aa486c200cf26e9236e2a2c04f787a5e13ffa8deefcfcae131efd9042d5c1dac3611c1a72d5c6d9e20020f9e18c60a0b60
|
7
|
+
data.tar.gz: 8c1bafd8c1f889c447096481581d07e0da624797b4505cf2d8ec8405a2ae060df548557a7bf2c70dc5cf20db614396d3d7f86af78e3891b55665e72aebfee0b5
|
data/HISTORY.md
CHANGED
data/README.md
CHANGED
@@ -109,6 +109,7 @@ Options:
|
|
109
109
|
--base-path [PATH] Specify the base path for the served pages (default: /) Example: --base-path wiki yields the home page accessible at http://localhost:4567/wiki/.
|
110
110
|
--gollum-path [PATH] Specify the path to the git repository to be served.
|
111
111
|
--ref [REF] Specify the repository ref to use (default: master).
|
112
|
+
--bare Specify that the repository is bare (only necessary when using the grit adapter).
|
112
113
|
--no-edit Restricts editing capability through frontend.
|
113
114
|
--no-live-preview Disables livepreview.
|
114
115
|
--live-preview Enables livepreview.
|
data/bin/gollum
CHANGED
@@ -81,6 +81,10 @@ opts = OptionParser.new do |opts|
|
|
81
81
|
wiki_options[:ref] = ref
|
82
82
|
end
|
83
83
|
|
84
|
+
opts.on("--bare", "Specify that the repository is bare (only necessary when using the grit adapter).") do
|
85
|
+
wiki_options[:repo_is_bare] = true
|
86
|
+
end
|
87
|
+
|
84
88
|
opts.on("--no-edit", "Restricts editing capability through frontend.") do
|
85
89
|
wiki_options[:allow_editing] = false
|
86
90
|
end
|
data/gollum.gemspec
CHANGED
data/lib/gollum.rb
CHANGED
@@ -16,7 +16,7 @@ require File.expand_path('../gollum/uri_encode_component', __FILE__)
|
|
16
16
|
$KCODE = 'U' if RUBY_VERSION[0, 3] == '1.8'
|
17
17
|
|
18
18
|
module Gollum
|
19
|
-
VERSION = '3.1.
|
19
|
+
VERSION = '3.1.2'
|
20
20
|
|
21
21
|
def self.assets_path
|
22
22
|
::File.expand_path('gollum/public', ::File.dirname(__FILE__))
|
data/lib/gollum/app.rb
CHANGED
@@ -22,6 +22,13 @@ Gollum::set_git_max_filesize(190 * 10**6)
|
|
22
22
|
# Fix to_url
|
23
23
|
class String
|
24
24
|
alias :upstream_to_url :to_url
|
25
|
+
|
26
|
+
if defined?(Gollum::GIT_ADAPTER) && Gollum::GIT_ADAPTER != 'grit'
|
27
|
+
def to_ascii
|
28
|
+
self # Do not transliterate utf-8 url's unless using Grit
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
25
32
|
# _Header => header which causes errors
|
26
33
|
def to_url
|
27
34
|
return nil if self.nil?
|
@@ -95,7 +102,8 @@ module Precious
|
|
95
102
|
@css = settings.wiki_options[:css]
|
96
103
|
@js = settings.wiki_options[:js]
|
97
104
|
@mathjax_config = settings.wiki_options[:mathjax_config]
|
98
|
-
|
105
|
+
settings.wiki_options[:allow_editing] = settings.wiki_options.fetch(:allow_editing, true)
|
106
|
+
@allow_editing = settings.wiki_options[:allow_editing]
|
99
107
|
end
|
100
108
|
|
101
109
|
get '/' do
|
@@ -310,7 +318,7 @@ module Precious
|
|
310
318
|
wiki.write_page(name, format, params[:content], commit_message, path)
|
311
319
|
|
312
320
|
page_dir = settings.wiki_options[:page_file_dir].to_s
|
313
|
-
redirect to("/#{clean_url(::File.join(page_dir, path, name))}")
|
321
|
+
redirect to("/#{clean_url(::File.join(page_dir, path, encodeURIComponent(name)))}")
|
314
322
|
rescue Gollum::DuplicatePageError => e
|
315
323
|
@message = "Duplicate page: #{e.message}"
|
316
324
|
mustache :error
|
@@ -372,7 +380,7 @@ module Precious
|
|
372
380
|
end
|
373
381
|
|
374
382
|
post '/compare/*' do
|
375
|
-
@file = params[:splat].first
|
383
|
+
@file = encodeURIComponent(params[:splat].first)
|
376
384
|
@versions = params[:versions] || []
|
377
385
|
if @versions.size < 2
|
378
386
|
redirect to("/history/#{@file}")
|
@@ -443,6 +451,7 @@ module Precious
|
|
443
451
|
wiki = Gollum::Wiki.new(settings.gollum_path, wiki_options)
|
444
452
|
@results = wiki.pages
|
445
453
|
@results += wiki.files if settings.wiki_options[:show_all]
|
454
|
+
@results = @results.sort_by { |p| p.name.downcase } # Sort Results alphabetically, fixes 922
|
446
455
|
@ref = wiki.ref
|
447
456
|
mustache :pages
|
448
457
|
end
|
data/lib/gollum/editing_auth.rb
CHANGED
@@ -7,7 +7,7 @@ module Precious
|
|
7
7
|
def call(env)
|
8
8
|
@env = env
|
9
9
|
# Blocks all potentially editable pages. Use EditingAuth::whitelist_pages to unblock pages.
|
10
|
-
unless (env["REQUEST_METHOD"] == "GET") ||
|
10
|
+
unless (env["REQUEST_METHOD"] == "GET") || @app.settings.wiki_options[:allow_editing]
|
11
11
|
return block unless excluded_page?
|
12
12
|
end
|
13
13
|
@app.call(env)
|
@@ -31,4 +31,4 @@ module Precious
|
|
31
31
|
return ["/compare/"]
|
32
32
|
end
|
33
33
|
end
|
34
|
-
end
|
34
|
+
end
|
data/lib/gollum/helpers.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gollum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Preston-Werner
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-01-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gollum-lib
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
- - ~>
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '4.0'
|
21
|
-
- -
|
21
|
+
- - '>='
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 4.0.1
|
24
24
|
type: :runtime
|
@@ -28,7 +28,7 @@ dependencies:
|
|
28
28
|
- - ~>
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: '4.0'
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 4.0.1
|
34
34
|
- !ruby/object:Gem::Dependency
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.4'
|
55
|
-
- -
|
55
|
+
- - '>='
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: 1.4.4
|
58
58
|
type: :runtime
|
@@ -62,14 +62,14 @@ dependencies:
|
|
62
62
|
- - ~>
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: '1.4'
|
65
|
-
- -
|
65
|
+
- - '>='
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: 1.4.4
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
69
|
name: mustache
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- -
|
72
|
+
- - '>='
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: 0.99.5
|
75
75
|
- - <
|
@@ -79,7 +79,7 @@ dependencies:
|
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
|
-
- -
|
82
|
+
- - '>='
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: 0.99.5
|
85
85
|
- - <
|
@@ -695,17 +695,17 @@ require_paths:
|
|
695
695
|
- lib
|
696
696
|
required_ruby_version: !ruby/object:Gem::Requirement
|
697
697
|
requirements:
|
698
|
-
- -
|
698
|
+
- - '>='
|
699
699
|
- !ruby/object:Gem::Version
|
700
700
|
version: '1.9'
|
701
701
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
702
702
|
requirements:
|
703
|
-
- -
|
703
|
+
- - '>='
|
704
704
|
- !ruby/object:Gem::Version
|
705
705
|
version: '0'
|
706
706
|
requirements: []
|
707
707
|
rubyforge_project: gollum
|
708
|
-
rubygems_version: 2.
|
708
|
+
rubygems_version: 2.0.0
|
709
709
|
signing_key:
|
710
710
|
specification_version: 2
|
711
711
|
summary: A simple, Git-powered wiki.
|