Coder Social home page Coder Social logo

ape-box / crystal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from exercism/crystal

0.0 1.0 0.0 136 KB

Exercism exercises in Crystal.

Home Page: http://exercism.io/languages/crystal

License: MIT License

Makefile 2.57% Shell 0.87% Crystal 96.56%

crystal's Introduction

Crystal Build Status

Exercism problems in Crystal.

The Tests

All Exercises

Run all Exercises with:

$ make test-exercises

Single Exercises

Run single Exercises with:

$ make test-exercise EXERCISE=exercise-name

The Test Generator

Creating a New Generator

Navigate to generator/src/generators and create a new generator file (i.e. hello_world.cr).

This file should contain 2 classes:

  • An exercise generator which must inherit from the ExerciseGenerator class.
  • A test case class which inherits from ExerciseTestCase.

There are two ways for the generator to get the test data.

Local: The problem-specifications repo must reside at the same level as the developer's crystal directory, and must contain a canonical-data.json file for the given exercise.

Remote: If the local problem-specifications repo doesn't exist, a request is made to GitHub to download (and cache) the test's canonical-data.json file.

Running the Generator for a Single Exercise

From within the crystal directory:

$ crystal generator/generator.cr hello-world

Or build a binary and use that:

$ make build-generator
$ make generate-exercise GENERATOR=hello-world

Running (or Re-running) the Generator for All Exercises

This can be used for refreshing the tests when changes are made to the x-common repo. Or for testing the full functionality of the test generator.

$ make generate-exercises

Testing the Generator

$ make test-generator

Contributing Guide

Please see the contributing guide

Crystal logo

The Crystal logo is assumed to be owned by Manas SA. It appears to be released under version 2.0 of the Apache license, along with the Crystal codebase. It may also fall within the public domain, since the version we are using is a geometric shape. We have cropped it for use on Exercism.

crystal's People

Contributors

bmulvihill avatar mhelmetag avatar elorest avatar derekgottlieb avatar tejasbubane avatar jhass avatar kytrinyx avatar petertseng avatar asterite avatar gangwolf avatar jhonnymoreira avatar joeltaylor avatar mdaubs avatar duffn avatar vjdhama avatar catb0t avatar

Watchers

James Cloos 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.