README.md in omniauth-identity-3.0.6 vs README.md in omniauth-identity-3.0.7

- old
+ new

@@ -91,12 +91,12 @@ Just include `OmniAuth::Identity::Models::Sequel` mixin, and specify whatever else you will need. ```ruby -class SequelTestIdentity < Sequel::Model - include OmniAuth::Identity::Models::Sequel +class SequelTestIdentity < Sequel::Model(:identities) + include ::OmniAuth::Identity::Models::Sequel auth_key :email # whatever else you want! end ``` @@ -106,12 +106,12 @@ Include the `OmniAuth::Identity::Models::Mongoid` mixin and specify fields that you will need. ```ruby class Identity - include Mongoid::Document - include OmniAuth::Identity::Models::Mongoid + include ::Mongoid::Document + include ::OmniAuth::Identity::Models::Mongoid field :email, type: String field :name, type: String field :password_digest, type: String end @@ -122,12 +122,13 @@ Include the `OmniAuth::Identity::Models::CouchPotatoModule` mixin and specify fields that you will need. ```ruby class Identity - include CouchPotato::Persistence - include OmniAuth::Identity::Models::CouchPotatoModule + # NOTE: CouchPotato::Persistence must be included before OmniAuth::Identity::Models::CouchPotatoModule + include ::CouchPotato::Persistence + include ::OmniAuth::Identity::Models::CouchPotatoModule property :email property :password_digest def self.where(search_hash) @@ -145,12 +146,12 @@ Include the `OmniAuth::Identity::Models::NoBrainer` mixin and specify fields that you will need. ```ruby class Identity - include NoBrainer::Document - include OmniAuth::Identity::Models::NoBrainer + include ::NoBrainer::Document + include ::OmniAuth::Identity::Models::NoBrainer auth_key :email end ``` @@ -262,9 +263,52 @@ option :on_failed_registration, nil # See #registration_phase option :locate_conditions, ->(req) { { model.auth_key => req['auth_key'] } } ``` Please contribute some documentation if you have the gumption! The maintainer's time is limited, and sometimes the authors of PRs with new options don't update the _this_ readme. 😭 + +## Contributing + +1. Fork it +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am ‘Added some feature’`) +4. Push to the branch (`git push origin my-new-feature`) +5. Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally. + - NOTE: In order to run *all* the tests you will need to have the following databases installed, configured, and running. + 1. [RethinkDB](https://rethinkdb.com), an open source, real-time, web database, [installed](https://rethinkdb.com/docs/install/) and [running](https://rethinkdb.com/docs/start-a-server/), e.g. + ```bash + brew install rethinkdb + rethinkdb + ``` + 2. [MongoDB](https://docs.mongodb.com/manual/administration/install-community/) + ```bash + brew tap mongodb/brew + brew install mongodb-community@4.4 + mongod --config /usr/local/etc/mongod.conf + ``` + 3. [CouchDB](https://couchdb.apache.org) (download the .app) + To run all tests on all databases: + ```bash + bundle exec rake + ``` + To run a specific DB: + ```bash + # 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 + bundle exec rspec spec_orms/nobrainer_spec.rb + ``` +6. Create new Pull Request ## License MIT License. See LICENSE for details.