lib/thin/command.rb in thin-1.0.0 vs lib/thin/command.rb in thin-1.2.1
- old
+ new
@@ -32,15 +32,16 @@
end
# Turn into a runnable shell command
def shellify
shellified_options = @options.inject([]) do |args, (name, value)|
+ option_name = name.to_s.tr("_", "-")
case value
when NilClass,
- TrueClass then args << "--#{name}"
+ TrueClass then args << "--#{option_name}"
when FalseClass
- when Array then value.each { |v| args << "--#{name}=#{v.inspect}" }
- else args << "--#{name.to_s.tr('_', '-')}=#{value.inspect}"
+ when Array then value.each { |v| args << "--#{option_name}=#{v.inspect}" }
+ else args << "--#{option_name}=#{value.inspect}"
end
args
end
raise ArgumentError, "Path to thin script can't be found, set Command.script" unless self.class.script