dsander-reve 0.0.136 → 0.0.137
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/reve.rb +4 -4
- metadata +1 -1
data/lib/reve.rb
CHANGED
@@ -614,7 +614,7 @@ module Reve
|
|
614
614
|
h = compute_hash(args.merge(:url => @@personal_assets_url))
|
615
615
|
return h if h
|
616
616
|
xml = process_query(nil,opts[:url] || @@personal_assets_url,true,args)
|
617
|
-
self.recur_through_assets(xml.search("/eveapi/result/rowset[@name='assets']/row"))
|
617
|
+
self.recur_through_assets(xml.search("/eveapi/result/rowset[@name='assets']/row"), true)
|
618
618
|
end
|
619
619
|
|
620
620
|
# Get a list of the Corporate Assets. Pass the characterid of the Corporate member See also assets_list method
|
@@ -623,7 +623,7 @@ module Reve
|
|
623
623
|
h = compute_hash(args.merge(:url => @@corporate_assets_url))
|
624
624
|
return h if h
|
625
625
|
xml = process_query(nil,opts[:url] || @@corporate_assets_url,true,args)
|
626
|
-
self.recur_through_assets(xml.search("/eveapi/result/rowset[@name='assets']/row"))
|
626
|
+
self.recur_through_assets(xml.search("/eveapi/result/rowset[@name='assets']/row"), true)
|
627
627
|
end
|
628
628
|
|
629
629
|
# Returns a Character list for the associated key and userid from
|
@@ -975,10 +975,10 @@ module Reve
|
|
975
975
|
|
976
976
|
protected
|
977
977
|
# Helper method to handle nested assets
|
978
|
-
def recur_through_assets(rows)
|
978
|
+
def recur_through_assets(rows, first_level=false)
|
979
979
|
assets = []
|
980
980
|
rows.each do |container|
|
981
|
-
|
981
|
+
if !container.empty? || first_level
|
982
982
|
asset_container = Reve::Classes::AssetContainer.new(container)
|
983
983
|
asset_container.assets = self.recur_through_assets(container.search("/rowset/row"))
|
984
984
|
assets << asset_container
|