Skip to content

Commit 7f38241

Browse files
committed
Fixed file load error
1 parent c08a6bc commit 7f38241

File tree

4 files changed

+7
-14
lines changed

4 files changed

+7
-14
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ source 'https://rubygems.org'
22

33
# Specify your gem's dependencies in ip2proxy_ruby.gemspec
44
gemspec
5-
gem 'bindata'
5+
gem 'bindata', "~> 2.4.15"

example.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,4 @@
4242
print 'Provider: ' + record['provider'] + "\n"
4343

4444
# close IP2Proxy BIN database
45-
i2p.close()
46-
47-
# Web Service
48-
ws = Ip2proxyWebService.new('demo', 'PX11', true)
49-
record = ws.lookup('1.2.3.4')
50-
print record
51-
print "\n"
52-
print ws.get_credit()
45+
i2p.close()

ip2proxy_ruby.gemspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Gem::Specification.new do |s|
44
s.name = "ip2proxy_ruby"
5-
s.version = "3.3.0"
5+
s.version = "3.3.1"
66
s.authors = ["ip2location"]
77
s.email = ["[email protected]"]
88

@@ -49,18 +49,18 @@ Gem::Specification.new do |s|
4949
s.specification_version = 4
5050

5151
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
52-
s.add_runtime_dependency(%q<bindata>, [">= 0"])
52+
s.add_runtime_dependency(%q<bindata>, ["~> 2.4.15"])
5353
s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
5454
s.add_development_dependency(%q<rdoc>, [">= 6.3.1"])
5555
s.add_development_dependency(%q<bundler>, [">= 1.2.0"])
5656
else
57-
s.add_dependency(%q<bindata>, [">= 0"])
57+
s.add_dependency(%q<bindata>, ["~> 2.4.15"])
5858
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
5959
s.add_dependency(%q<rdoc>, [">= 6.3.1"])
6060
s.add_dependency(%q<bundler>, [">= 1.2.0"])
6161
end
6262
else
63-
s.add_dependency(%q<bindata>, [">= 0"])
63+
s.add_dependency(%q<bindata>, ["~> 2.4.15"])
6464
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
6565
s.add_dependency(%q<rdoc>, [">= 6.3.1"])
6666
s.add_dependency(%q<bundler>, [">= 1.2.0"])

lib/ip2proxy_ruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class Ip2proxy
1212
attr_accessor :record_class4, :record_class6, :v4, :file, :db_index, :count, :base_addr, :ipno, :record, :database, :columns, :ip_version, :ipv4databasecount, :ipv4databaseaddr, :ipv4indexbaseaddr, :ipv6databasecount, :ipv6databaseaddr, :ipv6indexbaseaddr, :databaseyear, :databasemonth, :databaseday, :last_err_msg
1313

14-
VERSION = '3.3.0'
14+
VERSION = '3.3.1'
1515
FIELD_NOT_SUPPORTED = 'NOT SUPPORTED'
1616
INVALID_IP_ADDRESS = 'INVALID IP ADDRESS'
1717
INVALID_BIN_DATABASE = 'Incorrect IP2Proxy BIN file format. Please make sure that you are using the latest IP2Proxy BIN file.'

0 commit comments

Comments
 (0)