Git Product home page Git Product logo

vault-tools's Introduction

Vault::Tools

Tools is the English word for ツール. Tooling for the Heroku Vault team to enable faster bootstrapping for Ruby projects.

CircleCI

Installation

Add this line to your application's Gemfile:

gem 'vault-tools'

Usage

Vault.setup

calling Vault.setup will:

  • call Bundler.require with the corresponding RACK_ENV
  • add ./lib to the $LOAD_PATH
  • set TZ to utc as well as Sequel's default timezone
  • overwrite Time.to_s to default to ISO8601
  • replace Ruby's default, deprecated Config with Vault::Config
  • if the CONFIG_APP environment variable is defined and this is the production environment, it will attempt to use the Heroku API to load the config vars from another app into Vault::Config

Vault::Config

Provides a better way to configure the application than simply pulling strings from ENV.

defaults

Config[:foo]
# => nil

Config.default(:foo, 'bar')
Config[:foo]
# => 'bar'
Config['FOO']
# => 'bar'

type casts

Returns nil when undefined, otherwise casts to indicated type.

Config.int(:max_connections)

Vault::Log

  Log.time(name, t)
  #  => "measure=true at=web-40"

  Log.count('foo')
  #  => "measure=true at=foo"

Vault::Web

Sinatra base class

Includes request logging and health endpoints

  class Web < Vault::Web
    helpers Vault::SinatraHelpers::HtmlSerializer
  end

Setting up a development environment

Install the dependencies:

bundle install --binstubs vendor/bin
rbenv rehash

Run the tests:

vendor/bin/t

Generate the API documentation:

vendor/bin/d

Releasing

> bundle exec rake release

Release Notes

Version 2.1.1 (2022-01-06): - Added tooling to support metadata tags on request status metrics. - Reverted change to minimum supported ruby version. Version 2.1.0 (2021-08-26): guard-minitest was removed due to it causing problems with the ruby version upgrade. Was not actively used anymore. Hasn't been updated in a long time.

vault-tools's People

Contributors

adovenmuehle avatar benjamindenton-hub avatar crawfoal avatar csquared avatar danp avatar dependabot[bot] avatar jkakar avatar jroes avatar kennyp avatar mattmanning avatar maxbeizer avatar mgomes avatar mwhagedorn avatar rmcafee avatar stellaconyer avatar svc-scm avatar will avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.