Class: Gem::Commands::ScanCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::ScanCommand
- Includes:
- GemcutterUtilities
- Defined in:
- lib/rubygems/commands/scan_command.rb
Constant Summary collapse
- GemrageHost =
'http://gemrage.com/'
Instance Method Summary collapse
- #arguments ⇒ Object
- #description ⇒ Object
- #execute ⇒ Object
-
#initialize ⇒ ScanCommand
constructor
A new instance of ScanCommand.
- #usage ⇒ Object
Constructor Details
#initialize ⇒ ScanCommand
Returns a new instance of ScanCommand.
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/rubygems/commands/scan_command.rb', line 25 def initialize super('scan', description) defaults.merge!(:host => GemrageHost, :force_basic => false) add_option('-H', '--host HOST', 'Host to push to. Really only so we can debug') do |v, o| o[:host] = v end add_option('-b', '--basic', 'Force a basic scan') do |v,o| o[:force_basic] = true end end |
Instance Method Details
#arguments ⇒ Object
41 42 43 |
# File 'lib/rubygems/commands/scan_command.rb', line 41 def arguments '[DIR] Optional directory to scan for project files' end |
#description ⇒ Object
37 38 39 |
# File 'lib/rubygems/commands/scan_command.rb', line 37 def description 'Scan your gems and upload to gemrage.com' end |
#execute ⇒ Object
49 50 51 52 53 54 55 |
# File 'lib/rubygems/commands/scan_command.rb', line 49 def execute if dir = get_one_optional_argument send_project_to_gemrage(project_scan(File.(dir))) else send_system_to_gemrage(system_scan) end end |
#usage ⇒ Object
45 46 47 |
# File 'lib/rubygems/commands/scan_command.rb', line 45 def usage program_name end |