acts_as_encryptable 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd3645c421c930f061027f4e925adc58d428dd16
4
- data.tar.gz: d6a945aa8b5f0073b4557d0c722dcc9977896301
3
+ metadata.gz: ee5d3cc0b5cbdacb22cbf522f49b8178e6d448c5
4
+ data.tar.gz: 4990c13097dba9c1573a251de6a93176eabcd818
5
5
  SHA512:
6
- metadata.gz: 140516b6ee840faa1eed51774fa839d6d0226486bc8c43eacf1bfdf61548e558f588be0cbb1865c6748ffaa4d5f1ab25aa8311d25cf5ea87531301f19644a6fe
7
- data.tar.gz: d0b0268d67e53084a3b9fc0b5933c58968ce9c0e96765b6de8ca329ed50330f35b172cc46215e9a37a6df9ed75b84cb2f26bc6da81d2686d4f5c4d4bf1630faa
6
+ metadata.gz: '0749f5a82b07583f9179e7f6ad18257cfc94fb5e4f810d4f691ecec1f86a437fe06ab20d67b87f8b7f4087dc67177886f35aff2cd9123541d27318287b5f6318'
7
+ data.tar.gz: 83f685439e9c6a59e44d62e5d5edaf8c97f1f904ee83a6a40e5fd0368f43f226d0169858125d7b6d27fea4ef4fbd2b7585d106d982afa966067dbce55508c5e1
@@ -1,4 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.3
3
+ - 2.2.7
4
+ - 2.3.4
5
+ env:
6
+ matrix:
7
+ - RAILS_VERSION=4.1.15
8
+ - RAILS_VERSION=4.2.6
4
9
  before_install: gem install bundler -v 1.11.2
10
+ script: bundle exec rake test
data/README.md CHANGED
@@ -1,8 +1,13 @@
1
1
  # ActsAsEncryptable
2
+ [![Gem Version](https://badge.fury.io/rb/acts_as_encryptable.svg)](https://badge.fury.io/rb/acts_as_encryptable)
3
+ [![Build Status](https://travis-ci.org/danielpclark/acts_as_encryptable.svg?branch=master)](https://travis-ci.org/danielpclark/acts_as_encryptable)
2
4
 
3
- This gem add support for ActiveSupports existing message encryption feature
4
- and allows you to set any ActiveRecord model as an encrypted field.
5
+ This gem adds support with ActiveSupport's existing message encryption
6
+ and allows you to set any ActiveRecord model column as an encrypted field.
5
7
 
8
+ It's bloat free and easy to use. This way you're up to date on security as
9
+ long as Rails is. And there's no high maintenance or feature bloat like
10
+ other "encryption helper gems" have 😉 . It's fully tested too!
6
11
 
7
12
  ## Installation
8
13
 
@@ -12,9 +17,10 @@ Add this line to your application's Gemfile:
12
17
  gem 'acts_as_encryptable'
13
18
  ```
14
19
 
15
- And create an initializer file `config/initializers/acts_as_encryptable.rb`
20
+ And create an initializer file:
16
21
 
17
22
  ```ruby
23
+ # config/initializers/acts_as_encryptable.rb
18
24
  ActiveRecord::Base.extend ActsAsEncryptable
19
25
  ```
20
26
 
@@ -45,11 +51,11 @@ class Email < ActiveRecord::Base
45
51
  end
46
52
  ```
47
53
 
48
- If you're encrypting multiple fields you may choose to use to alter what keys
49
- and salts are used per column but this will add a performance hit for the extra
54
+ If you're encrypting multiple fields you may choose to vary what keys and salts
55
+ are used per column, but this will add a performance hit for the extra
50
56
  encryption startup time.
51
57
 
52
- If you want to perform additional work on record data that you want to encrypt
58
+ If you want to perform additional work on record data that you want to encrypt;
53
59
  write a method alias after the `acts_as_encryptable` decleration and have your
54
60
  new method call it. `acts_as_encryptable` should always be written before any
55
61
  method aliasing.
@@ -8,7 +8,7 @@ module ActsAsEncryptable
8
8
  instance_variable_set(
9
9
  encryptor,
10
10
  ActiveSupport::MessageEncryptor.new(
11
- ActiveSupport::KeyGenerator.new(send key).generate_key(send salt)
11
+ ActiveSupport::KeyGenerator.new(send key).generate_key(send(salt), 32)
12
12
  )
13
13
  ) unless instance_variable_defined? encryptor
14
14
 
@@ -22,7 +22,7 @@ module ActsAsEncryptable
22
22
  instance_variable_set(
23
23
  encryptor,
24
24
  ActiveSupport::MessageEncryptor.new(
25
- ActiveSupport::KeyGenerator.new(send key).generate_key(send salt)
25
+ ActiveSupport::KeyGenerator.new(send key).generate_key(send(salt), 32)
26
26
  )
27
27
  ) unless instance_variable_defined? encryptor
28
28
 
@@ -1,3 +1,3 @@
1
1
  module ActsAsEncryptable
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_encryptable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel P. Clark
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-28 00:00:00.000000000 Z
11
+ date: 2017-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  version: '0'
175
175
  requirements: []
176
176
  rubyforge_project:
177
- rubygems_version: 2.5.1
177
+ rubygems_version: 2.6.11
178
178
  signing_key:
179
179
  specification_version: 4
180
180
  summary: Adds simple record encryption for Rails.