
Security News
Rspack Introduces Rslint, a TypeScript-First Linter Written in Go
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
This gem provides a (for now) very opinionated interface to World Weather Online's API. It's based heavily on the forecast-ruby gem by David Czarnecki and was bourne out of the need to have a drop in replacemnet for Forecast.io in an application.
The plan is to enhance this over time so that it supports more of WWO's API and is a bit more developer friendly. Right now, however, there are the following assumptions / options that you need to be aware of:
forecast.io
. This is intentional -
remember that we intend this to be (for now), a drop-in replacement for forecast.io.Add this line to your application's Gemfile:
gem 'wwo'
And then execute:
$ bundle
Or install it yourself as:
$ gem install wwo
Basic usage is just like the forecast gem. For example, if you were calling the API from a Rails action, you might want to do this:
Wwo.configure do |configuration|
configuration.api_key = 'this-is-your-api-key'
configuration.use_premium_api = true # default is false
end
Wwo.connection = Faraday.new do |builder|
builder.use Faraday::HttpCache, store: Rails.cache, serializer: Marshal
builder.adapter Faraday.default_adapter
end
weather = Wwo.forecast(latitude, longitude, time: timestamp)
The forecast
method provides API compatibilty with forecast-ruby
. We also expose historic
for any
past weather and now_or_future
for any forecasting that is required.
We also play around with the response we get back from WWO so that it is in the same structure as the response from the Dark Sky API. The main difference is that the icon names will be the actual URLs to icon images served from WWO's CDN.
After checking out the repo, 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/sujrd/wwo. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that wwo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.