Bug reports and pull requests are welcome on GitHub at https://github.com/omniauth/omniauth-identity . This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
To submit a patch, please fork the project and create a patch with tests. Once you're happy with it send a pull request.
Take a look at the reek
list which is the file called REEK
and find something to improve.
Simply follow these instructions:
- Fork the repository
- Create your feature branch (
git checkout -b my-new-feature
) - Make some fixes.
- Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
- Create new Pull Request.
Your picture could be here!
Made with contributors-img.
To refresh the reek
list:
bundle exec reek > REEK
BUNDLE_GEMFILE=Appraisal.root.gemfile appraisal update
NOTE: In order to run all the tests you will need to have the following databases installed, configured, and running.
- RethinkDB, an open source, real-time, web database, installed and running, e.g.
brew install rethinkdb rethinkdb
- MongoDB
brew tap mongodb/brew brew install [email protected] mongod --config /usr/local/etc/mongod.conf
- CouchDB - download the .app, or:
CouchDB 3.x requires a set admin password set before startup. Add one to your
brew install couchdb
$HOMEBREW_PREFIX/etc/local.ini
before starting CouchDB e.g.:Also add whatever password you set to your[admins] admin = yourabsolutesecret
.env.local
:Then start the CouchDB serviceexport COUCHDB_PASSWORD=yourabsolutesecret
brew services start couchdb
Now you can run any of the tests!
To run all tests on all databases (except RethinkDB):
bundle exec rake spec:orm:all
To run all tests that do not require any additional services, like MongoDB, CouchDB, or RethinkDB:
bundle exec rake test
To run a specific DB:
# CouchDB / CouchPotato
bundle exec rspec spec spec_orms --tag 'couchdb'
# ActiveRecord and Sequel, as they both use the in-memory SQLite driver.
bundle exec rspec spec spec_orms --tag 'sqlite3'
# NOTE - mongoid and nobrainer specs can't be isolated with "tag" because it still loads everything,
# and the two libraries are fundamentally incompatible.
# MongoDB / Mongoid
bundle exec rspec spec_orms/mongoid_spec.rb
# RethinkDB / NoBrainer (Ignored by CI! see spec file for reasons)
bundle exec rspec spec_ignored/nobrainer_spec.rb
Run all the default tasks, which includes running the gradually autocorrecting linter, rubocop-gradual
.
bundle exec rake
Or just run the linter.
bundle exec rubocop_gradual:autocorrect
IMPORTANT: Your public key for signing gems will need to be picked up by the line in the
gemspec
defining the spec.cert_chain
(check the relevant ENV variables there),
in order to sign the new release.
See: RubyGems Security Guide
- Run
bin/setup && bin/rake
as a tests, coverage, & linting sanity check - Update the version number in
version.rb
- Run
bin/setup && bin/rake
again as a secondary check, and to updateGemfile.lock
- Run
git commit -am "🔖 Prepare release v<VERSION>"
to commit the changes - Run
git push
to trigger the final CI pipeline before release, & merge PRs- NOTE: Remember to check the build!
- Run
export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME
- Run
git checkout $GIT_TRUNK_BRANCH_NAME
- Run
git pull origin $GIT_TRUNK_BRANCH_NAME
to ensure you will release the latest trunk code - Set
SOURCE_DATE_EPOCH
sorake build
andrake release
use same timestamp, and generate same checksums- Run
export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH
- If the echo above has no output, then it didn't work.
- Note that you'll need the
zsh/datetime
module, if runningzsh
. - In
bash
you can usedate +%s
instead, i.e.export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH
- Run
- Run
bundle exec rake build
- Run
bin/checksums
(more context) to create SHA-256 and SHA-512 checksums- Checksums will be committed automatically by the script, but not pushed
- 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