symmetric-encryption 0.1.1 → 0.1.2

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.
@@ -55,7 +55,7 @@ module Symmetric
55
55
  self.key = symmetric_key
56
56
  self.iv = symmetric_iv
57
57
  else
58
- load_keys(config['symmetric_key_filename'], config['symmetric_iv_filename'], config['private_rsa_key'])
58
+ self.load_keys(config['symmetric_key_filename'], config['symmetric_iv_filename'], config['private_rsa_key'])
59
59
  end
60
60
  end
61
61
 
@@ -19,22 +19,22 @@ module Symmetric #:nodoc:
19
19
  # Initialize Symmetry. This will look for a symmetry.yml in the config
20
20
  # directory and configure Symmetry appropriately.
21
21
  #
22
- # @example symmetry.yml
22
+ # @example symmetric-encryption.yml
23
23
  #
24
24
  # development:
25
25
  # cipher: aes-256-cbc
26
26
  # symmetric_key: 1234567890ABCDEF1234567890ABCDEF
27
27
  # symmetric_iv: 1234567890ABCDEF
28
28
  #
29
- initializer "load symmetry encryption keys" do
30
- config.before_initialize do
31
- config_file = Rails.root.join("config", "symmetric-encryption.yml")
32
- if config_file.file?
33
- ::Symmetric::Encryption.load!(config_file, Rails.env)
34
- else
35
- puts "\nSymmetric Encryption config not found. Create a config file at: config/symmetric-encryption.yml"
36
- # puts "to generate one run: rails generate symmetric-encryption:config\n\n"
37
- end
29
+ # Loaded before Active Record initializes since database.yml can have encrypted
30
+ # passwords in it
31
+ initializer "load symmetry encryption keys" , :before=>"active_record.initialize_database" do
32
+ config_file = Rails.root.join("config", "symmetric-encryption.yml")
33
+ if config_file.file?
34
+ ::Symmetric::Encryption.load!(config_file, Rails.env)
35
+ else
36
+ puts "\nSymmetric Encryption config not found. Create a config file at: config/symmetric-encryption.yml"
37
+ # puts "to generate one run: rails generate symmetric-encryption:config\n\n"
38
38
  end
39
39
  end
40
40
 
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Symmetric #:nodoc
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
File without changes
@@ -0,0 +1,3 @@
1
+ file.reference.symmetry-lib=/Users/rmorrison/Sandbox/symmetry/lib
2
+ file.reference.symmetry-test=/Users/rmorrison/Sandbox/symmetry/test
3
+ platform.active=JRuby
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project-private xmlns="http://www.netbeans.org/ns/project-private/1">
3
+ <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
4
+ </project-private>
@@ -0,0 +1,4 @@
1
+ clean=
2
+ clobber=
3
+ gem=
4
+ test=
@@ -0,0 +1,9 @@
1
+ file.reference.symmetry-lib=lib
2
+ file.reference.symmetry-test=test
3
+ javac.classpath=
4
+ main.file=
5
+ platform.active=JRuby
6
+ source.encoding=UTF-8
7
+ src.examples.dir=examples
8
+ src.lib.dir=lib
9
+ test.test.dir=test
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project xmlns="http://www.netbeans.org/ns/project/1">
3
+ <type>org.netbeans.modules.ruby.rubyproject</type>
4
+ <configuration>
5
+ <data xmlns="http://www.netbeans.org/ns/ruby-project/1">
6
+ <name>symmetric-encryption</name>
7
+ <source-roots>
8
+ <root id="src.lib.dir" name="Source Files"/>
9
+ <root id="src.examples.dir" name="Examples"/>
10
+ </source-roots>
11
+ <test-roots>
12
+ <root id="test.test.dir" name="Test Files"/>
13
+ </test-roots>
14
+ </data>
15
+ </configuration>
16
+ </project>
Binary file
Binary file
metadata CHANGED
@@ -1,21 +1,26 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: symmetric-encryption
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.1.1
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 2
9
+ version: 0.1.2
6
10
  platform: ruby
7
11
  authors:
8
- - Reid Morrison
12
+ - Reid Morrison
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
16
 
13
- date: 2012-01-19 00:00:00 Z
17
+ date: 2012-01-24 00:00:00 -05:00
18
+ default_executable:
14
19
  dependencies: []
15
20
 
16
21
  description: Symmetric Encryption is a library to seamlessly enable symmetric encryption in a project, written in Ruby.
17
22
  email:
18
- - reidmo@gmail.com
23
+ - reidmo@gmail.com
19
24
  executables: []
20
25
 
21
26
  extensions: []
@@ -23,16 +28,25 @@ extensions: []
23
28
  extra_rdoc_files: []
24
29
 
25
30
  files:
26
- - LICENSE.txt
27
- - Rakefile
28
- - README.md
29
- - lib/symmetric-encryption.rb
30
- - lib/symmetric/encryption.rb
31
- - lib/symmetric/railtie.rb
32
- - lib/symmetric/version.rb
33
- - lib/symmetric/extensions/active_record/base.rb
34
- - lib/symmetric/railties/symmetric_encryption.rake
35
- - test/encryption_test.rb
31
+ - lib/symmetric/encryption.rb
32
+ - lib/symmetric/extensions/active_record/base.rb
33
+ - lib/symmetric/railtie.rb
34
+ - lib/symmetric/railties/symmetric_encryption.rake
35
+ - lib/symmetric/version.rb
36
+ - lib/symmetric-encryption.rb
37
+ - LICENSE.txt
38
+ - nbproject/private/config.properties
39
+ - nbproject/private/private.properties
40
+ - nbproject/private/private.xml
41
+ - nbproject/private/rake-d.txt
42
+ - nbproject/project.properties
43
+ - nbproject/project.xml
44
+ - Rakefile
45
+ - README.md
46
+ - symmetric-encryption-0.1.0.gem
47
+ - symmetric-encryption-0.1.1.gem
48
+ - test/encryption_test.rb
49
+ has_rdoc: true
36
50
  homepage: https://github.com/ClarityServices/symmetric-encryption
37
51
  licenses: []
38
52
 
@@ -40,23 +54,25 @@ post_install_message:
40
54
  rdoc_options: []
41
55
 
42
56
  require_paths:
43
- - lib
57
+ - lib
44
58
  required_ruby_version: !ruby/object:Gem::Requirement
45
- none: false
46
59
  requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: "0"
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ segments:
63
+ - 0
64
+ version: "0"
50
65
  required_rubygems_version: !ruby/object:Gem::Requirement
51
- none: false
52
66
  requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: "0"
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ segments:
70
+ - 0
71
+ version: "0"
56
72
  requirements: []
57
73
 
58
74
  rubyforge_project:
59
- rubygems_version: 1.8.9
75
+ rubygems_version: 1.3.6
60
76
  signing_key:
61
77
  specification_version: 3
62
78
  summary: Symmetric Encryption for Ruby, and Ruby on Rails