Class: Gem::Commands::GemfeedCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::GemfeedCommand
- Defined in:
- lib/rubygems/commands/gemfeed_command.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ GemfeedCommand
constructor
A new instance of GemfeedCommand.
Constructor Details
#initialize ⇒ GemfeedCommand
Returns a new instance of GemfeedCommand.
6 7 8 |
# File 'lib/rubygems/commands/gemfeed_command.rb', line 6 def initialize super 'gemfeed', 'Export subscribed gems to your gemfeed account' end |
Instance Method Details
#execute ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rubygems/commands/gemfeed_command.rb', line 10 def execute begin Gemfeed.check_gemfeed_login gem_names = Gem.source_index.gems.collect { |k,v| v.name }.uniq.sort say "Subscribing you to #{gem_names.size} gems on gemfeed..." gem_names.each do |name| say "Subscribing to #{name}" Gemfeed.subscribe_to_gem(name) end rescue exit() end end |