New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

spree_ip_geo

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spree_ip_geo

  • 3.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

SpreeIpGeo

Geo IP gem look up the city, state, country information with given IP address and store it in database as a cache. It provides helper function calls to other gems or your application code.

You will need account from maxmind.com, have purchase the queries for GeoIP2 Precision: City to use this gem.

call country_id to get the country id state_code to ge the country iso code country_code_from_ip(ip) state_code_from_ip(ip) city_from_ip(ip) in your view templates.

Installation

Add spree_ip_geo to your Gemfile:

gem 'spree_ip_geo'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g spree_ip_geo:install

Testing

First bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app.

bundle
bundle exec rake

When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:

require 'spree_ip_geo/factories'

Copyright (c) 2015 naturalwellbeing.com, released under the New BSD License

FAQs

Package last updated on 18 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc