dsander-reve 0.0.136 → 0.0.137

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/reve.rb +4 -4
  2. 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
- unless container.empty?
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
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: dsander-reve
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.136
5
+ version: 0.0.137
6
6
  platform: ruby
7
7
  authors:
8
8
  - Lisa Seelye