2011-01-18 19:08:49 -05:00
|
|
|
######################################################################
|
|
|
|
# This file is imported from the rubygems project.
|
|
|
|
# DO NOT make modifications in this repo. They _will_ be reverted!
|
|
|
|
# File a patch instead and assign it to Ryan Davis or Eric Hodel.
|
|
|
|
######################################################################
|
|
|
|
|
2009-06-09 17:38:59 -04:00
|
|
|
require 'rubygems/command_manager'
|
|
|
|
|
2010-04-22 04:24:42 -04:00
|
|
|
##
|
|
|
|
# This is an example of exactly what NOT to do.
|
|
|
|
#
|
|
|
|
# DO NOT include code like this in your rubygems_plugin.rb
|
|
|
|
|
2009-06-09 17:38:59 -04:00
|
|
|
class Gem::Commands::InterruptCommand < Gem::Command
|
|
|
|
|
|
|
|
def initialize
|
|
|
|
super('interrupt', 'Raises an Interrupt Exception', {})
|
|
|
|
end
|
|
|
|
|
|
|
|
def execute
|
|
|
|
raise Interrupt, "Interrupt exception"
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
Gem::CommandManager.instance.register_command :interrupt
|
|
|
|
|