Skip to content

Commit

Permalink
Merge pull request #62 from liquidz/bugfix/end-of-dot-git
Browse files Browse the repository at this point in the history
0.11.2
  • Loading branch information
liquidz authored Feb 27, 2021
2 parents 3921541 + 3d3aecb commit 282aed0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. This change

== Unreleased (dev)

== 0.11.2 (2021-02-28)

// {{{
=== Fixed

* https://github.com/liquidz/antq/issues/61[#61]: Fixed diff URL for `:git/url` ending with ".git" to be correct
// }}}

== 0.11.1 (2021-02-06)
// {{{
=== Fixed
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>antq</groupId>
<artifactId>antq</artifactId>
<version>0.11.1</version>
<version>0.11.2</version>
<name>antq</name>
<description>Point out your outdated dependencies</description>
<url>https://github.com/liquidz/antq</url>
Expand Down
4 changes: 3 additions & 1 deletion src/antq/diff/git_sha.clj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
(cond
(str/starts-with? url "https://github.com/")
(format "%scompare/%s...%s"
(u.url/ensure-tail-slash url)
(-> url
(u.url/ensure-git-https-url)
(u.url/ensure-tail-slash))
(:version dep)
(:latest-version dep))

Expand Down
4 changes: 4 additions & 0 deletions test/antq/diff/git_sha_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@
(t/testing "missing extra"
(t/is (nil? (diff/get-diff-url (dissoc dep :extra)))))

(t/testing "URL ending with .git"
(t/is (= "https://github.com/bar/baz/compare/1.0...2.0"
(diff/get-diff-url (assoc-in dep [:extra :url] "https://github.com/bar/baz.git")))))

(t/testing "not supported extra URL"
(t/is (nil? (diff/get-diff-url (assoc-in dep [:extra :url] "INVALID")))))))

0 comments on commit 282aed0

Please sign in to comment.