
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
OSRM Gem is a Ruby API that allows you to request Open Source Routing Machine servers. You can run your own server, use the OSRM demo server or the Mapbox server.
Install OSRM Gem
gem install osrm
Configure
require 'osrm'
OSRM.configure(
# Connection
server: 'example.com', # Must be specified
port: 8080, # Default: 80 or 443 if SSL
use_ssl: true, # Default: false
path_prefix: '/optional/path', # Default: ''
## OSRM demo server connection
# server: :demo,
## Mapbox server connection
# server: :mapbox,
# api_key: 'access-token',
# Connection (advanced)
timeout: 10, # Default: 3
user_agent: 'MyScript/1.1', # Default: 'OSRMRubyGem/{version}'
before_request: -> { sleep 1 }, # Default: nil
after_request: -> { puts 'Request performed!' }, # Default: nil
# Caching
# The cache can be any object providing [] and []= methods.
# The cache key must contain the {url} pattern.
cache: {}, # Default: nil (no cache)
cache_key: 'my-script:{url}', # Default: 'osrm:{url}'
# Requests
# Specify the precision of the overview geometries returned
overview: :full # Possible values: false, :simplified (default), :full
)
Request
OSRM.routes('50.202712,8.582738', '50.20232,8.574447')
OSRM.route('50.202712,8.582738', '50.20232,8.574447', '50.2099431,8.5710665')
OSRM.route_by_cycling('45.734818,7.3219649', '45.868829,7.1533417')
OSRM Gem is released under MIT License.
FAQs
Unknown package
We found that osrm 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 ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.