Permalink
Browse files

Add "gem fury" RubyGems command

  • Loading branch information...
1 parent 5ed7ccc commit bf4f5ad2f7acefbe2f6cdb9d2a34cc3db95419ca @rykov rykov committed Feb 2, 2012
Showing with 32 additions and 1 deletion.
  1. +1 −1 lib/gemfury/version.rb
  2. +29 −0 lib/rubygems/commands/fury_command.rb
  3. +2 −0 lib/rubygems_plugin.rb
View
@@ -1,3 +1,3 @@
module Gemfury
- VERSION = '0.4.3'
+ VERSION = '0.4.4'
end
@@ -0,0 +1,29 @@
+require 'gemfury'
+require 'gemfury/command'
+
+class Gem::Commands::FuryCommand < Gem::Command
+ def description
+ 'Push a private gem to your Gemfury account'
+ end
+
+ def arguments
+ "GEM built gem file to push"
+ end
+
+ def usage
+ "#{program_name} GEM"
+ end
+
+ def initialize
+ super 'fury', description
+ add_option('-a', '--as USERNAME', 'Impersonate another account') do |value, options|
+ options[:as] = value
+ end
+ end
+
+ def execute
+ opts = options.dup
+ args = opts.delete(:args)
+ Gemfury::Command::App.send(:dispatch, "push", args, opts, {})
+ end
+end
View
@@ -0,0 +1,2 @@
+require 'rubygems/command_manager'
+Gem::CommandManager.instance.register_command :fury

0 comments on commit bf4f5ad

Please sign in to comment.