
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
"Will It Rain?" uses forecast_io to determine whether or not it will rain (precipitate, more specifically) at a particular location today. This gem was created primarily to isolate logic from a larger project. I hope it helps you in your weather-related Ruby application.
Different data points are collected from the current day. For each data point, the probability of precipitation is considered. If any data point exceeds the threshold, it is considered a "rain day."
Add the following to your Gemfile and install:
gem 'will_it_rain'
You will first need to signup on forecast.io and get an API key. You can set the key as a FORECAST_IO_API_KEY
environment variable; alternatively you can set the API key in the following way:
require 'forecast_io'
ForecastIO.api_key = your_api_key
Find out if there is a chance of rain today:
WillItRain.at_location?(latitude, longitude) # returns boolean
The above checks for rain-chances greater than 10% by default. Here is how you can check if chance of rain today is greater than 25%:
WillItRain.at_location?(latitude, longitude, 25)
Get likelihood of precipitation along with percentage:
WillItRain.with_chances(latitude, longitude) # returns {it_will_rain: boolean, chances: percentage_string}
WillItRain.with_chances(latitude, longitude, 5) # compare with a value other than 10%
Get readable summaries of daily data points where precipitation probability exceeds 10%:
WillItRain.get_summaries(latitude, longitude) # returns array of readable summaries
WillItRain.get_summaries(latitude, longitude, 25) # adjust default threshold
FAQs
Unknown package
We found that will_it_rain 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.