This package provides various components necessary for integrating Task Lists into your GitHub-flavored-Markdown user content.
The Task List feature is actually made of several different components:
- GitHub-flavored-Markdown Filter
- Model: summarizes task list items
- JavaScript: task list update behavior
- CSS: styles Markdown task list items
Add this line to your application's Gemfile:
gem 'task_list'
And then execute:
$ bundle
# config/application.rb
require 'task_list/railtie'
Wherever you have your Sprockets setup:
Sprockets::Environment.new(Rails.root) do |env|
# Load TaskList assets
require 'task_list/railtie'
TaskList.asset_paths.each do |path|
env.append_path path
end
end
If you're not using Sprockets, you're on your own but it's pretty straight
forward. task_list/railtie
defines TaskList.asset_paths
which you can use
to manage building your asset bundles.
Aside from requiring CoffeeScript, jQuery is the only other requirement.
JavaScript unit tests can be run with script/testsuite
.
Ruby unit tests can be run with rake test
.
Functional tests are more for manual testing in the browser. To run, install
the necessary components with script/bootstrap
then run the server:
rackup -p 4011
Navigate to http://localhost:4011/test/functional/test_task_lists_behavior.html
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request