Skip to content

Commit

Permalink
fixed linting and removed addressable from Gemfile
Browse files Browse the repository at this point in the history
see #339 (review)

Signed-off-by: Markus Grobelin <grobi@koppzu.de>
  • Loading branch information
mgrobelin authored and zenspider committed Jan 31, 2020
1 parent 45452e0 commit e1aa37b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/train.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ def self.parse_uri(string)
# e.g. mock://. To do this, we match it manually and fake the hostname
if u.scheme && (u.host.nil? || u.host.empty?) && u.path.empty?
case string
when %r{^([a-z]+)://$}
string += "dummy"
when /^([a-z]+):$/
string += "//dummy"
when %r{^([a-z]+)://$}
string += "dummy"
when /^([a-z]+):$/
string += "//dummy"
end
u = Addressable::URI.parse(string)
u.host = nil
Expand Down

0 comments on commit e1aa37b

Please sign in to comment.