bin/gem2rpm in gem2rpm-0.5.0 vs bin/gem2rpm in gem2rpm-0.5.1
- old
+ new
@@ -13,10 +13,11 @@
opts.separator(" Uses a template to generate the RPM specfile")
opts.separator(" from the Gem spec")
template_file = nil
output_file = nil
+local = false
srpm = false
deps = false
nongem = false
opts.on("-T", "--default-template", "Print the default template") do |val|
@@ -34,10 +35,14 @@
output_file = val
end
opts.on("-s", "--srpm", "Create a source RPM") do |val|
srpm = true
end
+opts.on("-l", "--local", "Do not retrieve Gem information over
+#{' '*36} the network. Use on disconnected machines") do |val|
+ local = true
+end
opts.on("-d", "--dependencies", "Print the dependencies of the gem") do |val|
deps = true
end
opts.on("-n", "--nongem", "Generate a subpackage for non-gem use") do |val|
nongem = true
@@ -78,14 +83,14 @@
end
end
# Produce a specfile
if output_file.nil?
- Gem2Rpm::convert(gemfile, template, $stdout, nongem) unless deps
+ Gem2Rpm::convert(gemfile, template, $stdout, nongem, local) unless deps
else
begin
out = open(output_file, "w")
- Gem2Rpm::convert(gemfile, template, out, nongem)
+ Gem2Rpm::convert(gemfile, template, out, nongem, local)
ensure
out.close()
end
end