adam 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Adam
2
2
 
3
- * http://github.com/frkt/adam
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.to_killmail # => Kill log's killmail equivalent.
39
+ kill.to_s # => Kill log's killmail equivalent.
40
40
 
41
- ### Import a killboard
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
@@ -1,4 +1,4 @@
1
- adapter: mysql2
1
+ adapter: mysql
2
2
  database: eve_arena_development
3
3
  username: root
4
4
  password: frkt
@@ -1,5 +1,5 @@
1
1
  module Adam
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
 
4
4
  autoload :Killmail, 'adam/killmail'
5
5
  autoload :KillLog, 'adam/kill_log'
@@ -92,9 +92,9 @@ module Adam
92
92
  alias_method :to_s, :to_killmail
93
93
 
94
94
  def digest
95
- string = time.to_s + victim.pilot.to_s + victim.ship.to_s + solar_system.to_s + victim.damage_taken.to_s
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 += p.pilot.to_s + p.damage_done.to_s }
97
+ involved_parties.each { |p| string << "#{p.pilot}#{p.damage_done}" }
98
98
  Digest::MD5.hexdigest(string)
99
99
  end
100
100
 
@@ -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: ([^\/]+)/, 1] or raise ValidationError.new(source), "Involved party #{i+1} ship malformed"
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
- - 1
9
- version: 1.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-09-30 00:00:00 +02:00
17
+ date: 2010-10-01 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies: []
20
20