diff options
author | Hisham <hisham@gobolinux.org> | 2016-10-14 17:09:38 -0700 |
---|---|---|
committer | Hisham <hisham@gobolinux.org> | 2016-10-14 17:09:38 -0700 |
commit | cf94893bbd540d2ed62642ecf0938b7954ef13c6 (patch) | |
tree | b71cbd1f97808c31fcba4a2428fcc6a0cff9d299 /src | |
parent | 075196e8b5d315888a8ae110fa9a18089044ae3b (diff) | |
download | luarocks-cf94893bbd540d2ed62642ecf0938b7954ef13c6.tar.gz luarocks-cf94893bbd540d2ed62642ecf0938b7954ef13c6.tar.bz2 luarocks-cf94893bbd540d2ed62642ecf0938b7954ef13c6.zip |
Add labels and issues_url metadata
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/show.lua | 8 | ||||
-rw-r--r-- | src/luarocks/type_check.lua | 5 | ||||
-rw-r--r-- | src/luarocks/util.lua | 2 |
3 files changed, 15 insertions, 0 deletions
diff --git a/src/luarocks/show.lua b/src/luarocks/show.lua index 66ac6448..53d8ffa5 100644 --- a/src/luarocks/show.lua +++ b/src/luarocks/show.lua | |||
@@ -94,6 +94,8 @@ function show.command(flags, name, version) | |||
94 | if flags["rock-tree"] then util.printout(path.rocks_tree_to_string(repo)) | 94 | if flags["rock-tree"] then util.printout(path.rocks_tree_to_string(repo)) |
95 | elseif flags["rock-dir"] then util.printout(directory) | 95 | elseif flags["rock-dir"] then util.printout(directory) |
96 | elseif flags["home"] then util.printout(descript.homepage) | 96 | elseif flags["home"] then util.printout(descript.homepage) |
97 | elseif flags["issues"] then util.printout(descript.issues_url) | ||
98 | elseif flags["labels"] then util.printout(descript.labels and table.concat(descript.labels, "\n")) | ||
97 | elseif flags["modules"] then util.printout(keys_as_string(minfo.modules, "\n")) | 99 | elseif flags["modules"] then util.printout(keys_as_string(minfo.modules, "\n")) |
98 | elseif flags["deps"] then util.printout(keys_as_string(minfo.dependencies)) | 100 | elseif flags["deps"] then util.printout(keys_as_string(minfo.dependencies)) |
99 | elseif flags["rockspec"] then util.printout(rockspec_file) | 101 | elseif flags["rockspec"] then util.printout(rockspec_file) |
@@ -112,6 +114,12 @@ function show.command(flags, name, version) | |||
112 | if descript.homepage then | 114 | if descript.homepage then |
113 | util.printout("Homepage: ", descript.homepage) | 115 | util.printout("Homepage: ", descript.homepage) |
114 | end | 116 | end |
117 | if descript.issues_url then | ||
118 | util.printout("Issues: ", descript.issues_url) | ||
119 | end | ||
120 | if descript.labels then | ||
121 | util.printout("Labels: ", table.concat(descript.labels, ", ")) | ||
122 | end | ||
115 | util.printout("Installed in: ", path.rocks_tree_to_string(repo)) | 123 | util.printout("Installed in: ", path.rocks_tree_to_string(repo)) |
116 | if next(minfo.modules) then | 124 | if next(minfo.modules) then |
117 | util.printout() | 125 | util.printout() |
diff --git a/src/luarocks/type_check.lua b/src/luarocks/type_check.lua index 382d3f0a..4b7e68d7 100644 --- a/src/luarocks/type_check.lua +++ b/src/luarocks/type_check.lua | |||
@@ -9,6 +9,9 @@ type_check.rockspec_format = "3.0" | |||
9 | local string_1 = type_check.string_1 | 9 | local string_1 = type_check.string_1 |
10 | local mandatory_string_1 = type_check.mandatory_string_1 | 10 | local mandatory_string_1 = type_check.mandatory_string_1 |
11 | 11 | ||
12 | local string_3 = { _type = "string", _version = "3.0" } | ||
13 | local list_of_strings_3 = { _any = string_3, _version = "3.0" } | ||
14 | |||
12 | -- Syntax for type-checking tables: | 15 | -- Syntax for type-checking tables: |
13 | -- | 16 | -- |
14 | -- A type-checking table describes typing data for a value. | 17 | -- A type-checking table describes typing data for a value. |
@@ -33,6 +36,8 @@ local rockspec_types = { | |||
33 | homepage = string_1, | 36 | homepage = string_1, |
34 | license = string_1, | 37 | license = string_1, |
35 | maintainer = string_1, | 38 | maintainer = string_1, |
39 | labels = list_of_strings_3, | ||
40 | issues_url = string_3, | ||
36 | }, | 41 | }, |
37 | dependencies = { | 42 | dependencies = { |
38 | platforms = {}, -- recursively defined below | 43 | platforms = {}, -- recursively defined below |
diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua index 9760fafd..b23f4fab 100644 --- a/src/luarocks/util.lua +++ b/src/luarocks/util.lua | |||
@@ -87,7 +87,9 @@ local supported_flags = { | |||
87 | ["help"] = true, | 87 | ["help"] = true, |
88 | ["home"] = true, | 88 | ["home"] = true, |
89 | ["homepage"] = "\"<url>\"", | 89 | ["homepage"] = "\"<url>\"", |
90 | ["issues"] = true, | ||
90 | ["keep"] = true, | 91 | ["keep"] = true, |
92 | ["labels"] = true, | ||
91 | ["lib"] = "<library>", | 93 | ["lib"] = "<library>", |
92 | ["license"] = "\"<text>\"", | 94 | ["license"] = "\"<text>\"", |
93 | ["list"] = true, | 95 | ["list"] = true, |