vault-rails 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +2 -0
  3. data/lib/vault/encrypted_model.rb +3 -0
  4. data/lib/vault/rails/configurable.rb +3 -0
  5. data/lib/vault/rails/errors.rb +3 -0
  6. data/lib/vault/rails/json_serializer.rb +3 -0
  7. data/lib/vault/rails/version.rb +4 -1
  8. data/lib/vault/rails.rb +3 -0
  9. data/spec/dummy/app/models/lazy_person.rb +3 -0
  10. data/spec/dummy/app/models/lazy_single_person.rb +3 -0
  11. data/spec/dummy/app/models/person.rb +3 -0
  12. data/spec/dummy/config/application.rb +3 -0
  13. data/spec/dummy/config/boot.rb +3 -0
  14. data/spec/dummy/config/database.yml +7 -5
  15. data/spec/dummy/config/environment.rb +3 -0
  16. data/spec/dummy/config/environments/development.rb +3 -0
  17. data/spec/dummy/config/environments/test.rb +3 -0
  18. data/spec/dummy/config/initializers/assets.rb +3 -0
  19. data/spec/dummy/config/initializers/backtrace_silencers.rb +3 -0
  20. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  21. data/spec/dummy/config/initializers/filter_parameter_logging.rb +3 -0
  22. data/spec/dummy/config/initializers/inflections.rb +3 -0
  23. data/spec/dummy/config/initializers/mime_types.rb +3 -0
  24. data/spec/dummy/config/initializers/session_store.rb +3 -0
  25. data/spec/dummy/config/initializers/vault.rb +3 -0
  26. data/spec/dummy/config/initializers/wrap_parameters.rb +3 -0
  27. data/spec/dummy/config/locales/en.yml +3 -0
  28. data/spec/dummy/config/routes.rb +3 -0
  29. data/spec/dummy/config/secrets.yml +3 -0
  30. data/spec/dummy/config.ru +3 -0
  31. data/spec/dummy/db/development.sqlite3 +0 -0
  32. data/spec/dummy/db/migrate/20150428220101_create_people.rb +3 -0
  33. data/spec/dummy/db/schema.rb +3 -0
  34. data/spec/dummy/db/test.sqlite3 +0 -0
  35. data/spec/dummy/lib/binary_serializer.rb +3 -0
  36. data/spec/dummy/log/development.log +1637 -0
  37. data/spec/dummy/log/test.log +400 -0
  38. data/spec/dummy/public/404.html +5 -0
  39. data/spec/dummy/public/422.html +5 -0
  40. data/spec/dummy/public/500.html +5 -0
  41. data/spec/integration/rails_spec.rb +5 -2
  42. data/spec/lib/vault/rails/json_serializer_spec.rb +3 -0
  43. data/spec/spec_helper.rb +3 -0
  44. data/spec/support/vault_server.rb +38 -10
  45. data/spec/unit/encrypted_model_spec.rb +3 -0
  46. data/spec/unit/rails/configurable_spec.rb +3 -0
  47. data/spec/unit/rails_spec.rb +3 -0
  48. data/spec/unit/vault/rails_spec.rb +3 -0
  49. metadata +17 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d1495e96fb575962f54ab1046322ba914262ccd1c6510608969098910b26722
4
- data.tar.gz: 0a8c14b4e9b9657c8c3d8d69130a7ffd322ee12110df6f19058b612e7951c547
3
+ metadata.gz: c055664571a8c3823f5628d70a444685157ac01635896d286ae6fadba332507c
4
+ data.tar.gz: e40a6d7dccccb60d82bf0ac941233a3ce1cb8f623d30ccc3d71b317ec3fbb392
5
5
  SHA512:
6
- metadata.gz: a4864910f4373d375b1950b98f97fab013b4954939fabdb0cadede4fc1e22d082c5e6658621c03b163964b64de7d33695f02538bd4f6ac89bd2c37f228a0b0f5
7
- data.tar.gz: 3484a4c69580aeb6095b3b488ef8f8ed40fc0bb892f33104ad4dd8d852b8d403b6a0c70240264b9347fde8fbe1065e97d51d1b344c0972bc0407b7ef235c046b
6
+ metadata.gz: 5b0b4e77c0c06bf3185db3e255aaeb1d184a2fe2c3c422e507d77e1099c85af0bf02b64ff69fe2941950c645572d53ed9705433d99be9e4ff92d60e95412affb
7
+ data.tar.gz: 6fe948db7a47f95b2b961102ef476ae339b1b6f8ffe0fcecb08c8aaad1b9df19d611efe31a42835de8a8080ef38e4bf7bf9188f3e089c539ab14edb2aea4cf07
data/LICENSE CHANGED
@@ -1,3 +1,5 @@
1
+ Copyright (c) 2015 HashiCorp, Inc.
2
+
1
3
  Mozilla Public License, version 2.0
