README.md in vault-tools-0.5.5 vs README.md in vault-tools-0.5.6
- old
+ new
@@ -3,53 +3,96 @@
Tools is the English word for ツール. Tooling for the Heroku Vault
team to enable faster bootstrapping for Ruby projects.
[](https://travis-ci.org/heroku/vault-tools)
-## Setting up a development environment
+## Installation
-Install the dependencies:
+Add this line to your application's Gemfile:
- bundle install --binstubs vendor/bin
- rbenv rehash
+ gem 'vault-tools'
-Run the tests:
- vendor/bin/t
+## Usage
-Generate the API documentation:
+### `Vault.setup`
- vendor/bin/d
+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`
-## Installation
-Add this line to your application's Gemfile:
+### `Vault::Config`
- gem 'vault-tools'
+Provides a better way to configure the application than simply pulling
+strings from `ENV`.
+#### defaults
-## Usage
+```ruby
+Config[:foo]
+# => nil
-### Logging
+Config.default(:foo, 'bar')
+Config[:foo]
+# => 'bar'
+Config['FOO']
+# => 'bar'
+```
+#### type casts
+
+Returns `nil` when undefined, otherwise casts to indicated type.
+
```ruby
+Config.int(:max_connections)
+```
+
+### `Vault::Log`
+
+```ruby
Log.time(name, t)
# => "measure=true at=web-40"
Log.count('foo')
# => "measure=true at=foo"
```
-### Sinatra base class
+### `Vault::Web`
+Sinatra base class
+
Includes request logging and health endpoints
```ruby
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
+
+
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)