diff --git a/HISTORY.md b/HISTORY.md index f5bdb4ff..0c118986 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,9 @@ +# 4.1.0 /2017-03-09 + +* Added file deletion functionality to file view +* Various performance improvements +* Emoji support + # 4.0.0 /2015-04-11 * Now compatible with JRuby (via the [rjgit](https://github.com/repotag/rjgit) [adapter](https://github.com/repotag/gollum-lib_rjgit_adapter)) diff --git a/README.md b/README.md index c9e5e63d..59551ade 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,11 @@ For more information on Gollum's capabilities and pitfalls: 3. [Troubleshoot guide](https://github.com/gollum/gollum/wiki/Troubleshoot-guide). 4. [Security overview](https://github.com/gollum/gollum/wiki/Security). -For a quick impression of gollum, see [this video](https://www.youtube.com/watch?v=gj1qqK3Oku8). To see more advanced features in action, see [this video](https://www.youtube.com/watch?v=EauxgxsLDC4) here (installation with docker). +### Videos + +* [Quick impression of gollum](https://www.youtube.com/watch?v=gj1qqK3Oku8) +* [Gollum overview and simple markdown tutorial (german with english subtitles)](https://www.youtube.com/watch?v=wfWgDRmcbU4) +* [Advanced features in action](https://www.youtube.com/watch?v=EauxgxsLDC4) ## SYSTEM REQUIREMENTS @@ -69,7 +73,7 @@ Installation examples for individual systems can be seen [here](https://github.c ``` * And install: ``` - [sudo] gem install --no-ri --no-rdoc pkg/gollum*.gem + [sudo] gem install --no-document pkg/gollum*.gem ``` ### Markups diff --git a/gollum.gemspec b/gollum.gemspec index ed271c39..b44fe7d1 100644 --- a/gollum.gemspec +++ b/gollum.gemspec @@ -5,8 +5,8 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 1.9' s.name = 'gollum' - s.version = '4.0.1' - s.date = '2016-05-19' + s.version = '4.1.1' + s.date = '2017-04-17' s.rubyforge_project = 'gollum' s.license = 'MIT' @@ -41,6 +41,7 @@ Gem::Specification.new do |s| # = MANIFEST = s.files = %w[ + CONTRIBUTING.md Gemfile HISTORY.md LICENSE @@ -74,6 +75,7 @@ Gem::Specification.new do |s| lib/gollum/public/gollum/images/fileview/folder-horizontal.png lib/gollum/public/gollum/images/fileview/toggle-small-expand.png lib/gollum/public/gollum/images/fileview/toggle-small.png + lib/gollum/public/gollum/images/fileview/trashcan.png lib/gollum/public/gollum/images/icon-sprite.png lib/gollum/public/gollum/images/man_24.png lib/gollum/public/gollum/images/para.png diff --git a/lib/gollum.rb b/lib/gollum.rb index 1234830d..8a8b2614 100644 --- a/lib/gollum.rb +++ b/lib/gollum.rb @@ -12,7 +12,7 @@ require 'sanitize' require File.expand_path('../gollum/uri_encode_component', __FILE__) module Gollum - VERSION = '4.0.1' + VERSION = '4.1.1' def self.assets_path ::File.expand_path('gollum/public', ::File.dirname(__FILE__)) diff --git a/lib/gollum/app.rb b/lib/gollum/app.rb index ac2ef383..57f64cfe 100644 --- a/lib/gollum/app.rb +++ b/lib/gollum/app.rb @@ -413,6 +413,7 @@ module Precious @name = name @content = page.formatted_data @version = version + @bar_side = wikip.wiki.bar_side mustache :page elsif file = wikip.wiki.file("#{file_path}", version, true) show_file(file) diff --git a/lib/gollum/helpers.rb b/lib/gollum/helpers.rb index b080e0dc..f3368e3e 100644 --- a/lib/gollum/helpers.rb +++ b/lib/gollum/helpers.rb @@ -13,7 +13,7 @@ module Precious def join_page_name(name, ext) "#{name}#{ext}" end - + # Extract the path string that Gollum::Wiki expects def extract_path(file_path) return nil if file_path.nil? diff --git a/lib/gollum/public/gollum/javascript/editor/gollum.editor.js b/lib/gollum/public/gollum/javascript/editor/gollum.editor.js index 8c213749..ed7c764f 100755 --- a/lib/gollum/public/gollum/javascript/editor/gollum.editor.js +++ b/lib/gollum/public/gollum/javascript/editor/gollum.editor.js @@ -339,12 +339,12 @@ return false; } - Mousetrap.bind(['command+1', 'ctrl+1'], function( e ){ hotkey( e, 'function-h1' ); }); - Mousetrap.bind(['command+2', 'ctrl+2'], function( e ){ hotkey( e, 'function-h2' ); }); - Mousetrap.bind(['command+3', 'ctrl+3'], function( e ){ hotkey( e, 'function-h3' ); }); - Mousetrap.bind(['command+b', 'ctrl+b'], function( e ){ hotkey( e, 'function-bold' ); }); - Mousetrap.bind(['command+i', 'ctrl+i'], function( e ){ hotkey( e, 'function-italic' ); }); - Mousetrap.bind(['command+s', 'ctrl+s'], function( e ){ + Mousetrap.bind('mod+1', function( e ){ hotkey( e, 'function-h1' ); }); + Mousetrap.bind('mod+2', function( e ){ hotkey( e, 'function-h2' ); }); + Mousetrap.bind('mod+3', function( e ){ hotkey( e, 'function-h3' ); }); + Mousetrap.bind('mod+b', function( e ){ hotkey( e, 'function-bold' ); }); + Mousetrap.bind('mod+i', function( e ){ hotkey( e, 'function-italic' ); }); + Mousetrap.bind('mod+s', function( e ){ e.preventDefault(); $("#gollum-editor-submit").trigger("click"); return false; diff --git a/lib/gollum/public/gollum/javascript/mousetrap.min.js b/lib/gollum/public/gollum/javascript/mousetrap.min.js index c09f18e2..b50e0188 100644 --- a/lib/gollum/public/gollum/javascript/mousetrap.min.js +++ b/lib/gollum/public/gollum/javascript/mousetrap.min.js @@ -1,8 +1,11 @@ -/* mousetrap v1.1.2 craig.is/killing/mice */ -window.Mousetrap=function(){function o(a,c,b){if(a.addEventListener)return a.addEventListener(c,b,!1);a.attachEvent("on"+c,b)}function u(a){return"keypress"==a.type?String.fromCharCode(a.which):h[a.which]?h[a.which]:v[a.which]?v[a.which]:String.fromCharCode(a.which).toLowerCase()}function p(a){var a=a||{},c=!1,b;for(b in l)a[b]?c=!0:l[b]=0;c||(n=!1)}function w(a,c,b,d,C){var g,e,f=[];if(!j[a])return[];"keyup"==b&&q(a)&&(c=[a]);for(g=0;gd||h.hasOwnProperty(d)&&(k[h[d]]=d)}b=k[a]?"keydown": -"keypress"}"keypress"==b&&c.length&&(b="keydown");return b}function y(a,c,b,d,f){var a=a.replace(/\s+/g," "),g=a.split(" "),e,h,i=[];if(1":".","?":"/","|":"\\"},A={option:"alt",command:"meta","return":"enter",escape:"esc"},k,j={},i={},l={},z,t=!1,n=!1,f=1;20>f;++f)h[111+f]="f"+f;for(f=0;9>=f;++f)h[f+96]=f;o(document,"keypress",s);o(document,"keydown",s);o(document,"keyup",s);return{bind:function(a,c,b){for(var d=a instanceof Array?a:[a],f=0;fq||p.hasOwnProperty(q)&&(n[p[q]]=q)}d=n[g]?"keydown":"keypress"}"keypress"==d&&f.length&&(d="keydown");return{key:c,modifiers:f,action:d}}function E(a,b){return null===a||a===v?!1:a===b?!0:E(a.parentNode,b)}function c(a){function b(a){a= +a||{};var b=!1,l;for(l in n)a[l]?b=!0:n[l]=0;b||(y=!1)}function g(a,b,u,e,c,g){var l,m,k=[],f=u.type;if(!h._callbacks[a])return[];"keyup"==f&&x(a)&&(b=[a]);for(l=0;l":".","?":"/","|":"\\"},C={option:"alt",command:"meta","return":"enter", +escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},n;for(f=1;20>f;++f)p[111+f]="f"+f;for(f=0;9>=f;++f)p[f+96]=f.toString();c.prototype.bind=function(a,b,c){a=a instanceof Array?a:[a];this._bindMultiple.call(this,a,b,c);return this};c.prototype.unbind=function(a,b){return this.bind.call(this,a,function(){},b)};c.prototype.trigger=function(a,b){if(this._directMap[a+":"+b])this._directMap[a+":"+b]({},a);return this};c.prototype.reset=function(){this._callbacks={}; +this._directMap={};return this};c.prototype.stopCallback=function(a,b){return-1<(" "+b.className+" ").indexOf(" mousetrap ")||E(b,this.target)?!1:"INPUT"==b.tagName||"SELECT"==b.tagName||"TEXTAREA"==b.tagName||b.isContentEditable};c.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)};c.addKeycodes=function(a){for(var b in a)a.hasOwnProperty(b)&&(p[b]=a[b]);n=null};c.init=function(){var a=c(v),b;for(b in a)"_"!==b.charAt(0)&&(c[b]=function(b){return function(){return a[b].apply(a, +arguments)}}(b))};c.init();r.Mousetrap=c;"undefined"!==typeof module&&module.exports&&(module.exports=c);"function"===typeof define&&define.amd&&define(function(){return c})}})("undefined"!==typeof window?window:null,"undefined"!==typeof window?document:null); diff --git a/lib/gollum/views/pages.rb b/lib/gollum/views/pages.rb index ff11fcf7..cf9f8b4e 100644 --- a/lib/gollum/views/pages.rb +++ b/lib/gollum/views/pages.rb @@ -36,7 +36,8 @@ module Precious # 1012: Folders and Pages need to be separated @results.each do |page| - page_path = page.path.sub(/^#{@path}\//, '') + page_path = page.path + page_path = page_path.sub(/^#{Regexp.escape(@path)}\//, '') unless @path.nil? if page_path.include?('/') folder = page_path.split('/').first diff --git a/test/test_app.rb b/test/test_app.rb index 9882387f..8e8e4433 100644 --- a/test/test_app.rb +++ b/test/test_app.rb @@ -14,7 +14,7 @@ context "Frontend" do teardown do FileUtils.rm_rf(@path) end - + test "utf-8 kcode" do assert_equal 'μ†ℱ'.scan(/./), ["μ", "†", "ℱ"] end