symmetric-encryption 0.9.0 → 0.9.1

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.
data/Rakefile CHANGED
@@ -19,7 +19,7 @@ task :gem do |t|
19
19
  s.date = Date.today.to_s
20
20
  s.summary = "Symmetric Encryption for Ruby, and Ruby on Rails"
21
21
  s.description = "SymmetricEncryption supports encrypting ActiveRecord data, Mongoid data, passwords in configuration files, encrypting and decrypting of large files through streaming"
22
- s.files = FileList["./**/*"].exclude('*.gem', 'nbproject').map{|f| f.sub(/^\.\//, '')}
22
+ s.files = FileList["./**/*"].exclude(/.gem$/, /.log$/,/^nbproject/).map{|f| f.sub(/^\.\//, '')}
23
23
  s.has_rdoc = true
24
24
  end
25
25
  Gem::Builder.new(gemspec).build
@@ -18,7 +18,7 @@ release:
18
18
  # source code, we only hold a RSA key that is used to unlock the file
19
19
  # containing the actual symmetric encryption key
20
20
  private_rsa_key: |
21
- <%= OpenSSL::PKey::RSA.generate(2048).to_s.collect { |line| " #{line}" }.join('') %>
21
+ <%= OpenSSL::PKey::RSA.generate(2048).to_s.each_line.collect { |line| " #{line}" }.join('') %>
22
22
 
23
23
  # List Symmetric Key files in the order of current / latest first
24
24
  ciphers:
@@ -36,7 +36,7 @@ production:
36
36
  # source code, we only hold a RSA key that is used to unlock the file
37
37
  # containing the actual symmetric encryption key
38
38
  private_rsa_key: |
39
- <%= OpenSSL::PKey::RSA.generate(2048).to_s.collect { |line| " #{line}" }.join('') %>
39
+ <%= OpenSSL::PKey::RSA.generate(2048).to_s.each_line.collect { |line| " #{line}" }.join('') %>
40
40
 
41
41
  # List Symmetric Key files in the order of current / latest first
42
42
  ciphers:
@@ -1,9 +1,12 @@
1
+ require 'zlib'
1
2
  require 'symmetric_encryption/version'
2
3
  require 'symmetric_encryption/cipher'
3
4
  require 'symmetric_encryption/symmetric_encryption'
4
- require 'symmetric_encryption/reader'
5
- require 'symmetric_encryption/writer'
6
- require 'zlib'
5
+
6
+ module SymmetricEncryption
7
+ autoload :Reader, 'symmetric_encryption/reader'
8
+ autoload :Writer, 'symmetric_encryption/writer'
9
+ end
7
10
  if defined?(Rails)
8
11
  require 'symmetric_encryption/railtie'
9
12
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module SymmetricEncryption #:nodoc
3
- VERSION = "0.9.0"
3
+ VERSION = "0.9.1"
4
4
  end
@@ -1,3 +1,3 @@
1
1
  file.reference.symmetry-lib=/Users/rmorrison/Sandbox/symmetry/lib
2
2
  file.reference.symmetry-test=/Users/rmorrison/Sandbox/symmetry/test
3
- platform.active=JRuby
3
+ platform.active=Ruby_0
@@ -14,4 +14,7 @@
14
14
  <line>60</line>
15
15
  </file>
16
16
  </editor-bookmarks>
17
+ <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
18
+ <file>file:/Users/rmorrison/Sandbox/symmetric-encryption/lib/symmetric_encryption/extensions/active_record/base.rb</file>
19
+ </open-files>
17
20
  </project-private>
@@ -1,4 +1,4 @@
1
- clean=Remove any temporary products.
2
- clobber=Remove any generated file.
3
- gem=Build gem
4
- test=Run Test Suite
1
+ clean=
2
+ clobber=
3
+ gem=
4
+ test=
data/test.rb ADDED
@@ -0,0 +1,23 @@
1
+
2
+ require 'openssl'
3
+ openssl_cipher = ::OpenSSL::Cipher.new('aes-128-cbc')
4
+ openssl_cipher.encrypt
5
+ openssl_cipher.key = '1234567890ABCDEF1234567890ABCDEF'
6
+ result = openssl_cipher.update('Hello World')
7
+ result << openssl_cipher.final
8
+ puts result.unpack('H*')
9
+
10
+ # jruby 1.7.0.RC1 (1.9.3p203) 2012-09-25 8e849de on Java HotSpot(TM) 64-Bit Server VM 1.6.0_35-b10-428-11M3811 [darwin-x86_64]
11
+ # => 9dc9ebb434bc421326664c038bb4271d
12
+ #
13
+ # ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
14
+ # => b597b74f1de1f19a83d901a6fdb40643
15
+ #
16
+ # ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.2.0]
17
+ # => b597b74f1de1f19a83d901a6fdb40643
18
+ #
19
+ # jruby 1.6.8 (ruby-1.8.7-p357) (2012-09-18 1772b40) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_35) [darwin-x86_64-java]
20
+ # => 9dc9ebb434bc421326664c038bb4271d
21
+ #
22
+ # jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_35) [darwin-x86_64-java]
23
+ # => 9dc9ebb434bc421326664c038bb4271d
data/test/reader_test.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # Allow examples to be run in-place without requiring a gem install
2
2
  $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
3
3
 
4
+ require 'stringio'
4
5
  require 'rubygems'
5
6
  require 'test/unit'
6
7
  require 'shoulda'
data/test/writer_test.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # Allow examples to be run in-place without requiring a gem install
2
2
  $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
3
3
 
4
+ require 'stringio'
4
5
  require 'rubygems'
5
6
  require 'test/unit'
6
7
  require 'shoulda'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: symmetric-encryption
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-26 00:00:00.000000000 Z
12
+ date: 2012-11-05 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: SymmetricEncryption supports encrypting ActiveRecord data, Mongoid data,
15
15
  passwords in configuration files, encrypting and decrypting of large files through
@@ -21,7 +21,6 @@ extensions: []
21
21
  extra_rdoc_files: []
22
22
  files:
23
23
  - examples/symmetric-encryption.yml
24
- - foo.zip
25
24
  - lib/rails/generators/symmetric_encryption/config/config_generator.rb
26
25
  - lib/rails/generators/symmetric_encryption/config/templates/symmetric-encryption.yml
27
26
  - lib/rails/generators/symmetric_encryption/new_keys/new_keys_generator.rb
@@ -60,6 +59,7 @@ files:
60
59
  - test/reader_test.rb
61
60
  - test/symmetric_encryption_test.rb
62
61
  - test/writer_test.rb
62
+ - test.rb
63
63
  homepage: https://github.com/ClarityServices/symmetric-encryption
64
64
  licenses: []
65
65
  post_install_message:
data/foo.zip DELETED
Binary file