2
4
 
3
5
  1. Definitions
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  require "active_support/concern"
2
5
 
3
6
  module Vault
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  module Vault
2
5
  module Rails
3
6
  module Configurable
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  module Vault
2
5
  module Rails
3
6
  class VaultRailsError < RuntimeError; end
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  module Vault
2
5
  module Rails
3
6
  module JSONSerializer
@@ -1,5 +1,8 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  module Vault
2
5
  module Rails
3
- VERSION = "0.8.0"
6
+ VERSION = "0.9.0"
4
7
  end
5
8
  end
data/lib/vault/rails.rb CHANGED
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  require "vault"
2
5
 
3
6
  require "base64"
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  require "binary_serializer"
2
5
 
3
6
  class LazyPerson < ActiveRecord::Base
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
 
2
5
  class LazySinglePerson < ActiveRecord::Base
3
6
  include Vault::EncryptedModel
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  require "binary_serializer"
2
5
 
3
6
  class Person < ActiveRecord::Base
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  require File.expand_path('../boot', __FILE__)
2
5
 
3
6
  # Pick the frameworks you want:
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  # Set up gems listed in the Gemfile.
2
5
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
6
 
@@ -1,12 +1,14 @@
1
- default: &default
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
4
+ development:
2
5
  adapter: sqlite3
3
6
  pool: 5
4
7
  timeout: 5000
5
-
6
- development:
7
- <<: *default
8
8
  database: db/development.sqlite3
9
9
 
10
10
  test:
11
- <<: *default
11
+ adapter: sqlite3
12
+ pool: 5
13
+ timeout: 5000
12
14
  database: db/test.sqlite3
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  # Load the Rails application.
2
5
  require File.expand_path('../application', __FILE__)
3
6
 
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  Rails.application.configure do
2
5
  # Settings specified here will take precedence over those in config/application.rb.
3
6
 
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  Rails.application.configure do
2
5
  # Settings specified here will take precedence over those in config/application.rb.
3
6
 
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  # Be sure to restart your server when you modify this file.
2
5
 
3
6
  # Version of your assets, change this if you want to expire all your assets.
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  # Be sure to restart your server when you modify this file.
2
5
 
3
6
  # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  # Be sure to restart your server when you modify this file.
2
5
 
3
6
  Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  # Be sure to restart your server when you modify this file.
2
5
 
3
6
  # Configure sensitive parameters which will be filtered from the log file.
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  # Be sure to restart your server when you modify this file.
2
5
 
3
6
  # Add new inflection rules using the following format. Inflections
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  # Be sure to restart your server when you modify this file.
2
5
 
3
6
  # Add new mime types for use in respond_to blocks:
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  # Be sure to restart your server when you modify this file.
2
5
 
3
6
  Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  require "vault/rails"
2
5
 
3
6
  require_relative "../../../support/vault_server"
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  # Be sure to restart your server when you modify this file.
2
5
 
3
6
  # This file contains settings for ActionController::ParamsWrapper which
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  # Files in the config/locales directory are used for internationalization
2
5
  # and are automatically loaded by Rails. If you want to use locales other
3
6
  # than English, add the necessary files in this directory.
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  Rails.application.routes.draw do
2
5
 
3
6
  end
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  # Be sure to restart your server when you modify this file.
2
5
 
3
6
  # Your secret key is used for verifying the integrity of signed cookies.
data/spec/dummy/config.ru CHANGED
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  # This file is used by Rack-based servers to start the application.
2
5
 
3
6
  require ::File.expand_path('../config/environment', __FILE__)
Binary file
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  class CreatePeople < ActiveRecord::Migration[4.2]
2
5
  def change
3
6
  create_table :people do |t|
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  # This file is auto-generated from the current state of the database. Instead
2
5
  # of editing this file, please use the migrations feature of Active Record to
3
6
  # incrementally modify your database, and then regenerate this schema definition.
Binary file
@@ -1,3 +1,6 @@
1
+ # Copyright (c) HashiCorp, Inc.
2
+ # SPDX-License-Identifier: MPL-2.0
3
+
1
4
  # Encodes and decodes binary data.
2
5
  module BinarySerializer
3
6
  def self.encode(raw)