Giter Club home page Giter Club logo

learn-co's Introduction

⚠️ This gem is no longer maintained or supported

Installation

Install with:

$ gem install learn-co

Alternatively, add this line to your application's Gemfile:

gem 'learn-co'

And then execute:

$ bundle

Usage

From within a Learn.co lesson directory, run:

$ learn [command]

Contributing

  1. Fork it ( https://github.com/learn-co/learn-co/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 a new Pull Request

learn-co's People

Contributors

aturkewi avatar aviflombaum avatar danielseehausen avatar drewprice avatar gj avatar joshrowley avatar ktravers avatar loganhasson avatar notnotdrew avatar octosteve avatar sophiedebenedetto avatar talum avatar tmilewski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learn-co's Issues

continue with desired command if first run requires config

right now, if a user hasn't set up with the osx app (and doesn't have a proper config entry in their .netrc), and they run learn, it prompts for their creds and then stops. it should then continue to run the test suite instead of requiring the user to run learn again.

Auto-update gem

Idea proposed by Logan. Potentially useful to make sure people will be on latest version, given importance of gem at the center of so much of what we're trying to co-ordinate. But seems like a pretty unprecedented move? Do other gems do this?

One option would be to check one per day upon user entering command, prompt user telling them there is a new version available upon entering next command (so the check can happen async)

@loganhasson other thoughts to add?

Learn open command

I opened a lesson using the gem, and it opened it in sublime. I then tried to continue working in terminal but was unable to proceed.

Not sure if this is because it never reached “done”, if I am doing something wrong, or if a step needs to be added. As a new student I wouldn’t know how to move forward other than restarting my terminal.

2015-06-03_10-28-04

tweak learn next behavior

  • am i in the directory of my current lesson? -> do current learn next behavior
  • otherwise, just delegate to learn open

Create learn submit command

Syntax is learn submit [“message text”]

Logic is:

  • In current directory & branch do:
  • git add .
  • git commit -m “message”
  • git push
  • Automatically opens a PR
  • “message text” optional, if not supplied just default to “Done.”

learn failure

Ran learn, after a bit it failed, then it continued to run and gave me the error messages

screen shot 2015-06-15 at 4 25 20 pm

Create learn open command

Syntax is learn open [lab_name] [-editor <editor_name>]

Logic is:

If lab_name provided use that, else use current lesson. For this lab:

  • Automatically fork it
  • Automatically clone to working directly
  • Automatically cd into directory
  • If editor flag provided (or set in config file), then open working directory in editor

If lab is actually a README, just open Chrome at that lesson page

Note: --editor=sublime should be considered a default, written to a configuration file for all users that have set up through the OSX app. So that for these users, even if not supplying --editor, Sublime will open for them

learn ask “question text”

  • Injects a question relating to the current lab student is working on.
  • Other students notified on Learn and via OSX app.

learn doctor

  • Verifies student’s environment and reports any warnings or issues
  • Offers user option (y/n) to automatically try to fix warnings/issues (e.g. download newer versions of stuff..)

handle ssl cert blow up and tell user to run rvm command

