Giter Club home page Giter Club logo

learn-submit'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-submit's People

Contributors

evansenter avatar gj avatar joshrowley avatar loganhasson avatar notnotdrew avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learn-submit's Issues

Error messages could be a bit more explanatory

I just got this output when trying to submit:

// ♥ learn submit
Adding changes...
Committing changes...
Sorry, something went wrong. Please try again.

I see in learn-submit/lib/learn_submit/submission/git_interactor.rb that there are the following lines (starting on line 114):

      def commit_changes
        puts 'Committing changes...'
        begin
          git.commit(message)
        rescue Git::GitExecuteError => e
          if e.message.match(/nothing to commit/)
            puts "It looks like you have no changes to commit. Will still try updating your submission..."
          else
            puts 'Sorry, something went wrong. Please try again.'
            exit 1
          end
        end
      end

The "Sorry, something went wrong. Please try again." line sort of obscures the issue. Could it instead (in addition to printing that line) print the contents of e.message? That way it might be easier to diagnose the problem.

That could also be done in the other areas where a similar message is printed.

NoMethodError for user with hypen in github username

➜  first-lab-ruby-learn-cli-nitrous-q-000 git:(master) learn submit
Adding changes...
Committing changes...
It looks like you have no changes to commit. Will still try updating your submission...
Pushing changes to GitHub...
Submitting lesson...
/usr/local/opt/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/learn-submit-1.1.7/lib/learn_submit/submission/git_interactor.rb:28:in `repo_name': undefined method `[]' fo
r nil:NilClass (NoMethodError)
        from /usr/local/opt/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/learn-submit-1.1.7/lib/learn_submit/submission.rb:57:in `submit!'
        from /usr/local/opt/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/learn-submit-1.1.7/lib/learn_submit/submission.rb:25:in `create'

https://flatiron-staff.slack.com/archives/escalation/p1451867601001785

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.