lib/drg/tasks/gemfile.rb in drg-0.8.0 vs lib/drg/tasks/gemfile.rb in drg-0.8.1
- old
+ new
@@ -22,9 +22,10 @@
write
end
def find_by_name(name)
lines.each_with_index.each do |line, index|
+ next if line =~ /^\s*#/
next if line =~ /:?path:?\s*(=>)?\s*/
next if line =~ /:?git(hub)?:?\s*(=>)?\s*/
return GemfileLine.new line, index, name if line =~ /gem\s*['"]#{name}["']/
end
nil