1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Merge rubygems@21f12a8 from upstream.

* [BudlerVersionFinder] set .filter! and .compatible? to match only on major versions https://github.com/rubygems/rubygems/pull/2515
  * Fix broken symlink that points to ../* https://github.com/rubygems/rubygems/pull/2516

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2018-12-12 05:07:50 +00:00
parent 53a5b276b8
commit 7f9bf068fc
12 changed files with 90 additions and 54 deletions

View file

@ -14,6 +14,10 @@ class Gem::Commands::BuildCommand < Gem::Command
add_option '--strict', 'consider warnings as errors when validating the spec' do |value, options|
options[:strict] = true
end
add_option '-o', '--output FILE', 'output gem with the given filename' do |value, options|
options[:output] = value
end
end
def arguments # :nodoc:
@ -36,6 +40,11 @@ with gem spec:
$ cd my_gem-1.0
[edit gem contents]
$ gem build my_gem-1.0.gemspec
Gems can be saved to a specified filename with the output option:
$ gem build my_gem-1.0.gemspec --output=release.gem
EOF
end
@ -58,7 +67,8 @@ with gem spec:
Gem::Package.build(
spec,
options[:force],
options[:strict]
options[:strict],
options[:output]
)
else
alert_error "Error loading gemspec. Aborting."