summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Davis <ryand@zenspider.com>2019-12-14 17:14:38 -0800
committerRyan Davis <ryand@zenspider.com>2019-12-14 17:14:38 -0800
commit52b63ed2989b6ca03717d91587d5b0cd820c6096 (patch)
treee7dac7071a9110acf6ef94d665481de3b30befdd
parentc5bb62f78193e8dcb734d412c38791ce6f74773c (diff)
downloadhoe-52b63ed2989b6ca03717d91587d5b0cd820c6096.tar.gz
+ Added support for wiki_uri and mailing_list_uri. (JuanitoFatas)
[git-p4: depot-paths = "//src/hoe/dev/": change = 12451]
-rw-r--r--lib/hoe.rb2
-rw-r--r--test/test_hoe.rb24
2 files changed, 26 insertions, 0 deletions
diff --git a/lib/hoe.rb b/lib/hoe.rb
index 4d6f42e..4f45124 100644
--- a/lib/hoe.rb
+++ b/lib/hoe.rb
@@ -121,6 +121,8 @@ class Hoe
"doco" => "documentation_uri",
"home" => "homepage_uri",
"code" => "source_code_uri",
+ "wiki" => "wiki_uri",
+ "mail" => "mailing_list_uri",
}
##
diff --git a/test/test_hoe.rb b/test/test_hoe.rb
index a9dade1..1f7beb7 100644
--- a/test/test_hoe.rb
+++ b/test/test_hoe.rb
@@ -217,6 +217,30 @@ class TestHoe < Minitest::Test
assert_equal exp, hoe.parse_urls(hash)
end
+ def test_metadata
+ hash = [
+ "home :: https://github.com/seattlerb/hoe",
+ "doco :: http://docs.seattlerb.org/hoe/Hoe.pdf",
+ "clog :: https://github.com/seattlerb/hoe/master/History.rdoc",
+ "bugs :: https://github.com/seattlerb/hoe/issues",
+ "code :: https://github.com/seattlerb/hoe",
+ "wiki :: https://github.com/seattlerb/hoe/wiki",
+ "mail :: https://github.com/seattlerb/hoe/wiki#mailing_list",
+ ].join "\n"
+
+ exp = {
+ "home" => "https://github.com/seattlerb/hoe",
+ "doco" => "http://docs.seattlerb.org/hoe/Hoe.pdf",
+ "clog" => "https://github.com/seattlerb/hoe/master/History.rdoc",
+ "bugs" => "https://github.com/seattlerb/hoe/issues",
+ "code" => "https://github.com/seattlerb/hoe",
+ "wiki" => "https://github.com/seattlerb/hoe/wiki",
+ "mail" => "https://github.com/seattlerb/hoe/wiki#mailing_list",
+ }
+
+ assert_equal exp, hoe.parse_urls(hash)
+ end
+
def test_possibly_better
t = Gem::Specification::TODAY