snaptoken / leg

Tools for making step-by-step code walkthroughs
MIT License
132 stars 2 forks source link

Clarifications for a "Getting Started" section in TUTORIAL.md #38

Closed hayesall closed 5 years ago

hayesall commented 5 years ago

Hey authors,

I was working through TUTORIAL.md and ran into a few things that I thought could use clarification.

The version of leg that installs from RubyGems seems to be missing some of the subcommands mentioned in the document (most notably: leg init).

I got most things working using the master branch, and I've collected my thoughts on how this might be clarified below. If you think some of these could be helpful I could put together a Pull Request for this, which might be what Issue #33 intends to address.

Thanks for contributing this software!

System Information * [ruby](https://www.ruby-lang.org/en/downloads/): `2.6.0` * [gem](https://rubygems.org/pages/download): `3.0.1` * [bundler](https://bundler.io/): `2.0.1` * [cmake](https://cmake.org/): `3.14.0`

Getting Running

$ mkdir fizzbuzz-tutorial
$ cd fizzbuzz-tutorial
$ bundle init

$ bundle init creates a Gemfile. Modify the contents to include:

#      File:  Gemfile
# frozen_string_literal: true
source "https://rubygems.org"
gem "leg", :git => "https://github.com/snaptoken/leg.git"

This tells bundler to install leg from the snaptoken/leg GitHub repository.

Now use bundler to install leg and its dependencies:

$ bundle install --path vendor/bundle/

Your fizzbuzz-tutorial/ should now include a Gemfile.lock and a vendor/ directory where bundler installed dependencies.

Check that leg was installed:

$ bundle exec leg help

If this prints a list of leg subcommands, you should be all set!

Creating the Fizzbuzz Tutorial

$ bundle exec leg init

Initializing with leg will create several new files and directory: doc/, leg.yml, step/, and .leg/

Create a file in the step/ folder called fizzbuzz.js, with the following contents:

ghost commented 5 years ago

Oops, the leg that was on RubyGems was indeed out of date. I've pushed a new version with what's on master, so now gem install leg should work for people. I also added the install command to the top of the tutorial.

Thanks for letting me know about this!