Ravn
home | |
code | |
docs |
Description
This is the base namespace for Ravn
Ruby libraries. It contains utility functions, classes, and mixins common to all Ruby libraries at Ravn
as well as the top-level namespace module (Ravn
) which contains them.
Prerequisites
-
Ruby ~> 3.1
-
nacl or libsodium
Installation
$ gem install ravn
Development
You can check out the current source with Git via Github:
$ git clone git@github.com:RavnGroup/ravn.git $ cd ravn
After checking out the source, run:
$ gem install -Ng $ rake setup
This will install dependencies, and do any other necessary setup for development.
Docker
First you have to set up some environment variables:
$ export GH_USERNAME=[your username on github for pushing images] $ export GH_REGISTRY_TOKEN=[github PAT with docker registry permissions]
Once these are setup you can run a series of docker commands that will build a linux image with Ruby, install the gems in ‘vendor/’ and run the specs:
$ rake docker
If you want to run just the specs via this container, you can use the ‘docker:spec’ command:
$ rake docker:spec
By default these will build whatever version is in the Dockerfile (3.1.2 at the time of this writing, unless you have RUBY_VERSION set in your environment, in which case it’ll be that), but you can have it build using a different Ruby base image by passing in a version beforehand (see hub.docker.com/_/ruby for applicable versions):
$ RUBY_VERSION=3.2-rc rake docker
If you made changes to the docker build you can publish them with the ‘docker:publish’ command:
$ RUBY_VERSION=3.1.2 rake docker:publish
This will build the image, install gems in ‘vendor/’, run the specs and then push the image up to github’s docker registry. If you also want to tag this as ‘latest’, you can do that and push that up (latest tag is not currently used, but might be used for other types of tests, *probably want to set this to a Ruby release and not a beta or release candidate build)
$ RUBY_VERSION=3.1.2 rake docker:publish_latest
The workflow would be to make changes to the Dockerfile and/or .github/workflows/ruby.yml and then do ‘rake docker’ to see if your changes work. If it does you then do ‘rake docker:publish’ and almost immediately commit and push your changes. The docker images have to be pushed before the code that relies on them.
Authors
-
Michael Granger ged@faeriemud.org
License
Copyright © 2020-2022, Ravn
Inc. All rights reserved.
SBIR DATA RIGHTS Contract No. FA8649-19-9-9031 Contractor Name: Ravn Inc. Contractor Address: 548 Market Street, PMB 80382, San Francisco, CA 94104, United States Expiration of SBIR Data Rights Period: 7 August 2039 The Government's rights to use, modify, reproduce, release, perform, display, or disclose technical data or computer software marked with this legend are restricted during the period shown as provided in paragraph (b)(4) of the Rights in Noncommercial Technical Data and Computer Software—Small Business Innovation Research (SBIR) Program clause contained in the above identified contract. No restrictions apply after the expiration date shown above. Any reproduction of technical data, computer software, or portions thereof marked with this legend must also reproduce the markings.