GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cipherstash-archive/orm_adapter-activestash: A minimal orm_adapter backend for ActiveStash

This repository was archived by the owner on Dec 1, 2022. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
lib/orm_adapter
lib/orm_adapter
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.tool-versions
.tool-versions
 
 
.yardopts
.yardopts
 
 
CODEOWNERS
CODEOWNERS
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Gemfile
Gemfile
 
 
LICENCE
LICENCE
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
orm_adapter-activestash.gemspec
orm_adapter-activestash.gemspec
 
 

Repository files navigation

This is a (partial) orm_adapter backend for ActiveStash, the ActiveRecord adapter for the CipherStash encrypted, searchable data store. Only those methods which have been needed for real-world ActiveStash usage to date have been implemented. PRs for the remaining methods are appreciated, and should be fairly straightforward.

Installation

The basic option is to install it as a gem directly:

gem install orm_adapter-activestash

There's also the wonders of the Gemfile:

gem 'orm_adapter-activestash'

If you're the sturdy type that likes to run from git:

rake install

Or, if you've eschewed the convenience of Rubygems entirely, then you presumably know what to do already.

Usage

In general, it should be sufficient to load the ActiveStash orm_adapter backend:

require "orm_adapter/activestash"

Then use your ActiveStash::Search-enabled models in the usual way, mixing encrypted and plaintext fields as you wish:

class User < ActiveRecord::Base
  include ActiveStash::Search

  has_encrypted :first_name, type: :string
  has_encrypted :last_name, type: :string

  stash_index :first_name, :last_name
end

# Can query on indexed, encrypted fields
User.to_adapter.find_first(first_name: "Jean", last_name: "Doe")

# Can query on unencrypted fields
User.to_adapter.find_first(employee: true)

# Can also query on a *mix* of encrypted and unencrypted fields
User.to_adapter.find_first(employee: true, first_name: "Jean")

Contributing

Please see CONTRIBUTING.md for general contribution guidelines.

Making a Release

If you have push access to the GitHub repository, you can make a release by doing the following:

  1. Run git version-bump -n <major|minor|patch> (see the semver spec for what each of major, minor, and patch version bumps represent).

  2. Write a changelog for the release, in Git commit style (headline on the first line, blank line, then Markdown text as you see fit). Save/exit your editor. This will automatically push the newly-created annotated tag, which will in turn kick off a release build of the gem and push it to RubyGems.org.

  3. Run rake release to automagically create a new GitHub release for the project.

... and that's it!

Licence

Unless otherwise stated, everything in this repo is covered by the following copyright notice:

Copyright (C) 2022  CipherStash Inc.

This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License version 3, as
published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

About

A minimal orm_adapter backend for ActiveStash

Topics

cipherstashencryptionrailsrubysearch

Resources

Readme
GPL-3.0 license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.