Flowdock
method

sign_in

Importance_0
sign_in() public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/gemcutter_utilities.rb, line 27
  def sign_in
    return if Gem.configuration.rubygems_api_key

    say "Enter your RubyGems.org credentials."
    say "Don't have an account yet? Create one at http://rubygems.org/sign_up"

    email    =              ask "   Email: "
    password = ask_for_password "Password: "
    say "\n"

    response = rubygems_api_request :get, "api/v1/api_key" do |request|
      request.basic_auth email, password
    end

    with_response response do |resp|
      say "Signed in."
      Gem.configuration.rubygems_api_key = resp.body
    end
  end
Register or log in to add new notes.