crypt_keeper 0.18.4 → 0.19.0

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: 87199ef70463ed7fdd3a68c35e39198577cc2397
4
- data.tar.gz: 7362001fac8cfdd42614ccef35a7fd928809fb6c
3
+ metadata.gz: 2141c209434cabd811523c0c3be27aa602278aef
4
+ data.tar.gz: c5c5f534bdd2ec9dacbbdeed57f9e2b80c7f6445
5
5
  SHA512:
6
- metadata.gz: 6cfd907ddf0f9e0bc8bf8361d25f43736d79ea4c62ac8a3420e70361d3c11fe69043a0abfa38d0622957f02d8778403d99c58d710841b8d509c0bb32896bbfa2
7
- data.tar.gz: 5bb2d687db031076f835daab50afe9ed4a0ded50146d57a9ad252705d76ac3b080fb8ec27a934a84ab12d323f84eb42d2bfe1661c31dba0399b384f43c90b609
6
+ metadata.gz: 599ab56c6956a2eb1f8e817a25095ac77e48ea9a599700240569768e5f5d9d4d10e5ced9af6ddc328b5958145729d0866a444dd7a5f909fc3b188f9cdc581091
7
+ data.tar.gz: 0c821d0952c356c791a0abf54e3e41c56a8c62a4c7134ee6b6950b43bf1c022f9031e40bd1e7eef62e8dcb8be86d14f7d8663334db52fd0d95fe6ac59abaf498
data/.travis.yml CHANGED
@@ -1,26 +1,38 @@
1
- branches: master
2
1
  language: ruby
2
+
3
+ rvm:
4
+ - 1.9.3
5
+ - 2.0.0
6
+ - 2.1.1
7
+
3
8
  gemfile:
4
9
  - gemfiles/activerecord_3_1.gemfile
5
10
  - gemfiles/activerecord_3_2.gemfile
6
11
  - gemfiles/activerecord_4_0.gemfile
7
12
  - gemfiles/activerecord_4_1.gemfile
8
- before_install:
9
- - bundle install
13
+ - gemfiles/activerecord_4_2.gemfile
14
+
15
+ matrix:
16
+ include:
17
+ - rvm: 2.2.0
18
+ gemfile: gemfiles/activerecord_4_2.gemfile
19
+
20
+ addons:
21
+ postgresql: 9.3
22
+
23
+ sudo: false
24
+
10
25
  before_script:
11
26
  - cp spec/default.database.yml spec/database.yml
12
27
  - psql -c 'CREATE DATABASE crypt_keeper_providers;' -U postgres
13
28
  - psql crypt_keeper_providers -c 'CREATE EXTENSION IF NOT EXISTS pgcrypto;' -U postgres
14
29
  - mysql -e 'CREATE DATABASE crypt_keeper_providers'
30
+
31
+ branches: master
32
+
15
33
  notifications:
16
34
  email:
17
35
  recipients:
18
36
  jmazzi@gmail.com
19
37
  on_success: never
20
38
  on_failure: always
21
- rvm:
22
- - 1.9.3
23
- - 2.0.0
24
- - 2.1.1
25
- addons:
26
- postgresql: 9.3
data/Appraisals CHANGED
@@ -17,3 +17,8 @@ appraise "activerecord_4_1" do
17
17
  gem 'activerecord', '~> 4.1.0'
18
18
  gem 'activesupport', '~> 4.1.0'
19
19
  end
20
+
21
+ appraise "activerecord_4_2" do
22
+ gem 'activerecord', '~> 4.2.0'
23
+ gem 'activesupport', '~> 4.2.0'
24
+ end
data/README.md CHANGED
@@ -78,7 +78,7 @@ Running `encrypt_table!` will encrypt all rows in the database using the encrypt
78
78
 
79
79
  ## Supported Available Encryptors
80
80
 
81
- There are four supported encryptors: `aes_new`, `mysql_aes_new`, `postgresql_pgp`, `postgres_pgp_public_key`.
81
+ There are four supported encryptors: `aes_new`, `mysql_aes_new`, `postgres_pgp`, `postgres_pgp_public_key`.
82
82
 
