Sha256: c392165e77d2659fb2cd1cd922f234ae19cbf8cd2951f66e18b57c057e75f40c

Contents?: true

Size: 895 Bytes

Versions: 27

Compression:

Stored size: 895 Bytes

Contents

# frozen_string_literal: true
require_relative '../command'
require_relative '../gemcutter_utilities'

class Gem::Commands::SigninCommand < Gem::Command
  include Gem::GemcutterUtilities

  def initialize
    super 'signin', 'Sign in to any gemcutter-compatible host. '\
          'It defaults to https://rubygems.org'

    add_option('--host HOST', 'Push to another gemcutter-compatible host') do |value, options|
      options[:host] = value
    end

    add_otp_option
  end

  def description # :nodoc:
    'The signin command executes host sign in for a push server (the default is'\
    ' https://rubygems.org). The host can be provided with the host flag or can'\
    ' be inferred from the provided gem. Host resolution matches the resolution'\
    ' strategy for the push command.'
  end

  def usage # :nodoc:
    program_name
  end

  def execute
    sign_in options[:host]
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
rubygems-update-3.2.34 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.18 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.17 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.16 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.15 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.14 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.13 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.12 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.11 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.10 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.9 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.8 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.7 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.6 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.5 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.4 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.3 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.2 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.1 lib/rubygems/commands/signin_command.rb
rubygems-update-3.3.0 lib/rubygems/commands/signin_command.rb