Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
This gem provides easy access to the fuel prices for many gas stations in The Netherlands. Prices are taken from brandstofprijzen.info.
Add this line to your application's Gemfile:
gem 'nl_gas_stations'
And then execute:
bundle
Or install it yourself as:
gem install nl_gas_stations
NlGasStations.configure do |config|
# It is recommended to use a cache, to avoid flooding the source website with requests.
# Leave this out of the configuration to not use the cache.
# This must be a cache object (with read, write and fetch methods).
config.cache = Rails.cache
# If you are using the cache you can set a custom cache key prefix.
# Default value: nl_gas_stations_
# config.cache_prefix = 'custom_prefix'
# Duration of how long data should be cached. Example: 14.days
# Default value: 7.days
config.cache_expires_in = 48.hours
end
Find multiple stations by providing a postal code (the numbers only), fuel type and an optional distance in kilometers. The default distance is 5 km. Distance must be 5, 10, 15 or 25.
The fuel type must be one of the following: :diesel
, :euro_95
, :lpg
or :cng
.
Call NlGasStations.fuel_types
to get all types returned as a hash.
# postal_code, fuel_type, distance
stations = NlGasStations.find_stations('1234', 'Euro 95', 15)
station_1 = stations.first
station_1[:gas_station][:name] #=> 'Gas Station Name Here'
station_1[:gas_station][:street_address] #=> 'Streetaddress 13a'
station_1[:gas_station][:postal_code] #=> '1234 AA'
station_1[:gas_station][:city] #=> 'AMSTERDAM'
station_1[:fuel_type] #=> :euro_95
station_1[:price] #=> 1.543
station_1[:date] #=> Date.new(2015, 2, 12)
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that nl_gas_stations 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.