sample backtrace:

 /Users/tadeanzalone/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:923:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)<br/>    from /Users/tadeanzalone/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:923:in`block in connect'
    from /Users/tadeanzalone/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:74:in `timeout'<br/>    from /Users/tadeanzalone/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:923:in`connect'
    from /Users/tadeanzalone/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:863:in `do_start'<br/>    from /Users/tadeanzalone/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:852:in`start'
    from /Users/tadeanzalone/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:583:in `start'<br/>    from /Users/tadeanzalone/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:478:in`get_response'
    from /Users/tadeanzalone/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:455:in `get'<br/>    from /Users/tadeanzalone/.rvm/gems/ruby-2.2.1/gems/learn-co-2.3.0/lib/learn/internet_connection.rb:35:in`block in test_connection'
    from /Users/tadeanzalone/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:89:in `block in timeout'<br/>    from /Users/tadeanzalone/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:34:in`block in catch'
    from /Users/tadeanzalone/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:34:in `catch'<br/>    from /Users/tadeanzalone/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:34:in`catch'
    from /Users/tadeanzalone/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:104:in `timeout'<br/>    from /Users/tadeanzalone/.rvm/gems/ruby-2.2.1/gems/learn-co-2.3.0/lib/learn/internet_connection.rb:34:in`test_connection'
    from /Users/tadeanzalone/.rvm/gems/ruby-2.2.1/gems/learn-co-2.3.0/lib/learn/internet_connection.rb:29:in `initialize'<br/>    from /Users/tadeanzalone/.rvm/gems/ruby-2.2.1/gems/learn-co-2.3.0/lib/learn/internet_connection.rb:14:in`new'
    from /Users/tadeanzalone/.rvm/gems/ruby-2.2.1/gems/learn-co-2.3.0/lib/learn/internet_connection.rb:14:in `no_internet_connection?'<br/>    from /Users/tadeanzalone/.rvm/gems/ruby-2.2.1/gems/learn-co-2.3.0/bin/learn:21:in`<top (required)>'
    from /Users/tadeanzalone/.rvm/gems/ruby-2.2.1/bin/learn:23:in `load'<br/>    from /Users/tadeanzalone/.rvm/gems/ruby-2.2.1/bin/learn:23:in`<main>'
    from /Users/tadeanzalone/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'<br/>    from /Users/tadeanzalone/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in`<main>

learn new and learn generate

Generates a new lab. Should list templates you can generate off. It’s difficult because you have to choose a language, and then a lab type and that’s tuff. We’d need to support templates the way the rails bin and really point to the git template you want.

learn-test blow up

shouldn't blow up the gem also (aka, should not see any gem errors in traceback):

learn tracks

List all tracks student can take with descriptions

"Learn open x tab to complete" cannot find the lesson to open

Repro:

  1. open terminal
  2. cd into the directory where your lessons are saved
  3. run learn open plus beginning of lab name and tab to complete the name
  4. Hit enter
  5. Result:

2015-06-04_12-16-54

Looks like the auto-added / is causing the command to not find the lesson and open it.

learn track trackname

  • Changes student’s active track to trackname
  • Automatically opens contents of student’s current lesson in that track in Sublime
  • Pops open Chrome tab at lesson page

catch faraday error

faraday connection error - in conjunction with the pre warning that now exists when a user doesn't have internet, need to rescue from faraday connection errors so that it doesn't throw an ugly error. can probably just do this in the learn-web gem

Add Submit error message

When a user clicks Submit on the Learn companion but their local build is the same as master, throw up an error message. Currently it looks like the PR is being submitted but then nothing happens.

Proposed `learn console` extension to provide generic default console

In theory we could create a learn-console extension gem that provides a generic console that loads the environment.

task :console do
  require_all "./config" if Dir.exists?("./config")
  require_all "./app" if Dir.exists?("./app")
  require_all "./lib" if Dir.exists?("./lib")
  require_all "./*.rb" if Dir.entries(".").include?(/\.rb/)

  Pry.start
end

Given require_all gem, that code should work for all Ruby labs. If the lab defines it's own console task, we can use that, otherwise fallback to this default. In Rails labs, learn console could delegate to rails console.

add --no-delete flag to learn-test

so that .results.json doesn't get deleted (that way the osx app can piggy pack off of the learn-test gem and clean up the results file itself when it's done reading from it)

Feature Request add Node and NPM to Learn Gem

Instructions to add Node and NPM in Terminal run:

$ brew install node

This should install both node and npm. This should be all that's required... I think Homebrew puts everything reachable within existing PATH.

If not, you can add node modules and and npm to your PATH in ~/.bash_profile like so:

export NODE_MODULES_PATH="/usr/local/share/npm/lib/node_modules"
export NPM_PATH="/usr/local/share/npm/bin"
export PATH="$POSTGRES_APP_PATH:$NEW_GIT_PATH:$USR_PATHS:$RVM_PATH:$PYTHON_SHARE:$PHP_PATH:$HEROKU_PATH:$NODE_MODULES_PATH:$NPM_PATH:$RABBIT_PATH:$PATH"

That's how mine looks anyway...
To test after install in Terminal run:

$ node -v
$ npm -v

These should return version numbers if it worked succesfully.

learn status

  • Shows student current green light status for this lab
  • Summary of # tests passing / failing
  • Time since you started this lab
  • # of other students working on this lab
  • Average time taken by students that have completed this lab

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.