dsander-reve 0.0.118 → 0.0.119
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/reve/extensions.rb +4 -5
- data/test/test_reve.rb +2 -2
- metadata +3 -4
data/lib/reve/extensions.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'time'
|
2
2
|
|
3
3
|
module Reve #:nodoc:
|
4
4
|
# All of these are shamelessly nicked from Ruby on Rails.
|
@@ -78,12 +78,11 @@ module Reve #:nodoc:
|
|
78
78
|
cattr_writer(*syms)
|
79
79
|
end
|
80
80
|
end
|
81
|
-
|
82
81
|
module String
|
83
82
|
def to_time(form = :utc)
|
84
83
|
begin
|
85
|
-
|
86
|
-
rescue Exception
|
84
|
+
return Time.parse(self + ' +00:00')
|
85
|
+
rescue Exception => e
|
87
86
|
self
|
88
87
|
end
|
89
88
|
end
|
@@ -117,4 +116,4 @@ class Object
|
|
117
116
|
obj
|
118
117
|
end
|
119
118
|
alias_method :__rsend__, :rsend
|
120
|
-
end
|
119
|
+
end
|
data/test/test_reve.rb
CHANGED
@@ -1163,7 +1163,7 @@ class TestReve < Test::Unit::TestCase
|
|
1163
1163
|
kills = @api.send(meth,{:url =>url})
|
1164
1164
|
end
|
1165
1165
|
assert_equal 25, kills.size
|
1166
|
-
assert_equal 25, kills.collect { |k| k.victim.name }.
|
1166
|
+
assert_equal 25, kills.collect { |k| k.victim.name }.compact.length # i should have 10 good victim names to match with 10 kills
|
1167
1167
|
|
1168
1168
|
# Process the Kills here to get the number of "Contained Losses" - KillLoss that are contained within another
|
1169
1169
|
# KillLoss (like a Giant Secure Container); there should only be one contained loss and should be
|
@@ -1176,7 +1176,7 @@ class TestReve < Test::Unit::TestCase
|
|
1176
1176
|
attacker_names = kills.collect { |k| k.attackers.collect { |a| a.name } }.flatten
|
1177
1177
|
assert_equal 98, attacker_names.size # total of 25 attackers (24 players + 1 NPC)
|
1178
1178
|
assert_equal 2, attacker_names.grep(nil).size # npc exists once
|
1179
|
-
assert_equal 96, attacker_names.
|
1179
|
+
assert_equal 96, attacker_names.compact.length # 24 player attackers
|
1180
1180
|
|
1181
1181
|
assert_kind_of Integer, kills.first.victim.faction_id
|
1182
1182
|
assert_kind_of String, kills.first.victim.faction_name
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dsander-reve
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.119
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lisa Seelye
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-09-09 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -43,7 +43,6 @@ files:
|
|
43
43
|
- ChangeLog
|
44
44
|
has_rdoc: false
|
45
45
|
homepage: http://revetrac.crudvision.com
|
46
|
-
licenses:
|
47
46
|
post_install_message:
|
48
47
|
rdoc_options:
|
49
48
|
- --charset=UTF-8
|
@@ -64,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
63
|
requirements: []
|
65
64
|
|
66
65
|
rubyforge_project: reve
|
67
|
-
rubygems_version: 1.
|
66
|
+
rubygems_version: 1.2.0
|
68
67
|
signing_key:
|
69
68
|
specification_version: 3
|
70
69
|
summary: Reve is a Ruby library to interface with the Eve Online API
|