Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a2d296a6e | |||
| 8198b4d563 | |||
| 9a79b0a800 | |||
| ca13298d00 | |||
| eaf82e6367 | |||
| cae290ded7 | |||
| a22208a0be | |||
| bc877dc9dc | |||
| 40b1775d42 | |||
| c2dc605adb | |||
| a1e1af07a4 | |||
| 76948130f6 | |||
| f71ba31bfe | |||
| b7caa228e6 | |||
| 0101dd2f65 | |||
| c8baa61fe3 | |||
| 104335706a | |||
| 7c60841bad | |||
| f6a7c57175 | |||
| 730acee609 | |||
| b7295df662 | |||
| aba3ec37d9 | |||
| 020c98bfad | |||
| d33d11e086 | |||
| 2e41751cf6 |
@@ -1,6 +1,7 @@
|
||||
rvm:
|
||||
- 2.4.0
|
||||
- 2.6.0
|
||||
- 3.0.0
|
||||
- jruby-9.2.9.0
|
||||
jdk:
|
||||
- oraclejdk9
|
||||
|
||||
@@ -63,6 +63,8 @@ Pull Requests fixing bugs, implementing new features, or updating documentation
|
||||
bundle exec rake test
|
||||
```
|
||||
|
||||
To profile slow tests, you can use `bundle exec rake test TESTOPTS="--verbose"`.
|
||||
|
||||
### Working with test repositories
|
||||
|
||||
An example of how to add a test file to the bare repository lotr.git.
|
||||
|
||||
+15
@@ -1,3 +1,18 @@
|
||||
# 5.2.1 2021-02-25
|
||||
|
||||
* Fix include call to a missing asset (@benjaminwil). This caused slow first page loads on JRuby.
|
||||
|
||||
# 5.2 2021-02-24
|
||||
|
||||
* Improved styling and Primer upgrade (@benjaminwil)
|
||||
* Add redirect to rename commit (@ViChyavIn)
|
||||
* Updated dependencies
|
||||
* Bugfixes
|
||||
|
||||
# 5.1.2
|
||||
|
||||
* Guard against malicious filenames in breadcrumbs
|
||||
|
||||
# 5.1
|
||||
|
||||
* Bugfixes
|
||||
|
||||
@@ -6,8 +6,6 @@ gollum -- A git-based Wiki
|
||||
[](https://www.codetriage.com/gollum/gollum)
|
||||
[](https://dometto-cuttingedge.herokuapp.com/github/gollum/gollum/info)
|
||||
|
||||
**Please update to gollum 5.1.2 to counter a recent exploit. More info will follow after CVE is assigned.**
|
||||
|
||||
**Gollum version 5.0 is out!** See [here](https://github.com/gollum/gollum/wiki/5.0-release-notes) for a list of changes and new features compared to Gollum version 4.x, and see some [Screenshots](https://github.com/gollum/gollum/wiki/Screenshots) of Gollum's features.
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
+14
-12
@@ -5,8 +5,8 @@ Gem::Specification.new do |s|
|
||||
s.required_ruby_version = '>= 1.9'
|
||||
|
||||
s.name = 'gollum'
|
||||
s.version = '5.1.2'
|
||||
s.date = '2021-01-03'
|
||||
s.version = '5.2.1'
|
||||
s.date = '2021-02-25'
|
||||
s.license = 'MIT'
|
||||
|
||||
s.summary = 'A simple, Git-powered wiki.'
|
||||
@@ -38,6 +38,7 @@ Gem::Specification.new do |s|
|
||||
s.add_dependency 'sprockets-helpers', '~> 1.2'
|
||||
s.add_dependency 'rss', '~> 0.2.9'
|
||||
s.add_dependency 'therubyrhino', '~> 2.1.0'
|
||||
s.add_dependency 'webrick', '~> 1.7'
|
||||
|
||||
s.add_development_dependency 'rack-test', '~> 0.6.3'
|
||||
s.add_development_dependency 'shoulda', '~> 3.6.0'
|
||||
@@ -45,7 +46,6 @@ Gem::Specification.new do |s|
|
||||
s.add_development_dependency 'twitter_cldr', '~> 3.2.0'
|
||||
s.add_development_dependency 'mocha', '~> 1.8.0'
|
||||
s.add_development_dependency 'test-unit', '~> 3.3.0'
|
||||
s.add_development_dependency 'webrick', '~> 1.4.2'
|
||||
|
||||
# = MANIFEST =
|
||||
s.files = %w[
|
||||
@@ -59,6 +59,7 @@ Gem::Specification.new do |s|
|
||||
bin/gollum-migrate-tags
|
||||
config.rb
|
||||
config.ru
|
||||
contrib/automation/gollum-post
|
||||
contrib/openrc/conf.d/gollum
|
||||
contrib/openrc/init.d/gollum
|
||||
contrib/systemd/gollum@.service
|
||||
@@ -68,15 +69,15 @@ Gem::Specification.new do |s|
|
||||
lib/gollum/app.rb
|
||||
lib/gollum/assets.rb
|
||||
lib/gollum/helpers.rb
|
||||
lib/gollum/public/assets/.sprockets-manifest-35882cacf71c40928e0c2dc9b8acf8fe.json
|
||||
lib/gollum/public/assets/app-4215e58002a43c4b2e9f0f7caa05a81c7c09d22a918c6fe40cd8e423db3110b5.css
|
||||
lib/gollum/public/assets/app-4215e58002a43c4b2e9f0f7caa05a81c7c09d22a918c6fe40cd8e423db3110b5.css.gz
|
||||
lib/gollum/public/assets/app-6e925e38a12a40c4fa9e0400cc874e0f4f97b66fdeb90a144dea527dbb544fbd.js
|
||||
lib/gollum/public/assets/app-6e925e38a12a40c4fa9e0400cc874e0f4f97b66fdeb90a144dea527dbb544fbd.js.gz
|
||||
lib/gollum/public/assets/.sprockets-manifest-15b663a27211dc9de9a452b4b74462d7.json
|
||||
lib/gollum/public/assets/app-7a0bbff2e8bad3033e7c17e0e0f886f336a9d23d3b912dcd2ae389c48b4b63e6.css
|
||||
lib/gollum/public/assets/app-7a0bbff2e8bad3033e7c17e0e0f886f336a9d23d3b912dcd2ae389c48b4b63e6.css.gz
|
||||
lib/gollum/public/assets/app-7a4bd115f4bc7ece39bc8073ca0ffad7c5e55cc5837b1464a12dead4905cefb2.js
|
||||
lib/gollum/public/assets/app-7a4bd115f4bc7ece39bc8073ca0ffad7c5e55cc5837b1464a12dead4905cefb2.js.gz
|
||||
lib/gollum/public/assets/criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css
|
||||
lib/gollum/public/assets/criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css.gz
|
||||
lib/gollum/public/assets/editor-b621bfe2cb8823516fb3a96c32e82001b297f6754117b47bdad6e59db85a9d08.js
|
||||
lib/gollum/public/assets/editor-b621bfe2cb8823516fb3a96c32e82001b297f6754117b47bdad6e59db85a9d08.js.gz
|
||||
lib/gollum/public/assets/editor-db10c8351306e92f1926ba225d0cd9c8e886482b3b9820a85825ec3abab5f1cf.js
|
||||
lib/gollum/public/assets/editor-db10c8351306e92f1926ba225d0cd9c8e886482b3b9820a85825ec3abab5f1cf.js.gz
|
||||
lib/gollum/public/assets/print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css
|
||||
lib/gollum/public/assets/print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css.gz
|
||||
lib/gollum/public/gollum/javascript/HOWTO_UPDATE_ACE.md
|
||||
@@ -1174,18 +1175,18 @@ Gem::Specification.new do |s|
|
||||
lib/gollum/public/gollum/javascript/jquery-1.7.2.min.js
|
||||
lib/gollum/public/gollum/javascript/jquery.resize.js
|
||||
lib/gollum/public/gollum/javascript/mousetrap.min.js
|
||||
lib/gollum/public/gollum/javascript/polyfills.js
|
||||
lib/gollum/public/gollum/stylesheets/_base.scss
|
||||
lib/gollum/public/gollum/stylesheets/_breakpoint.scss
|
||||
lib/gollum/public/gollum/stylesheets/_component.scss
|
||||
lib/gollum/public/gollum/stylesheets/_features.scss
|
||||
lib/gollum/public/gollum/stylesheets/_layout.scss
|
||||
lib/gollum/public/gollum/stylesheets/_spinners.scss
|
||||
lib/gollum/public/gollum/stylesheets/app.scss
|
||||
lib/gollum/public/gollum/stylesheets/criticmarkup.scss
|
||||
lib/gollum/public/gollum/stylesheets/dialog.scss
|
||||
lib/gollum/public/gollum/stylesheets/editor.scss
|
||||
lib/gollum/public/gollum/stylesheets/emoji.scss
|
||||
lib/gollum/public/gollum/stylesheets/primer.scss
|
||||
lib/gollum/public/gollum/stylesheets/primer.css
|
||||
lib/gollum/public/gollum/stylesheets/print.scss
|
||||
lib/gollum/public/gollum/stylesheets/spinner.scss
|
||||
lib/gollum/public/gollum/stylesheets/tables.scss
|
||||
@@ -1202,6 +1203,7 @@ Gem::Specification.new do |s|
|
||||
lib/gollum/templates/history_authors/none.mustache
|
||||
lib/gollum/templates/latest_changes.mustache
|
||||
lib/gollum/templates/layout.mustache
|
||||
lib/gollum/templates/mobilenav.mustache
|
||||
lib/gollum/templates/navbar.mustache
|
||||
lib/gollum/templates/overview.mustache
|
||||
lib/gollum/templates/page.mustache
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ require 'rhino' if RUBY_PLATFORM == 'java'
|
||||
require File.expand_path('../gollum/uri_encode_component', __FILE__)
|
||||
|
||||
module Gollum
|
||||
VERSION = '5.1.2'
|
||||
VERSION = '5.2.1'
|
||||
|
||||
def self.assets_path
|
||||
::File.expand_path('gollum/public', ::File.dirname(__FILE__))
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ module Precious
|
||||
@js = settings.wiki_options[:js]
|
||||
@mathjax_config = settings.wiki_options[:mathjax_config]
|
||||
|
||||
@use_static_assets = settings.wiki_options.fetch(:static, settings.environment == :production || settings.environment == :staging)
|
||||
@use_static_assets = settings.wiki_options.fetch(:static, settings.environment != :development)
|
||||
@static_assets_path = settings.wiki_options.fetch(:static_assets_path, ::File.join(File.dirname(__FILE__), 'public/assets'))
|
||||
@mathjax_path = ::File.join(File.dirname(__FILE__), 'public/gollum/javascript/MathJax')
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"files":{"app-0fd228e26bfbe6fe31a2da268eb0e98e780c1191c1a918adf383377946e9c838.js":{"logical_path":"app.js","mtime":"2021-03-23T08:40:11-07:00","size":136020,"digest":"0fd228e26bfbe6fe31a2da268eb0e98e780c1191c1a918adf383377946e9c838","integrity":"sha256-D9Io4mv75v4xotomjrDpjngMEZHBqRit84M3eUbpyDg="},"editor-db10c8351306e92f1926ba225d0cd9c8e886482b3b9820a85825ec3abab5f1cf.js":{"logical_path":"editor.js","mtime":"2021-02-24T23:16:14-08:00","size":744866,"digest":"db10c8351306e92f1926ba225d0cd9c8e886482b3b9820a85825ec3abab5f1cf","integrity":"sha256-2xDINRMG6S8ZJroiXQzZyOiGSCs7mCCoWCXsOrq18c8="},"app-ad43ca64b295d8444b10f22ee868f18429268af498f1bc515434878b690e37a2.css":{"logical_path":"app.css","mtime":"2021-03-23T08:40:11-07:00","size":396615,"digest":"ad43ca64b295d8444b10f22ee868f18429268af498f1bc515434878b690e37a2","integrity":"sha256-rUPKZLKV2ERLEPIu6GjxhCkmivSY8bxRVDSHi2kON6I="},"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css":{"logical_path":"criticmarkup.css","mtime":"2021-02-24T23:16:14-08:00","size":646,"digest":"31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4","integrity":"sha256-Ma5dMoK7uOe3w8mRfp+2jjMVprSnXabOxI0huIRpBcQ="},"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css":{"logical_path":"print.css","mtime":"2021-02-24T23:16:14-08:00","size":75,"digest":"512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb","integrity":"sha256-USSYw2i+DT+xuhBd+oQomuSDgOyfy++Ui9TiOwsJW/s="}},"assets":{"app.js":"app-0fd228e26bfbe6fe31a2da268eb0e98e780c1191c1a918adf383377946e9c838.js","editor.js":"editor-db10c8351306e92f1926ba225d0cd9c8e886482b3b9820a85825ec3abab5f1cf.js","app.css":"app-ad43ca64b295d8444b10f22ee868f18429268af498f1bc515434878b690e37a2.css","criticmarkup.css":"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css","print.css":"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css"}}
|
||||
@@ -1 +0,0 @@
|
||||
{"files":{"app-7a4bd115f4bc7ece39bc8073ca0ffad7c5e55cc5837b1464a12dead4905cefb2.js":{"logical_path":"app.js","mtime":"2021-02-19T21:46:58-08:00","size":135925,"digest":"7a4bd115f4bc7ece39bc8073ca0ffad7c5e55cc5837b1464a12dead4905cefb2","integrity":"sha256-ekvRFfS8fs45vIBzyg/618XlXMWDexRkoS3q1JBc77I="},"editor-db10c8351306e92f1926ba225d0cd9c8e886482b3b9820a85825ec3abab5f1cf.js":{"logical_path":"editor.js","mtime":"2021-02-17T20:47:49-08:00","size":744866,"digest":"db10c8351306e92f1926ba225d0cd9c8e886482b3b9820a85825ec3abab5f1cf","integrity":"sha256-2xDINRMG6S8ZJroiXQzZyOiGSCs7mCCoWCXsOrq18c8="},"app-7a0bbff2e8bad3033e7c17e0e0f886f336a9d23d3b912dcd2ae389c48b4b63e6.css":{"logical_path":"app.css","mtime":"2021-02-19T21:46:58-08:00","size":396661,"digest":"7a0bbff2e8bad3033e7c17e0e0f886f336a9d23d3b912dcd2ae389c48b4b63e6","integrity":"sha256-egu/8ui60wM+fBfg4PiG8zap0j07kS3NKuOJxItLY+Y="},"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css":{"logical_path":"criticmarkup.css","mtime":"2021-02-17T20:47:49-08:00","size":646,"digest":"31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4","integrity":"sha256-Ma5dMoK7uOe3w8mRfp+2jjMVprSnXabOxI0huIRpBcQ="},"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css":{"logical_path":"print.css","mtime":"2021-02-17T20:47:49-08:00","size":75,"digest":"512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb","integrity":"sha256-USSYw2i+DT+xuhBd+oQomuSDgOyfy++Ui9TiOwsJW/s="}},"assets":{"app.js":"app-7a4bd115f4bc7ece39bc8073ca0ffad7c5e55cc5837b1464a12dead4905cefb2.js","editor.js":"editor-db10c8351306e92f1926ba225d0cd9c8e886482b3b9820a85825ec3abab5f1cf.js","app.css":"app-7a0bbff2e8bad3033e7c17e0e0f886f336a9d23d3b912dcd2ae389c48b4b63e6.css","criticmarkup.css":"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css","print.css":"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css"}}
|
||||
+2
-2
File diff suppressed because one or more lines are too long
BIN
Binary file not shown.
+1
-1
File diff suppressed because one or more lines are too long
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -380,8 +380,12 @@ $(document).ready(function() {
|
||||
active_tab = '#edit.tabnav-tab';
|
||||
}
|
||||
|
||||
$('.tabnav-tab.selected').removeAttr('aria-current');
|
||||
$('.tabnav-tab.selected').removeClass('selected');
|
||||
|
||||
$(active_tab).attr('aria-current', 'page');
|
||||
$(active_tab).addClass('selected');
|
||||
|
||||
$('.tabnav-div').hide();
|
||||
$(active_div).show();
|
||||
}
|
||||
|
||||
@@ -147,7 +147,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#gollum-dialog-dialog-buttons {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -5,9 +5,11 @@
|
||||
</div>
|
||||
<div id="wiki-content" class="create edit">
|
||||
<div class="tabnav">
|
||||
<nav class="tabnav-tabs" aria-label="Foo bar">
|
||||
<a href="#" id="edit" class="tabnav-tab selected" aria-current="edit">Edit</a>
|
||||
<a href="#" id="preview" class="tabnav-tab" aria-current="preview">Preview</a>
|
||||
<nav class="tabnav-tabs" aria-label="Toggle edit or preview mode">
|
||||
<a href="#" id="edit" class="tabnav-tab selected" aria-current="page">
|
||||
Edit
|
||||
</a>
|
||||
<a href="#" id="preview" class="tabnav-tab">Preview</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
</div>
|
||||
<div class="tabnav">
|
||||
<nav class="tabnav-tabs">
|
||||
<a href="#" id="edit" class="tabnav-tab selected" aria-current="edit">Edit</a>
|
||||
<a href="#" id="preview" class="tabnav-tab" aria-current="preview">Preview</a>
|
||||
<a href="#" id="edit" class="tabnav-tab selected" aria-current="page">
|
||||
Edit
|
||||
</a>
|
||||
<a href="#" id="preview" class="tabnav-tab">Preview</a>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="tabnav-div" id="edit-content">{{>editor}}</div>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<button class="btn btn-sm function-button" id="function-h3" title="Heading 3">h3</button>
|
||||
<span class="pr-2"></span>
|
||||
<button class="btn btn-sm function-button" id="function-link" title="Link">{{#octicon}}link{{/octicon}}</button>
|
||||
<button class="btn btn-sm function-button" id="function-image" title="Image">{{#octicon}}file-media{{/octicon}}</button>
|
||||
<button class="btn btn-sm function-button" id="function-image" title="Image">{{#octicon}}image{{/octicon}}</button>
|
||||
<span class="pr-2"></span>
|
||||
{{#critic_markup}}
|
||||
<button class="btn btn-sm function-button" id="function-critic-accept" title="Accept Selected CriticMarkup">{{#octicon}}plus{{/octicon}}</button>
|
||||
@@ -50,13 +50,13 @@
|
||||
|
||||
<div id="gollum-editor-format-selector">
|
||||
<label for="format">Keybinding</label>
|
||||
<select id="keybinding" name="keybinding" class="form-select">
|
||||
<select id="keybinding" name="keybinding" class="form-select input-sm">
|
||||
<option selected="selected">default</option>
|
||||
<option>vim</option>
|
||||
<option>emacs</option>
|
||||
</select>
|
||||
<label for="format">Markup</label>
|
||||
<select id="wiki_format" name="format" class="form-select">
|
||||
<select id="wiki_format" name="format" class="form-select input-sm">
|
||||
{{#formats}}
|
||||
{{#enabled}}
|
||||
<option {{#selected}}selected="selected" {{/selected}}value="{{id}}" data-ext="{{ext}}">
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<li class="Box-row Box-row--hover-gray border-top d-flex flex-items-center">
|
||||
<span class="float-left col-2" id="user-icons">{{>author_template}}</span>
|
||||
<span class="flex-auto col-1 text-gray-light">{{date}}</span>
|
||||
<span class="flex-auto col-7">{{message}}<br/>
|
||||
<span class="flex-auto col-5">{{message}}<br/>
|
||||
{{#files}}
|
||||
<span class="flex-auto col-2">{{#renamed}}{{renamed}} -> {{/renamed}}<a href="{{link}}">{{file}}</a></span><br/>
|
||||
{{/files}}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<meta name="MobileOptimized" content="width">
|
||||
<meta name="HandheldFriendly" content="true">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
{{#sprockets_stylesheet_tag}}primer{{/sprockets_stylesheet_tag}}
|
||||
{{#sprockets_stylesheet_tag}}app{{/sprockets_stylesheet_tag}}
|
||||
{{#sprockets_stylesheet_tag}}print print{{/sprockets_stylesheet_tag}}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<nav class="actions pt-4 px-2 px-lg-0 overflow-x-scroll">
|
||||
<div class="TableObject">
|
||||
<nav class="TableObject actions pt-4 px-2 px-lg-0 overflow-x-scroll">
|
||||
<div class="TableObject-item hide-lg hide-xl">
|
||||
{{>mobilenav}}
|
||||
</div>
|
||||
@@ -18,7 +17,7 @@
|
||||
</div>
|
||||
|
||||
<div class="TableObject-item hide-sm hide-md">
|
||||
<div class="BtnGroup" style="display: flex;">
|
||||
<div class="BtnGroup d-flex">
|
||||
{{#overview}}
|
||||
<a
|
||||
class="btn BtnGroup-item btn-sm"
|
||||
@@ -41,37 +40,35 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="TableObject-item px-2">
|
||||
<div class="BtnGroup d-flex">
|
||||
{{#history}}
|
||||
<div class="TableObject-item pl-2 hide-sm hide-md">
|
||||
<a
|
||||
class="btn btn-sm"
|
||||
class="btn BtnGroup-item btn-sm hide-sm hide-md"
|
||||
href="{{history_path}}/{{escaped_url_path}}"
|
||||
id="minibutton-history"
|
||||
>
|
||||
Page History
|
||||
History
|
||||
</a>
|
||||
</div>
|
||||
{{/history}}
|
||||
|
||||
{{#allow_editing}}
|
||||
<div class="TableObject-item px-2">
|
||||
<div class="BtnGroup" style="display: flex;">
|
||||
{{#allow_uploads}}
|
||||
<a
|
||||
<button
|
||||
class="btn BtnGroup-item btn-sm hide-sm hide-md
|
||||
minibutton-upload-page"
|
||||
>
|
||||
Upload
|
||||
</a>
|
||||
</button>
|
||||
{{/allow_uploads}}
|
||||
|
||||
{{#editable}}
|
||||
<a
|
||||
<button
|
||||
class="btn BtnGroup-item btn-sm hide-sm hide-md
|
||||
minibutton-rename-page"
|
||||
>
|
||||
Rename
|
||||
</a>
|
||||
</button>
|
||||
<a
|
||||
class="btn BtnGroup-item btn-sm hide-sm hide-md"
|
||||
href="{{edit_path}}/{{escaped_url_path}}"
|
||||
@@ -80,9 +77,11 @@
|
||||
Edit
|
||||
</a>
|
||||
{{/editable}}
|
||||
{{/allow_editing}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#allow_editing}}
|
||||
{{#editable}}
|
||||
<div class="TableObject-item">
|
||||
<a class="btn btn-primary btn-sm minibutton-new-page" href="#">
|
||||
@@ -101,5 +100,4 @@
|
||||
{{/newable}}
|
||||
{{/editable}}
|
||||
{{/allow_editing}}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
{{{content}}}
|
||||
</div>
|
||||
{{#has_sidebar}}
|
||||
<div id="wiki-sidebar" class="Box Box--condensed float-md-{{body_side}} col-md-3 px-4">
|
||||
<div id="sidebar-content" class="gollum-{{sidebar_format}}-content markdown-body">
|
||||
<div id="wiki-sidebar" class="Box Box--condensed float-md-{{body_side}} col-md-3">
|
||||
<div id="sidebar-content" class="gollum-{{sidebar_format}}-content markdown-body px-4">
|
||||
{{{sidebar_content}}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -31,8 +31,8 @@
|
||||
</div>
|
||||
</div>
|
||||
{{#has_footer}}
|
||||
<div id="wiki-footer" class="gollum-{{footer_format}}-content my-2 my-md-0">
|
||||
<div id="footer-content" class="Box Box-condensed markdown-body pl-2">
|
||||
<div id="wiki-footer" class="gollum-{{footer_format}}-content my-2">
|
||||
<div id="footer-content" class="Box Box-condensed markdown-body px-4">
|
||||
{{{footer_content}}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,7 +20,7 @@ module Precious
|
||||
def lines(diff = @diff)
|
||||
lines = []
|
||||
lines_to_parse = diff.split("\n")[3..-1]
|
||||
lines_to_parse = lines_to_parse[2..-1] if lines_to_parse[0].start_with?('---')
|
||||
lines_to_parse = lines_to_parse[2..-1] if lines_to_parse[0] =~ /^(---|rename to )/
|
||||
|
||||
if lines_to_parse.nil? || lines_to_parse.empty?
|
||||
lines_to_parse = [] # File is created without content
|
||||
|
||||
@@ -14,6 +14,18 @@ context "Precious::Views::Compare" do
|
||||
@wiki = Gollum::Wiki.new(@path)
|
||||
end
|
||||
|
||||
test 'rename diff' do
|
||||
# JGit returns differenly formatted diffs for rename commits. Support both kinds of diff.
|
||||
jgit_diff = "diff --git a/Foo.md b/Bar.md\nsimilarity index 100%\nrename from Foo.md\nrename to Bar.md"
|
||||
rugged_diff = "diff --git a/Bar.md b/Bar.md\nnew file mode 100644\nindex 0000000..e69de29\n--- /dev/null\n+++ b/Bar.md\n"
|
||||
|
||||
[jgit_diff, rugged_diff].each do |diff|
|
||||
view = Precious::Views::Compare.new
|
||||
view.instance_variable_set(:@diff, diff)
|
||||
assert_equal [], view.lines
|
||||
end
|
||||
end
|
||||
|
||||
test 'file addition diff' do
|
||||
view = Precious::Views::Compare.new
|
||||
diff = get_commit_diff 'fbabba862dfa7ac35b39042dd4ad780c9f67b8cb'
|
||||
|
||||
Reference in New Issue
Block a user