32 Commits

Author SHA1 Message Date
Dawa Ometto 0098e9187a Only require uglifier when precompiling 2022-09-22 11:40:10 +02:00
Josh Soref 681c687ad9 spelling: version
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-09-06 21:47:02 -06:00
Josh Soref ed16078c2d spelling: changelog
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-09-06 21:47:02 -06:00
Dawa Ometto 98cb39347d Add integration tests with capybara (#1707)
* Add integration tests with capybara
* Add Rake task for running integration tests
* Don't include integration in default test task
2022-06-19 00:51:58 +02:00
benjamin wil 738f8ed462 Start using Yarn to manage JavaScript dependencies (#1824)
* Start using `yarn` for vendor assets

Until this commit, Gollum has included JavaScript assets by committing
the source code to the `lib/gollum/public/gollum/javascript/` directory
and including them for compilation in the Sprockets asset manifest file
at `lib/gollum/public/gollum/javascript/app.js`. This has been a
reasonable way to deal with third-party JavaScript, but there are a few
downsides:

  - It's a burden to find out if JavaScript dependencies have been
    updated and require updating in Gollum.
  - It doesn't give us good visibility into the JavaScript dependencies
    required by our dependencies.
  - It forces us to commit external code to our repository, which can
    make our developer tools more difficult to configure or use. For
    example: when I search for key words in the repository using
    Ripgrep, I often get "garbage" results from minified JavaScript.

Managing JavaScript dependencies via a JS package manager can resolve
all of these issues.

This commit allows us to manage JavaScript dependencies using the Yarn
package manager for Node JS modules[1]. I chose Yarn over NPM for one
reason: Yarn is the JavaScript package manager that Rails uses by
default. So many Ruby developers will already be familiar with Yarn.

To demonstrate how this can change how we manage JS assets in Gollum,
I've configured Yarn and started to manage the `mousetrap` dependency
with it. I chose `mousetrap` to start because it's a smaller, mostly
uncomplicated dependency. I was easily able to manually test that
`mousetrap` is still working after re-compiling the assets.

Hopefully this gives anyone reading enough context to jump in and start
moving our third-party JS assets out of the codebase.

[1]: https://yarnpkg.com/

* Recompile assets

* Add dev environment setup info to CONTRIBUTING

Now that we require additional tooling to manage JavaScript
dependencies, it seemed reasonable to add more documentation around
setting up one's development environment.

* Don't compile assets without `yarn`-managed ones

If a developer compiled assets without first running `yarn install`, we
would get incomplete collection of up-to-date assets.

Let's ensure that the developer has all the required assets by enforcing
this in the precompile task they should be using to compile production
assets to begin with.
2022-06-06 15:52:26 +02:00
Dawa Ometto 9c2f8dfeba Release 5.3.0 2022-05-25 11:24:19 +02:00
Dawa Ometto 8e35688b17 Release preparation: update readme, rakefile and changelog (#1788)
* Update README.md
* Add LATEST_CHANGES.md and release helpers
2022-05-24 16:27:39 +02:00
mishina ecc317886a Remove fields from gemspec that should not be set (#1811) 2022-03-23 13:27:54 +01:00
Dawa Ometto c8f856109d Set environment to production when precompiling (#1554) 2020-04-14 11:50:29 +02:00
Sven Schwyn 4035c579c7 Don't uglify JS in development env (#1551) 2020-04-14 11:22:48 +02:00
Dawa Ometto a45101cfe9 Package assets (#1493)
* Package static assets
* Fixed cancel button in editor
* Fix rake compilation task
* Add asset path helper
* Serve MathJax statically
* Fix mathjax in preview
2020-03-24 15:55:28 +01:00
Dawa Ometto c8fed4d50d Provide JS with correct exts via template (#1437) 2019-10-10 16:36:06 +02:00
jamieforth 7c65d65cb1 Rake precompile: Add missing requires (#1434) 2019-10-08 12:52:20 +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
Michael Gissing f5f655e3a1 Feature/fix gem 3 (#1364)
* change deprecated option which was removed in gem 3
2019-01-05 10:16:07 +01:00
Dawa Ometto 616c004058 Refactor 2018-12-28 22:47:39 +01:00
Dawa Ometto 7ec80bf2f1 Optional assets path argument for rake task via ENV 2018-12-28 22:43:59 +01:00
Dawa Ometto 8f6c19b3fd Move precompilation task to Rakefile 2018-12-10 19:50:49 +01:00
bootstraponline 491b1041f8 Add publish alias. Fix rake release 2014-04-05 14:25:39 -04:00
bootstraponline d2f7766aea Update template.css to match github 2014-03-14 22:19:33 -04:00
bootstraponline 2713aabeaf Update gemspec 2012-11-11 15:08:21 -07:00
bootstraponline b6633f0ecb Release 2.3.2 2012-10-22 19:21:10 -06:00
bootstraponline f48e923f28 Fix release 2012-10-21 17:15:09 -06:00
bootstraponline f928cfa8be Don't ship Lorem ipsum in gem 2012-10-13 20:21:08 -06:00
bootstraponline ac432aad78 Add bump task to Rakefile 2012-10-10 19:35:04 -06:00
bootstraponline 56a5a7d92b Fix #507 2012-09-04 16:24:16 -06:00
bootstraponline 02d3a3d7ec Clarify gemspec task desc. 2012-05-08 16:36:44 -06:00
bootstraponline 00b6f5c3fb Add desc to tasks so they show up in rake -T. 2012-04-12 13:58:57 -07:00
rick 6887c89d5c remove rdoc task 2011-09-29 10:04:48 -06:00
Chris Hoffman 4e3b4e23da Ruby 1.9 compatibility
* Adds current directory to load path for tests because 1.9 does not
* Aliases String#lines to String#to_a under 1.8 to match 1.9 behavior
* Sets encoding magic comment in test file with characters outside ascii
* Require 'ostruct' explicitly

This depends on a patch to Grit to have full functionality through the
whole stack.
2010-08-14 21:37:00 +00:00
Tom Preston-Werner 2a905cedc9 Release 1.0.1 2010-08-12 16:04:51 -07:00
Tom Preston-Werner c1abbec2f1 initial library setup 2010-04-07 00:41:50 -07:00