Commit Graph

430 Commits

Author SHA1 Message Date
Bart Kamphorst 4d549b1660 Use tmpdir instead of tempfile for creating temporary repos in the test suite. 2020-03-13 17:07:15 +01:00
Dawa Ometto caf4da73e2 Fix Windows assets and tests (#1425)
* Fix Windows assets and tests
* Update gemojione
2019-12-15 21:52:37 +01:00
Bart Kamphorst 7458e396ee Add tests to ensure protection of redirects file. 2019-10-05 18:07:54 +02:00
Bart Kamphorst 8f104ec09c Add redirect support (e.g., after renames). Fixes #1023. 2019-10-05 13:32:28 +02:00
Dawa Ometto bbe609974a Fix change of format (#1419)
* Add empty language def for bibtex
2019-09-25 11:44:42 +02:00
Dawa Ometto 88c624877e Extract page dir from latest changes. Fix #1388 (#1395)
* Strip off page_dir prefix from latest changes urls
* Rename spurious next and previous_link
* New format for LatestChanges#versions: detect renames
2019-09-18 18:10:09 +02:00
Dawa Ometto d55a3432a2 Solve minor issue involving Preview title (#1417) 2019-09-11 15:47:41 +02:00
Bart Kamphorst a04af6c638 Remove failing base-path test because base-path functionality is implemented in Rack middleware. 2019-09-04 13:56:26 +02:00
Bart Kamphorst 1c98a787ab Reopen the tempfile before passing it to Rack::Test::UploadedFile. 2019-09-03 22:03:43 +02:00
Bart Kamphorst b6b176fdc1 Add uploading tests for mode page, with and without base-path enabled. 2019-09-03 11:33:53 +02:00
Dawa Ometto d1b1375629 Fix usericons (#1408)
* Fix and refactor user icons, add Basic tests
* Remove identicon_canvas, use identicon.js
* Use octicon by default
2019-09-01 21:45:55 +02:00
Bart Kamphorst beff52a68e Added tests for file_upload route. 2019-08-29 16:01:20 +02:00
Dawa Ometto 976f55e1b2 Pagination for history and latest changes. (#1396)
* Pagination for history and latest changes

* New footer for historical pages

* Fix pagination on history view.

* Do not directly use git adapter

* History view: allow selecting from different pages

* Use log_pagination_options to determine latest changes parameters

* Fix JS pageFullPath
2019-08-21 23:28:49 +02:00
Bart Kamphorst 92b17f9053 Removed some inline CSS. Removed footer from preview pages. 2019-08-14 16:39:55 +02:00
Bart Kamphorst 8413e5b5ee Merge branch '5.x' into primer_css 2019-08-13 22:46:19 +02:00
Bart Kamphorst aa16f6ba2a Major CSS/styling overhaul with Primer.css. 2019-08-13 22:10:10 +02:00
Dawa Ometto e28a41bb8f Fix breadcrumbs (#1387) 2019-05-18 14:42:42 +02:00
Dawa Ometto b40a344c49 Remove page file dir from frontend. Resolves #1052 #1241 (#1369)
* Remove all references to page_file_dir. Use new method signature for Wiki#page. Refactor helpers.
* Use write_file for uploads
* Refactor /pages route
2019-05-04 01:19:59 +02:00
Bart Kamphorst e966de6922 Added tests for mathjax.config.js permissions. Fixed typo in permission regex. 2018-12-28 22:57:13 +01:00
Bart Kamphorst 59bb48340e Fix test by adding new h2 editable class to expected output. 2018-12-28 22:45:17 +01:00
Bart Kamphorst 4eb7fd211c Fix tests (do not expect redirect after edit) and add test for edit collisions. 2018-11-20 14:53:27 +01:00
Bart Kamphorst 64c4ee9c05 Improve upload handling (server-side and UI). 2018-11-07 11:06:25 +01:00
Bart Kamphorst 19751ec37f Use snake_case uniformly for all routes. 2018-10-19 21:54:14 +02:00
Bart Kamphorst 814caff755 Merge pull request #1336 from gollum/unify_deletion_routes
Unify deletion routes. Implement ajax deletion for /pages. Closes #1332.
2018-10-19 21:41:33 +02:00
Dawa Ometto 78289a53bb Implement header counting using YAML frontmatter. Resolves #908 (#1330) 2018-10-19 16:09:23 +02:00
Bart Kamphorst 454b5e94dc Unify deletion routes. Closes #1332. 2018-10-17 22:18:23 +02:00
Bart Kamphorst 6475394133 Use new view helper method in /pages. Add /deleteFile route to helpers. Fix bug in breadcrumb of /Home. 2018-10-17 14:47:35 +02:00
Dawa Ometto 197a2bd57b Namespace (#1328)
* CSS to SCSS

* Use sprockets

* Use Sprockets helpers

* Fix gollum.editor.js error when changing language

* Add keybinding files required by ace and some ace ext files that are required or might be useful.

* Move app paths to /gollum namespace, add route helpers for view templates

* Use path helper for links in page view

* Use path helper methods in javascript assets

* Refactored sprockets helpers for mustache

* Remove debugging
2018-10-14 15:46:10 +02:00
Bart Kamphorst 5c5bfc71bd Merge pull request #1326 from gollum/fix_pages_view_urls
Fix url generation in pages view.
2018-10-07 14:39:33 +02:00
Bart Kamphorst 3b9af34e0d Fix url generation in pages view. Show full filename with extension for pages. Distinguish in HTML between file and pages. 2018-10-05 14:48:42 +02:00
Dawa Ometto f8673f565a Lockdown write access to custom.css and js 2018-10-02 23:56:46 +02:00
Dawa Ometto 6d4f97fdc4 Add custom.css and custom.js files to example repo 2018-10-02 23:56:16 +02:00
Dawa Ometto c85e14336e Lockdown access to custom css and js files in repo 2018-10-02 23:31:07 +02:00
Dawa Ometto efe1df769b Remove legacy git_adapter helper method 2018-09-17 17:09:19 +02:00
Thomas KUNTZ a75b003c78 Update Mousetrap and use new 'mod' helper (#1245)
* Fix page list for files that have regexp special chars.

The page list collection logic was using the filename without any
scaping to create a regexp. This not only breaks for some names it might
even be a security problem by introducing bad regular expression as
filenames.

* Add another video to README.

* Test on Ruby 2.4

* Pass non-empty commit author details in transliteration test

Empty name or email are not allowed by libgit2 and cause a test failure
when the test suite is run against rugged_adapter.

* Solve bug when folder contain non-ascii character

When you create a file in a folder with non-ascii character, for exemple "Réseau", after creating the page, it throwed an "URI::InvalidURIError", given the fact that the url returned was "/Réseau/H%C3%A9y", only the part with the name of the file was correctly encoded.

So I propose to encode every part of the url to solve this issue
So I just

* readme: Use --document in place of deprecated options

* Release 4.1.0

* Skip tests for transliteration for adapters different than grit

* Fix date. Closes #1211

* Set bar_side for versioned pages. Closes #1226

* Update gemijione dependency. Closes #1227

* Release 4.1.1

* Update Mousetrap and use new 'mod' helper

Since version 1.4, a generic 'mod' helper can be used for cross
platform shortcuts. I updated Mousetrap to latest v1.6.1 and
used 'mod+s' instead of ['ctrl+s', 'command+s'] for the editor's
keyboard shortcut.

See https://craig.is/killing/mice#api.bind.combo
2017-08-07 00:29:08 +02:00
Dawa Ometto 0fa47047f3 Merge pull request #1225 from repotag/follow_renames
Follow page renames in history view. Close #565
2017-04-13 19:59:59 +02:00
Dawa Ometto cabe9f353b Fix tests 2017-04-13 00:24:06 +02:00
Dawa Ometto 16ea6245e3 Follow page renames in history view 2017-04-12 23:00:07 +02:00
Dawa Ometto df9382bbc3 Add test for Page view #sha. Fix h1 title test. 2017-04-12 19:50:40 +02:00
Dawa Ometto f9b8b4e8d3 Remove ws subs (#1220)
* remove unwanted whitespace substitution
* end repression of file extensions
* see also https://github.com/gollum/gollum-lib/pull/249
2017-04-10 14:50:18 +02:00
Dawa Ometto 8aa10fe400 Yaml frontmatter (#1217)
Render YAML frontmatter

* Fix tests on 5.x

* Update README

* Refactor Page view #table

* Minor refactor

* Refactor
2017-04-09 19:26:04 +02:00
Daniele Grandini fdbde7840d mv template load in page create and added tests 2017-02-24 13:32:20 +01:00
Dawa Ometto 435a3e62ba Remove calls to Page#last_version, replace with AJAX-lookup of version info. 2016-08-07 20:09:01 +02:00
Sven Schwyn fa1bcf9608 Add support for emojione 2016-05-19 20:33:25 +02:00
Matt Hill 51b5a11a54 Fix custom.x path when page-file-dir is not set 2015-08-20 23:19:25 -04:00
GROUX Richard 3301252fb2 deps(update): twitter_cldr update to > 3.2
Changelog is
[there](https://github.com/twitter/twitter-cldr-rb/blob/master/History.txt)
2015-07-27 13:20:50 +02:00
Nathan Lowe 2db2cfb81c Update test coverage to account for #1012
The existing 'files_folders' test only covered the /Mordor subdirectory,
which does not include a diverse enough set of pages and folders to account
for the new rendering logic.

This test uses the results from the root of the lotr.git example repository
as it exists at this point in time. The mock '@results' are not passed as a
sorted array in order to test the sorting logic.

The existing 'files_folders' test has been renamed to 'files_folders from subdir'
because the 'files_folders' function should be tested in a situation when
viewing /pages from a subdirectory to ensure proper functionality.
2015-05-20 18:58:24 -04:00
Dawa Ometto 80854584bb Make test regex more lenient 2015-04-11 01:29:08 +02:00
Dawa Ometto 77f4aee0af Fix test related to gollum-lib TOC update 2015-01-23 00:00:01 +01:00
Nathan Lowe a650c0eab8 Sort /pages alphabetically
Previously, the 'All Pages' view was not sorted alphabetically. We need
to sort on the lowercase version of the page names so that lowercase
names do not end up at the bottom of the list and are instead mixed in
alphabetically, as they should be.

Patches test/test_latest_changes_view.rb to include changes needed to
test alphabetical sorting.
2015-01-12 19:04:07 -05:00