GithubHelp home page GithubHelp logo

ataru's Introduction

Project Ataru
CI Build Status
Gem Version Gem Version

Ataru

Ataru is a gem that provides a command line tool for testing code samples in the documentation files. You can also integrate ataru in your continuous integration process on Travis CI.

Ataru will check if your documentation is still in sync with the application it was written for. The output of the results has the MiniTest style.

What can ataru check

  • Ataru can read files written in Github Flavoured Markdown, as it uses Kramdown with Github Flavoured Markdown Parser.

  • Ataru is currently able to test the Ruby code only.

Requirements

  • The dependencies of your gem have to be in the range of the latest major versions of:

    • minitest (~> 5)
    • kramdown (~> 1)
    • thor (~> 0)
  • You need to create the setup file (for more info read Setup section).

Usage as command line tool

  1. Add ataru to your project Gemfile.

  2. From the top level of your project execute:

$ bundle install
  1. To create the setup file (for more info read Setup section) execute:
$ bundle exec ataru setup
  1. Finally, execute:

    • in case you want to check all the markdown files from your project:
    $ bundle exec ataru check
    • in case you want to check only specific markdown files from your project:
    $ bundle exec ataru check PROJECT_ROOT/foo/bar/filename_1.md PROJECT_ROOT/foo/bar/filename_2.md
  2. Check the results.

Workflow with Travis CI

  1. Add ataru to your project Gemfile.

  2. From the top level of your project execute:

$ bundle install
  1. To create the setup file (for more info read Setup section) execute:
$ bundle exec ataru setup
  1. In your .travis.yml file add:

    • in case you want to check all the markdown files from your project:
      script:
      - bundle exec rake build
      - bundle exec rake ataru check
    
    • in case you want to check only specific markdown files from your project:
    script:
    - bundle exec rake build
    - bundle exec ataru check PROJECT_ROOT/foo/bar/filename_1.md PROJECT_ROOT/foo/bar/filename_2.md
    
  2. Now you can commit and push the changes to github.

  3. Check the results of your build.

Setup

The setup file has to be created in order to enable ataru to read your project source code and use it for its checks. Ataru comes with an easy to use generator for creating that file. When the generator process is finished, the created setup file is automatically passed to ataru.

To create the setup file execute:

$ bundle exec ataru setup

Open created file in your text editor and write:

require "your_project_name"

Save the file.

Contributing

  1. Fork it ( http://github.com//ataru/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request`

ataru's People

Contributors

madziaf avatar nanoparsec avatar nerdbabe avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.