lib/github_url.rb in github_url-0.2.0 vs lib/github_url.rb in github_url-0.2.1

- old
+ new

@@ -35,9 +35,10 @@ def default_branch? (["blob", "tree", "raw"] & url_path).empty? end def validate_url + raise(Invalid, "Url cannot be blank.") if url.strip.empty? raise(Invalid, "Must contain #{@host}") unless url.split("/").any? { |e| e.include?(@host) } raise(Invalid, "Missing organization") if organization.nil? raise(Invalid, "Missing repository") if repository.nil? raise(Invalid, "Missing branch") if !default_branch? && url_path[3].nil? end