reve 0.0.74

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.
Files changed (100) hide show
  1. data/ChangeLog +155 -0
  2. data/Rakefile +43 -0
  3. data/init.rb +1 -0
  4. data/lib/reve.rb +793 -0
  5. data/reve.rb +1 -0
  6. data/test/test_reve.rb +700 -0
  7. data/test/xml/alliances.xml +171 -0
  8. data/test/xml/assets.xml +32 -0
  9. data/test/xml/badxml.xml +6 -0
  10. data/test/xml/character_sheet.xml +37 -0
  11. data/test/xml/characterid.xml +11 -0
  12. data/test/xml/charactername.xml +11 -0
  13. data/test/xml/characters.xml +13 -0
  14. data/test/xml/conqurable_stations.xml +11 -0
  15. data/test/xml/corporation_sheet.xml +52 -0
  16. data/test/xml/errors/error_100.xml +5 -0
  17. data/test/xml/errors/error_101.xml +5 -0
  18. data/test/xml/errors/error_102.xml +5 -0
  19. data/test/xml/errors/error_103.xml +5 -0
  20. data/test/xml/errors/error_104.xml +5 -0
  21. data/test/xml/errors/error_105.xml +5 -0
  22. data/test/xml/errors/error_106.xml +5 -0
  23. data/test/xml/errors/error_107.xml +5 -0
  24. data/test/xml/errors/error_108.xml +5 -0
  25. data/test/xml/errors/error_109.xml +5 -0
  26. data/test/xml/errors/error_110.xml +5 -0
  27. data/test/xml/errors/error_111.xml +5 -0
  28. data/test/xml/errors/error_112.xml +5 -0
  29. data/test/xml/errors/error_113.xml +5 -0
  30. data/test/xml/errors/error_114.xml +5 -0
  31. data/test/xml/errors/error_115.xml +5 -0
  32. data/test/xml/errors/error_116.xml +5 -0
  33. data/test/xml/errors/error_117.xml +5 -0
  34. data/test/xml/errors/error_118.xml +5 -0
  35. data/test/xml/errors/error_119.xml +5 -0
  36. data/test/xml/errors/error_120.xml +5 -0
  37. data/test/xml/errors/error_121.xml +5 -0
  38. data/test/xml/errors/error_200.xml +5 -0
  39. data/test/xml/errors/error_201.xml +5 -0
  40. data/test/xml/errors/error_202.xml +5 -0
  41. data/test/xml/errors/error_203.xml +5 -0
  42. data/test/xml/errors/error_204.xml +5 -0
  43. data/test/xml/errors/error_205.xml +5 -0
  44. data/test/xml/errors/error_206.xml +5 -0
  45. data/test/xml/errors/error_207.xml +5 -0
  46. data/test/xml/errors/error_208.xml +5 -0
  47. data/test/xml/errors/error_209.xml +5 -0
  48. data/test/xml/errors/error_210.xml +5 -0
  49. data/test/xml/errors/error_211.xml +5 -0
  50. data/test/xml/errors/error_212.xml +5 -0
  51. data/test/xml/errors/error_213.xml +5 -0
  52. data/test/xml/errors/error_214.xml +5 -0
  53. data/test/xml/errors/error_500.xml +5 -0
  54. data/test/xml/errors/error_501.xml +5 -0
  55. data/test/xml/errors/error_502.xml +5 -0
  56. data/test/xml/errors/error_503.xml +5 -0
  57. data/test/xml/errors/error_504.xml +5 -0
  58. data/test/xml/errors/error_505.xml +5 -0
  59. data/test/xml/errors/error_506.xml +5 -0
  60. data/test/xml/errors/error_507.xml +5 -0
  61. data/test/xml/errors/error_508.xml +5 -0
  62. data/test/xml/errors/error_509.xml +5 -0
  63. data/test/xml/errors/error_510.xml +5 -0
  64. data/test/xml/errors/error_511.xml +5 -0
  65. data/test/xml/errors/error_512.xml +5 -0
  66. data/test/xml/errors/error_513.xml +5 -0
  67. data/test/xml/errors/error_514.xml +5 -0
  68. data/test/xml/errors/error_515.xml +5 -0
  69. data/test/xml/errors/error_516.xml +5 -0
  70. data/test/xml/errors/error_517.xml +5 -0
  71. data/test/xml/errors/error_518.xml +5 -0
  72. data/test/xml/errors/error_519.xml +5 -0
  73. data/test/xml/errors/error_520.xml +5 -0
  74. data/test/xml/errors/error_521.xml +5 -0
  75. data/test/xml/errors/error_522.xml +5 -0
  76. data/test/xml/errors/error_523.xml +5 -0
  77. data/test/xml/errors/error_900.xml +5 -0
  78. data/test/xml/errors/error_901.xml +5 -0
  79. data/test/xml/errors/error_902.xml +5 -0
  80. data/test/xml/errors/error_903.xml +5 -0
  81. data/test/xml/errors/error_999.xml +5 -0
  82. data/test/xml/industryjobs.xml +11 -0
  83. data/test/xml/kills.xml +163 -0
  84. data/test/xml/mapjumps.xml +15 -0
  85. data/test/xml/mapkills.xml +16 -0
  86. data/test/xml/market_transactions.xml +79 -0
  87. data/test/xml/marketorders.xml +37 -0
  88. data/test/xml/member_tracking.xml +22 -0
  89. data/test/xml/nonmember_corpsheet.xml +30 -0
  90. data/test/xml/reftypes.xml +14 -0
  91. data/test/xml/skill_in_training-amarr-titan.xml +13 -0
  92. data/test/xml/skill_in_training-none.xml +7 -0
  93. data/test/xml/skilltree.xml +40 -0
  94. data/test/xml/sovereignty.xml +29 -0
  95. data/test/xml/starbase_fuel.xml +23 -0
  96. data/test/xml/starbases.xml +12 -0
  97. data/test/xml/wallet_balance.xml +17 -0
  98. data/test/xml/wallet_journal.xml +48 -0
  99. data/tester.rb +17 -0
  100. metadata +151 -0
