File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66class Gem ::Commands ::BuildBinaryCommand < Gem ::Command
77 def initialize
8- super ( "build_binary" , "Build a binary gem for the current platform" )
8+ super ( "build_binary" ,
9+ "Build a binary gem for the current platform" ,
10+ requirements : [ ] )
11+
12+ add_option ( "--add-requirement=REQUIREMENT" ,
13+ "Add REQUIREMENT to spec.requirements" ,
14+ "You can specify this option multiple times" ,
15+ "to add multiples requirements" ) do |value , options |
16+ options [ :requirements ] << value
17+ end
918 end
1019
1120 def arguments
@@ -81,6 +90,11 @@ def adjust_spec(spec, dist_dir)
8190 spec . platform = Gem ::Platform . local
8291 # Available only for the current Ruby.
8392 spec . required_ruby_version = required_ruby_version
93+
94+ pp @options
95+ @options [ :requirements ] . each do |requirement |
96+ spec . requirements << requirement
97+ end
8498 end
8599
86100 def required_ruby_version
You can’t perform that action at this time.
0 commit comments