Sha256: 694661cbd0a52dbb4e6c5d2e38e4000f3283bd3096792ba4ec39143e90e87863

Contents?: true

Size: 814 Bytes

Versions: 2

Compression:

Stored size: 814 Bytes

Contents

#!/usr/bin/env ruby

require "bundler/setup"
require "jdx/geocoder"
require 'redis'
require 'dotenv/load'

module ErrorHandler
  def self.warning(*params)
    puts params
  end

  def self.error(*params)
    puts params
  end

  def self.info(*params)
    puts params
  end
end

JDX::Geocoder.configure do |c|
  c.ipapi_key = ENV['IPAPI_KEY']
  c.google_key = ENV['GOOGLE_KEY']
  c.location_cache_db = Redis.new(url: ENV['LOCATION_REDIS_URL'])
  c.ip_cache_db = Redis.new(url: ENV['IP_REDIS_URL'])
  c.error_handler = ErrorHandler
end

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.

# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start

require "irb"
IRB.start(__FILE__)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jdx-geocoder-0.1.1 bin/console
jdx-geocoder-0.1.0 bin/console