gollum 2.4.11 → 2.4.12
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 +15 -0
- data/Gemfile +1 -1
- data/HISTORY.md +4 -0
- data/README.md +205 -110
- data/bin/gollum +6 -1
- data/gollum.gemspec +491 -516
- data/lib/gollum.rb +3 -14
- data/lib/gollum/{frontend/app.rb → app.rb} +64 -22
- data/lib/gollum/{frontend/helpers.rb → helpers.rb} +6 -6
- data/lib/gollum/{frontend/public → public}/gollum/css/_styles.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/css/dialog.css +12 -2
- data/lib/gollum/{frontend/public → public}/gollum/css/editor.css +1 -1
- data/lib/gollum/{frontend/public → public}/gollum/css/gollum.css +26 -10
- data/lib/gollum/{frontend/public → public}/gollum/css/ie7.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/css/template.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/images/dirty-shade.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/images/fileview/document.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/images/fileview/folder-horizontal.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/images/fileview/toggle-small-expand.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/images/fileview/toggle-small.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/images/icon-sprite.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/images/man_24.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/images/para.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/images/pin-16.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/images/pin-20.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/images/pin-24.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/images/pin-32.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/javascript/editor/gollum.editor.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/javascript/editor/langs/asciidoc.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/javascript/editor/langs/creole.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/javascript/editor/langs/markdown.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/javascript/editor/langs/org.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/javascript/editor/langs/pod.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/javascript/editor/langs/rdoc.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/javascript/editor/langs/textile.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/javascript/gollum.dialog.js +4 -0
- data/lib/gollum/{frontend/public → public}/gollum/javascript/gollum.js +83 -19
- data/lib/gollum/{frontend/public → public}/gollum/javascript/gollum.placeholder.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/javascript/identicon_canvas.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/javascript/jquery-1.7.2.min.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/javascript/jquery.color.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/javascript/mousetrap.min.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/css/custom.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/images/cancel_24.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/images/globe_24.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/images/lr_24.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/images/save_24.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/images/savecomment_24.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/index.html +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/ace.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/anchor.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/anchor_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/background_tokenizer.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/background_tokenizer_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/commands/command_manager.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/commands/command_manager_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/commands/default_commands.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/commands/multi_select_commands.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/config.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/config_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/css/codefolding-fold-button-states.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/css/editor.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/css/expand-marker.png +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/document.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/document_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/edit_session.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/edit_session/bracket_match.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/edit_session/fold.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/edit_session/fold_line.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/edit_session/folding.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/edit_session_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/editor.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/editor_change_document_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/editor_highlight_selected_word_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/editor_navigation_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/editor_text_edit_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/ext/static.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/ext/static_highlight.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/ext/static_highlight_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/ext/textarea.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/keyboard/emacs.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/keyboard/hash_handler.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/keyboard/keybinding.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/keyboard/state_handler.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/keyboard/textinput.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/keyboard/vim.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/keyboard/vim/commands.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/aliases.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/motions.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/operators.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/util.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/keyboard/vim/registers.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/layer/cursor.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/layer/gutter.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/layer/marker.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/layer/text.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/layer/text_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/lib/browser_focus.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/lib/dom.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/lib/es5-shim.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/lib/event.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/lib/event_emitter.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/lib/event_emitter_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/lib/fixoldbrowsers.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/lib/keys.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/lib/lang.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/lib/net.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/lib/oop.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/lib/regexp.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/lib/useragent.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/package.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/test_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/text_javascript.txt +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_c9search.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_c_cpp.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_clojure.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_coffee.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_coldfusion.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_csharp.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_css.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_diff.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_glsl.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_golang.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_groovy.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_haxe.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_html.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_java.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_javascript.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_json.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jsx.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_latex.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_less.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_liquid.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lua.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_luapage.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_markdown.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ocaml.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_perl.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_pgsql.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_php.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_powershell.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_python.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ruby.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scad.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scala.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scss.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sh.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sql.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_svg.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_tcl.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_text.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_textile.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_xml.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_xquery.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_yaml.json +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/abap.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/abap_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/asciidoc.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/asciidoc_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/behaviour.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/behaviour/cstyle.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/behaviour/html.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xml.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xquery.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/c9search.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/c9search_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/c_cpp.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/c_cpp_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/clojure.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/clojure_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/coffee.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/coffee/coffee-script.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/coffee/helpers.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/coffee/lexer.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/coffee/nodes.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/coffee/rewriter.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/coffee/scope.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/coffee_worker.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/coldfusion.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/csharp.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/csharp_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/css.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/css/csslint.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/css_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/css_highlight_rules_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/css_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/css_worker.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/css_worker_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/dart.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/dart_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/diff.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/diff_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/doc_comment_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/asciidoc.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/c9search.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/coffee.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/coffee_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/diff.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/fold_mode.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/html.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/html_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/latex.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/lua.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/markdown.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/mixed.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/pythonic.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/pythonic_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/xml.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/folding/xml_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/glsl.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/glsl_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/golang.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/golang_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/groovy.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/groovy_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/haml.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/haml_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/haxe.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/haxe_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/html.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/html_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/html_highlight_rules_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/html_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/jade.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/jade_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/java.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/java_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/javascript.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/javascript/jshint.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/javascript_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/javascript_highlight_rules_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/javascript_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/json.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/json/json_parse.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/json_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/json_worker.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/json_worker_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/jsp.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/jsp_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/jsx.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/jsx_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/latex.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/less.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/less_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/liquid.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/liquid_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/liquid_highlight_rules_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/lisp.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/lisp_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/lua.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/lua_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/luapage.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/luapage_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/lucene.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/lucene_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/lucene_highlight_rules_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/makefile.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/makefile_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/markdown.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/markdown_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/markdown_highlight_rules_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/matching_brace_outdent.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/matching_parens_outdent.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/objectivec.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/objectivec_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/ocaml.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/ocaml_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/perl.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/perl_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/pgsql.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/pgsql_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/php.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/php_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/powershell.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/powershell_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/python.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/python_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/python_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/r.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/r_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/rdoc.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/rdoc_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/rhtml.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/rhtml_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/ruby.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/ruby_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/ruby_highlight_rules_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/scad.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/scad_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/scala.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/scala_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/scss.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/scss_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/sh.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/sh_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/sql.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/sql_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/stylus.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/stylus_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/svg.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/svg_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/tcl.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/tcl_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/tex.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/tex_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/text.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/text_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/text_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/textile.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/textile_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/typescript.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/typescript_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/xml.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/xml_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/xml_highlight_rules_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/xml_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/xml_util.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/xquery.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/xquery/JSONParseTreeHandler.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/xquery/Readme.md +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQueryParser.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/xquery/visitors/SyntaxHighlighter.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/xquery_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/xquery_worker.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/yaml.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mode/yaml_highlight_rules.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/model/editor.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mouse/default_gutter_handler.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mouse/default_handlers.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mouse/dragdrop.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mouse/fold_handler.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mouse/mouse_event.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mouse/mouse_handler.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/mouse/multi_select_handler.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/multi_select.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/multi_select_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/placeholder.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/placeholder_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/range.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/range_list.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/range_list_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/range_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/renderloop.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/requirejs/text.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/scrollbar.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/search.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/search_highlight.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/search_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/selection.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/selection_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/split.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/test/all.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/test/all_browser.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/test/assertions.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/test/asyncjs/assert.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/test/asyncjs/async.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/test/asyncjs/index.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/test/asyncjs/test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/test/asyncjs/utils.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/test/benchmark.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/test/mockdom.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/test/mockrenderer.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/test/tests.html +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/ambiance.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/ambiance.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/chrome.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/chrome.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/clouds.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/clouds.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/cobalt.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/cobalt.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/crimson_editor.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/crimson_editor.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/dawn.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/dawn.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/dreamweaver.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/dreamweaver.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/eclipse.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/eclipse.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/github.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/github.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/merbivore.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/merbivore.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/monokai.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/monokai.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/textmate.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/textmate.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/twilight.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/twilight.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/xcode.css +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/theme/xcode.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/token_iterator.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/token_iterator_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/tokenizer.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/tokenizer_dev.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/undomanager.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/unicode.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/virtual_renderer.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/virtual_renderer_test.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/worker/mirror.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/worker/worker.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/worker/worker_client.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/ace/lib/ace/worker/worker_sourcemint.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/jquery.ba-throttle-debounce.min.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/livepreview.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/md_sundown.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/requirejs.min.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/js/sundown.js +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/licenses/ace/LICENSE.txt +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/licenses/bootstraponline_gollum/LICENSE.txt +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/licenses/debounce/LICENSE-MIT.txt +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/licenses/gollum/LICENSE.txt +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/licenses/jquery/MIT-LICENSE.txt +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/licenses/licenses.txt +13 -13
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/licenses/notepages/LICENSE.txt +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/licenses/requirejs/LICENSE.txt +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/licenses/retina_display_icon_set/by_sa_3.0_unported_legalcode.txt +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/licenses/sizzle/LICENSE.txt +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/licenses/sundown/sundown.txt +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/licenses/templarian_windowsicons/license.txt +0 -0
- data/lib/gollum/{frontend/public → public}/gollum/livepreview/readme.md +1 -1
- data/lib/gollum/{frontend/templates → templates}/compare.mustache +0 -0
- data/lib/gollum/{frontend/templates → templates}/create.mustache +1 -1
- data/lib/gollum/{frontend/templates → templates}/edit.mustache +0 -0
- data/lib/gollum/{frontend/templates → templates}/editor.mustache +0 -0
- data/lib/gollum/{frontend/templates → templates}/error.mustache +0 -0
- data/lib/gollum/{frontend/templates → templates}/file_view.mustache +2 -1
- data/lib/gollum/{frontend/templates → templates}/history.mustache +1 -1
- data/lib/gollum/{frontend/templates → templates}/history_authors/gravatar.mustache +0 -0
- data/lib/gollum/{frontend/templates → templates}/history_authors/identicon.mustache +0 -0
- data/lib/gollum/{frontend/templates → templates}/history_authors/none.mustache +0 -0
- data/lib/gollum/{frontend/templates → templates}/layout.mustache +9 -3
- data/lib/gollum/{frontend/templates → templates}/page.mustache +12 -7
- data/lib/gollum/{frontend/templates → templates}/pages.mustache +2 -2
- data/lib/gollum/{frontend/templates → templates}/search.mustache +1 -1
- data/lib/gollum/{frontend/templates → templates}/searchbar.mustache +0 -0
- data/lib/gollum/{frontend/uri_encode_component.rb → uri_encode_component.rb} +0 -0
- data/lib/gollum/{frontend/views → views}/compare.rb +0 -0
- data/lib/gollum/{frontend/views → views}/create.rb +0 -0
- data/lib/gollum/{frontend/views → views}/edit.rb +0 -0
- data/lib/gollum/{frontend/views → views}/editable.rb +2 -2
- data/lib/gollum/{frontend/views → views}/error.rb +0 -0
- data/lib/gollum/{frontend/views → views}/file_view.rb +0 -0
- data/lib/gollum/{frontend/views → views}/has_page.rb +0 -0
- data/lib/gollum/{frontend/views → views}/history.rb +1 -0
- data/lib/gollum/{frontend/views → views}/layout.rb +4 -0
- data/lib/gollum/{frontend/views → views}/page.rb +8 -3
- data/lib/gollum/{frontend/views → views}/pages.rb +0 -0
- data/lib/gollum/{frontend/views → views}/search.rb +0 -0
- data/licenses/licenses.txt +7 -7
- metadata +498 -724
- data/lib/gollum/blob_entry.rb +0 -91
- data/lib/gollum/committer.rb +0 -236
- data/lib/gollum/file.rb +0 -94
- data/lib/gollum/file_view.rb +0 -155
- data/lib/gollum/git_access.rb +0 -249
- data/lib/gollum/gitcode.rb +0 -48
- data/lib/gollum/markup.rb +0 -664
- data/lib/gollum/page.rb +0 -510
- data/lib/gollum/pagination.rb +0 -62
- data/lib/gollum/sanitization.rb +0 -176
- data/lib/gollum/web_sequence_diagram.rb +0 -44
- data/lib/gollum/wiki.rb +0 -762
data/lib/gollum/pagination.rb
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
# ~*~ encoding: utf-8 ~*~
|
2
|
-
module Gollum
|
3
|
-
module Pagination
|
4
|
-
def self.included(klass)
|
5
|
-
klass.extend ClassMethods
|
6
|
-
class << klass
|
7
|
-
# Default Integer max count of items to return in git commands.
|
8
|
-
attr_accessor :per_page
|
9
|
-
end
|
10
|
-
klass.per_page = 30
|
11
|
-
end
|
12
|
-
|
13
|
-
module ClassMethods
|
14
|
-
# Turns a page number into an offset number for the git skip option.
|
15
|
-
#
|
16
|
-
# page - Integer page number.
|
17
|
-
#
|
18
|
-
# Returns an Integer.
|
19
|
-
def page_to_skip(page)
|
20
|
-
([1, page.to_i].max - 1) * per_page
|
21
|
-
end
|
22
|
-
|
23
|
-
# Fills in git-specific options for the log command using simple
|
24
|
-
# pagination options.
|
25
|
-
#
|
26
|
-
# options - Hash of options:
|
27
|
-
# page - Optional Integer page number (default: 1)
|
28
|
-
# per_page - Optional Integer max count of items to return.
|
29
|
-
# Defaults to #per_class class method.
|
30
|
-
#
|
31
|
-
# Returns Hash with :max_count and :skip keys.
|
32
|
-
def log_pagination_options(options = {})
|
33
|
-
skip = page_to_skip(options.delete(:page))
|
34
|
-
options[:max_count] = [options.delete(:per_page).to_i, per_page].max
|
35
|
-
options[:skip] = skip if skip > 0
|
36
|
-
options
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
# Turns a page number into an offset number for the git skip option.
|
41
|
-
#
|
42
|
-
# page - Integer page number.
|
43
|
-
#
|
44
|
-
# Returns an Integer.
|
45
|
-
def page_to_skip(page)
|
46
|
-
self.class.page_to_skip(page)
|
47
|
-
end
|
48
|
-
|
49
|
-
# Fills in git-specific options for the log command using simple
|
50
|
-
# pagination options.
|
51
|
-
#
|
52
|
-
# options - Hash of options:
|
53
|
-
# page - Optional Integer page number (default: 1)
|
54
|
-
# per_page - Optional Integer max count of items to return.
|
55
|
-
# Defaults to #per_class class method.
|
56
|
-
#
|
57
|
-
# Returns Hash with :max_count and :skip keys.
|
58
|
-
def log_pagination_options(options = {})
|
59
|
-
self.class.log_pagination_options(options)
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
data/lib/gollum/sanitization.rb
DELETED
@@ -1,176 +0,0 @@
|
|
1
|
-
# ~*~ encoding: utf-8 ~*~
|
2
|
-
module Gollum
|
3
|
-
# Encapsulate sanitization options.
|
4
|
-
#
|
5
|
-
# This class does not yet support all options of Sanitize library.
|
6
|
-
# See http://github.com/rgrove/sanitize/.
|
7
|
-
class Sanitization
|
8
|
-
# Default whitelisted elements.
|
9
|
-
ELEMENTS = [
|
10
|
-
'a', 'abbr', 'acronym', 'address', 'area', 'b', 'big',
|
11
|
-
'blockquote', 'br', 'button', 'caption', 'center', 'cite',
|
12
|
-
'code', 'col', 'colgroup', 'dd', 'del', 'dfn', 'dir',
|
13
|
-
'div', 'dl', 'dt', 'em', 'fieldset', 'font', 'form', 'h1',
|
14
|
-
'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'input',
|
15
|
-
'ins', 'kbd', 'label', 'legend', 'li', 'map', 'menu',
|
16
|
-
'ol', 'optgroup', 'option', 'p', 'pre', 'q', 's', 'samp',
|
17
|
-
'select', 'small', 'span', 'strike', 'strong', 'sub',
|
18
|
-
'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th',
|
19
|
-
'thead', 'tr', 'tt', 'u', 'ul', 'var'
|
20
|
-
].freeze
|
21
|
-
|
22
|
-
# Default whitelisted attributes.
|
23
|
-
ATTRIBUTES = {
|
24
|
-
'a' => ['href'],
|
25
|
-
'img' => ['src'],
|
26
|
-
:all => ['abbr', 'accept', 'accept-charset',
|
27
|
-
'accesskey', 'action', 'align', 'alt', 'axis',
|
28
|
-
'border', 'cellpadding', 'cellspacing', 'char',
|
29
|
-
'charoff', 'class', 'charset', 'checked', 'cite',
|
30
|
-
'clear', 'cols', 'colspan', 'color',
|
31
|
-
'compact', 'coords', 'datetime', 'dir',
|
32
|
-
'disabled', 'enctype', 'for', 'frame',
|
33
|
-
'headers', 'height', 'hreflang',
|
34
|
-
'hspace', 'id', 'ismap', 'label', 'lang',
|
35
|
-
'longdesc', 'maxlength', 'media', 'method',
|
36
|
-
'multiple', 'name', 'nohref', 'noshade',
|
37
|
-
'nowrap', 'prompt', 'readonly', 'rel', 'rev',
|
38
|
-
'rows', 'rowspan', 'rules', 'scope',
|
39
|
-
'selected', 'shape', 'size', 'span',
|
40
|
-
'start', 'summary', 'tabindex', 'target',
|
41
|
-
'title', 'type', 'usemap', 'valign', 'value',
|
42
|
-
'vspace', 'width']
|
43
|
-
}.freeze
|
44
|
-
|
45
|
-
# Default whitelisted protocols for URLs.
|
46
|
-
PROTOCOLS = {
|
47
|
-
'a' => {'href' => ['http', 'https', 'mailto', 'ftp', 'irc', 'apt', :relative]},
|
48
|
-
'img' => {'src' => ['http', 'https', :relative]},
|
49
|
-
'form' => {'action' => ['http', 'https', :relative]}
|
50
|
-
}.freeze
|
51
|
-
|
52
|
-
ADD_ATTRIBUTES = lambda do |env, node|
|
53
|
-
if add = env[:config][:add_attributes][node.name]
|
54
|
-
add.each do |key, value|
|
55
|
-
node[key] = value
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
# Default elements whose contents will be removed in addition
|
61
|
-
# to the elements themselve
|
62
|
-
REMOVE_CONTENTS = [
|
63
|
-
'script',
|
64
|
-
'style'
|
65
|
-
].freeze
|
66
|
-
|
67
|
-
# Default transformers to force @id attributes with 'wiki-' prefix
|
68
|
-
TRANSFORMERS = [
|
69
|
-
lambda do |env|
|
70
|
-
node = env[:node]
|
71
|
-
return if env[:is_whitelisted] || !node.element?
|
72
|
-
prefix = env[:config][:id_prefix]
|
73
|
-
found_attrs = %w(id name).select do |key|
|
74
|
-
if value = node[key]
|
75
|
-
node[key] = value.gsub(/\A(#{prefix})?/, prefix)
|
76
|
-
end
|
77
|
-
end
|
78
|
-
if found_attrs.size > 0
|
79
|
-
ADD_ATTRIBUTES.call(env, node)
|
80
|
-
{}
|
81
|
-
end
|
82
|
-
end,
|
83
|
-
lambda do |env|
|
84
|
-
node = env[:node]
|
85
|
-
return unless value = node['href']
|
86
|
-
prefix = env[:config][:id_prefix]
|
87
|
-
node['href'] = value.gsub(/\A\#(#{prefix})?/, '#'+prefix)
|
88
|
-
ADD_ATTRIBUTES.call(env, node)
|
89
|
-
{}
|
90
|
-
end
|
91
|
-
].freeze
|
92
|
-
|
93
|
-
# Gets an Array of whitelisted HTML elements. Default: ELEMENTS.
|
94
|
-
attr_reader :elements
|
95
|
-
|
96
|
-
# Gets a Hash describing which attributes are allowed in which HTML
|
97
|
-
# elements. Default: ATTRIBUTES.
|
98
|
-
attr_reader :attributes
|
99
|
-
|
100
|
-
# Gets a Hash describing which URI protocols are allowed in HTML
|
101
|
-
# attributes. Default: PROTOCOLS
|
102
|
-
attr_reader :protocols
|
103
|
-
|
104
|
-
# Gets a Hash describing which URI protocols are allowed in HTML
|
105
|
-
# attributes. Default: TRANSFORMERS
|
106
|
-
attr_reader :transformers
|
107
|
-
|
108
|
-
# Gets or sets a String prefix which is added to ID attributes.
|
109
|
-
# Default: ''
|
110
|
-
attr_accessor :id_prefix
|
111
|
-
|
112
|
-
# Gets a Hash describing HTML attributes that Sanitize should add.
|
113
|
-
# Default: {}
|
114
|
-
attr_reader :add_attributes
|
115
|
-
|
116
|
-
# Gets an Array of element names whose contents will be removed in addition
|
117
|
-
# to the elements themselves. Default: REMOVE_CONTENTS
|
118
|
-
attr_reader :remove_contents
|
119
|
-
|
120
|
-
# Sets a boolean determining whether Sanitize allows HTML comments in the
|
121
|
-
# output. Default: false.
|
122
|
-
attr_writer :allow_comments
|
123
|
-
|
124
|
-
def initialize
|
125
|
-
@elements = ELEMENTS.dup
|
126
|
-
@attributes = ATTRIBUTES.dup
|
127
|
-
@protocols = PROTOCOLS.dup
|
128
|
-
@transformers = TRANSFORMERS.dup
|
129
|
-
@add_attributes = {}
|
130
|
-
@remove_contents = REMOVE_CONTENTS.dup
|
131
|
-
@allow_comments = false
|
132
|
-
@id_prefix = ''
|
133
|
-
yield self if block_given?
|
134
|
-
end
|
135
|
-
|
136
|
-
# Determines if Sanitize should allow HTML comments.
|
137
|
-
#
|
138
|
-
# Returns True if comments are allowed, or False.
|
139
|
-
def allow_comments?
|
140
|
-
!!@allow_comments
|
141
|
-
end
|
142
|
-
|
143
|
-
# Modifies the current Sanitization instance to sanitize older revisions
|
144
|
-
# of pages.
|
145
|
-
#
|
146
|
-
# Returns a Sanitization instance.
|
147
|
-
def history_sanitization
|
148
|
-
self.class.new do |sanitize|
|
149
|
-
sanitize.add_attributes['a'] = {'rel' => 'nofollow'}
|
150
|
-
end
|
151
|
-
end
|
152
|
-
|
153
|
-
# Builds a Hash of options suitable for Sanitize.clean.
|
154
|
-
#
|
155
|
-
# Returns a Hash.
|
156
|
-
def to_hash
|
157
|
-
{ :elements => elements,
|
158
|
-
:attributes => attributes,
|
159
|
-
:protocols => protocols,
|
160
|
-
:add_attributes => add_attributes,
|
161
|
-
:remove_contents => remove_contents,
|
162
|
-
:allow_comments => allow_comments?,
|
163
|
-
:transformers => transformers,
|
164
|
-
:id_prefix => id_prefix
|
165
|
-
}
|
166
|
-
end
|
167
|
-
|
168
|
-
# Builds a Sanitize instance from the current options.
|
169
|
-
#
|
170
|
-
# Returns a Sanitize instance.
|
171
|
-
def to_sanitize
|
172
|
-
Sanitize.new(to_hash)
|
173
|
-
end
|
174
|
-
end
|
175
|
-
end
|
176
|
-
|
@@ -1,44 +0,0 @@
|
|
1
|
-
# ~*~ encoding: utf-8 ~*~
|
2
|
-
require 'net/http'
|
3
|
-
require 'uri'
|
4
|
-
require 'open-uri'
|
5
|
-
|
6
|
-
class Gollum::WebSequenceDiagram
|
7
|
-
WSD_URL = "http://www.websequencediagrams.com/index.php"
|
8
|
-
|
9
|
-
# Initialize a new WebSequenceDiagram object.
|
10
|
-
#
|
11
|
-
# code - The String containing the sequence diagram markup.
|
12
|
-
# style - The String containing the rendering style.
|
13
|
-
#
|
14
|
-
# Returns a new Gollum::WebSequenceDiagram object
|
15
|
-
def initialize(code, style)
|
16
|
-
@code = code
|
17
|
-
@style = style
|
18
|
-
@tag = ""
|
19
|
-
|
20
|
-
render
|
21
|
-
end
|
22
|
-
|
23
|
-
# Render the sequence diagram on the remote server and store the url to
|
24
|
-
# the rendered image.
|
25
|
-
#
|
26
|
-
# Returns nil.
|
27
|
-
def render
|
28
|
-
response = Net::HTTP.post_form(URI.parse(WSD_URL), 'style' => @style, 'message' => @code)
|
29
|
-
if response.body =~ /img: "(.+)"/
|
30
|
-
url = "http://www.websequencediagrams.com/#{$1}"
|
31
|
-
@tag = "<img src=\"#{url}\" />"
|
32
|
-
else
|
33
|
-
puts response.body
|
34
|
-
@tag ="Sorry, unable to render sequence diagram at this time."
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
# Gets the HTML IMG tag for the sequence diagram.
|
39
|
-
#
|
40
|
-
# Returns a String containing the IMG tag.
|
41
|
-
def to_tag
|
42
|
-
@tag
|
43
|
-
end
|
44
|
-
end
|
data/lib/gollum/wiki.rb
DELETED
@@ -1,762 +0,0 @@
|
|
1
|
-
# ~*~ encoding: utf-8 ~*~
|
2
|
-
module Gollum
|
3
|
-
class Wiki
|
4
|
-
include Pagination
|
5
|
-
|
6
|
-
class << self
|
7
|
-
# Sets the page class used by all instances of this Wiki.
|
8
|
-
attr_writer :page_class
|
9
|
-
|
10
|
-
# Sets the file class used by all instances of this Wiki.
|
11
|
-
attr_writer :file_class
|
12
|
-
|
13
|
-
# Sets the markup class used by all instances of this Wiki.
|
14
|
-
attr_writer :markup_classes
|
15
|
-
|
16
|
-
# Sets the default ref for the wiki.
|
17
|
-
attr_accessor :default_ref
|
18
|
-
|
19
|
-
# Sets the default name for commits.
|
20
|
-
attr_accessor :default_committer_name
|
21
|
-
|
22
|
-
# Sets the default email for commits.
|
23
|
-
attr_accessor :default_committer_email
|
24
|
-
|
25
|
-
# Array of chars to substitute whitespace for when trying to locate file in git repo.
|
26
|
-
attr_accessor :default_ws_subs
|
27
|
-
|
28
|
-
# Sets sanitization options. Set to false to deactivate
|
29
|
-
# sanitization altogether.
|
30
|
-
attr_writer :sanitization
|
31
|
-
|
32
|
-
# Sets sanitization options. Set to false to deactivate
|
33
|
-
# sanitization altogether.
|
34
|
-
attr_writer :history_sanitization
|
35
|
-
|
36
|
-
# Hash for setting different default wiki options
|
37
|
-
# These defaults can be overridden by options passed directly to initialize()
|
38
|
-
attr_accessor :default_options
|
39
|
-
|
40
|
-
# Gets the page class used by all instances of this Wiki.
|
41
|
-
# Default: Gollum::Page.
|
42
|
-
def page_class
|
43
|
-
@page_class ||
|
44
|
-
if superclass.respond_to?(:page_class)
|
45
|
-
superclass.page_class
|
46
|
-
else
|
47
|
-
::Gollum::Page
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
# Gets the file class used by all instances of this Wiki.
|
52
|
-
# Default: Gollum::File.
|
53
|
-
def file_class
|
54
|
-
@file_class ||
|
55
|
-
if superclass.respond_to?(:file_class)
|
56
|
-
superclass.file_class
|
57
|
-
else
|
58
|
-
::Gollum::File
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
# Gets the markup class used by all instances of this Wiki.
|
63
|
-
# Default: Gollum::Markup
|
64
|
-
def markup_classes
|
65
|
-
@markup_classes ||=
|
66
|
-
if superclass.respond_to?(:markup_classes)
|
67
|
-
superclass.markup_classes
|
68
|
-
else
|
69
|
-
Hash.new(::Gollum::Markup)
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
# Gets the default markup class used by all instances of this Wiki.
|
74
|
-
# Kept for backwards compatibility until Gollum v2.x
|
75
|
-
def markup_class(language=:default)
|
76
|
-
markup_classes[language]
|
77
|
-
end
|
78
|
-
|
79
|
-
# Sets the default markup class used by all instances of this Wiki.
|
80
|
-
# Kept for backwards compatibility until Gollum v2.x
|
81
|
-
def markup_class=(default)
|
82
|
-
@markup_classes = Hash.new(default).update(markup_classes)
|
83
|
-
default
|
84
|
-
end
|
85
|
-
|
86
|
-
alias_method :default_markup_class, :markup_class
|
87
|
-
alias_method :default_markup_class=, :markup_class=
|
88
|
-
|
89
|
-
# Gets the default sanitization options for current pages used by
|
90
|
-
# instances of this Wiki.
|
91
|
-
def sanitization
|
92
|
-
if @sanitization.nil?
|
93
|
-
@sanitization = Sanitization.new
|
94
|
-
end
|
95
|
-
@sanitization
|
96
|
-
end
|
97
|
-
|
98
|
-
# Gets the default sanitization options for older page revisions used by
|
99
|
-
# instances of this Wiki.
|
100
|
-
def history_sanitization
|
101
|
-
if @history_sanitization.nil?
|
102
|
-
@history_sanitization = sanitization ?
|
103
|
-
sanitization.history_sanitization :
|
104
|
-
false
|
105
|
-
end
|
106
|
-
@history_sanitization
|
107
|
-
end
|
108
|
-
end
|
109
|
-
|
110
|
-
self.default_ref = 'master'
|
111
|
-
self.default_committer_name = 'Anonymous'
|
112
|
-
self.default_committer_email = 'anon@anon.com'
|
113
|
-
|
114
|
-
self.default_ws_subs = ['_','-']
|
115
|
-
self.default_options = {}
|
116
|
-
|
117
|
-
# The String base path to prefix to internal links. For example, when set
|
118
|
-
# to "/wiki", the page "Hobbit" will be linked as "/wiki/Hobbit". Defaults
|
119
|
-
# to "/".
|
120
|
-
attr_reader :base_path
|
121
|
-
|
122
|
-
# Gets the sanitization options for current pages used by this Wiki.
|
123
|
-
attr_reader :sanitization
|
124
|
-
|
125
|
-
# Gets the sanitization options for older page revisions used by this Wiki.
|
126
|
-
attr_reader :history_sanitization
|
127
|
-
|
128
|
-
# Gets the String ref in which all page files reside.
|
129
|
-
attr_reader :ref
|
130
|
-
|
131
|
-
# Gets the String directory in which all page files reside.
|
132
|
-
attr_reader :page_file_dir
|
133
|
-
|
134
|
-
# Gets the Array of chars to sub for ws in filenames.
|
135
|
-
attr_reader :ws_subs
|
136
|
-
|
137
|
-
# Gets the boolean live preview value.
|
138
|
-
attr_reader :live_preview
|
139
|
-
|
140
|
-
# Injects custom css from custom.css in root repo.
|
141
|
-
# Defaults to false
|
142
|
-
attr_reader :css
|
143
|
-
|
144
|
-
# Sets page title to value of first h1
|
145
|
-
# Defaults to false
|
146
|
-
attr_reader :h1_title
|
147
|
-
|
148
|
-
# Public: Initialize a new Gollum Repo.
|
149
|
-
#
|
150
|
-
# path - The String path to the Git repository that holds the Gollum
|
151
|
-
# site.
|
152
|
-
# options - Optional Hash:
|
153
|
-
# :universal_toc - Table of contents on all pages. Default: false
|
154
|
-
# :live_preview - Livepreview editing for markdown files. Default: true
|
155
|
-
# :base_path - String base path for all Wiki links.
|
156
|
-
# Default: "/"
|
157
|
-
# :page_class - The page Class. Default: Gollum::Page
|
158
|
-
# :file_class - The file Class. Default: Gollum::File
|
159
|
-
# :markup_classes - A hash containing the markup Classes for each
|
160
|
-
# document type. Default: { Gollum::Markup }
|
161
|
-
# :sanitization - An instance of Sanitization.
|
162
|
-
# :page_file_dir - String the directory in which all page files reside
|
163
|
-
# :ref - String the repository ref to retrieve pages from
|
164
|
-
# :ws_subs - Array of chars to sub for ws in filenames.
|
165
|
-
# :mathjax - Set to false to disable mathjax.
|
166
|
-
# :user_icons - Enable user icons on the history page. [gravatar, identicon, none].
|
167
|
-
# Default: none
|
168
|
-
# :show_all - Show all files in file view, not just valid pages.
|
169
|
-
# Default: false
|
170
|
-
# :collapse_tree - Start with collapsed file view. Default: false
|
171
|
-
#
|
172
|
-
# Returns a fresh Gollum::Repo.
|
173
|
-
def initialize(path, options = {})
|
174
|
-
options = self.class.default_options.merge(options)
|
175
|
-
if path.is_a?(GitAccess)
|
176
|
-
options[:access] = path
|
177
|
-
path = path.path
|
178
|
-
end
|
179
|
-
|
180
|
-
# Use .fetch instead of ||
|
181
|
-
#
|
182
|
-
# o = { :a => false }
|
183
|
-
# o[:a] || true # => true
|
184
|
-
# o.fetch :a, true # => false
|
185
|
-
|
186
|
-
@path = path
|
187
|
-
@repo_is_bare = options.fetch :repo_is_bare, nil
|
188
|
-
@page_file_dir = options.fetch :page_file_dir, nil
|
189
|
-
@access = options.fetch :access, GitAccess.new(path, @page_file_dir, @repo_is_bare)
|
190
|
-
@base_path = options.fetch :base_path, "/"
|
191
|
-
@page_class = options.fetch :page_class, self.class.page_class
|
192
|
-
@file_class = options.fetch :file_class, self.class.file_class
|
193
|
-
@markup_classes = options.fetch :markup_classes, self.class.markup_classes
|
194
|
-
@repo = @access.repo
|
195
|
-
@ref = options.fetch :ref, self.class.default_ref
|
196
|
-
@sanitization = options.fetch :sanitization, self.class.sanitization
|
197
|
-
@ws_subs = options.fetch :ws_subs, self.class.default_ws_subs
|
198
|
-
@history_sanitization = options.fetch :history_sanitization, self.class.history_sanitization
|
199
|
-
@live_preview = options.fetch :live_preview, true
|
200
|
-
@universal_toc = options.fetch :universal_toc, false
|
201
|
-
@mathjax = options.fetch :mathjax, false
|
202
|
-
@show_all = options.fetch :show_all, false
|
203
|
-
@collapse_tree = options.fetch :collapse_tree, false
|
204
|
-
@css = options.fetch :css, false
|
205
|
-
@h1_title = options.fetch :h1_title, false
|
206
|
-
|
207
|
-
@user_icons = ['gravatar', 'identicon'].include?( options[:user_icons] ) ?
|
208
|
-
options[:user_icons] : 'none'
|
209
|
-
end
|
210
|
-
|
211
|
-
# Public: check whether the wiki's git repo exists on the filesystem.
|
212
|
-
#
|
213
|
-
# Returns true if the repo exists, and false if it does not.
|
214
|
-
def exist?
|
215
|
-
@access.exist?
|
216
|
-
end
|
217
|
-
|
218
|
-
# Public: Get the formatted page for a given page name, version, and dir.
|
219
|
-
#
|
220
|
-
# name - The human or canonical String page name of the wiki page.
|
221
|
-
# version - The String version ID to find (default: @ref).
|
222
|
-
# dir - The directory String relative to the repo.
|
223
|
-
#
|
224
|
-
# Returns a Gollum::Page or nil if no matching page was found.
|
225
|
-
def page(name, version = @ref, dir = nil, exact = false)
|
226
|
-
version = @ref if version.nil?
|
227
|
-
@page_class.new(self).find(name, version, dir, exact)
|
228
|
-
end
|
229
|
-
|
230
|
-
# Public: Convenience method instead of calling page(name, nil, dir).
|
231
|
-
#
|
232
|
-
# name - The human or canonical String page name of the wiki page.
|
233
|
-
# version - The String version ID to find (default: @ref).
|
234
|
-
# dir - The directory String relative to the repo.
|
235
|
-
#
|
236
|
-
# Returns a Gollum::Page or nil if no matching page was found.
|
237
|
-
def paged(name, dir = nil, exact = false, version = @ref)
|
238
|
-
page(name, version, dir, exact)
|
239
|
-
end
|
240
|
-
|
241
|
-
# Public: Get the static file for a given name.
|
242
|
-
#
|
243
|
-
# name - The full String pathname to the file.
|
244
|
-
# version - The String version ID to find (default: @ref).
|
245
|
-
#
|
246
|
-
# Returns a Gollum::File or nil if no matching file was found.
|
247
|
-
def file(name, version = @ref)
|
248
|
-
@file_class.new(self).find(name, version)
|
249
|
-
end
|
250
|
-
|
251
|
-
# Public: Create an in-memory Page with the given data and format. This
|
252
|
-
# is useful for previewing what content will look like before committing
|
253
|
-
# it to the repository.
|
254
|
-
#
|
255
|
-
# name - The String name of the page.
|
256
|
-
# format - The Symbol format of the page.
|
257
|
-
# data - The new String contents of the page.
|
258
|
-
#
|
259
|
-
# Returns the in-memory Gollum::Page.
|
260
|
-
def preview_page(name, data, format)
|
261
|
-
page = @page_class.new(self)
|
262
|
-
ext = @page_class.format_to_ext(format.to_sym)
|
263
|
-
name = @page_class.cname(name) + '.' + ext
|
264
|
-
blob = OpenStruct.new(:name => name, :data => data)
|
265
|
-
page.populate(blob)
|
266
|
-
page.version = @access.commit('master')
|
267
|
-
page
|
268
|
-
end
|
269
|
-
|
270
|
-
# Public: Write a new version of a page to the Gollum repo root.
|
271
|
-
#
|
272
|
-
# name - The String name of the page.
|
273
|
-
# format - The Symbol format of the page.
|
274
|
-
# data - The new String contents of the page.
|
275
|
-
# commit - The commit Hash details:
|
276
|
-
# :message - The String commit message.
|
277
|
-
# :name - The String author full name.
|
278
|
-
# :email - The String email address.
|
279
|
-
# :parent - Optional Grit::Commit parent to this update.
|
280
|
-
# :tree - Optional String SHA of the tree to create the
|
281
|
-
# index from.
|
282
|
-
# :committer - Optional Gollum::Committer instance. If provided,
|
283
|
-
# assume that this operation is part of batch of
|
284
|
-
# updates and the commit happens later.
|
285
|
-
# dir - The String subdirectory of the Gollum::Page without any
|
286
|
-
# prefix or suffix slashes (e.g. "foo/bar").
|
287
|
-
# Returns the String SHA1 of the newly written version, or the
|
288
|
-
# Gollum::Committer instance if this is part of a batch update.
|
289
|
-
def write_page(name, format, data, commit = {}, dir = '')
|
290
|
-
# spaces must be dashes
|
291
|
-
name.gsub!(' ', '-')
|
292
|
-
dir.gsub!(' ', '-')
|
293
|
-
|
294
|
-
multi_commit = false
|
295
|
-
|
296
|
-
committer = if obj = commit[:committer]
|
297
|
-
multi_commit = true
|
298
|
-
obj
|
299
|
-
else
|
300
|
-
Committer.new(self, commit)
|
301
|
-
end
|
302
|
-
|
303
|
-
filename = Gollum::Page.cname(name)
|
304
|
-
|
305
|
-
committer.add_to_index(dir, filename, format, data)
|
306
|
-
|
307
|
-
committer.after_commit do |index, sha|
|
308
|
-
@access.refresh
|
309
|
-
index.update_working_dir('', filename, format)
|
310
|
-
end
|
311
|
-
|
312
|
-
multi_commit ? committer : committer.commit
|
313
|
-
end
|
314
|
-
|
315
|
-
# Public: Update an existing page with new content. The location of the
|
316
|
-
# page inside the repository will not change. If the given format is
|
317
|
-
# different than the current format of the page, the filename will be
|
318
|
-
# changed to reflect the new format.
|
319
|
-
#
|
320
|
-
# page - The Gollum::Page to update.
|
321
|
-
# name - The String extension-less name of the page.
|
322
|
-
# format - The Symbol format of the page.
|
323
|
-
# data - The new String contents of the page.
|
324
|
-
# commit - The commit Hash details:
|
325
|
-
# :message - The String commit message.
|
326
|
-
# :name - The String author full name.
|
327
|
-
# :email - The String email address.
|
328
|
-
# :parent - Optional Grit::Commit parent to this update.
|
329
|
-
# :tree - Optional String SHA of the tree to create the
|
330
|
-
# index from.
|
331
|
-
# :committer - Optional Gollum::Committer instance. If provided,
|
332
|
-
# assume that this operation is part of batch of
|
333
|
-
# updates and the commit happens later.
|
334
|
-
#
|
335
|
-
# Returns the String SHA1 of the newly written version, or the
|
336
|
-
# Gollum::Committer instance if this is part of a batch update.
|
337
|
-
def update_page(page, name, format, data, commit = {})
|
338
|
-
name ||= page.name
|
339
|
-
format ||= page.format
|
340
|
-
dir = ::File.dirname(page.path)
|
341
|
-
dir = '' if dir == '.'
|
342
|
-
filename = (rename = page.name != name) ?
|
343
|
-
Gollum::Page.cname(name) : page.filename_stripped
|
344
|
-
|
345
|
-
multi_commit = false
|
346
|
-
|
347
|
-
committer = if obj = commit[:committer]
|
348
|
-
multi_commit = true
|
349
|
-
obj
|
350
|
-
else
|
351
|
-
Committer.new(self, commit)
|
352
|
-
end
|
353
|
-
|
354
|
-
if !rename && page.format == format
|
355
|
-
committer.add(page.path, normalize(data))
|
356
|
-
else
|
357
|
-
committer.delete(page.path)
|
358
|
-
committer.add_to_index(dir, filename, format, data, :allow_same_ext)
|
359
|
-
end
|
360
|
-
|
361
|
-
committer.after_commit do |index, sha|
|
362
|
-
@access.refresh
|
363
|
-
index.update_working_dir(dir, page.filename_stripped, page.format)
|
364
|
-
index.update_working_dir(dir, filename, format)
|
365
|
-
end
|
366
|
-
|
367
|
-
multi_commit ? committer : committer.commit
|
368
|
-
end
|
369
|
-
|
370
|
-
# Public: Delete a page.
|
371
|
-
#
|
372
|
-
# page - The Gollum::Page to delete.
|
373
|
-
# commit - The commit Hash details:
|
374
|
-
# :message - The String commit message.
|
375
|
-
# :name - The String author full name.
|
376
|
-
# :email - The String email address.
|
377
|
-
# :parent - Optional Grit::Commit parent to this update.
|
378
|
-
# :tree - Optional String SHA of the tree to create the
|
379
|
-
# index from.
|
380
|
-
# :committer - Optional Gollum::Committer instance. If provided,
|
381
|
-
# assume that this operation is part of batch of
|
382
|
-
# updates and the commit happens later.
|
383
|
-
#
|
384
|
-
# Returns the String SHA1 of the newly written version, or the
|
385
|
-
# Gollum::Committer instance if this is part of a batch update.
|
386
|
-
def delete_page(page, commit)
|
387
|
-
multi_commit = false
|
388
|
-
|
389
|
-
committer = if obj = commit[:committer]
|
390
|
-
multi_commit = true
|
391
|
-
obj
|
392
|
-
else
|
393
|
-
Committer.new(self, commit)
|
394
|
-
end
|
395
|
-
|
396
|
-
committer.delete(page.path)
|
397
|
-
|
398
|
-
committer.after_commit do |index, sha|
|
399
|
-
dir = ::File.dirname(page.path)
|
400
|
-
dir = '' if dir == '.'
|
401
|
-
|
402
|
-
@access.refresh
|
403
|
-
index.update_working_dir(dir, page.filename_stripped, page.format)
|
404
|
-
end
|
405
|
-
|
406
|
-
multi_commit ? committer : committer.commit
|
407
|
-
end
|
408
|
-
|
409
|
-
# Public: Applies a reverse diff for a given page. If only 1 SHA is given,
|
410
|
-
# the reverse diff will be taken from its parent (^SHA...SHA). If two SHAs
|
411
|
-
# are given, the reverse diff is taken from SHA1...SHA2.
|
412
|
-
#
|
413
|
-
# page - The Gollum::Page to delete.
|
414
|
-
# sha1 - String SHA1 of the earlier parent if two SHAs are given,
|
415
|
-
# or the child.
|
416
|
-
# sha2 - Optional String SHA1 of the child.
|
417
|
-
# commit - The commit Hash details:
|
418
|
-
# :message - The String commit message.
|
419
|
-
# :name - The String author full name.
|
420
|
-
# :email - The String email address.
|
421
|
-
# :parent - Optional Grit::Commit parent to this update.
|
422
|
-
#
|
423
|
-
# Returns a String SHA1 of the new commit, or nil if the reverse diff does
|
424
|
-
# not apply.
|
425
|
-
def revert_page(page, sha1, sha2 = nil, commit = {})
|
426
|
-
if sha2.is_a?(Hash)
|
427
|
-
commit = sha2
|
428
|
-
sha2 = nil
|
429
|
-
end
|
430
|
-
|
431
|
-
patch = full_reverse_diff_for(page, sha1, sha2)
|
432
|
-
committer = Committer.new(self, commit)
|
433
|
-
parent = committer.parents[0]
|
434
|
-
committer.options[:tree] = @repo.git.apply_patch(parent.sha, patch)
|
435
|
-
return false unless committer.options[:tree]
|
436
|
-
committer.after_commit do |index, sha|
|
437
|
-
@access.refresh
|
438
|
-
|
439
|
-
files = []
|
440
|
-
if page
|
441
|
-
files << [page.path, page.filename_stripped, page.format]
|
442
|
-
else
|
443
|
-
# Grit::Diff can't parse reverse diffs.... yet
|
444
|
-
patch.each_line do |line|
|
445
|
-
if line =~ %r{^diff --git b/.+? a/(.+)$}
|
446
|
-
path = $1
|
447
|
-
ext = ::File.extname(path)
|
448
|
-
name = ::File.basename(path, ext)
|
449
|
-
if format = ::Gollum::Page.format_for(ext)
|
450
|
-
files << [path, name, format]
|
451
|
-
end
|
452
|
-
end
|
453
|
-
end
|
454
|
-
end
|
455
|
-
|
456
|
-
files.each do |(path, name, format)|
|
457
|
-
dir = ::File.dirname(path)
|
458
|
-
dir = '' if dir == '.'
|
459
|
-
index.update_working_dir(dir, name, format)
|
460
|
-
end
|
461
|
-
end
|
462
|
-
|
463
|
-
committer.commit
|
464
|
-
end
|
465
|
-
|
466
|
-
# Public: Applies a reverse diff to the repo. If only 1 SHA is given,
|
467
|
-
# the reverse diff will be taken from its parent (^SHA...SHA). If two SHAs
|
468
|
-
# are given, the reverse diff is taken from SHA1...SHA2.
|
469
|
-
#
|
470
|
-
# sha1 - String SHA1 of the earlier parent if two SHAs are given,
|
471
|
-
# or the child.
|
472
|
-
# sha2 - Optional String SHA1 of the child.
|
473
|
-
# commit - The commit Hash details:
|
474
|
-
# :message - The String commit message.
|
475
|
-
# :name - The String author full name.
|
476
|
-
# :email - The String email address.
|
477
|
-
#
|
478
|
-
# Returns a String SHA1 of the new commit, or nil if the reverse diff does
|
479
|
-
# not apply.
|
480
|
-
def revert_commit(sha1, sha2 = nil, commit = {})
|
481
|
-
revert_page(nil, sha1, sha2, commit)
|
482
|
-
end
|
483
|
-
|
484
|
-
# Public: Lists all pages for this wiki.
|
485
|
-
#
|
486
|
-
# treeish - The String commit ID or ref to find (default: @ref)
|
487
|
-
#
|
488
|
-
# Returns an Array of Gollum::Page instances.
|
489
|
-
def pages(treeish = nil)
|
490
|
-
tree_list(treeish || @ref)
|
491
|
-
end
|
492
|
-
|
493
|
-
# Public: Lists all non-page files for this wiki.
|
494
|
-
#
|
495
|
-
# treeish - The String commit ID or ref to find (default: @ref)
|
496
|
-
#
|
497
|
-
# Returns an Array of Gollum::File instances.
|
498
|
-
def files(treeish = nil)
|
499
|
-
file_list(treeish || @ref)
|
500
|
-
end
|
501
|
-
|
502
|
-
# Public: Returns the number of pages accessible from a commit
|
503
|
-
#
|
504
|
-
# ref - A String ref that is either a commit SHA or references one.
|
505
|
-
#
|
506
|
-
# Returns a Fixnum
|
507
|
-
def size(ref = nil)
|
508
|
-
tree_map_for(ref || @ref).inject(0) do |num, entry|
|
509
|
-
num + (@page_class.valid_page_name?(entry.name) ? 1 : 0)
|
510
|
-
end
|
511
|
-
rescue Grit::GitRuby::Repository::NoSuchShaFound
|
512
|
-
0
|
513
|
-
end
|
514
|
-
|
515
|
-
# Public: Search all pages for this wiki.
|
516
|
-
#
|
517
|
-
# query - The string to search for
|
518
|
-
#
|
519
|
-
# Returns an Array with Objects of page name and count of matches
|
520
|
-
def search(query)
|
521
|
-
args = [{}, '-i', '-c', query, @ref, '--']
|
522
|
-
args << '--' << @page_file_dir if @page_file_dir
|
523
|
-
|
524
|
-
results = {}
|
525
|
-
|
526
|
-
@repo.git.grep(*args).split("\n").each do |line|
|
527
|
-
result = line.split(':')
|
528
|
-
result_1 = result[1]
|
529
|
-
# Remove ext only from known extensions.
|
530
|
-
# test.pdf => test.pdf, test.md => test
|
531
|
-
file_name = Page::valid_page_name?(result_1) ? result_1.chomp(::File.extname(result_1)) :
|
532
|
-
result_1
|
533
|
-
results[file_name] = result[2].to_i
|
534
|
-
end
|
535
|
-
|
536
|
-
# Use git ls-files '*query*' to search for file names. Grep only searches file content.
|
537
|
-
# Spaces are converted to dashes when saving pages to disk.
|
538
|
-
@repo.git.ls_files({}, "*#{ query.gsub(' ', '-') }*").split("\n").each do |line|
|
539
|
-
# Remove ext only from known extensions.
|
540
|
-
file_name = Page::valid_page_name?(line) ? line.chomp(::File.extname(line)) :
|
541
|
-
line
|
542
|
-
# If there's not already a result for file_name then
|
543
|
-
# the value is nil and nil.to_i is 0.
|
544
|
-
results[file_name] = results[file_name].to_i + 1;
|
545
|
-
end
|
546
|
-
|
547
|
-
results.map do |key,val|
|
548
|
-
{ :count => val, :name => key }
|
549
|
-
end
|
550
|
-
end
|
551
|
-
|
552
|
-
# Public: All of the versions that have touched the Page.
|
553
|
-
#
|
554
|
-
# options - The options Hash:
|
555
|
-
# :page - The Integer page number (default: 1).
|
556
|
-
# :per_page - The Integer max count of items to return.
|
557
|
-
#
|
558
|
-
# Returns an Array of Grit::Commit.
|
559
|
-
def log(options = {})
|
560
|
-
@repo.log(@ref, nil, log_pagination_options(options))
|
561
|
-
end
|
562
|
-
|
563
|
-
# Public: Refreshes just the cached Git reference data. This should
|
564
|
-
# be called after every Gollum update.
|
565
|
-
#
|
566
|
-
# Returns nothing.
|
567
|
-
def clear_cache
|
568
|
-
@access.refresh
|
569
|
-
end
|
570
|
-
|
571
|
-
# Public: Creates a Sanitize instance using the Wiki's sanitization
|
572
|
-
# options.
|
573
|
-
#
|
574
|
-
# Returns a Sanitize instance.
|
575
|
-
def sanitizer
|
576
|
-
if options = sanitization
|
577
|
-
@sanitizer ||= options.to_sanitize
|
578
|
-
end
|
579
|
-
end
|
580
|
-
|
581
|
-
# Public: Creates a Sanitize instance using the Wiki's history sanitization
|
582
|
-
# options.
|
583
|
-
#
|
584
|
-
# Returns a Sanitize instance.
|
585
|
-
def history_sanitizer
|
586
|
-
if options = history_sanitization
|
587
|
-
@history_sanitizer ||= options.to_sanitize
|
588
|
-
end
|
589
|
-
end
|
590
|
-
|
591
|
-
#########################################################################
|
592
|
-
#
|
593
|
-
# Internal Methods
|
594
|
-
#
|
595
|
-
#########################################################################
|
596
|
-
|
597
|
-
# The Grit::Repo associated with the wiki.
|
598
|
-
#
|
599
|
-
# Returns the Grit::Repo.
|
600
|
-
attr_reader :repo
|
601
|
-
|
602
|
-
# The String path to the Git repository that holds the Gollum site.
|
603
|
-
#
|
604
|
-
# Returns the String path.
|
605
|
-
attr_reader :path
|
606
|
-
|
607
|
-
# Gets the page class used by all instances of this Wiki.
|
608
|
-
attr_reader :page_class
|
609
|
-
|
610
|
-
# Gets the file class used by all instances of this Wiki.
|
611
|
-
attr_reader :file_class
|
612
|
-
|
613
|
-
# Gets the markup class used by all instances of this Wiki.
|
614
|
-
attr_reader :markup_classes
|
615
|
-
|
616
|
-
# Toggles display of universal table of contents
|
617
|
-
attr_reader :universal_toc
|
618
|
-
|
619
|
-
# Toggles mathjax.
|
620
|
-
attr_reader :mathjax
|
621
|
-
|
622
|
-
# Toggles user icons. Default: 'none'
|
623
|
-
attr_reader :user_icons
|
624
|
-
|
625
|
-
# Toggles showing all files in files view. Default is false.
|
626
|
-
# When false, only valid pages in the git repo are displayed.
|
627
|
-
attr_reader :show_all
|
628
|
-
|
629
|
-
# Start with collapsed file view. Default: false
|
630
|
-
attr_reader :collapse_tree
|
631
|
-
|
632
|
-
# Normalize the data.
|
633
|
-
#
|
634
|
-
# data - The String data to be normalized.
|
635
|
-
#
|
636
|
-
# Returns the normalized data String.
|
637
|
-
def normalize(data)
|
638
|
-
data.gsub(/\r/, '')
|
639
|
-
end
|
640
|
-
|
641
|
-
# Assemble a Page's filename from its name and format.
|
642
|
-
#
|
643
|
-
# name - The String name of the page (should be pre-canonicalized).
|
644
|
-
# format - The Symbol format of the page.
|
645
|
-
#
|
646
|
-
# Returns the String filename.
|
647
|
-
def page_file_name(name, format)
|
648
|
-
name + '.' + @page_class.format_to_ext(format)
|
649
|
-
end
|
650
|
-
|
651
|
-
# Fill an array with a list of pages.
|
652
|
-
#
|
653
|
-
# ref - A String ref that is either a commit SHA or references one.
|
654
|
-
#
|
655
|
-
# Returns a flat Array of Gollum::Page instances.
|
656
|
-
def tree_list(ref)
|
657
|
-
if sha = @access.ref_to_sha(ref)
|
658
|
-
commit = @access.commit(sha)
|
659
|
-
tree_map_for(sha).inject([]) do |list, entry|
|
660
|
-
next list unless @page_class.valid_page_name?(entry.name)
|
661
|
-
list << entry.page(self, commit)
|
662
|
-
end
|
663
|
-
else
|
664
|
-
[]
|
665
|
-
end
|
666
|
-
end
|
667
|
-
|
668
|
-
# Fill an array with a list of files.
|
669
|
-
#
|
670
|
-
# ref - A String ref that is either a commit SHA or references one.
|
671
|
-
#
|
672
|
-
# Returns a flat Array of Gollum::File instances.
|
673
|
-
def file_list(ref)
|
674
|
-
if sha = @access.ref_to_sha(ref)
|
675
|
-
commit = @access.commit(sha)
|
676
|
-
tree_map_for(sha).inject([]) do |list, entry|
|
677
|
-
next list if entry.name.start_with?('_')
|
678
|
-
next list if @page_class.valid_page_name?(entry.name)
|
679
|
-
list << entry.file(self, commit)
|
680
|
-
end
|
681
|
-
else
|
682
|
-
[]
|
683
|
-
end
|
684
|
-
end
|
685
|
-
|
686
|
-
# Creates a reverse diff for the given SHAs on the given Gollum::Page.
|
687
|
-
#
|
688
|
-
# page - The Gollum::Page to scope the patch to, or a String Path.
|
689
|
-
# sha1 - String SHA1 of the earlier parent if two SHAs are given,
|
690
|
-
# or the child.
|
691
|
-
# sha2 - Optional String SHA1 of the child.
|
692
|
-
#
|
693
|
-
# Returns a String of the reverse Diff to apply.
|
694
|
-
def full_reverse_diff_for(page, sha1, sha2 = nil)
|
695
|
-
sha1, sha2 = "#{sha1}^", sha1 if sha2.nil?
|
696
|
-
args = [{:R => true}, sha1, sha2]
|
697
|
-
if page
|
698
|
-
args << '--' << (page.respond_to?(:path) ? page.path : page.to_s)
|
699
|
-
end
|
700
|
-
repo.git.native(:diff, *args)
|
701
|
-
end
|
702
|
-
|
703
|
-
# Creates a reverse diff for the given SHAs.
|
704
|
-
#
|
705
|
-
# sha1 - String SHA1 of the earlier parent if two SHAs are given,
|
706
|
-
# or the child.
|
707
|
-
# sha2 - Optional String SHA1 of the child.
|
708
|
-
#
|
709
|
-
# Returns a String of the reverse Diff to apply.
|
710
|
-
def full_reverse_diff(sha1, sha2 = nil)
|
711
|
-
full_reverse_diff_for(nil, sha1, sha2)
|
712
|
-
end
|
713
|
-
|
714
|
-
# Gets the default name for commits.
|
715
|
-
#
|
716
|
-
# Returns the String name.
|
717
|
-
def default_committer_name
|
718
|
-
@default_committer_name ||= \
|
719
|
-
@repo.config['user.name'] || self.class.default_committer_name
|
720
|
-
end
|
721
|
-
|
722
|
-
# Gets the default email for commits.
|
723
|
-
#
|
724
|
-
# Returns the String email address.
|
725
|
-
def default_committer_email
|
726
|
-
@default_committer_email ||= \
|
727
|
-
@repo.config['user.email'] || self.class.default_committer_email
|
728
|
-
end
|
729
|
-
|
730
|
-
# Gets the commit object for the given ref or sha.
|
731
|
-
#
|
732
|
-
# ref - A string ref or SHA pointing to a valid commit.
|
733
|
-
#
|
734
|
-
# Returns a Grit::Commit instance.
|
735
|
-
def commit_for(ref)
|
736
|
-
@access.commit(ref)
|
737
|
-
rescue Grit::GitRuby::Repository::NoSuchShaFound
|
738
|
-
end
|
739
|
-
|
740
|
-
# Finds a full listing of files and their blob SHA for a given ref. Each
|
741
|
-
# listing is cached based on its actual commit SHA.
|
742
|
-
#
|
743
|
-
# ref - A String ref that is either a commit SHA or references one.
|
744
|
-
# ignore_page_file_dir - Boolean, if true, searches all files within the git repo, regardless of dir/subdir
|
745
|
-
#
|
746
|
-
# Returns an Array of BlobEntry instances.
|
747
|
-
def tree_map_for(ref, ignore_page_file_dir=false)
|
748
|
-
if ignore_page_file_dir && !@page_file_dir.nil?
|
749
|
-
@root_access ||= GitAccess.new(path, nil, @repo_is_bare)
|
750
|
-
@root_access.tree(ref)
|
751
|
-
else
|
752
|
-
@access.tree(ref)
|
753
|
-
end
|
754
|
-
rescue Grit::GitRuby::Repository::NoSuchShaFound
|
755
|
-
[]
|
756
|
-
end
|
757
|
-
|
758
|
-
def inspect
|
759
|
-
%(#<#{self.class.name}:#{object_id} #{@repo.path}>)
|
760
|
-
end
|
761
|
-
end
|
762
|
-
end
|