
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Country and Currency Code provides quick access to country and currency data via SOAP webservice provided by http://www.webservicex.net.
The data of all countries can be accessed directly via SOAP or be persisted and used via local database access.
Add this line to your application's Gemfile:
gem 'cccode'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cccode
After the gem is installed you need to create the country_codes table via the gem`s generator:
$ rails g cccode:install
$ rake db:migrate
Enable usage by adding this to your class/ ruby file:
require 'Cccode'
This section explains how to call the web service via SOAP directly. For quick access via local db see next section 'Database'.
Get all countries as an array:
Cccode.get_countries
Get country code by country:
Cccode.get_country_code(<country name>)
Get currency by country:
Cccode.get_currency(<country name>)
Get currency code by currency:
Cccode.get_currency_code(<currency name>)
Note: all these actions DO NOT persist the data. To achieve that see 'Database' section!
To get all available data at once and fill the database (reset is executed upfront):
Cccode.get_all
Reset (truncate) conutry_codes table:
Cccode.reset
Check if data exists:
Cccode::CountryCode.exists?
Get all data for a country:
data = Cccode::Codes.new(<country name>)
Example: data = Cccode::Codes.new('Germany') returns:
data.country = 'Germany'
data.country_code = 'de'
data.currency = 'Mark'
data.currency_code = 'DEM'
Bug reports and pull requests are welcome on GitHub at https://github.com/cherrystoned/cccode.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that cccode 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
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.