dsander-reve 0.0.124 → 0.0.131

Sign up to get free protection for your applications and to get access to all the features.
data/lib/reve/classes.rb CHANGED
@@ -1034,7 +1034,7 @@ module Reve #:nodoc:
1034
1034
  @installed_item_material_level = elem['installedItemMaterialLevel'].to_i
1035
1035
  @installed_item_licensed_production_runs_remaining = elem['installedItemLicensedProductionRunsRemaining'].to_i
1036
1036
  @output_location_id = elem['outputLocationID'].to_i ; @installer_id = elem['installerID'].to_i; @runs = elem['runs'].to_i
1037
- @licensed_production_runs = elem['licensedProductionRuns'].to_i ; @installed_system_id = elem['installedSolarSystemID'].to_i
1037
+ @licensed_production_runs = elem['licensedProductionRuns'].to_i ; @installed_system_id = elem['installedInSolarSystemID'].to_i
1038
1038
  @container_location_id = elem['containerLocationID'].to_i ; @material_multiplier = elem['materialMultiplier'].to_f
1039
1039
  @char_material_multiplier = elem['charMaterialMultiplier'].to_f; @time_multiplier = elem['timeMultiplier'].to_f
1040
1040
  @char_time_multiplier = elem['charTimeMultiplier'].to_f ; @installed_item_type_id = elem['installedItemTypeID'].to_i
@@ -1264,12 +1264,11 @@ module Reve #:nodoc:
1264
1264
  # See Also: Alliance, Reve::API#alliances
1265
1265
  # TODO: Find out what constellationSovereignty is
1266
1266
  class Sovereignty
1267
- attr_reader :system_id, :alliance_id, :constellation_sovereignty, :level, :faction_id, :system_name
1267
+ attr_reader :system_id, :alliance_id, :corporation_id, :factionID, :faction_id, :system_name
1268
1268
  def initialize(elem) #:nodoc:
1269
1269
  @system_id = elem['solarSystemID'].to_i
1270
1270
  @alliance_id = elem['allianceID'] == '0' ? nil : elem['allianceID'].to_i
1271
- @constellation_sovereignty = elem['constellationSovereignty'].to_i
1272
- @level = elem['sovereigntyLevel'].to_i if elem['sovereigntyLevel']
1271
+ @corporation_id = elem['corporationID'] == '0' ? nil : elem['corporationID'].to_i
1273
1272
  @faction_id = elem['factionID'] == '0' ? nil : elem['factionID'].to_i
1274
1273
  @system_name = elem['solarSystemName']
1275
1274
  end
data/test/test_reve.rb CHANGED
@@ -270,6 +270,7 @@ class TestReve < Test::Unit::TestCase
270
270
  assert_not_nil job.send(att)
271
271
  end
272
272
  end
273
+ assert jobs.last.installed_system_id != 0
273
274
  end
274
275
 
275
276
  def test_corporate_industry_jobs_clean
@@ -580,13 +581,25 @@ class TestReve < Test::Unit::TestCase
580
581
  end
581
582
  assert_not_nil @api.last_hash
582
583
  assert_kind_of Time, @api.cached_until
583
- assert_equal 7, sovereignties.size
584
- sovereignties.each do |sovereignty|
584
+ assert_equal 10, sovereignties.size
585
+ sovereignties[0..4].each do |sovereignty|
585
586
  assert_instance_of Reve::Classes::Sovereignty, sovereignty
586
587
  assert_not_nil sovereignty.system_id
587
- assert_not_nil sovereignty.constellation_sovereignty
588
588
  assert_not_nil sovereignty.system_name
589
+ assert_not_nil sovereignty.faction_id
590
+ assert_nil sovereignty.alliance_id
589
591
  end
592
+ sovereignties[5..8].each do |sovereignty|
593
+ assert_instance_of Reve::Classes::Sovereignty, sovereignty
594
+ assert_not_nil sovereignty.system_id
595
+ assert_not_nil sovereignty.system_name
596
+ assert_not_nil sovereignty.alliance_id
597
+ assert_not_nil sovereignty.corporation_id
598
+ assert_nil sovereignty.faction_id
599
+ end
600
+ assert_nil sovereignties[-1].alliance_id
601
+ assert_nil sovereignties[-1].corporation_id
602
+ assert_nil sovereignties[-1].faction_id
590
603
  end
