# ActiveRecord CipherStash PostgreSQL Adapter An adapter to allow the use of the CipherStash libpq fork for encryption of data in your PostgreSQL databases. This adapter supports Rails 6 & 7. ## Installation Add this line to your application's Gemfile: ```ruby gem 'activerecord-cipherstash-pg-adapter' ``` Remove `gem 'pg'` from your Gemfile. In `database.yml`, use the following adapter setting: ```yaml development: adapter: postgres_cipherstash # ... username, password, etc. as you would with postgres as normal. ``` ## 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 release a new version: - update the version number in `version.rb`. - update the CHANGELOG. - raise a PR and merge. - 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](https://rubygems.org). In the github repo: - Click on releases. - Click on `Draft a new release`. - Select the created tag from the `Choose a tag` dropdown. - Click on `Generate release notes` - Click on `Publish release`. ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/cipherstash/activerecord-cipherstash-pg-adapter