wowr 0.1.0
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.
- data/lib/wowr.rb +350 -0
- data/lib/wowr/classes.rb +1299 -0
- data/lib/wowr/exceptions.rb +33 -0
- data/lib/wowr/extensions.rb +15 -0
- metadata +49 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
module Wowr
|
2
|
+
module Exceptions
|
3
|
+
def self.raise_me(code)
|
4
|
+
#msg = "(#{code.to_s}) #{msg}"
|
5
|
+
case code
|
6
|
+
when "noCharacter"
|
7
|
+
raise CharacterNotFound.new("Character with that name not found.")
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
class InvalidXML < StandardError
|
12
|
+
end
|
13
|
+
|
14
|
+
# errCode="noCharacter"
|
15
|
+
class CharacterNotFound < StandardError
|
16
|
+
end
|
17
|
+
|
18
|
+
class ItemNotFound < StandardError
|
19
|
+
end
|
20
|
+
|
21
|
+
class GuildNotFound < StandardError
|
22
|
+
end
|
23
|
+
|
24
|
+
class InvalidSearchType < StandardError
|
25
|
+
end
|
26
|
+
|
27
|
+
class NoSearchString < StandardError
|
28
|
+
end
|
29
|
+
|
30
|
+
class InvalidArenaTeamSize < StandardError
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Wowr
|
2
|
+
# All of these are shamelessly nicked from Ruby on Rails.
|
3
|
+
# The String Extensions have a bit more fault tolerance.
|
4
|
+
module Extensions
|
5
|
+
module String
|
6
|
+
def to_time(form = :utc)
|
7
|
+
begin
|
8
|
+
::Time.send(form, *ParseDate.parsedate(self))
|
9
|
+
rescue TypeError
|
10
|
+
self
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.9.2
|
3
|
+
specification_version: 1
|
4
|
+
name: wowr
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: 0.1.0
|
7
|
+
date: 2008-01-20 00:00:00 +00:00
|
8
|
+
summary: An API wrapper for the World of Warcraft Armory.
|
9
|
+
require_paths:
|
10
|
+
- lib
|
11
|
+
email: benhumphreys @nospam@ gmail.com
|
12
|
+
homepage: http://wowr.rubyforge.org/
|
13
|
+
rubyforge_project:
|
14
|
+
description: Provides Ruby interface for retrieving item, character, guild and arena team info from the armory.
|
15
|
+
autorequire:
|
16
|
+
default_executable:
|
17
|
+
bindir: bin
|
18
|
+
has_rdoc: true
|
19
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
24
|
+
version:
|
25
|
+
platform: ruby
|
26
|
+
signing_key:
|
27
|
+
cert_chain:
|
28
|
+
post_install_message:
|
29
|
+
authors:
|
30
|
+
- Ben Humphreys
|
31
|
+
files:
|
32
|
+
- lib/wowr.rb
|
33
|
+
- lib/wowr/classes.rb
|
34
|
+
- lib/wowr/exceptions.rb
|
35
|
+
- lib/wowr/extensions.rb
|
36
|
+
test_files: []
|
37
|
+
|
38
|
+
rdoc_options: []
|
39
|
+
|
40
|
+
extra_rdoc_files: []
|
41
|
+
|
42
|
+
executables: []
|
43
|
+
|
44
|
+
extensions: []
|
45
|
+
|
46
|
+
requirements: []
|
47
|
+
|
48
|
+
dependencies: []
|
49
|
+
|