A project to build source of truth across languages
Ruby 100.00%
constants's Introduction
Constants
Goals
a single repo from which we can publish a Ruby gem as well as a Node package (and maybe others someday)
a single source of truth โ such as one or more JSON files โ with a build process to generate the gem and the package from it
automated deploys to the respective package managers' repositories
Desired usage in consuming apps
Ruby
require'constants'putsConstants::Math::PI
Javascript
import{Math}from"constants"console.log(Math.PI)
Desired workflow for updating and publishing
# update the source of truth
vi source-of-truth/math.json
# rebuild the packages in all languages
rake build
# publish new versions to the package mgr repos
rake publish