dsander-reve 0.0.135 → 0.0.136

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/reve/classes.rb +1 -1
  2. data/lib/reve.rb +15 -15
  3. metadata +3 -14
data/lib/reve/classes.rb CHANGED
@@ -1580,7 +1580,7 @@ module Reve #:nodoc:
1580
1580
  @corporation_date = Time.parse((elem/'corporationDate').inner_html)
1581
1581
  @alliance_id = (elem/'allianceID').inner_html.to_i
1582
1582
  @alliance_name = (elem/'alliance').inner_html
1583
- @alliance_date = Time.parse((elem/'alliancenDate').inner_html)
1583
+ @alliance_date = Time.parse((elem/'alliancenDate').inner_html) rescue nil
1584
1584
  @security_status = (elem/'securityStatus').inner_html.to_f
1585
1585
  @skillpoints = (elem/'skillPoints').inner_html == "" ? nil : (elem/'skillPoints').inner_html.to_i
1586
1586
  @skill_training_ends = (elem/'nextTrainingEnds').inner_html == "" ? nil : Time.parse((elem/'nextTrainingEnds').inner_html)
data/lib/reve.rb CHANGED
@@ -626,21 +626,6 @@ module Reve
626
626
  self.recur_through_assets(xml.search("/eveapi/result/rowset[@name='assets']/row"))
627
627
  end
628
628
 
629
- # Helper method to handle nested assets
630
- def recur_through_assets(rows)
631
- assets = []
632
- rows.each do |container|
633
- unless container.empty?
634
- asset_container = Reve::Classes::AssetContainer.new(container)
635
- asset_container.assets = self.recur_through_assets(container.search("/rowset/row"))
636
- assets << asset_container
637
- else
638
- assets << Reve::Classes::Asset.new(container)
639
- end
640
- end
641
- assets
642
- end
643
-
644
629
  # Returns a Character list for the associated key and userid from
645
630
  # http://api.eve-online.com/account/Characters.xml.aspx
646
631
  # See also: Reve::Classes::Character
@@ -989,6 +974,21 @@ module Reve
989
974
  end
990
975
 
991
976
  protected
977
+ # Helper method to handle nested assets
978
+ def recur_through_assets(rows)
979
+ assets = []
980
+ rows.each do |container|
981
+ unless container.empty?
982
+ asset_container = Reve::Classes::AssetContainer.new(container)
983
+ asset_container.assets = self.recur_through_assets(container.search("/rowset/row"))
984
+ assets << asset_container
985
+ else
986
+ assets << Reve::Classes::Asset.new(container)
987
+ end
988
+ end
989
+ assets
990
+ end
991
+
992
992
  # Sets up the post fields for Net::HTTP::Get hash for process_query method.
993
993
  # See also format_url_request
994
994
  # TODO: Consider moving this whole thing into process_query to avoid
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dsander-reve
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 135
9
- version: 0.0.135
4
+ prerelease:
5
+ version: 0.0.136
10
6
  platform: ruby
11
7
  authors:
12
8
  - Lisa Seelye
@@ -25,9 +21,6 @@ dependencies:
25
21
  requirements:
26
22
  - - ">="
27
23
  - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- - 6
31
24
  version: "0.6"
32
25
  type: :runtime
33
26
  version_requirements: *id001
@@ -185,21 +178,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
178
  requirements:
186
179
  - - ">="
187
180
  - !ruby/object:Gem::Version
188
- segments:
189
- - 0
190
181
  version: "0"
191
182
  required_rubygems_version: !ruby/object:Gem::Requirement
192
183
  none: false
193
184
  requirements:
194
185
  - - ">="
195
186
  - !ruby/object:Gem::Version
196
- segments:
197
- - 0
198
187
  version: "0"
199
188
  requirements: []
200
189
 
201
190
  rubyforge_project: reve
202
- rubygems_version: 1.3.7
191
+ rubygems_version: 1.5.2
203
192
  signing_key:
204
193
  specification_version: 3
205
194
  summary: Reve is a Ruby library to interface with the Eve Online API