591
604
 
592
605
  def test_reftypes_clean
@@ -1,29 +1,23 @@
1
- <eveapi version="1">
2
- <currentTime>2007-06-18 22:42:00</currentTime>
1
+ <?xml version='1.0' encoding='UTF-8'?>
2
+ <eveapi version="2">
3
+ <currentTime>2010-09-07 10:47:30</currentTime>
3
4
  <result>
4
- <rowset name="solarSystems">
5
- <row solarSystemID="30000001" allianceID="0"
6
- constellationSovereignty="0" sovereigntyLevel="0"
7
- factionID="500007" solarSystemName="Tanoo" />
8
- <row solarSystemID="30000002" allianceID="0"
9
- constellationSovereignty="0" sovereigntyLevel="0"
10
- factionID="500007" solarSystemName="Lashesih" />
11
- <row solarSystemID="30000003" allianceID="0"
12
- constellationSovereignty="0" sovereigntyLevel="0"
13
- factionID="500007" solarSystemName="Akpivem" />
14
- <row solarSystemID="30000004" allianceID="0"
15
- constellationSovereignty="0" sovereigntyLevel="0"
16
- factionID="500007" solarSystemName="Jark" />
17
- <row solarSystemID="30000005" allianceID="0"
18
- constellationSovereignty="0" sovereigntyLevel="0"
19
- factionID="500007" solarSystemName="Sasta" />
20
- <row solarSystemID="30000006" allianceID="0"
21
- constellationSovereignty="0" sovereigntyLevel="0"
22
- factionID="500007" solarSystemName="Zaid" />
23
- <row solarSystemID="30000007" allianceID="0"
24
- constellationSovereignty="0" sovereigntyLevel="0"
25
- factionID="500007" solarSystemName="Yuzier" />
5
+ <rowset name="solarSystems" key="solarSystemID" columns="solarSystemID,allianceID,factionID,solarSystemName,corporationID">
6
+ <row solarSystemID="30000203" allianceID="0" factionID="500001" solarSystemName="Eruka" corporationID="0" />
7
+ <row solarSystemID="30000204" allianceID="0" factionID="500001" solarSystemName="Ohkunen" corporationID="0" />
8
+ <row solarSystemID="30000205" allianceID="0" factionID="500001" solarSystemName="Obe" corporationID="0" />
9
+ <row solarSystemID="30000206" allianceID="0" factionID="500001" solarSystemName="Wirashoda" corporationID="0" />
10
+ <row solarSystemID="30000207" allianceID="0" factionID="500001" solarSystemName="Osaa" corporationID="0" />
11
+
12
+ <row solarSystemID="30000208" allianceID="212716751" factionID="0" solarSystemName="LZ-6SU" corporationID="1628348921" />
13
+ <row solarSystemID="30000209" allianceID="212716751" factionID="0" solarSystemName="MC6O-F" corporationID="1628348921" />
14
+ <row solarSystemID="30000210" allianceID="212716751" factionID="0" solarSystemName="U54-1L" corporationID="847483660" />
15
+ <row solarSystemID="30000211" allianceID="212716751" factionID="0" solarSystemName="B-588R" corporationID="224161983" />
16
+
17
+ <row solarSystemID="30000230" allianceID="0" factionID="0" solarSystemName="NFM-0V" corporationID="0" />
18
+
26
19
  </rowset>
20
+ <dataTime>2010-09-07 10:00:41</dataTime>
27
21
  </result>
28
- <cachedUntil>2007-06-18 23:42:00</cachedUntil>
29
- </eveapi>
22
+ <cachedUntil>2010-09-07 11:47:30</cachedUntil>
23
+ </eveapi>
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 124
9
- version: 0.0.124
8
+ - 131
9
+ version: 0.0.131
10
10
  platform: ruby
11
11
  authors:
12
12
  - Lisa Seelye