Giter VIP home page Giter VIP logo

cli's Introduction

Build Status

Exercism Command-Line Client

The CLI provides a way to do the problems on exercism.io.

This CLI ships as a binary with no additional runtime requirements. This means that if you're doing the Haskell problems on exercism you don't need a working Python or Ruby environment simply to fetch and submit exercises.

Dependencies

Go version 1.3 or higher

Installing Go

Follow the directions on http://golang.org/doc/install

Development

  1. fork this repo
  2. go get github.com/exercism/cli/exercism
  3. cd $GOPATH/src/github.com/exercism/cli
  4. git remote set-url origin https://github.com/<your-github-username>/cli
  5. go get
  6. Make sure $GOPATH/bin is on your path (you may need something like export PATH=$PATH:/projects/goprojects/bin)
  7. Open a separate terminal window to your project directory and run the command glitch
  8. Make the change.
  9. Submit a pull request.

Please provide tests for the changes where possible.

At the moment the CLI commands are not tested, so if you're adding a new command don't worry too hard about tests.

Building

To build the binary for your platform run

bin/build

The resulting binary can be found in out/exercism (Linux, Mac OS X) or out/exercism.exe (Windows).

In order to cross-compile for all platforms, run bin/build-all. The binaries will be built into the release directory.

Troubleshooting

app.Run(os.Args) used as value

This error is due to a breaking change between the 0.x version of the codegangsta/cli library and the 1.x version of the library.

To fix it update the codegangsta/cli dependency:

$ go get -u github.com/codegangsta/cli

Using Glitch

If you'd like to run lint, vet, and the tests on every change, install Levi Cook's glitch library:

  1. go get github.com/levicook/glitch
  2. go install github.com/levicook/glitch
  3. Ensure that you have go vet
  4. Run it with glitch.

Troubleshooting.

When you glitch, do you get stymied like this?

# github.com/exercism/cli
api_test.go:7:2: cannot find package "github.com/stretchr/testify/assert" in any of: ...
FAIL	github.com/exercism/cli [setup failed]

You may need to

$ go get github.com/stretchr/testify/assert
$ go install github.com/stretchr/testify/assert

Now you should be able to run glitch.

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.