
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Based on an amazing work of OpenCage Data who collected so many international formats of postal addresses, this is a Ruby implementation of that formatter.
The goal of this gem is processing the output of ruby_postal
Add this line to your application's Gemfile:
gem 'address_composer'
And then execute:
$ bundle
Or install it yourself as:
$ gem install address_composer
require "address_composer"
address_components = {
"house_number" => 301,
"road" => "Hamilton Avenue",
"neighbourhood" => "Crescent Park",
"city" => "Palo Alto",
"postcode" => 94303,
"county" => "Santa Clara County",
"state" => "California",
"country" => "United States of America",
"country_code" => "US"
}
puts AddressComposer.compose(address_components)
301 Hamilton Avenue
Palo Alto, CA 94303
United States of America
You can also control whether the output should be abbreviated or not by passing should_abbreviate
:
require "address_composer"
address_components = {
"house_number" => 301,
"road" => "Hamilton Avenue",
"neighbourhood" => "Crescent Park",
"city" => "Palo Alto",
"postcode" => 94303,
"county" => "Santa Clara County",
"state" => "California",
"country" => "United States of America",
"country_code" => "US",
"should_abbreviate" => true
}
puts AddressComposer.compose(address_components)
301 Hamilton Ave
Palo Alto, CA 94303
United States of America
After checking out the repo, run git submodule init
and git submodule update
to fetch all the data from the submodule project and check out the mapped commit.
Then, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/mirubiri/address_composer
Many thanks to these implementations:
FAQs
Unknown package
We found that address_composer demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.