83
83
  * [AES New](https://github.com/jmazzi/crypt_keeper/blob/master/lib/crypt_keeper/provider/aes_new.rb)
84
84
  * Encryption is peformed using AES-256 via OpenSSL.
@@ -175,7 +175,7 @@ end
175
175
 
176
176
  ## Requirements
177
177
 
178
- CryptKeeper has been tested against ActiveRecord 3.1, 3.2, 4.0, 4.1 using ruby
178
+ CryptKeeper has been tested against ActiveRecord 3.1, 3.2, 4.0, 4.1, 4.2 using ruby
179
179
  1.9.3, 2.0.0 and 2.1.1
180
180
 
181
181
  ActiveRecord 4.0 is supported starting with v0.11.0.
data/crypt_keeper.gemspec CHANGED
@@ -16,8 +16,8 @@ Gem::Specification.new do |gem|
16
16
  gem.require_paths = ["lib"]
17
17
  gem.version = CryptKeeper::VERSION
18
18
 
19
- gem.add_runtime_dependency 'activerecord', '>= 3.1', '< 4.2'
20
- gem.add_runtime_dependency 'activesupport', '>= 3.1', '< 4.2'
19
+ gem.add_runtime_dependency 'activerecord', '>= 3.1', '< 4.3'
20
+ gem.add_runtime_dependency 'activesupport', '>= 3.1', '< 4.3'
21
21
  gem.add_runtime_dependency 'aes', '~> 0.5.0'
22
22
  gem.add_runtime_dependency 'armor', '~> 0.0.2'
23
23
 
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- crypt_keeper (0.18.2)
5
- activerecord (>= 3.1, < 4.2)
6
- activesupport (>= 3.1, < 4.2)
4
+ crypt_keeper (0.18.4)
5
+ activerecord (>= 3.1, < 4.3)
6
+ activesupport (>= 3.1, < 4.3)
7
7
  aes (~> 0.5.0)
8
8
  armor (~> 0.0.2)
9
9
 
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- crypt_keeper (0.18.2)
5
- activerecord (>= 3.1, < 4.2)
6
- activesupport (>= 3.1, < 4.2)
4
+ crypt_keeper (0.18.4)
5
+ activerecord (>= 3.1, < 4.3)
6
+ activesupport (>= 3.1, < 4.3)
7
7
  aes (~> 0.5.0)
8
8
  armor (~> 0.0.2)
9
9
 
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- crypt_keeper (0.18.2)
5
- activerecord (>= 3.1, < 4.2)
6
- activesupport (>= 3.1, < 4.2)
4
+ crypt_keeper (0.18.4)
5
+ activerecord (>= 3.1, < 4.3)
6
+ activesupport (>= 3.1, < 4.3)
7
7
  aes (~> 0.5.0)
8
8
  armor (~> 0.0.2)
9
9
 
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- crypt_keeper (0.18.2)
5
- activerecord (>= 3.1, < 4.2)
6
- activesupport (>= 3.1, < 4.2)
4
+ crypt_keeper (0.18.4)
5
+ activerecord (>= 3.1, < 4.3)
6
+ activesupport (>= 3.1, < 4.3)
7
7
  aes (~> 0.5.0)
8
8
  armor (~> 0.0.2)
9
9
 
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 4.2.0"
6
+ gem "activesupport", "~> 4.2.0"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,123 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ crypt_keeper (0.18.4)
5
+ activerecord (>= 3.1, < 4.3)
6
+ activesupport (>= 3.1, < 4.3)
7
+ aes (~> 0.5.0)
8
+ armor (~> 0.0.2)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ activemodel (4.2.0)
14
+ activesupport (= 4.2.0)
15
+ builder (~> 3.1)
16
+ activerecord (4.2.0)
17
+ activemodel (= 4.2.0)
18
+ activesupport (= 4.2.0)
19
+ arel (~> 6.0)
20
+ activesupport (4.2.0)
21
+ i18n (~> 0.7)
22
+ json (~> 1.7, >= 1.7.7)
23
+ minitest (~> 5.1)
24
+ thread_safe (~> 0.3, >= 0.3.4)
25
+ tzinfo (~> 1.1)
26
+ aes (0.5.0)
27
+ appraisal (1.0.2)
28
+ bundler
29
+ rake
30
+ thor (>= 0.14.0)
31
+ arel (6.0.0)
32
+ armor (0.0.3)
33
+ builder (3.2.2)
34
+ celluloid (0.16.0)
35
+ timers (~> 4.0.0)
36
+ coderay (1.1.0)
37
+ coveralls (0.7.1)
38
+ multi_json (~> 1.3)
39
+ rest-client
40
+ simplecov (>= 0.7)
41
+ term-ansicolor
42
+ thor
43
+ diff-lcs (1.2.5)
44
+ docile (1.1.5)
45
+ ffi (1.9.6)
46
+ formatador (0.2.5)
47
+ guard (2.6.1)
48
+ formatador (>= 0.2.4)
49
+ listen (~> 2.7)
50
+ lumberjack (~> 1.0)
51
+ pry (>= 0.9.12)
52
+ thor (>= 0.18.1)
53
+ guard-rspec (4.2.10)
54
+ guard (~> 2.1)
55
+ rspec (>= 2.14, < 4.0)
56
+ hitimes (1.2.2)
57
+ i18n (0.7.0)
58
+ json (1.8.1)
59
+ listen (2.8.4)
60
+ celluloid (>= 0.15.2)
61
+ rb-fsevent (>= 0.9.3)
62
+ rb-inotify (>= 0.9)
63
+ lumberjack (1.0.9)
64
+ method_source (0.8.2)
65
+ mime-types (2.4.3)
66
+ minitest (5.5.0)
67
+ multi_json (1.10.1)
68
+ mysql2 (0.3.17)
69
+ netrc (0.10.2)
70
+ pg (0.17.1)
71
+ pry (0.10.1)
72
+ coderay (~> 1.1.0)
73
+ method_source (~> 0.8.1)
74
+ slop (~> 3.4)
75
+ rake (10.3.2)
76
+ rb-fsevent (0.9.4)
77
+ rb-inotify (0.9.5)
78
+ ffi (>= 0.5.0)
79
+ rest-client (1.7.2)
80
+ mime-types (>= 1.16, < 3.0)
81
+ netrc (~> 0.7)
82
+ rspec (2.14.1)
83
+ rspec-core (~> 2.14.0)
84
+ rspec-expectations (~> 2.14.0)
85
+ rspec-mocks (~> 2.14.0)
86
+ rspec-core (2.14.8)
87
+ rspec-expectations (2.14.5)
88
+ diff-lcs (>= 1.1.3, < 2.0)
89
+ rspec-mocks (2.14.6)
90
+ simplecov (0.9.1)
91
+ docile (~> 1.1.0)
92
+ multi_json (~> 1.0)
93
+ simplecov-html (~> 0.8.0)
94
+ simplecov-html (0.8.0)
95
+ slop (3.6.0)
96
+ sqlite3 (1.3.10)
97
+ term-ansicolor (1.3.0)
98
+ tins (~> 1.0)
99
+ thor (0.19.1)
100
+ thread_safe (0.3.4)
101
+ timers (4.0.1)
102
+ hitimes
103
+ tins (1.3.3)
104
+ tzinfo (1.2.2)
105
+ thread_safe (~> 0.1)
106
+
107
+ PLATFORMS
108
+ ruby
109
+
110
+ DEPENDENCIES
111
+ activerecord (~> 4.2.0)
112
+ activesupport (~> 4.2.0)
113
+ appraisal (~> 1.0.0)
114
+ coveralls
115
+ crypt_keeper!
116
+ guard (~> 2.6.1)
117
+ guard-rspec (~> 4.2.9)
118
+ mysql2 (~> 0.3.11)
119
+ pg (~> 0.17.1)
120
+ rake (~> 10.3.1)
121
+ rb-fsevent (~> 0.9.1)
122
+ rspec (~> 2.14.0)
123
+ sqlite3
@@ -36,7 +36,7 @@ module CryptKeeper
36
36
  #
37
37
  # Returns an Enumerable
38
38
  def search(records, field, criteria)
39
- records.where(field.to_sym => encrypt(criteria))
39
+ records.where("#{field} = ?", encrypt(criteria))
40
40
  end
41
41
  end
42
42
  end
@@ -1,3 +1,3 @@
1
1
  module CryptKeeper
2
- VERSION = "0.18.4"
2
+ VERSION = "0.19.0"
3
3
  end
data/spec/model_spec.rb CHANGED
@@ -55,12 +55,12 @@ module CryptKeeper
55
55
  it "decrypts the data" do
56
56
  record = subject.create!(storage: 'testing')
57
57
  CryptKeeper::Provider::Encryptor.any_instance.should_receive(:decrypt).at_least(1).times.with('toolgnitset')
58
- subject.find(record).storage
58
+ subject.find(record.id).storage
59
59
  end
60
60
 
61
61
  it "returns the plaintext on decrypt" do
62
62
  record = subject.create!(storage: 'testing')
63
- subject.find(record).storage.should == 'testing'
63
+ subject.find(record.id).storage.should == 'testing'
64
64
  end
65
65
 
66
66
  it "does not encrypt or decrypt nil" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crypt_keeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.4
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Mazzi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-20 00:00:00.000000000 Z
11
+ date: 2015-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3.1'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '4.2'
22
+ version: '4.3'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3.1'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '4.2'
32
+ version: '4.3'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: activesupport
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '3.1'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '4.2'
42
+ version: '4.3'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: '3.1'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '4.2'
52
+ version: '4.3'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: aes
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -245,6 +245,8 @@ files:
245
245
  - gemfiles/activerecord_4_0.gemfile.lock
246
246
  - gemfiles/activerecord_4_1.gemfile
247
247
  - gemfiles/activerecord_4_1.gemfile.lock
248
+ - gemfiles/activerecord_4_2.gemfile
249
+ - gemfiles/activerecord_4_2.gemfile.lock
248
250
  - lib/crypt_keeper.rb
249
251
  - lib/crypt_keeper/helper.rb
250
252
  - lib/crypt_keeper/log_subscriber/mysql_aes.rb