Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/google-maps-directions.rb
. To experiment with that code, run bin/console
for an interactive prompt.
TODO: Delete this and the text above, and describe your gem
Add this line to your application's Gemfile:
gem 'google-maps-directions'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install google-maps-directions
TODO: Write usage instructions here
GoogleMaps::Directions.configure
yields config to a block in which you can supply a valid API key with access to the Googlemaps Directions API, and set any default options.
New instances of GoogleMaps::Directions::Request
will use this config unless they are overridden in individual
requests (via Client.new.directions
options)
Example config to set API key and default options for all API requests
# config/initializers/google_maps-directions.rb
GoogleMaps::Directions.configure do |config|
config.api_key = ENV['GOOGLEMAPS_API_KEY']
config.default_options = { region: 'uk', alternatives: true }
end
After checking out the repo, run bin/setup
to install dependencies. 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 the created tag, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/google-maps-directions.
The gem is available as open source under the terms of the MIT License.