
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
= has_addresses
+has_addresses+ demonstrates a reference implementation for handling countries, regions, and addresses.
== Resources
API
Bugs
Development
Source
== Description
Countries, regions, and addresses are all simple models whose data and functionality should be able to be standardized across multiple applications. has_addresses adds support for countries and regions based on the ISO 3166 and ISO 3166-2 standard. The data for these standards is obtained through the open-source Debian package, iso-codes.
Along with the simple Country and Region models, addresses can be defined and integrated based on the data in these models. Addresses are minimalistic in terms of the type of data required.
== Usage
Note that this is a reference implementation and, most likely, should be modified for your own usage.
=== Installation
+has_addresses+ requires additional database tables to work. You can generate a migration for these tables like so:
script/generate has_addresses
Then simply migrate your database:
rake db:migrate
=== Example
address = Address.new( :street_1 => '1600 Amphitheatre Parkway', :city => 'Mountain View', :region => 'US-CA', :postal_code => '94043' ) address.single_line # => "1600 Amphitheatre Parkway, Mountain View, California 94043, United States"
== Testing
Before you can run any tests, the following gem must be installed:
To run against a specific version of Rails:
rake test RAILS_FRAMEWORK_ROOT=/path/to/rails
== Dependencies
FAQs
Unknown package
We found that has_addresses demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.