File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 38
38
COPY_REPO_PROPERTIES . each do |prop |
39
39
library [ prop ] = github [ prop ]
40
40
end
41
+ unless github [ :license ] . nil?
42
+ library [ :license ] ||= github [ :license ] [ :spdx_id ]
43
+ end
41
44
end
42
45
43
46
library [ :versions ] . each do |version |
Original file line number Diff line number Diff line change @@ -55,6 +55,14 @@ def link_to_category(category)
55
55
link_to ( category , :href => "/categories/#{ category . keyize } " )
56
56
end
57
57
58
+ def link_to_license ( license )
59
+ if license . nil?
60
+ "Unknown"
61
+ else
62
+ link_to ( license , :href => "https://choosealicense.com/licenses/#{ license . downcase } /" )
63
+ end
64
+ end
65
+
58
66
def pretty_list ( list )
59
67
if list . nil?
60
68
"<i>Unknown</i>"
Original file line number Diff line number Diff line change 12
12
< dt > Github</ dt > < dd > <%== link_to ( library [ :github ] ) %> </ dd >
13
13
<% end %>
14
14
< dt > Category</ dt > < dd > <%== link_to_category ( library [ :category ] ) %> </ dd >
15
+ < dt > License</ dt > < dd > <%== link_to_license ( library [ :license ] ) %> </ dd >
15
16
< dt > Library Type</ dt > < dd > <%== pretty_list ( library [ :types ] ) %> </ dd >
16
17
< dt > Architectures</ dt > < dd > <%== pretty_list ( library [ :architectures ] ) %> </ dd >
17
18
</ dl >
You can’t perform that action at this time.
0 commit comments