crypt_keeper 0.15.0.pre → 0.16.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +4 -0
  3. data/Appraisals +5 -0
  4. data/README.md +26 -7
  5. data/bin/crypt_keeper +99 -0
  6. data/crypt_keeper.gemspec +4 -2
  7. data/gemfiles/activerecord_3_1.gemfile.lock +10 -6
  8. data/gemfiles/activerecord_3_2.gemfile.lock +10 -6
  9. data/gemfiles/activerecord_4_0.gemfile.lock +10 -6
  10. data/gemfiles/activerecord_4_1.gemfile +8 -0
  11. data/gemfiles/activerecord_4_1.gemfile.lock +117 -0
  12. data/lib/crypt_keeper/helper.rb +8 -0
  13. data/lib/crypt_keeper/log_subscriber/mysql_aes.rb +1 -1
  14. data/lib/crypt_keeper/log_subscriber/postgres_pgp.rb +3 -3
  15. data/lib/crypt_keeper/provider/aes.rb +9 -8
  16. data/lib/crypt_keeper/provider/aes_new.rb +53 -0
  17. data/lib/crypt_keeper/provider/mysql_aes.rb +7 -2
  18. data/lib/crypt_keeper/provider/mysql_aes_new.rb +43 -0
  19. data/lib/crypt_keeper/provider/postgres_pgp.rb +1 -1
  20. data/lib/crypt_keeper/provider/postgres_pgp_public_key.rb +57 -0
  21. data/lib/crypt_keeper/version.rb +1 -1
  22. data/lib/crypt_keeper.rb +3 -0
  23. data/spec/fixtures/private.asc +60 -0
  24. data/spec/fixtures/public.asc +31 -0
  25. data/spec/log_subscriber/postgres_pgp_spec.rb +82 -14
  26. data/spec/provider/aes_new_spec.rb +45 -0
  27. data/spec/provider/aes_spec.rb +29 -7
  28. data/spec/provider/mysql_aes_new_spec.rb +52 -0
  29. data/spec/provider/mysql_aes_spec.rb +0 -16
  30. data/spec/provider/postgres_pgp_public_key_spec.rb +70 -0
  31. data/spec/provider/postgres_pgp_spec.rb +6 -4
  32. data/spec/spec_helper.rb +16 -1
  33. data/spec/support/active_record.rb +3 -2
  34. metadata +53 -10
  35. data/spec/log_subscriber/mysql_aes_spec.rb +0 -30
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.15.0.pre
4
+ version: 0.16.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Mazzi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-18 00:00:00.000000000 Z
11
+ date: 2014-04-22 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.1'
22
+ version: '4.2'
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.1'
32
+ version: '4.2'
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.1'
42
+ version: '4.2'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,35 @@ dependencies:
49
49
  version: '3.1'
50
50
  - - <
51
51
  - !ruby/object:Gem::Version
52
- version: '4.1'
52
+ version: '4.2'
53
+ - !ruby/object:Gem::Dependency
54
+ name: aes
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ~>
58
+ - !ruby/object:Gem::Version
59
+ version: 0.5.0
60
+ type: :runtime
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ~>
65
+ - !ruby/object:Gem::Version
66
+ version: 0.5.0
67
+ - !ruby/object:Gem::Dependency
68
+ name: armor
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ~>
72
+ - !ruby/object:Gem::Version
73
+ version: 0.0.2
74
+ type: :runtime
75
+ prerelease: false
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ~>
79
+ - !ruby/object:Gem::Version
80
+ version: 0.0.2
53
81
  - !ruby/object:Gem::Dependency
54
82
  name: rspec
55
83
  requirement: !ruby/object:Gem::Requirement
@@ -193,7 +221,8 @@ dependencies:
193
221
  description: Transparent encryption for ActiveRecord that isn't over-engineered
194
222
  email:
195
223
  - jmazzi@gmail.com
196
- executables: []
224
+ executables:
225
+ - crypt_keeper
197
226
  extensions: []
198
227
  extra_rdoc_files: []
199
228
  files:
@@ -206,6 +235,7 @@ files:
206
235
  - LICENSE
207
236
  - README.md
208
237
  - Rakefile
238
+ - bin/crypt_keeper
209
239
  - crypt_keeper.gemspec
210
240
  - gemfiles/activerecord_3_1.gemfile
211
241
  - gemfiles/activerecord_3_1.gemfile.lock
