dsander-reve 0.0.116
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +155 -0
- data/LICENSE +22 -0
- data/Rakefile +79 -0
- data/init.rb +1 -0
- data/lib/reve/classes.rb +1341 -0
- data/lib/reve/exceptions.rb +353 -0
- data/lib/reve/extensions.rb +108 -0
- data/lib/reve.rb +1001 -0
- data/reve.rb +1 -0
- data/test/test_reve.rb +1191 -0
- data/test/xml/alliances.xml +171 -0
- data/test/xml/assets.xml +32 -0
- data/test/xml/badxml.xml +6 -0
- data/test/xml/certificate_tree.xml +231 -0
- data/test/xml/char_facwarstats.xml +18 -0
- data/test/xml/char_medals.xml +12 -0
- data/test/xml/character_sheet.xml +288 -0
- data/test/xml/characterid.xml +11 -0
- data/test/xml/charactername.xml +11 -0
- data/test/xml/characters.xml +13 -0
- data/test/xml/conqurable_stations.xml +12 -0
- data/test/xml/corp_facwarstats.xml +17 -0
- data/test/xml/corp_medals.xml +23 -0
- data/test/xml/corp_member_medals.xml +20 -0
- data/test/xml/corp_membersecurity.xml +49 -0
- data/test/xml/corporate_assets_list.xml +16 -0
- data/test/xml/corporate_market_orders.xml +10 -0
- data/test/xml/corporate_wallet_balance.xml +16 -0
- data/test/xml/corporate_wallet_journal.xml +11 -0
- data/test/xml/corporate_wallet_transactions.xml +10 -0
- data/test/xml/corporation_sheet.xml +52 -0
- data/test/xml/errors/error_100.xml +5 -0
- data/test/xml/errors/error_101.xml +5 -0
- data/test/xml/errors/error_102.xml +5 -0
- data/test/xml/errors/error_103.xml +5 -0
- data/test/xml/errors/error_104.xml +5 -0
- data/test/xml/errors/error_105.xml +5 -0
- data/test/xml/errors/error_106.xml +5 -0
- data/test/xml/errors/error_107.xml +5 -0
- data/test/xml/errors/error_108.xml +5 -0
- data/test/xml/errors/error_109.xml +5 -0
- data/test/xml/errors/error_110.xml +5 -0
- data/test/xml/errors/error_111.xml +5 -0
- data/test/xml/errors/error_112.xml +5 -0
- data/test/xml/errors/error_113.xml +5 -0
- data/test/xml/errors/error_114.xml +5 -0
- data/test/xml/errors/error_115.xml +5 -0
- data/test/xml/errors/error_116.xml +5 -0
- data/test/xml/errors/error_117.xml +5 -0
- data/test/xml/errors/error_118.xml +5 -0
- data/test/xml/errors/error_119.xml +5 -0
- data/test/xml/errors/error_120.xml +5 -0
- data/test/xml/errors/error_121.xml +5 -0
- data/test/xml/errors/error_122.xml +5 -0
- data/test/xml/errors/error_123.xml +5 -0
- data/test/xml/errors/error_124.xml +5 -0
- data/test/xml/errors/error_125.xml +5 -0
- data/test/xml/errors/error_200.xml +5 -0
- data/test/xml/errors/error_201.xml +5 -0
- data/test/xml/errors/error_202.xml +5 -0
- data/test/xml/errors/error_203.xml +5 -0
- data/test/xml/errors/error_204.xml +5 -0
- data/test/xml/errors/error_205.xml +5 -0
- data/test/xml/errors/error_206.xml +5 -0
- data/test/xml/errors/error_207.xml +5 -0
- data/test/xml/errors/error_208.xml +5 -0
- data/test/xml/errors/error_209.xml +5 -0
- data/test/xml/errors/error_210.xml +5 -0
- data/test/xml/errors/error_211.xml +5 -0
- data/test/xml/errors/error_212.xml +5 -0
- data/test/xml/errors/error_213.xml +5 -0
- data/test/xml/errors/error_214.xml +5 -0
- data/test/xml/errors/error_500.xml +5 -0
- data/test/xml/errors/error_501.xml +5 -0
- data/test/xml/errors/error_502.xml +5 -0
- data/test/xml/errors/error_503.xml +5 -0
- data/test/xml/errors/error_504.xml +5 -0
- data/test/xml/errors/error_505.xml +5 -0
- data/test/xml/errors/error_506.xml +5 -0
- data/test/xml/errors/error_507.xml +5 -0
- data/test/xml/errors/error_508.xml +5 -0
- data/test/xml/errors/error_509.xml +5 -0
- data/test/xml/errors/error_510.xml +5 -0
- data/test/xml/errors/error_511.xml +5 -0
- data/test/xml/errors/error_512.xml +5 -0
- data/test/xml/errors/error_513.xml +5 -0
- data/test/xml/errors/error_514.xml +5 -0
- data/test/xml/errors/error_515.xml +5 -0
- data/test/xml/errors/error_516.xml +5 -0
- data/test/xml/errors/error_517.xml +5 -0
- data/test/xml/errors/error_518.xml +5 -0
- data/test/xml/errors/error_519.xml +5 -0
- data/test/xml/errors/error_520.xml +5 -0
- data/test/xml/errors/error_521.xml +5 -0
- data/test/xml/errors/error_522.xml +5 -0
- data/test/xml/errors/error_523.xml +5 -0
- data/test/xml/errors/error_524.xml +5 -0
- data/test/xml/errors/error_525.xml +5 -0
- data/test/xml/errors/error_900.xml +5 -0
- data/test/xml/errors/error_901.xml +5 -0
- data/test/xml/errors/error_902.xml +5 -0
- data/test/xml/errors/error_903.xml +5 -0
- data/test/xml/errors/error_999.xml +5 -0
- data/test/xml/errors.xml +70 -0
- data/test/xml/eve_facwarstats.xml +35 -0
- data/test/xml/eve_facwartopstats.xml +178 -0
- data/test/xml/industryjobs.xml +11 -0
- data/test/xml/kills.xml +569 -0
- data/test/xml/map_facwarsystems.xml +13 -0
- data/test/xml/mapjumps.xml +15 -0
- data/test/xml/mapkills.xml +16 -0
- data/test/xml/market_transactions.xml +79 -0
- data/test/xml/marketorders.xml +43 -0
- data/test/xml/member_tracking.xml +22 -0
- data/test/xml/nonmember_corpsheet.xml +30 -0
- data/test/xml/reftypes.xml +14 -0
- data/test/xml/server_status.xml +9 -0
- data/test/xml/skill_in_training-amarr-titan.xml +15 -0
- data/test/xml/skill_in_training-none.xml +7 -0
- data/test/xml/skill_queue.xml +18 -0
- data/test/xml/skilltree.xml +41 -0
- data/test/xml/sovereignty.xml +29 -0
- data/test/xml/starbase_fuel.xml +23 -0
- data/test/xml/starbases.xml +12 -0
- data/test/xml/wallet_balance.xml +17 -0
- data/test/xml/wallet_journal.xml +48 -0
- data/tester.rb +17 -0
- metadata +187 -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/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2007, 2008 Lisa Seelye <lisa@thedoh.com>
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
4
|
+
obtaining a copy of this software and associated documentation
|
5
|
+
files (the "Software"), to deal in the Software without
|
6
|
+
restriction, including without limitation the rights to use,
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the
|
9
|
+
Software is furnished to do so, subject to the following
|
10
|
+
conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
STATS_DIRECTORIES = [
|
2
|
+
%w(Libraries lib/),
|
3
|
+
%w(tests test/)
|
4
|
+
]
|
5
|
+
|
6
|
+
require 'rake'
|
7
|
+
require 'rake/testtask'
|
8
|
+
require 'rake/rdoctask'
|
9
|
+
|
10
|
+
|
11
|
+
task :default => :redoc
|
12
|
+
|
13
|
+
desc "Generate Docs"
|
14
|
+
Rake::RDocTask.new("doc") { |rdoc|
|
15
|
+
rdoc.rdoc_dir = 'doc'
|
16
|
+
rdoc.title = 'Reve API Documentation'
|
17
|
+
rdoc.options << '--line-numbers' << '--inline-source' << '--all'
|
18
|
+
rdoc.rdoc_files.include('./ChangeLog')
|
19
|
+
rdoc.rdoc_files.include('*.rb')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
+
rdoc.rdoc_files.include('test/**/*')
|
22
|
+
}
|
23
|
+
|
24
|
+
desc "Code Statistics"
|
25
|
+
task :stats do
|
26
|
+
require 'code_statistics'
|
27
|
+
CodeStatistics.new(*STATS_DIRECTORIES).to_s
|
28
|
+
end
|
29
|
+
|
30
|
+
if File.exists?('.svn')
|
31
|
+
require 'rubygems'
|
32
|
+
require 'rake/packagetask'
|
33
|
+
require 'rake/gempackagetask'
|
34
|
+
|
35
|
+
REVE_RELEASE=`svn up &>/dev/null && svn info|grep ^Revision| cut -d ' ' -f 2`
|
36
|
+
|
37
|
+
spec = Gem::Specification.new do |s|
|
38
|
+
s.name = "reve"
|
39
|
+
s.rubyforge_project = "reve"
|
40
|
+
s.version = "0.0.#{REVE_RELEASE.chomp || '1'}"
|
41
|
+
s.author = "Lisa Seelye"
|
42
|
+
s.email = "lisa@thedoh.com"
|
43
|
+
s.homepage = "http://revetrac.crudvision.com"
|
44
|
+
s.platform = Gem::Platform::RUBY
|
45
|
+
s.summary = "Reve is a Ruby library to interface with the Eve Online API"
|
46
|
+
s.files = FileList["Rakefile","LICENSE", "lib/**/*.rb","reve.rb","tester.rb","init.rb"].to_a
|
47
|
+
s.require_path = "lib"
|
48
|
+
s.test_files = FileList["test/test_reve.rb","test/xml/**/*.xml"].to_a
|
49
|
+
s.has_rdoc = true
|
50
|
+
s.extra_rdoc_files = ["ChangeLog"]
|
51
|
+
s.add_dependency("hpricot",">= 0.6")
|
52
|
+
end rescue nil
|
53
|
+
|
54
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
55
|
+
pkg.need_tar = true
|
56
|
+
end rescue nil
|
57
|
+
elsif File.exists?('.git')
|
58
|
+
begin
|
59
|
+
require 'jeweler'
|
60
|
+
Jeweler::Tasks.new do |s|
|
61
|
+
s.name = "reve"
|
62
|
+
s.rubyforge_project = "reve"
|
63
|
+
s.author = "Lisa Seelye"
|
64
|
+
s.email = "lisa@thedoh.com"
|
65
|
+
s.homepage = "http://revetrac.crudvision.com"
|
66
|
+
s.platform = Gem::Platform::RUBY
|
67
|
+
s.summary = "Reve is a Ruby library to interface with the Eve Online API"
|
68
|
+
s.files = FileList["Rakefile","LICENSE", "lib/**/*.rb","reve.rb","tester.rb","init.rb"].to_a
|
69
|
+
s.require_path = "lib"
|
70
|
+
s.test_files = FileList["test/test_reve.rb","test/xml/**/*.xml"].to_a
|
71
|
+
s.has_rdoc = true
|
72
|
+
s.extra_rdoc_files = ["ChangeLog"]
|
73
|
+
s.add_dependency("hpricot",">= 0.6")
|
74
|
+
end
|
75
|
+
rescue LoadError
|
76
|
+
puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
data/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'reve'
|