Sha256: 09e2b89a687b49ab8b133dc1eca87268e64aaea4dcbc4a92d51e37dbca24e785

Contents?: true

Size: 492 Bytes

Versions: 4

Compression:

Stored size: 492 Bytes

Contents

class Gem::Commands::UpgradeCommand < Gem::Command
  def description
    'Upgrade your gem source to Gemcutter'
  end

  def initialize
    super 'upgrade', description
  end

  def execute
    if Gem.sources.include?(URL)
      say "Gemcutter is already your primary gem source. Please use `gem downgrade` if you wish to no longer use Gemcutter."
    else
      Gem.sources.unshift URL
      Gem.configuration.write
      say "Your primary gem source is now gemcutter.org"
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
qrush-gemcutter-0.0.4 lib/commands/upgrade.rb
qrush-gemcutter-0.0.5 lib/commands/upgrade.rb
gemcutter-0.0.5 lib/commands/upgrade.rb
gemcutter-0.0.4 lib/commands/upgrade.rb