@@ -213,21 +243,30 @@ files:
213
243
  - gemfiles/activerecord_3_2.gemfile.lock
214
244
  - gemfiles/activerecord_4_0.gemfile
215
245
  - gemfiles/activerecord_4_0.gemfile.lock
246
+ - gemfiles/activerecord_4_1.gemfile
247
+ - gemfiles/activerecord_4_1.gemfile.lock
216
248
  - lib/crypt_keeper.rb
217
249
  - lib/crypt_keeper/helper.rb
218
250
  - lib/crypt_keeper/log_subscriber/mysql_aes.rb
219
251
  - lib/crypt_keeper/log_subscriber/postgres_pgp.rb
220
252
  - lib/crypt_keeper/model.rb
221
253
  - lib/crypt_keeper/provider/aes.rb
254
+ - lib/crypt_keeper/provider/aes_new.rb
222
255
  - lib/crypt_keeper/provider/mysql_aes.rb
256
+ - lib/crypt_keeper/provider/mysql_aes_new.rb
223
257
  - lib/crypt_keeper/provider/postgres_pgp.rb
258
+ - lib/crypt_keeper/provider/postgres_pgp_public_key.rb
224
259
  - lib/crypt_keeper/version.rb
225
260
  - spec/default.database.yml
226
- - spec/log_subscriber/mysql_aes_spec.rb
261
+ - spec/fixtures/private.asc
262
+ - spec/fixtures/public.asc
227
263
  - spec/log_subscriber/postgres_pgp_spec.rb
228
264
  - spec/model_spec.rb
265
+ - spec/provider/aes_new_spec.rb
229
266
  - spec/provider/aes_spec.rb
267
+ - spec/provider/mysql_aes_new_spec.rb
230
268
  - spec/provider/mysql_aes_spec.rb
269
+ - spec/provider/postgres_pgp_public_key_spec.rb
231
270
  - spec/provider/postgres_pgp_spec.rb
232
271
  - spec/spec_helper.rb
233
272
  - spec/support/active_record.rb
@@ -252,17 +291,21 @@ required_rubygems_version: !ruby/object:Gem::Requirement
252
291
  version: 1.3.1
253
292
  requirements: []
254
293
  rubyforge_project:
255
- rubygems_version: 2.1.3
294
+ rubygems_version: 2.0.14
256
295
  signing_key:
257
296
  specification_version: 4
258
297
  summary: Transparent encryption for ActiveRecord that isn't over-engineered
259
298
  test_files:
260
299
  - spec/default.database.yml
261
- - spec/log_subscriber/mysql_aes_spec.rb
300
+ - spec/fixtures/private.asc
301
+ - spec/fixtures/public.asc
262
302
  - spec/log_subscriber/postgres_pgp_spec.rb
263
303
  - spec/model_spec.rb
304
+ - spec/provider/aes_new_spec.rb
264
305
  - spec/provider/aes_spec.rb
306
+ - spec/provider/mysql_aes_new_spec.rb
265
307
  - spec/provider/mysql_aes_spec.rb
308
+ - spec/provider/postgres_pgp_public_key_spec.rb
266
309
  - spec/provider/postgres_pgp_spec.rb
267
310
  - spec/spec_helper.rb
268
311
  - spec/support/active_record.rb
@@ -1,30 +0,0 @@
1
- require 'spec_helper'
2
-
3
- module CryptKeeper::LogSubscriber
4
- describe MysqlAes do
5
- use_mysql
6
-
7
- # Fire the ActiveSupport.on_load
8
- before do
9
- CryptKeeper::Provider::MysqlAes.new key: 'secret'
10
- end
11
-
12
- subject { ::ActiveRecord::LogSubscriber.new }
13
-
14
- let(:input_query) do
15
- "SELECT AES_ENCRYPT('encrypt_value', 'encrypt_key'), AES_DECRYPT('decrypt_value', 'decrypt_key') FROM DUAL;"
16
- end
17
-
18
- let(:output_query) do
19
- "SELECT AES_ENCRYPT([FILTERED]), AES_DECRYPT([FILTERED]) FROM DUAL;"
20
- end
21
-
22
- it "filters mysql aes functions" do
23
- subject.should_receive(:sql_without_mysql_aes) do |event|
24
- event.payload[:sql].should == output_query
25
- end
26
-
27
- subject.sql(ActiveSupport::Notifications::Event.new(:sql, 1, 1, 1, { sql: input_query }))
28
- end
29
- end
30
- end