X7ROOT File Manager
Current Path:
/opt/alt/ruby18/lib64/ruby/site_ruby/1.8/rubygems/commands
opt
/
alt
/
ruby18
/
lib64
/
ruby
/
site_ruby
/
1.8
/
rubygems
/
commands
/
ðŸ“
..
📄
build_command.rb
(1.25 KB)
📄
cert_command.rb
(2.74 KB)
📄
check_command.rb
(1.64 KB)
📄
cleanup_command.rb
(2.59 KB)
📄
contents_command.rb
(2.59 KB)
📄
dependency_command.rb
(4.19 KB)
📄
environment_command.rb
(3.9 KB)
📄
fetch_command.rb
(1.85 KB)
📄
generate_index_command.rb
(3.86 KB)
📄
help_command.rb
(4.43 KB)
📄
install_command.rb
(4.83 KB)
📄
list_command.rb
(696 B)
📄
lock_command.rb
(2.67 KB)
📄
outdated_command.rb
(785 B)
📄
owner_command.rb
(1.7 KB)
📄
pristine_command.rb
(3.2 KB)
📄
push_command.rb
(1.31 KB)
📄
query_command.rb
(7.38 KB)
📄
rdoc_command.rb
(2.24 KB)
📄
search_command.rb
(582 B)
📄
server_command.rb
(2.35 KB)
📄
setup_command.rb
(9.67 KB)
📄
sources_command.rb
(3.27 KB)
📄
specification_command.rb
(3.04 KB)
📄
stale_command.rb
(704 B)
📄
uninstall_command.rb
(2.49 KB)
📄
unpack_command.rb
(4.03 KB)
📄
update_command.rb
(6.04 KB)
📄
which_command.rb
(1.87 KB)
Editing: push_command.rb
require 'rubygems/command' require 'rubygems/local_remote_options' require 'rubygems/gemcutter_utilities' class Gem::Commands::PushCommand < Gem::Command include Gem::LocalRemoteOptions include Gem::GemcutterUtilities def description # :nodoc: 'Push a gem up to RubyGems.org' end def arguments # :nodoc: "GEM built gem to push up" end def usage # :nodoc: "#{program_name} GEM" end def initialize super 'push', description add_proxy_option add_key_option add_option( '--host HOST', 'Push to another gemcutter-compatible host' ) do |value, options| options[:host] = value end end def execute sign_in send_gem get_one_gem_name end def send_gem name args = [:post, "api/v1/gems"] args << options[:host] if options[:host] if Gem.latest_rubygems_version < Gem::Version.new(Gem::VERSION) then alert_error "Using beta/unreleased version of rubygems. Not pushing." terminate_interaction 1 end response = rubygems_api_request(*args) do |request| request.body = Gem.read_binary name request.add_field "Content-Length", request.body.size request.add_field "Content-Type", "application/octet-stream" request.add_field "Authorization", api_key end with_response response end end
Upload File
Create Folder