Skip to content

Commit

Permalink
ruby style
Browse files Browse the repository at this point in the history
  • Loading branch information
dmacvicar committed Oct 19, 2017
1 parent ee33492 commit 40a867f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/models/appdata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

class Appdata

def self.get dist = "factory"
def self.get(dist = 'factory')
data = Hash.new
xml = Appdata.get_distribution dist, "oss"
data = add_appdata data, xml
xml = Appdata.get_distribution(dist, 'oss')
data = add_appdata(data, xml)
data
end

private

def self.add_appdata data, xml
def self.add_appdata(data, xml)
data[:apps] = Array.new unless data[:apps]
data[:categories] = Array.new unless data[:categories]
xml.xpath("/components/component").each do |app|
Expand All @@ -31,7 +31,7 @@ def self.add_appdata data, xml
end

# Get the appdata xml for a distribution
def self.get_distribution dist = "factory", flavour = "oss"
def self.get_distribution(dist = 'factory', flavour = 'oss')
appdata_url = if dist == "factory"
"http://download.opensuse.org/tumbleweed/repo/#{flavour}/suse/setup/descr/appdata.xml.gz"
else
Expand Down

0 comments on commit 40a867f

Please sign in to comment.