ipcat_jruby 0.2.2-java → 0.2.3-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ipcat.jar +0 -0
- data/lib/ipcat.rb +8 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 282cba712945228fa6985c5886b7d5f976c77abd
|
4
|
+
data.tar.gz: d0722cdaab356f41c9ce6625a29ef3845b67f598
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c80128c65c52594e7c682a4f19f1baadf6c09188e2cb4971b62c551b00b58ca98236c0db425de0a63eb0e19f90f367e8a9b9e5c925f5531671fcd4900832ce54
|
7
|
+
data.tar.gz: 17db1553fbe88d993cf3dd2d26740d5437c984e6c9f1d00044c27dfaacab3dedfbfbe6c0c25ef1b7c71ded09f6e0615c1389ae7d42e1982d5e31cd32fcbc707b
|
data/lib/ipcat.jar
CHANGED
Binary file
|
data/lib/ipcat.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'java'
|
2
2
|
require 'ipcat.jar'
|
3
3
|
|
4
|
+
include_class 'java.lang.NumberFormatException'
|
5
|
+
|
4
6
|
module IPCat
|
5
7
|
class Datacenters
|
6
8
|
def initialize(file)
|
@@ -18,8 +20,12 @@ module IPCat
|
|
18
20
|
|
19
21
|
def find(ipstring)
|
20
22
|
return nil if ipstring.nil?
|
21
|
-
|
22
|
-
|
23
|
+
begin
|
24
|
+
n = @blocks.find(org.ipcat.IP.parseIp(ipstring))
|
25
|
+
return @urls[n] unless n == -1
|
26
|
+
rescue NumberFormatException => e
|
27
|
+
return nil
|
28
|
+
end
|
23
29
|
end
|
24
30
|
|
25
31
|
def length
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ipcat_jruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Mathieu Lecarme
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Client for the data from https://github.com/client9/ipcat
|
14
14
|
email: mlecarme@garambrogne.net
|