Skip to content

Commit

Permalink
Merge pull request #82 from hashicorp/release-notes-0.5.0
Browse files Browse the repository at this point in the history
Bump version to 0.5.0 w/ changelog
  • Loading branch information
justincampbell committed Jun 20, 2019
2 parents b17ed1b + 56ac8e3 commit b2c9794
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
# Vault Rails Changelog

## v0.5.0 (June 20th, 2019)

IMPROVEMENTS

- Added support for Vault Transit derived keys with the `:context` option. [GH-78]
- Added a `:default` option to `vault_attribute`. [GH-83]

BREAKING CHANGES

- Dropped support for Ruby < 2.4, Rails < 4.2. [GH-79]
- Null and empty types were previously deserialized to an empty JSON object (`{}`). They will now be properly deserialized as `null`, empty string (`""`), and so on. To preserve the old behavior, add `default: {}` to JSON-serialized attributes. [GH-81]

BUG FIXES

- Fixed uniqueness of generated key for in-memory operations. [GH-80]

## v0.4.0 (November 9, 2017)

- Update supported Ruby and Rails versions [GH-50]
- Ruby
- Added 2.4.2
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,22 @@ person.ssn # Vault communication happens here
# => "123-45-6789"
```

#### Automatic serializing
#### Serialization

By default, all values are assumed to be "text" fields in the database. Sometimes it is beneficial for your application to work with a more flexible data structure (such as a Hash or Array). Vault-rails can automatically serialize and deserialize these structures for you:

```ruby
vault_attribute :details,
serialize: :json
serialize: :json,
default: {}
```

It is recommended to set a default matching type that you're serializing.

- **Note** You can view the source for the exact serialization and deserialization options, but they are intentionally not customizable and cannot be used for a full object marshal/unmarshal.

##### Custom Serializers

For customized solutions, you can also pass a module to the `:serializer` key. This module must have the following API:

```ruby
Expand Down
2 changes: 1 addition & 1 deletion lib/vault/rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Vault
module Rails
VERSION = "0.4.0"
VERSION = "0.5.0"
end
end

0 comments on commit b2c9794

Please sign in to comment.