Pont
pont is French for "bridge"
This repository contains code that:
- Behaves well in both Ruby 2.4.10 & 3.1.0
- Is used in both soleil & garcon
- Is relatively dependency free, or uses dependencies shared by soleil & garcon
- Is probably going to be short lived (moved to soleil only at some point)
Installation
Add this line to your application's Gemfile:
gem 'pont', git: 'https://github.com/DWPHoldings/pont.git', branch: 'main'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install pont
Usage
In order to use pont locally, you need to configure your local system to allow bundler to use a personal access token.
Soleil & Garcon are configured to use a shared access token that was generated using the InspireOps account. If you attempt to set up pont in another repository please use an InspireOps token. Do not share one of your personal tokens on Github Actions or on our Heroku app. The
repo
access grants access to all of your repositories and you don't want to do that. The InspireOps account has limited access and is our "machine" account
To generate a new personal token:
- Visit the New personal access token page
- Fill in the Note with
inspire_bundle_github__com
or something descriptive - Set the Expiration to something you're comfortable with (if you don't choose No expiration you'll have to regenerate this periodically)
- Copy the token value (referenced as
<token>
in subsequent commands) - Set the token up:
- Globally:
bundle config --global github.com <token>
- This works for all repositories on your local machine and can be run from any directory
- Locally:
bundle config --local github.com <token>
- This only works in one repository on your local machine and must be run from the root of the repository directory you want to have access to the token
- Globally:
- Validate the token is set
- Globally:
cat ~/.bundle/config
and see the token in the output - Locally:
cat .bundle/config
and see the token in the output
- Globally:
Ensure that whichever option you chose, the token isn't saved in a file that is committed.
Development
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 the created tag, and push the .gem
file to rubygems.org.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/DWPHoldings/pont. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
License
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the Pont project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.