adam 1.1.1 → 1.1.2
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/README.md +3 -3
- data/config/database.yml +1 -1
- data/lib/adam.rb +1 -1
- data/lib/adam/kill.rb +2 -2
- data/lib/adam/killmail.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Adam
|
2
2
|
|
3
|
-
* http://github.com/
|
3
|
+
* http://github.com/jgorset/adam
|
4
4
|
|
5
5
|
## Description
|
6
6
|
|
@@ -36,9 +36,9 @@ Adam is a library for all things [EVE](http://www.eveonline.com/).
|
|
36
36
|
kill.loot[0].name # => Warp Disruptor II
|
37
37
|
kill.loot[0].quantity # => 1
|
38
38
|
|
39
|
-
kill.
|
39
|
+
kill.to_s # => Kill log's killmail equivalent.
|
40
40
|
|
41
|
-
### Import
|
41
|
+
### Import killmails
|
42
42
|
|
43
43
|
killboard = Adam::Killboard.new :uri => 'http://invicta.eve-kill.net/', :feed_uri => 'http://feed.evsco.net/?a=feed&corp=Invicta.&combined=true'
|
44
44
|
killboard.killmails :week => 1, :year => 2010
|
data/config/database.yml
CHANGED
data/lib/adam.rb
CHANGED
data/lib/adam/kill.rb
CHANGED
@@ -92,9 +92,9 @@ module Adam
|
|
92
92
|
alias_method :to_s, :to_killmail
|
93
93
|
|
94
94
|
def digest
|
95
|
-
string = time
|
95
|
+
string = "#{time}#{victim.pilot}#{victim.ship}#{solar_system.name}#{victim.damage_taken}"
|
96
96
|
involved_parties.sort! { |x, y| x.damage_done <=> y.damage_done }
|
97
|
-
involved_parties.each { |p| string
|
97
|
+
involved_parties.each { |p| string << "#{p.pilot}#{p.damage_done}" }
|
98
98
|
Digest::MD5.hexdigest(string)
|
99
99
|
end
|
100
100
|
|
data/lib/adam/killmail.rb
CHANGED
@@ -79,7 +79,7 @@ module Adam
|
|
79
79
|
when 2
|
80
80
|
involved_party = Adam::Kill::InvolvedParty.new do |ip|
|
81
81
|
ip.type = "NPC"
|
82
|
-
ip.ship = snippet[/Name: ([
|
82
|
+
ip.ship = snippet[/Name: ([a-zA-Z0-9]{1}[a-zA-Z0-9'. -]{1,48}[a-zA-Z0-9.]{1})/, 1] or raise ValidationError.new(source), "Involved party #{i+1} ship malformed"
|
83
83
|
ip.damage_done = (snippet[/Damage Done: ([0-9]+)/, 1] or raise ValidationError.new(source), "Involved party #{i+1} damage malformed").to_i
|
84
84
|
ip.final_blow = snippet =~ /\(laid the final blow\)/ ? true : false
|
85
85
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 1.1.
|
8
|
+
- 2
|
9
|
+
version: 1.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Johannes Gorset
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-10-01 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|