Thanks for your interest in the gollum project!
Please note that the issue tracker is meant for:
- Bug reports.
- Feature requests.
If your have problems using or installing the software which stem from bugs in the software or a lack of documentation, we are always happy to help out! However, for ordinary usage questions, please consider asking elsewhere, for instance on StackOverflow.
Gollum supports custom macros for the creation of additional wiki markup tags. Please do not use this tracker to request macros specific to your situation. However, if you have or are working on a macro that you think may be useful to more users, you can share it as a GitHub gist and link to it in the wiki.
Before submitting an issue, please carefully look through the following places to make sure your problem is not already addressed:
Security vulnerabilities can be reported directly to the maintainers using these GPG keys:
Lastly, please consider helping out by opening a Pull Request!
You can triage issues which may include reproducing bug reports or asking for vital information, such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to subscribe to gollum on CodeTriage.
If you want to hack on Gollum, you'll need to set up a development environment.
To get started, you'll need:
Refer to their installation instructions. Installation methods differ depending on your operating system.
Once you have those:
- Install Bundler, the Ruby package manager. In a terminal:
gem install bundler
- Install Yarn, a JavaScript package manager. See Yarn's install guide.
Now, you can start setting up Gollum to run locally:
-
Clone the git repository. In a terminal:
git clone https://github.com/gollum/gollum.git
-
Change directory into the cloned project:
cd gollum
-
Bundle the project's Ruby dependencies using Bundler:
[sudo] bundle install
-
Install the project's JavaScript dependencies using Yarn:
yarn install
-
Configure the local git repository to use
master
as the default branch when initializing new git repositories:git config --local init.defaultbranch=master
This is currently required make the test suite pass when running it locally.1
If all went well, you should now be able to run the test suite using the following command:
bundle exec rake
If you already have a Gollum wiki, you can also browse it via your local version of Gollum:
bundle exec gollum <path/to/my/wiki/root>
Or you can clone an example wiki and browse that:
git clone test/examples/lotr.git ~/lotr-wiki
bundle exec gollum ~/lotr-wiki
With this, you're ready to start contributing and open your first pull request.
Pull Requests fixing bugs, implementing new features, or updating documentation and dependencies are all very welcome! If you would like to help out with the project, you can pick an open issue from the issue tracker. We're more than happy to help you get started! Here's how you can proceed:
- Fork and clone Gollum. See Set up your development environment.
- Create a thoughtfully named topic branch to contain your changes.
- If you haven't installed dependencies yet, navigate to your clone and execute:
[sudo] bundle install
- Hack away.
- Add your own tests and make sure they're all still passing.
- If some of your changes deserve a mention on Gollum's home page, edit the README accordingly.
- If necessary, rebase your commits into logical chunks, without errors.
- Push the branch to your fork on GitHub.
- Create a pull request for Gollum.
Do not change Gollum's version number, we will do that on our own.
- Install Bundler.
- Navigate to the cloned source of Gollum.
- Install dependencies:
[sudo] bundle install
- Run the tests:
bundle exec rake test
To profile slow tests, you can use the --verbose
flag:
bundle exec rake test TESTOPTS="--verbose"
You can also run a single test file with the following command:
bundle exec ruby <test/test_the_file_i_want_to_run.rb>
An example of how to add a test file to the bare repository lotr.git.
mkdir tmp
cd tmp
git clone ../test/examples/lotr.git/
git log
echo "test" > test.md
git add .
git commit -am "Add test"
git push ../lotr.git/ master
Gollum uses yarn and sprockets to manage assets. By default, Gollum uses the precompiled static assets that are packaged with the gem (under lib/gollum/public/assets
). If you're making changes to Gollum's JavaScript or (S)CSS assets, you might want to develop by calling gollum
with the --development-assets
flag. This will cause the application to use the unpackaged assets that you are editing (under lib/gollum/public/gollum/
and in your local node_modules
directory), so you can test and tweak. Once you are satisfied with your changes, it's time to update the static assets!
For convenience, Gollum also allows developers to set a custom location for node_modules
(by default expected to be in the root of the project) when using --development-assets
. Set the GOLLUM_DEV_ASSETS
environment variable to do this, e.g.: GOLLUM_DEV_ASSETS=/path/to/my/node_modules gollum --development-assets
This is necessary whenever changes have been made to the assets in
lib/gollum/public/gollum/javascript
(mostly SASS, CSS, and JS files), to
ensure the changes are also present in the released
version of the gem.
Steps:
git rm -r lib/gollum/public/assets
bundle exec rake precompile
git add lib/gollum/public/assets
git commit
Gollum uses Semantic Versioning.
x.y.z
For z releases:
rake bump
rake release
For x.y releases:
# First update VERSION in lib/gollum.rb and then:
rake gemspec
rake release
Footnotes
-
Gollum's test suite will clone and initialize test git repositories using your system's
git
executable. These test git repositories are committed to the codebase, and all of them usemaster
as theHEAD
. Ifinit.defaultbranch
is set tomain
or something else in your global git configuration file, this will cause many tests to erroneously fail. It's on our to-do list to move these committed git repos to using amain
branch. ↩