github-education-resources / teachers_pet

Command line tool to help teachers use GitHub in their classrooms
https://education.github.com/guide
MIT License
187 stars 74 forks source link

`method_missing': undefined method `password' #72

Closed jkitchin closed 10 years ago

jkitchin commented 10 years ago

Running this: teachers_pet create_student_teams --organization=org-mode-Su-2014

leads to this:

/usr/local/rvm/gems/ruby-1.9.3-p547/gems/teachers_pet-0.3.1/lib/teachers_pet/actions/base.rb:20:in `method_missing': undefined method `password' for #<TeachersPet::Actions::CreateStudentTeams:0x00000002a65458> (NoMethodError)
    from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/teachers_pet-0.3.1/lib/teachers_pet/actions/base.rb:36:in `octokit_config'
    from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/teachers_pet-0.3.1/lib/teachers_pet/actions/base.rb:45:in `init_client'
    from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/teachers_pet-0.3.1/lib/teachers_pet/actions/create_student_teams.rb:30:in `run'
    from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/teachers_pet-0.3.1/lib/teachers_pet/commands/create_student_teams.rb:10:in `create_student_teams'
    from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /usr/local/rvm/gems/ruby-1.9.3-p547/gems/teachers_pet-0.3.1/bin/teachers_pet:4:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p547/bin/teachers_pet:23:in `load'
    from /usr/local/rvm/gems/ruby-1.9.3-p547/bin/teachers_pet:23:in `<main>'
    from /usr/local/rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in `eval'
    from /usr/local/rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in `<main>'

The gem was installed this morning with: gem install teachers_pet

afeld commented 10 years ago

Argh, sorry about that. The short answer is that you need to include --username and --password or --token (see authentication info), but I'll get the error fixed.

afeld commented 10 years ago

Just released v0.3.2, which should fix the problem. Apologies again!

jkitchin commented 10 years ago

Thanks. it works now. It is not too pretty that you must use a plain text password at the command line though!

afeld commented 10 years ago

Agreed! https://github.com/education/teachers_pet/issues/60

jkitchin commented 10 years ago

http://stackoverflow.com/questions/2338889/how-to-hide-password-input-from-terminal-in-ruby-script

this seems to address that issue pretty well.

John


John Kitchin Associate Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu

On Wed, Jun 18, 2014 at 3:10 PM, Aidan Feldman notifications@github.com wrote:

Agreed! #60 https://github.com/education/teachers_pet/issues/60

— Reply to this email directly or view it on GitHub https://github.com/education/teachers_pet/issues/72#issuecomment-46479917 .