eaal 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Manifest.txt +1 -0
- data/lib/eaal.rb +1 -1
- data/lib/eaal/config.rb +36 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9544d1f4fff43904339ffc973b2c1662c32c7a4e
|
4
|
+
data.tar.gz: e293c585daad5109515cd6943b542055df13f06f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 402c9bfb3ba3d69931491db13e8c7de7d7e050208974dd2fddeed0e8108403b4d3e78143b3e465071a4c08487ea560814c628352f4c8c6065f2b109f35132f2a
|
7
|
+
data.tar.gz: 7f3f81257d4df1c3952498ede71ff34eec1d8e233b618afebd22e6fb043d327e906d93b1455cc4c8967564e39917765d3a8e1e6b6672f302942999a6eb596f44
|
data/Manifest.txt
CHANGED
@@ -11,6 +11,7 @@ lib/eaal/cache/memcached.rb
|
|
11
11
|
lib/eaal/exception.rb
|
12
12
|
lib/eaal/result.rb
|
13
13
|
lib/eaal/rowset.rb
|
14
|
+
lib/eaal/config.rb
|
14
15
|
test/fixtures/test/test/account/Characters/Request_.xml
|
15
16
|
test/fixtures/test/test/char/CharacterSheet/Request_.xml
|
16
17
|
test/fixtures/test/test/char/CharacterSheet/Request_characterID_12345.xml
|
data/lib/eaal.rb
CHANGED
@@ -35,7 +35,7 @@ require 'eaal/rowset'
|
|
35
35
|
require 'eaal/config'
|
36
36
|
|
37
37
|
module EAAL
|
38
|
-
VERSION = "0.1.
|
38
|
+
VERSION = "0.1.16" # fix for Hoe.spec 2.x
|
39
39
|
@@version_string = "EAAL" + VERSION # the version string, used as client name in http requests
|
40
40
|
|
41
41
|
@@api_base = "https://api.eveonline.com" # the url used as basis for all requests, you might want to use gatecamper url or a personal proxy instead
|
data/lib/eaal/config.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
module EAAL
|
2
|
+
class Config
|
3
|
+
|
4
|
+
def initialize(data={})
|
5
|
+
@data = {}
|
6
|
+
update!(data)
|
7
|
+
end
|
8
|
+
|
9
|
+
def update!(data)
|
10
|
+
data.each do |key, value|
|
11
|
+
self[key] = value
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def [](key)
|
16
|
+
@data[key.to_sym]
|
17
|
+
end
|
18
|
+
|
19
|
+
def []=(key, value)
|
20
|
+
if value.class == Hash
|
21
|
+
@data[key.to_sym] = Config.new(value)
|
22
|
+
else
|
23
|
+
@data[key.to_sym] = value
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def method_missing(sym, *args)
|
28
|
+
if sym.to_s =~ /(.+)=$/
|
29
|
+
self[$1] = args.first
|
30
|
+
else
|
31
|
+
self[sym]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eaal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Petermann
|
@@ -104,6 +104,7 @@ files:
|
|
104
104
|
- lib/eaal/cache/base.rb
|
105
105
|
- lib/eaal/cache/file.rb
|
106
106
|
- lib/eaal/cache/memcached.rb
|
107
|
+
- lib/eaal/config.rb
|
107
108
|
- lib/eaal/exception.rb
|
108
109
|
- lib/eaal/result.rb
|
109
110
|
- lib/eaal/rowset.rb
|