super-pro-rb 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/gollum-6.1.0/CONTRIBUTING.md +221 -0
- data/gollum-6.1.0/Dockerfile +57 -0
- data/gollum-6.1.0/Gemfile +30 -0
- data/gollum-6.1.0/HISTORY.md +229 -0
- data/gollum-6.1.0/LATEST_CHANGES.md +6 -0
- data/gollum-6.1.0/LICENSE +21 -0
- data/gollum-6.1.0/README.md +177 -0
- data/gollum-6.1.0/Rakefile +297 -0
- data/gollum-6.1.0/bin/gollum +301 -0
- data/gollum-6.1.0/bin/gollum-migrate-tags +283 -0
- data/gollum-6.1.0/config.rb +12 -0
- data/gollum-6.1.0/config.ru +12 -0
- data/gollum-6.1.0/contrib/automation/gollum-post +66 -0
- data/gollum-6.1.0/contrib/openrc/conf.d/gollum +3 -0
- data/gollum-6.1.0/contrib/openrc/init.d/gollum +36 -0
- data/gollum-6.1.0/contrib/systemd/gollum@.service +12 -0
- data/gollum-6.1.0/contrib/sysv-debian/init.d/gollum +79 -0
- data/gollum-6.1.0/docker-run.sh +24 -0
- data/gollum-6.1.0/gollum.gemspec +305 -0
- data/gollum-6.1.0/lib/gollum/app.rb +747 -0
- data/gollum-6.1.0/lib/gollum/assets.rb +33 -0
- data/gollum-6.1.0/lib/gollum/helpers.rb +74 -0
- data/gollum-6.1.0/lib/gollum/locales/cn.yml +103 -0
- data/gollum-6.1.0/lib/gollum/locales/en.yml +103 -0
- data/gollum-6.1.0/lib/gollum/public/assets/app-05adca32f8f4f3effe10f8f4cf26dfd6a419ba986bce60d3f51a97e4055d4113.js +30 -0
- data/gollum-6.1.0/lib/gollum/public/assets/app-05adca32f8f4f3effe10f8f4cf26dfd6a419ba986bce60d3f51a97e4055d4113.js.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/app-e224b375d824f0171fc926d624dc0887bf453db83f485b1992bc0859c4110e3e.css +11 -0
- data/gollum-6.1.0/lib/gollum/public/assets/app-e224b375d824f0171fc926d624dc0887bf453db83f485b1992bc0859c4110e3e.css.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/criticmarkup-7b66f7a53b854bc9e4168be5b4725ca38e2bc6e9c41d5c050a9f60d9a94cb405.css +1 -0
- data/gollum-6.1.0/lib/gollum/public/assets/criticmarkup-7b66f7a53b854bc9e4168be5b4725ca38e2bc6e9c41d5c050a9f60d9a94cb405.css.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/editor-9bef5462bb5dae2db84d6d8d534b55c5bb5a430e11344b3c23f9ea4410312f52.js +165 -0
- data/gollum-6.1.0/lib/gollum/public/assets/editor-9bef5462bb5dae2db84d6d8d534b55c5bb5a430e11344b3c23f9ea4410312f52.js.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/gollum.katex-e70c1d51a08ebfe759eecbb33fbed54f300ccd7fb8d0e86e251caaf4e50f6b68.js +9 -0
- data/gollum-6.1.0/lib/gollum/public/assets/gollum.katex-e70c1d51a08ebfe759eecbb33fbed54f300ccd7fb8d0e86e251caaf4e50f6b68.js.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/gollum.mermaid-06fd2f5494199db250618043312c27770720504b50c3f6ca99d2d2df529c7da3.js +118 -0
- data/gollum-6.1.0/lib/gollum/public/assets/gollum.mermaid-06fd2f5494199db250618043312c27770720504b50c3f6ca99d2d2df529c7da3.js.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/katex-709d4191c4f005516a709377f79e468d343f4e6c91a29a6ff188d13d124ba55f.css +1 -0
- data/gollum-6.1.0/lib/gollum/public/assets/katex/dist/katex-709d4191c4f005516a709377f79e468d343f4e6c91a29a6ff188d13d124ba55f.css.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/assets/print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css +1 -0
- data/gollum-6.1.0/lib/gollum/public/assets/print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css.gz +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/HOWTO_UPDATE_MATHJAX.md +21 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/a11y/assistive-mml.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/a11y/complexity.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/a11y/explorer.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/a11y/semantic-enrich.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/a11y/sre.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/adaptors/liteDOM.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/core.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/asciimath.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/mml/entities.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/mml/extensions/mml3.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/mml/extensions/mml3.sef.json +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/mml.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/action.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/all-packages.js +34 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/ams.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/amscd.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/autoload.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/bbox.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/boldsymbol.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/braket.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/bussproofs.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/cancel.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/cases.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/centernot.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/color.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/colortbl.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/colorv2.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/configmacros.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/empheq.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/enclose.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/extpfeil.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/gensymb.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/html.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/mathtools.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/mhchem.js +34 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/newcommand.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/noerrors.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/noundefined.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/physics.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/require.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/setoptions.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/tagformat.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/textcomp.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/textmacros.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/unicode.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/upgreek.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex/extensions/verb.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex-base.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex-full.js +34 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/input/tex.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/latest.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/loader.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/node-main.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/tex.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml/fonts/woff-v2/MathJax_Zero.woff +0 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/chtml.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/svg/fonts/tex.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/output/svg.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/base.json +29 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/ca.json +140 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/da.json +140 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/de.json +146 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/en.json +158 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/es.json +140 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/fr.json +146 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/hi.json +146 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/it.json +146 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/nb.json +146 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/nemeth.json +125 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/nn.json +146 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/sre/mathmaps/sv.json +146 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/startup.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/tex-chtml-full-speech.js +34 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/tex-mml-chtml.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/ui/lazy.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/ui/menu.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/MathJax/ui/safe.js +1 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/app.js +15 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/clipboard.min.js +7 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/date.min.js +123 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/gollum.editor.js +1277 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/asciidoc.js +117 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/bib.js +8 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/creole.js +70 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/default.js +201 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/markdown.js +119 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/mediawiki.js +122 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/org.js +128 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/plaintext.js +8 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/pod.js +93 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/rdoc.js +23 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/rest.js +187 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/langs/textile.js +133 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/modes.js.erb +252 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor/sections.js +87 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/editor.js +30 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/gollum.behaviors.js +40 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/gollum.dialog.js +263 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/gollum.js.erb +814 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/gollum.katex.js +3 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/gollum.mermaid.js +2 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/gollum.placeholder.js +54 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/identicon.js +205 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/jquery-1.9.1.min.js +5 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/jquery.resize.js +164 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/javascript/polyfills.js +6 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/_base.scss +13 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/_breakpoint.scss +22 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/_features.scss +84 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/_spinners.scss +245 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/app.scss +16 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/criticmarkup.scss +42 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/dialog.scss +140 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/editor.scss +217 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/emoji.scss +5 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/highlights.scss +196 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/print.scss +16 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/spinner.scss +9 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/tables.scss +47 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/template.scss.erb +204 -0
- data/gollum-6.1.0/lib/gollum/public/gollum/stylesheets/wiki_content.scss +144 -0
- data/gollum-6.1.0/lib/gollum/templates/commit.mustache +29 -0
- data/gollum-6.1.0/lib/gollum/templates/compare.mustache +84 -0
- data/gollum-6.1.0/lib/gollum/templates/create.mustache +26 -0
- data/gollum-6.1.0/lib/gollum/templates/edit.mustache +24 -0
- data/gollum-6.1.0/lib/gollum/templates/editor.mustache +215 -0
- data/gollum-6.1.0/lib/gollum/templates/error.mustache +8 -0
- data/gollum-6.1.0/lib/gollum/templates/history.mustache +51 -0
- data/gollum-6.1.0/lib/gollum/templates/history_authors/gravatar.mustache +2 -0
- data/gollum-6.1.0/lib/gollum/templates/history_authors/identicon.mustache +2 -0
- data/gollum-6.1.0/lib/gollum/templates/history_authors/none.mustache +2 -0
- data/gollum-6.1.0/lib/gollum/templates/latest_changes.mustache +36 -0
- data/gollum-6.1.0/lib/gollum/templates/layout.mustache +140 -0
- data/gollum-6.1.0/lib/gollum/templates/mobilenav.mustache +72 -0
- data/gollum-6.1.0/lib/gollum/templates/navbar.mustache +110 -0
- data/gollum-6.1.0/lib/gollum/templates/overview.mustache +55 -0
- data/gollum-6.1.0/lib/gollum/templates/page.mustache +13 -0
- data/gollum-6.1.0/lib/gollum/templates/pagination.mustache +23 -0
- data/gollum-6.1.0/lib/gollum/templates/search.mustache +51 -0
- data/gollum-6.1.0/lib/gollum/templates/searchbar.mustache +3 -0
- data/gollum-6.1.0/lib/gollum/templates/wiki_content.mustache +64 -0
- data/gollum-6.1.0/lib/gollum/uri_encode_component.rb +212 -0
- data/gollum-6.1.0/lib/gollum/views/commit.rb +49 -0
- data/gollum-6.1.0/lib/gollum/views/compare.rb +109 -0
- data/gollum-6.1.0/lib/gollum/views/create.rb +53 -0
- data/gollum-6.1.0/lib/gollum/views/edit.rb +78 -0
- data/gollum-6.1.0/lib/gollum/views/editable.rb +31 -0
- data/gollum-6.1.0/lib/gollum/views/error.rb +7 -0
- data/gollum-6.1.0/lib/gollum/views/has_math.rb +15 -0
- data/gollum-6.1.0/lib/gollum/views/has_page.rb +19 -0
- data/gollum-6.1.0/lib/gollum/views/has_user_icons.rb +15 -0
- data/gollum-6.1.0/lib/gollum/views/helpers/locale_helpers.rb +89 -0
- data/gollum-6.1.0/lib/gollum/views/helpers.rb +132 -0
- data/gollum-6.1.0/lib/gollum/views/history.rb +56 -0
- data/gollum-6.1.0/lib/gollum/views/latest_changes.rb +44 -0
- data/gollum-6.1.0/lib/gollum/views/layout.rb +103 -0
- data/gollum-6.1.0/lib/gollum/views/overview.rb +81 -0
- data/gollum-6.1.0/lib/gollum/views/page.rb +277 -0
- data/gollum-6.1.0/lib/gollum/views/pagination.rb +13 -0
- data/gollum-6.1.0/lib/gollum/views/rss.rb +84 -0
- data/gollum-6.1.0/lib/gollum/views/search.rb +47 -0
- data/gollum-6.1.0/lib/gollum/views/template_cascade.rb +29 -0
- data/gollum-6.1.0/lib/gollum.rb +42 -0
- data/gollum-6.1.0/licenses/licenses.txt +31 -0
- data/gollum-6.1.0/package.json +12 -0
- data/gollum-6.1.0/yarn.lock +1025 -0
- data/super-pro-rb.gemspec +11 -0
- metadata +290 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
module Precious
|
|
2
|
+
module Views
|
|
3
|
+
class Edit < Layout
|
|
4
|
+
include Editable
|
|
5
|
+
include HasPage
|
|
6
|
+
include HasMath
|
|
7
|
+
|
|
8
|
+
attr_reader :page, :content
|
|
9
|
+
|
|
10
|
+
# return path set in app.rb not @page.path
|
|
11
|
+
def path
|
|
12
|
+
@path
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def title
|
|
16
|
+
"#{@page.title}"
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def page_name
|
|
20
|
+
@name
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def header
|
|
24
|
+
if @header.nil?
|
|
25
|
+
if page = @page.header
|
|
26
|
+
@header = page.text_data
|
|
27
|
+
else
|
|
28
|
+
@header = false
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
@header
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def footer
|
|
35
|
+
if @footer.nil?
|
|
36
|
+
if page = @page.footer
|
|
37
|
+
@footer = page.text_data
|
|
38
|
+
else
|
|
39
|
+
@footer = false
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
@footer
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def sidebar
|
|
46
|
+
if @sidebar.nil?
|
|
47
|
+
if page = @page.sidebar
|
|
48
|
+
@sidebar = page.text_data
|
|
49
|
+
else
|
|
50
|
+
@sidebar = false
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
@sidebar
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def is_create_page
|
|
57
|
+
false
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def is_edit_page
|
|
61
|
+
true
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def etag
|
|
65
|
+
@etag
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def allow_uploads
|
|
69
|
+
@allow_uploads
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def format
|
|
73
|
+
@format = (@page.format || false) if @format.nil?
|
|
74
|
+
@format.to_s.downcase
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module Precious
|
|
2
|
+
module Editable
|
|
3
|
+
def has_editor
|
|
4
|
+
true
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def default_keybinding
|
|
8
|
+
@default_keybinding
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def keybindings
|
|
12
|
+
Gollum::KEYBINDINGS.map do |kb|
|
|
13
|
+
{ :name => kb,
|
|
14
|
+
:selected => default_keybinding == kb
|
|
15
|
+
}
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def formats(selected = @page.format)
|
|
20
|
+
Gollum::Markup.formats.map do |key, val|
|
|
21
|
+
{ :name => val[:name],
|
|
22
|
+
:id => key.to_s,
|
|
23
|
+
:enabled => val.fetch(:enabled, true),
|
|
24
|
+
:ext => Gollum::Page.format_to_ext(key),
|
|
25
|
+
:selected => selected == key }
|
|
26
|
+
end.sort do |a, b|
|
|
27
|
+
a[:name].downcase <=> b[:name].downcase
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Precious
|
|
2
|
+
module HasUserIcons
|
|
3
|
+
def user_icon_code(str)
|
|
4
|
+
Digest::MD5.hexdigest(str.strip.downcase)
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def partial(name)
|
|
8
|
+
if name == :author_template
|
|
9
|
+
self.class.partial("history_authors/#{@wiki.user_icons}")
|
|
10
|
+
else
|
|
11
|
+
super
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
module Precious
|
|
2
|
+
module Views
|
|
3
|
+
module LocaleHelpers
|
|
4
|
+
NO_METHOD_MESSAGE = 'Argument must be a view method'
|
|
5
|
+
YAML_VARIABLE_REGEXP = /\%\{[\w]+\}/
|
|
6
|
+
|
|
7
|
+
# Returns all I18n translation strings for the current view class.
|
|
8
|
+
# This method support YAML arguments. For example:
|
|
9
|
+
#
|
|
10
|
+
# last_edited: This content was last edited at %{date}.
|
|
11
|
+
#
|
|
12
|
+
# Where the `date` argument must be a method available on the current
|
|
13
|
+
# class.
|
|
14
|
+
#
|
|
15
|
+
# Use this interface within Mustache templates to render any user
|
|
16
|
+
# interface strings in the current locale. For example:
|
|
17
|
+
#
|
|
18
|
+
# {{ t.last_edited }}
|
|
19
|
+
#
|
|
20
|
+
def t
|
|
21
|
+
autofill I18n.t(locale_klass_name)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Returns all I18n translation strings from the root of an I18n YAML file.
|
|
25
|
+
# Otherwise, it works exactly like the `#t` method that's also defined in
|
|
26
|
+
# this file.
|
|
27
|
+
def tt
|
|
28
|
+
autofill I18n.t('.')
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
private
|
|
32
|
+
|
|
33
|
+
# Recursively looks up I18n translation values and autofills any YAML
|
|
34
|
+
# arguments with the return value of the current class's matching method.
|
|
35
|
+
#
|
|
36
|
+
# When a translation value with an argument has no matching method, we
|
|
37
|
+
# then return that value transformed to include the `no_method_message`
|
|
38
|
+
#
|
|
39
|
+
def autofill(yaml)
|
|
40
|
+
yaml.map { |i18n_key, i18n_value|
|
|
41
|
+
if i18n_value.is_a? Hash
|
|
42
|
+
[i18n_key, autofill(i18n_value)]
|
|
43
|
+
elsif has_arguments?(i18n_value)
|
|
44
|
+
fill_argument_content(i18n_key, i18n_value)
|
|
45
|
+
else
|
|
46
|
+
[i18n_key, i18n_value]
|
|
47
|
+
end
|
|
48
|
+
}.to_h
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def fill_argument_content(i18n_key, i18n_value)
|
|
52
|
+
i18n_value = i18n_value.gsub(YAML_VARIABLE_REGEXP) do |argument|
|
|
53
|
+
method_name = argument.gsub(/[^\w]/, '')
|
|
54
|
+
|
|
55
|
+
next if method_name.nil?
|
|
56
|
+
|
|
57
|
+
begin
|
|
58
|
+
self.public_send(method_name)
|
|
59
|
+
rescue NoMethodError => error
|
|
60
|
+
no_method_message(method_name)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
[i18n_key, i18n_value]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def has_arguments?(i18n_value)
|
|
68
|
+
i18n_value.match?(YAML_VARIABLE_REGEXP)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Returns the current class name in a format that is acceptable in YAML.
|
|
72
|
+
# To summarize its function:
|
|
73
|
+
#
|
|
74
|
+
# NameOfConstant => name_of_constant
|
|
75
|
+
#
|
|
76
|
+
def locale_klass_name
|
|
77
|
+
@locale_klass_name ||= self.class.name.gsub(/::/, '/').
|
|
78
|
+
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
|
|
79
|
+
gsub(/([a-z\d])([A-Z])/,'\1_\2').
|
|
80
|
+
tr('-', '_').
|
|
81
|
+
downcase
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def no_method_message(method_name, message = NO_METHOD_MESSAGE)
|
|
85
|
+
"[#{message}: #{method_name}]"
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
module Precious
|
|
4
|
+
module Views
|
|
5
|
+
|
|
6
|
+
module AppHelpers
|
|
7
|
+
def extract_page_dir(path)
|
|
8
|
+
return path unless @page_dir
|
|
9
|
+
@path_to_extract ||= "#{Pathname.new(@page_dir).cleanpath}/"
|
|
10
|
+
path.start_with?(@path_to_extract) ? path.slice(@path_to_extract.length, path.length) : path
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
module RouteHelpers
|
|
15
|
+
ROUTES = {
|
|
16
|
+
'gollum' => {
|
|
17
|
+
assets: 'assets',
|
|
18
|
+
last_commit_info: 'last_commit_info',
|
|
19
|
+
latest_changes: 'latest_changes',
|
|
20
|
+
upload_file: 'upload_file',
|
|
21
|
+
create: 'create',
|
|
22
|
+
delete: 'delete',
|
|
23
|
+
edit: 'edit',
|
|
24
|
+
overview: 'overview',
|
|
25
|
+
history: 'history',
|
|
26
|
+
rename: 'rename',
|
|
27
|
+
revert: 'revert',
|
|
28
|
+
preview: 'preview',
|
|
29
|
+
compare: 'compare',
|
|
30
|
+
search: 'search'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
def self.parse_routes(routes, prefix = '')
|
|
35
|
+
routes.each do |name, path|
|
|
36
|
+
if path.respond_to?(:keys)
|
|
37
|
+
self.parse_routes(path, "#{prefix}/#{name}")
|
|
38
|
+
else
|
|
39
|
+
route_path = "#{prefix}/#{path}"
|
|
40
|
+
@@route_methods[name.to_s] = route_path
|
|
41
|
+
define_method :"#{name.to_s}_path" do
|
|
42
|
+
page_route(route_path)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def self.included(base)
|
|
49
|
+
@@route_methods = {}
|
|
50
|
+
self.parse_routes(ROUTES)
|
|
51
|
+
define_method :routes_to_json do
|
|
52
|
+
@@route_methods.to_json
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def page_route(page = nil)
|
|
57
|
+
clean_url("/#{@base_url}", page)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def clean_url(*url)
|
|
61
|
+
url.compact!
|
|
62
|
+
return nil if url.empty?
|
|
63
|
+
|
|
64
|
+
_url = ::File.join(*url)
|
|
65
|
+
_url.gsub!(%r{/{2,}}, '/')
|
|
66
|
+
_url.gsub!(%r{\?}, '%3F')
|
|
67
|
+
_url
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
module OcticonHelpers
|
|
72
|
+
def self.included(base)
|
|
73
|
+
|
|
74
|
+
def rocticon(symbol, parameters = {})
|
|
75
|
+
Octicons::Octicon.new(symbol, parameters).to_svg
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Well-formed SVG with XMLNS and height/width removed, for use in CSS
|
|
79
|
+
def rocticon_css(symbol, parameters = {})
|
|
80
|
+
octicon = ::Octicons::Octicon.new(symbol, parameters.merge({xmlns: 'http://www.w3.org/2000/svg'}))
|
|
81
|
+
[:width, :height].each {|option| octicon.options.delete(option)}
|
|
82
|
+
octicon.to_svg
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def octicon
|
|
86
|
+
lambda do |args|
|
|
87
|
+
symbol, height, width, *cls = args.split(' ')
|
|
88
|
+
parameters = {}
|
|
89
|
+
parameters[:height] = height if height
|
|
90
|
+
parameters[:width] = width if width
|
|
91
|
+
parameters[:class] = cls.join(' ') if cls
|
|
92
|
+
Octicons::Octicon.new(symbol, parameters).to_svg
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
module SprocketsHelpers
|
|
100
|
+
def self.included(base)
|
|
101
|
+
|
|
102
|
+
def sprockets_stylesheet_tag
|
|
103
|
+
lambda do |args|
|
|
104
|
+
args = args.split(' ')
|
|
105
|
+
name = args[0]
|
|
106
|
+
options = {:media => :all}
|
|
107
|
+
options[:media] = :print if args[1] == 'print'
|
|
108
|
+
send(:stylesheet_tag, name, options)
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def sprockets_asset_path
|
|
113
|
+
lambda do |name|
|
|
114
|
+
send(:asset_path, name)
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
def sprockets_javascript_tag
|
|
119
|
+
lambda do |name|
|
|
120
|
+
send(:javascript_tag, name)
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
def sprockets_image_path
|
|
125
|
+
lambda do |args|
|
|
126
|
+
send(:image_path, name)
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
module Precious
|
|
2
|
+
module Views
|
|
3
|
+
class History < Layout
|
|
4
|
+
DATE_FORMAT = '%B %d, %Y'
|
|
5
|
+
|
|
6
|
+
include HasPage
|
|
7
|
+
include Pagination
|
|
8
|
+
include HasUserIcons
|
|
9
|
+
include Sprockets::Helpers
|
|
10
|
+
include Precious::Views::SprocketsHelpers
|
|
11
|
+
|
|
12
|
+
attr_reader :page, :allow_editing
|
|
13
|
+
|
|
14
|
+
def title
|
|
15
|
+
@page.title
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def versions
|
|
19
|
+
i = @versions.size + 1
|
|
20
|
+
@versions.map do |v|
|
|
21
|
+
i -= 1
|
|
22
|
+
filename = path_for_version(v.tracked_pathname)
|
|
23
|
+
authored_date = v.authored_date
|
|
24
|
+
{ :id => v.id,
|
|
25
|
+
:id7 => v.id[0..6],
|
|
26
|
+
:href => page_route("gollum/commit/#{v.id}"),
|
|
27
|
+
:href_page => page_route("#{filename}/#{v.id}"),
|
|
28
|
+
:num => i,
|
|
29
|
+
:selected => @page.version.id == v.id,
|
|
30
|
+
:author => v.author.name.respond_to?(:force_encoding) ? v.author.name.force_encoding('UTF-8') : v.author.name,
|
|
31
|
+
:message => v.message.respond_to?(:force_encoding) ? v.message.force_encoding('UTF-8') : v.message,
|
|
32
|
+
:date_full => authored_date,
|
|
33
|
+
:date => authored_date.strftime(DATE_FORMAT),
|
|
34
|
+
:datetime => authored_date.utc.iso8601,
|
|
35
|
+
:date_format => DATE_FORMAT,
|
|
36
|
+
:user_icon => self.user_icon_code(v.author.email),
|
|
37
|
+
:filename => filename
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def editable
|
|
43
|
+
@editable
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
private
|
|
47
|
+
|
|
48
|
+
def path_for_version(pathname)
|
|
49
|
+
@preview_page ||= Gollum::PreviewPage.new(@wiki, '', '', nil)
|
|
50
|
+
@preview_page.path = pathname ? pathname : @name
|
|
51
|
+
@preview_page.escaped_url_path
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module Precious
|
|
2
|
+
module Views
|
|
3
|
+
class LatestChanges < Layout
|
|
4
|
+
DATE_FORMAT = '%B %d, %Y'
|
|
5
|
+
|
|
6
|
+
include Pagination
|
|
7
|
+
include HasUserIcons
|
|
8
|
+
|
|
9
|
+
attr_reader :wiki
|
|
10
|
+
|
|
11
|
+
def title
|
|
12
|
+
t[:title]
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def versions
|
|
16
|
+
i = @versions.size + 1
|
|
17
|
+
@versions.map do |v|
|
|
18
|
+
i -= 1
|
|
19
|
+
authored_date = v.authored_date
|
|
20
|
+
{ :id => v.id,
|
|
21
|
+
:id7 => v.id[0..6],
|
|
22
|
+
:href => page_route("gollum/commit/#{v.id}"),
|
|
23
|
+
:num => i,
|
|
24
|
+
:author => v.author.name.respond_to?(:force_encoding) ? v.author.name.force_encoding('UTF-8') : v.author.name,
|
|
25
|
+
:message => v.message.respond_to?(:force_encoding) ? v.message.force_encoding('UTF-8') : v.message,
|
|
26
|
+
:date_full => authored_date,
|
|
27
|
+
:date => authored_date.strftime(DATE_FORMAT),
|
|
28
|
+
:datetime => authored_date.utc.iso8601,
|
|
29
|
+
:date_format => DATE_FORMAT,
|
|
30
|
+
:user_icon => self.user_icon_code(v.author.email),
|
|
31
|
+
:files => v.stats.files.map { |f|
|
|
32
|
+
new_path = extract_page_dir(f[:new_file])
|
|
33
|
+
{ :file => new_path,
|
|
34
|
+
:link => "#{page_route(new_path)}/#{v.id}",
|
|
35
|
+
:renamed => f[:old_file] ? extract_page_dir(f[:old_file]) : nil
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
require 'cgi'
|
|
2
|
+
|
|
3
|
+
module Precious
|
|
4
|
+
module Views
|
|
5
|
+
class Layout < Mustache
|
|
6
|
+
include Sprockets::Helpers
|
|
7
|
+
include Precious::Views::AppHelpers
|
|
8
|
+
include Precious::Views::LocaleHelpers
|
|
9
|
+
include Precious::Views::SprocketsHelpers
|
|
10
|
+
include Precious::Views::RouteHelpers
|
|
11
|
+
include Precious::Views::OcticonHelpers
|
|
12
|
+
|
|
13
|
+
attr_reader :name, :path
|
|
14
|
+
|
|
15
|
+
self.extend Precious::Views::TemplateCascade
|
|
16
|
+
|
|
17
|
+
# Method should track lib/mustache.rb from Mustache project.
|
|
18
|
+
def partial(name)
|
|
19
|
+
path = self.class.first_path_available(name)
|
|
20
|
+
begin
|
|
21
|
+
File.read(path)
|
|
22
|
+
rescue
|
|
23
|
+
raise if raise_on_context_miss?
|
|
24
|
+
""
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def escaped_name
|
|
29
|
+
CGI.escape(@name)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def title
|
|
33
|
+
t[:title]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def has_path
|
|
37
|
+
!@path.nil?
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def base_url
|
|
41
|
+
@base_url
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def custom_path
|
|
45
|
+
@base_url
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def custom_css
|
|
49
|
+
clean_url(custom_path, "custom.css")
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def custom_js
|
|
53
|
+
clean_url(custom_path, "custom.js")
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def mathjax_js
|
|
57
|
+
"#{page_route('gollum/assets/mathjax/tex-mml-chtml.js')}"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def mermaid
|
|
61
|
+
@mermaid
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def css # custom css
|
|
65
|
+
@css
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def js # custom js
|
|
69
|
+
@js
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def critic_markup
|
|
73
|
+
@critic_markup
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def per_page_uploads
|
|
77
|
+
@per_page_uploads
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def show_local_time
|
|
81
|
+
@show_local_time ? 'true' : 'false'
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Navigation bar
|
|
85
|
+
def search
|
|
86
|
+
false
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def history
|
|
90
|
+
false
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def overview
|
|
94
|
+
false
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def latest_changes
|
|
98
|
+
false
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
require 'pathname'
|
|
2
|
+
|
|
3
|
+
module Precious
|
|
4
|
+
module Views
|
|
5
|
+
class Overview < Layout
|
|
6
|
+
attr_reader :name, :results, :ref, :allow_editing, :newable
|
|
7
|
+
HIDDEN_PATHS = ['.gitkeep']
|
|
8
|
+
|
|
9
|
+
def title
|
|
10
|
+
t[:title]
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# def editable
|
|
14
|
+
# false
|
|
15
|
+
# end
|
|
16
|
+
|
|
17
|
+
def current_path
|
|
18
|
+
@path ? @path : '/'
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def breadcrumb
|
|
22
|
+
if @path
|
|
23
|
+
path = Pathname.new(@path)
|
|
24
|
+
breadcrumb = [%{<nav aria-label="Breadcrumb"><ol><li class="breadcrumb-item"><a href="#{overview_path}">Home</a></li>}]
|
|
25
|
+
path.descend do |crumb|
|
|
26
|
+
title = crumb.basename
|
|
27
|
+
|
|
28
|
+
if title == path.basename
|
|
29
|
+
breadcrumb << %{<li class="breadcrumb-item" aria-current="page">#{CGI.escapeHTML(title.to_s)}</li>}
|
|
30
|
+
else
|
|
31
|
+
breadcrumb << %{<li class="breadcrumb-item"><a href="#{overview_path}/#{crumb}/">#{CGI.escapeHTML(title.to_s)}</a></li>}
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
breadcrumb << %{</ol></nav>}
|
|
35
|
+
breadcrumb.join("\n")
|
|
36
|
+
else
|
|
37
|
+
'' # Top directory does not display content.
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def files_folders
|
|
43
|
+
if has_results
|
|
44
|
+
files_and_folders = []
|
|
45
|
+
|
|
46
|
+
@results.each do |result|
|
|
47
|
+
result_path = result.url_path
|
|
48
|
+
result_path = result_path.sub(/^#{Regexp.escape(@path)}\//, '') unless @path.nil?
|
|
49
|
+
if result_path.include?('/')
|
|
50
|
+
# result contains a folder
|
|
51
|
+
folder_name = result_path.split('/').first
|
|
52
|
+
folder_path = @path ? "#{@path}/#{folder_name}" : folder_name
|
|
53
|
+
folder_url = "#{overview_path}/#{folder_path}/"
|
|
54
|
+
files_and_folders << {name: folder_name, icon: rocticon('file-directory-fill'), type: 'dir', url: folder_url, is_file: false}
|
|
55
|
+
elsif !HIDDEN_PATHS.include?(result_path)
|
|
56
|
+
file_url = page_route(result.escaped_url_path)
|
|
57
|
+
files_and_folders << {name: result.filename, icon: rocticon('file'), type: 'file', url: file_url, file_path: result.escaped_url_path, is_file: true}
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
# 1012: Overview should list folders first, followed by files and pages sorted alphabetically
|
|
61
|
+
files_and_folders.uniq{|f| f[:name]}.sort_by!{|f| [f[:type], f[:name]]}
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def has_results
|
|
67
|
+
!@results.empty?
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def no_results
|
|
71
|
+
@results.empty?
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def latest_changes
|
|
75
|
+
true
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|