aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/commands
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-12 05:07:50 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-12 05:07:50 +0000
commit7f9bf068fcff9ca7d6a21711f31c5b8d6022dddf (patch)
tree2bf9d83db081c73e583aeaf9f30140732c43282a /lib/rubygems/commands
parent53a5b276b8bc6e22a9fecc23dd99259e2d0e7fa4 (diff)
downloadruby-7f9bf068fcff9ca7d6a21711f31c5b8d6022dddf.tar.gz
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
Diffstat (limited to 'lib/rubygems/commands')
-rw-r--r--lib/rubygems/commands/build_command.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/rubygems/commands/build_command.rb b/lib/rubygems/commands/build_command.rb
index 78737154b6..e59471e976 100644
--- a/lib/rubygems/commands/build_command.rb
+++ b/lib/rubygems/commands/build_command.rb
@@ -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."