Giter Site home page Giter Site logo

x-api's Introduction

x-API

Build Status Coverage Status Code Climate Dependency Status

Exercism exercise API

This codebase collects all the exercises and metadata that make up the problem sets for exercism.io.

The exercises for each language are stored in separate repositories, included here as git submodules. This codebase provides an API for serving the Exercism exercises to people using the Exercism command-line client.

Tests

Run the entire test suite with rake, or an individual test file with

ruby path/to/file_test.rb

Some of the API tests use approvals, which is a form of Golden Master testing. The test captures the entire body of the response, dumps it to a file, and compares it to the previously accepted version (which lives in a fixture file).

If the two versions are all good, then fine. The test passes. If they're different, then the test fails.

View the diffs using the approvals script:

approvals verify -d diff -a

-d is for the diff library, use whatever you're comfortable with. opendiff is nice if you don't already have a preference.

-a is a boolean option that, if passed, will ask you if you want to accept the change.

Accepting the change means that the new output gets copied over the old one, and any new test runs will be compared to this output.

The approvals tests are particularly handy when tweaking the view templates.

View Templates

The entire project serves up JSON. It uses the petroglyph library to write the views. Petroglyph is a tiny library that essentially lets you write some simple ruby to define the JSON structure.

Contributing

Please see the CONTRIBUTING guidelines in the root of this repository.

License

The MIT License (MIT)

Copyright (c) 2014 Katrina Owen, [email protected]

x-api's People

Contributors

kytrinyx avatar michaelavila avatar rud avatar tonkpils avatar mikepack avatar

Watchers

James Cloos avatar Ben Lewis 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.