Exploit databaseDownload repository ZIP
GH-08b4e46992fde5efb0a6e5e3983b5d84
jas502n/cve-2019-12384
Sources for CVE-2019-12384
5 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files34
jas502n/cve-2019-12384Revision 20605173b861
- ↑..Parent directory
- build_command.rb
- cert_command.rb
- check_command.rb
- cleanup_command.rb
- contents_command.rb
- dependency_command.rb
- environment_command.rb
- fetch_command.rb
- generate_index_command.rb
- help_command.rb
- install_command.rb
- list_command.rb
- lock_command.rb
- mirror_command.rb
- open_command.rb
- outdated_command.rb
- owner_command.rb
- pristine_command.rb
- push_command.rb
- query_command.rb
- rdoc_command.rb
- search_command.rb
- server_command.rb
- setup_command.rb
- signin_command.rb
- signout_command.rb
- sources_command.rb
- specification_command.rb
- stale_command.rb
- uninstall_command.rb
- unpack_command.rb
- update_command.rb
- which_command.rb
- yank_command.rb
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
jruby-9.2.7.0/lib/ruby/stdlib/rubygems/commands/build_command.rb
Ruby · 1,511 bytes# frozen_string_literal: true
require 'rubygems/command'
require 'rubygems/package'
class Gem::Commands::BuildCommand < Gem::Command
def initialize
super 'build', 'Build a gem from a gemspec'
add_option '--force', 'skip validation of the spec' do |value, options|
options[:force] = true
end
end
def arguments # :nodoc:
"GEMSPEC_FILE gemspec file name to build a gem for"
end
def description # :nodoc:
<<-EOF
The build command allows you to create a gem from a ruby gemspec.
The best way to build a gem is to use a Rakefile and the Gem::PackageTask
which ships with RubyGems.
The gemspec can either be created by hand or extracted from an existing gem
with gem spec:
$ gem unpack my_gem-1.0.gem
Unpacked gem: '.../my_gem-1.0'
$ gem spec my_gem-1.0.gem --ruby > my_gem-1.0/my_gem-1.0.gemspec
$ cd my_gem-1.0
[edit gem contents]
$ gem build my_gem-1.0.gemspec
EOF
end
def usage # :nodoc:
"#{program_name} GEMSPEC_FILE"
end
def execute
gemspec = get_one_gem_name
unless File.exist? gemspec
gemspec += '.gemspec' if File.exist? gemspec + '.gemspec'
end
if File.exist? gemspec then
spec = Gem::Specification.load gemspec
if spec then
Gem::Package.build spec, options[:force]
else
alert_error "Error loading gemspec. Aborting."
terminate_interaction 1
end
else
alert_error "Gemspec file not found: #{gemspec}"
terminate_interaction 1
end
end
end