-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[api] show also remote distributions from all remote projects
- Loading branch information
1 parent
0b7bbc5
commit ace6b06
Showing
6 changed files
with
101 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,32 @@ | ||
xml.distributions do | ||
@distributions.each do |d| | ||
xml.distribution(vendor: d.vendor, version: d.version, id: d.id) do | ||
xml.name(d.name) | ||
xml.project(d.project) | ||
xml.reponame(d.reponame) | ||
xml.repository(d.repository) | ||
xml.link(d.link) | ||
d.icons.each do |i| | ||
attr = {url: i.url} | ||
attr[:width] = i.width if i.width | ||
attr[:height] = i.height if i.height | ||
xml.icon(attr) | ||
if d.class == Hash | ||
This comment has been minimized.
Sorry, something went wrong.
coolo
Member
|
||
xml.distribution(vendor: d["vendor"], version: d["version"], id: d["id"]) do | ||
xml.name(d["name"]) | ||
xml.project(d["project"]) | ||
xml.reponame(d["reponame"]) | ||
xml.repository(d["repository"]) | ||
xml.link(d["link"]) | ||
d["icons"].each do |i| | ||
attr = {url: i["url"]} | ||
attr[:width] = i["width"] unless i["width"].blank? | ||
attr[:height] = i["height"] unless i["height"].blank? | ||
xml.icon(attr) | ||
end | ||
end | ||
else | ||
xml.distribution(vendor: d.vendor, version: d.version, id: d.id) do | ||
xml.name(d.name) | ||
xml.project(d.project) | ||
xml.reponame(d.reponame) | ||
xml.repository(d.repository) | ||
xml.link(d.link) | ||
d.icons.each do |i| | ||
attr = {url: i.url} | ||
attr[:width] = i.width if i.width | ||
attr[:height] = i.height if i.height | ||
xml.icon(attr) | ||
end | ||
end | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<distributions> | ||
<distribution vendor="openSUSE" version="Factory" id="1"> | ||
<name>openSUSE Factory</name> | ||
<project>openSUSE:Factory</project> | ||
<reponame>openSUSE_Factory</reponame> | ||
<repository>snapshot</repository> | ||
<link>http://www.opensuse.org/</link> | ||
<icon url="https://static.opensuse.org/distributions/logos/opensuse-Factory-8.png" width="8" height="8"/> | ||
<icon url="https://static.opensuse.org/distributions/logos/opensuse-Factory-16.png" width="16" height="16"/> | ||
</distribution> | ||
<distribution vendor="openSUSE" version="12.2" id="2"> | ||
<name>openSUSE 12.2</name> | ||
<project>openSUSE:12.2</project> | ||
<reponame>openSUSE_12.2</reponame> | ||
<repository>standard</repository> | ||
<link>http://www.opensuse.org/</link> | ||
<icon url="https://static.opensuse.org/distributions/logos/opensuse-12.2-8.png" width="8" height="8"/> | ||
<icon url="https://static.opensuse.org/distributions/logos/opensuse-12.2-16.png" width="16" height="16"/> | ||
</distribution> | ||
</distributions> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can't be serious ;(
Revert that quick