lib/symmetric_encryption/railtie.rb in symmetric-encryption-0.7.2 vs lib/symmetric_encryption/railtie.rb in symmetric-encryption-0.8.0
- old
+ new
@@ -5,14 +5,18 @@
# Exposes Symmetric Encryption's configuration to the Rails application configuration.
#
# @example Set up configuration in the Rails app.
# module MyApplication
# class Application < Rails::Application
- # config.symmetric_encryption.cipher = 'aes-256-cbc'
+ # config.symmetric_encryption.cipher = SymmetricEncryption::Cipher.new(
+ # :key => '1234567890ABCDEF1234567890ABCDEF',
+ # :iv => '1234567890ABCDEF',
+ # :cipher => 'aes-128-cbc'
+ # )
# end
# end
- #config.symmetric_encryption = ::SymmetricEncryption::Config
+ config.symmetric_encryption = ::SymmetricEncryption
rake_tasks do
load "symmetric_encryption/railties/symmetric_encryption.rake"
end
@@ -31,11 +35,11 @@
config.before_configuration do
config_file = Rails.root.join("config", "symmetric-encryption.yml")
if config_file.file?
::SymmetricEncryption.load!(config_file, Rails.env)
else
- puts "\nSymmetric Encryption config not found. Create a config file at: config/symmetric-encryption.yml"
- # puts "to generate one run: rails generate symmetric-encryption:config\n\n"
+ puts "\nSymmetric Encryption config not found."
+ puts "To generate one for the first time: rails generate symmetric_encryption:config\n\n"
end
end
end
end