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 6ca2b1e commit 5ae8347
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.2.2")
gem "json", "< 2.0"
end

gem "addressable", "~> 2.5"

group :test do
gem "coveralls", require: false
gem "minitest", "~> 5.8"
Expand Down
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 5ae8347

Please sign in to comment.