data/ChangeLog ADDED
@@ -0,0 +1,155 @@
1
+ Revision 61: 2008-01-13
2
+ Please see http://revetrac.crudvision.com/log/trunk?action=stop_on_copy&rev=61&stop_rev=40&mode=stop_on_copy&verbose=on
3
+ for ChangeLog
4
+
5
+ Revision 41: 2007-12-19
6
+ Add support for the nesting of Corporation under Alliance in
7
+ Reve::API#alliances
8
+ Added missing tests
9
+
10
+ Revisions 31-37: December 2007
11
+ Add support for version 2 API stuff.
12
+
13
+ Revision 30: 2007-11-15
14
+ Added initial support for the API version 2 CorporationSheet method.
15
+
16
+ Revision 29: 2007-09-19
17
+ Removed rolldocs.rake and just put the documentation building into the
18
+ Rakefile. To build docs just use `rake doc`.
19
+ Added some rescue statements the internal Reve::API#check_exception to try
20
+ and handle problems when some things aren't found in the XML document.
21
+
22
+ Revision 28: 2007-09-09
23
+ Fixed typos that made the library, uh, not work.
24
+
25
+ Revision 27: 2007-09-08 21:29:07 +0100 (Sat, 08 Sep 2007)
26
+ Added preliminary support for the ConqurableStation API, see
27
+ Reve::Clases::ConqurableStation class.
28
+ Migrated subversion to a traditional trunk directory for my sanity. Expect
29
+ future releases to also be in the tags directory.
30
+
31
+ Revision 21: 2007-08-28 02:45 (Tue, 28 Augu 2007)
32
+ Changed all methods to require a Hash of parameters. Please refer to the
33
+ documentation <http://docs.crudvision.com/reve/> for new method signatures,
34
+ especially Reve::API main documentation.
35
+ Add a protected method 'compute_hash' which every other public method calls,
36
+ using this new Hash parameter system, to construct a hash to represent the
37
+ call uniquely. The result of this method should be suitable to store in a
38
+ database so it can be used in conjunction with the cached_until variable.
39
+ This hash is computed after each call and is available through the
40
+ last_hash instance variable (like cached_until)
41
+ Updated the test suite for these changes
42
+
43
+ Revision 20: 2007-08-22 23:36:00 +0100 (Wed, 22 Aug 2007)
44
+ Added this ChangeLog
45
+
46
+ Revision 19: 2007-08-22 23:33:57 +0100 (Wed, 22 Aug 2007)
47
+ docs in svn removed. Roll docs with rake -f rolldocs.rake doc
48
+
49
+ Revision 18: 2007-08-21 09:19:16 +0100 (Tue, 21 Aug 2007)
50
+ Add Reve::API.cached_until. Users of Reve PLEASE obey this setting! It will
51
+ be set (overwritten) after each call and should be copied somewhere before
52
+ another call is made.
53
+ Change tester.rb to print the cached_until response for each test call.
54
+ Change Reve::API#postfields to take a hash of post fields and change each
55
+ Reve::API method accordingly.
56
+
57
+ Revision 17: 2007-08-16 23:07:00 +0100 (Thu, 16 Aug 2007)
58
+ RDoc update
59
+
60
+ Revision 16: 2007-08-16 23:04:56 +0100 (Thu, 16 Aug 2007)
61
+ Add preliminary support for Reve::API#starbases and Reve::API#starbase_fuel
62
+ Modify Reve::API#postfields to allow for item_id for Reve::API#starbase_fuel
63
+ Add Reve::Classes::Starbase and Reve::Classes::StarbaseFuel
64
+ Add new exceptions: Reve::Exceptions::VersionMismatchException,
65
+ Reve::Exceptions::InvalidItemIDProvided,
66
+ Reve::Exceptions::MustBeDirectorOrCEO,
67
+ Reve::Exceptions::StarbaseDetailFetchFailure,
68
+ Reve::Exceptions::EveDatabaseConnectionFailure
69
+
70
+ Revision 15: 2007-08-16 21:23:08 +0100 (Thu, 16 Aug 2007)
71
+ Add Reve::Exceptions::VersionEscalationException
72
+
73
+ Revision 14: 2007-08-15 21:58:20 +0100 (Wed, 15 Aug 2007)
74
+ Fix badxml xml file to actually break it
75
+ Fix class attributes in Reve::API (wallet transactions) to point to the right
76
+ place
77
+ Add a warning to Reve::Exceptions#raise_it for
78
+ Reve::Exceptions::SecurityLevelNotHighEnough to warn the user that maybe
79
+ they don't have the full API key
80
+
81
+ Revision 13: 2007-08-14 22:36:50 +0100 (Tue, 14 Aug 2007)
82
+ Global attempts to fix when to_time can be nil
83
+ Add a check in Reve::Classes::WalletTransaction#new to check for the presence
84
+ of character_id in the return data before trying to use it
85
+
86
+ Revision 12: 2007-08-14 21:10:26 +0100 (Tue, 14 Aug 2007)
87
+ Add a test for malformed XML input
88
+ Subclass Reve::Classes::WalletTransaction for Personal and Corporate
89
+ wallet transactions ('transactionFor' in the XML) as per
90
+ http://myeve.eve-online.com/ingameboard.asp?a=topic&threadID=575626&page=1#1
91
+ Removed characterID and characterName attributes frm WalletTransaction as
92
+ per the above link
93
+
94
+ Revision 11: 2007-08-10 22:13:46 +0100 (Fri, 10 Aug 2007)
95
+ Add alliances test xml for test suite
96
+
97
+ Revision 10: 2007-08-10 22:12:59 +0100 (Fri, 10 Aug 2007)
98
+ Add a test suite
99
+ Add Reve::Exceptions::WebsiteOffline
100
+ Reve::Classes::WalletBalance.account_key now works
101
+ Reve::Classes::CharacterSheet.skill_in_training is boolean (and now works)
102
+ Reve::Classes::SkillTree.description now works
103
+
104
+
105
+ Revision 9: 2007-08-07 07:22:42 +0100 (Tue, 07 Aug 2007)
106
+ Add Reve::Exceptions::EveDatabaseOffline for when the Eve DB is offline
107
+
108
+ Revision 8: 2007-08-01 22:30:57 +0100 (Wed, 01 Aug 2007)
109
+ First tarball release
110
+ Remove Curl dependency in favour of Ruby's built-in Net::HTTP
111
+ Change Reve::API#postfields and Reve::API#process_query for Curl removal
112
+ RDoc has inline source with line numbers
113
+ Document existance of Reve::Classes::PrimaryAttribute,
114
+ Reve::Classes::SecondaryAttribute, Reve::Classes::WillpowerEnhancer,
115
+ Reve::Classes::IntelligenceEnhancer, Reve::Classes::MemoryEnhancer,
116
+ Reve::Classes::PerceptionEnhancer, Reve::Classes::CharismaEnhancer
117
+ Add Reve::Exceptions::ReveNetworkStatusException for when the network times
118
+ out.
119
+
120
+ Revision 7: 2007-08-01 19:28:52 +0100 (Wed, 01 Aug 2007)
121
+ Finish the Reve::API#character_sheet method
122
+ Add Reve::Classes::AttributeEnhancer (and IntelligenceEnhancer,
123
+ MemoryEnhancer, PerceptionEnhancer, CharismaEnhancer and WillpowerEnhancer
124
+ subclasses, for implants)
125
+ Add enhancers (Array) attribute to Reve::Classes::CharacterSheet
126
+ Add Reve::Extensions::String#to_i in an attempt to make an integer from a
127
+ String when possible. See the docs for the method for details.
128
+ Update RDoc
129
+
130
+ Revision 6: 2007-08-01 08:04:33 +0100 (Wed, 01 Aug 2007)
131
+ Remove some pretty print debug info.
132
+
133
+ Revision 5: 2007-07-29 23:08:45 +0100 (Sun, 29 Jul 2007)
134
+ Change Reve::Classes::Sovereignty to use nil (not 0) for alliance_id and
135
+ faction_id where applicable.
136
+
137
+ Revision 4: 2007-07-26 20:07:30 +0100 (Thu, 26 Jul 2007)
138
+ Add Copyright notice
139
+ More documentation with brief sample usage in the Reve::API class
140
+ Change Reve::Extensions::String#to_date to use :utc instead of :local for
141
+ conversions
142
+
143
+ Revision 3: 2007-07-22 15:18:06 +0100 (Sun, 22 Jul 2007)
144
+ Add better 'require reve' support ($:.unshift fun)
145
+ Add Documentation (RDoc)
146
+
147
+ Revision 2:2007-07-22 10:06:11 +0100 (Sun, 22 Jul 2007)
148
+ Add sample "tester.rb"
149
+ Add Reve::Classes::RequiredAttribute and Primary/Secondary subclass
150
+ for skill_tree
151
+ Change Reve::Classes::Alliance's attribute alliance_id to plain id
152
+ Fix Reve::API.current_time assignment in Reve::API#check_exception
153
+
154
+ Revision 1: 2007-07-22 02:02:33 +0100 (Sun, 22 Jul 2007)
155
+ Initial Import
data/Rakefile ADDED
@@ -0,0 +1,43 @@
1
+ require 'rubygems'
2
+
3
+ require 'rake'
4
+ require 'rake/testtask'
5
+ require 'rake/rdoctask'
6
+
7
+ require 'rake/packagetask'
8
+ require 'rake/gempackagetask'
9
+
10
+ task :default => :redoc
11
+
12
+ REVE_RELEASE=`svn up &>/dev/null && svn info|grep ^Revision| cut -d ' ' -f 2`
13
+
14
+ desc "Generate Docs"
15
+ Rake::RDocTask.new("doc") { |rdoc|
16
+ rdoc.rdoc_dir = 'doc'
17
+ rdoc.title = 'Reve API Documentation'
18
+ rdoc.options << '--line-numbers' << '--inline-source' << '--all'
19
+ rdoc.rdoc_files.include('./ChangeLog')
20
+ rdoc.rdoc_files.include('*.rb')
21
+ rdoc.rdoc_files.include('lib/*.rb')
22
+ rdoc.rdoc_files.include('test/**/*')
23
+ }
24
+
25
+ spec = Gem::Specification.new do |s|
26
+ s.name = "reve"
27
+ s.version = "0.0.#{REVE_RELEASE.chomp || '1'}"
28
+ s.author = "Lisa Seelye"
29
+ s.email = "lisa@thedoh.com"
30
+ s.homepage = "http://revetrac.crudvision.com"
31
+ s.platform = Gem::Platform::RUBY
32
+ s.summary = "Reve is a Ruby library to interface with the Eve Online API"
33
+ s.files = FileList["Rakefile","lib/*.rb","reve.rb","tester.rb","init.rb"].to_a
34
+ s.require_path = "lib"
35
+ s.test_files = FileList["test/test_reve.rb","test/xml/**/*.xml"].to_a
36
+ s.has_rdoc = true
37
+ s.extra_rdoc_files = ["ChangeLog"]
38
+ s.add_dependency("hpricot",">= 0.6")
39
+ end rescue nil
40
+
41
+ Rake::GemPackageTask.new(spec) do |pkg|
42
+ pkg.need_tar = true
43
+ end rescue nil
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ require 'reve'