Skip to content

Commit

Permalink
Fixed file load error
Browse files Browse the repository at this point in the history
  • Loading branch information
ip2location committed Mar 8, 2024
1 parent c08a6bc commit 7f38241
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ source 'https://rubygems.org'

# Specify your gem's dependencies in ip2proxy_ruby.gemspec
gemspec
gem 'bindata'
gem 'bindata', "~> 2.4.15"
9 changes: 1 addition & 8 deletions example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,4 @@
print 'Provider: ' + record['provider'] + "\n"

# close IP2Proxy BIN database
i2p.close()

# Web Service
ws = Ip2proxyWebService.new('demo', 'PX11', true)
record = ws.lookup('1.2.3.4')
print record
print "\n"
print ws.get_credit()
i2p.close()
8 changes: 4 additions & 4 deletions ip2proxy_ruby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |s|
s.name = "ip2proxy_ruby"
s.version = "3.3.0"
s.version = "3.3.1"
s.authors = ["ip2location"]
s.email = ["[email protected]"]

Expand Down Expand Up @@ -49,18 +49,18 @@ Gem::Specification.new do |s|
s.specification_version = 4

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<bindata>, [">= 0"])
s.add_runtime_dependency(%q<bindata>, ["~> 2.4.15"])
s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
s.add_development_dependency(%q<rdoc>, [">= 6.3.1"])
s.add_development_dependency(%q<bundler>, [">= 1.2.0"])
else
s.add_dependency(%q<bindata>, [">= 0"])
s.add_dependency(%q<bindata>, ["~> 2.4.15"])
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
s.add_dependency(%q<rdoc>, [">= 6.3.1"])
s.add_dependency(%q<bundler>, [">= 1.2.0"])
end
else
s.add_dependency(%q<bindata>, [">= 0"])
s.add_dependency(%q<bindata>, ["~> 2.4.15"])
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
s.add_dependency(%q<rdoc>, [">= 6.3.1"])
s.add_dependency(%q<bundler>, [">= 1.2.0"])
Expand Down
2 changes: 1 addition & 1 deletion lib/ip2proxy_ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class Ip2proxy
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

VERSION = '3.3.0'
VERSION = '3.3.1'
FIELD_NOT_SUPPORTED = 'NOT SUPPORTED'
INVALID_IP_ADDRESS = 'INVALID IP ADDRESS'
INVALID_BIN_DATABASE = 'Incorrect IP2Proxy BIN file format. Please make sure that you are using the latest IP2Proxy BIN file.'
Expand Down

0 comments on commit 7f38241

Please sign in to comment.