lib/symmetric_encryption/railtie.rb in symmetric-encryption-3.7.2 vs lib/symmetric_encryption/railtie.rb in symmetric-encryption-3.8.0
- old
+ new
@@ -15,11 +15,11 @@
# end
# end
config.symmetric_encryption = ::SymmetricEncryption
rake_tasks do
- load "symmetric_encryption/railties/symmetric_encryption.rake"
+ load 'symmetric_encryption/railties/symmetric_encryption.rake'
end
# Initialize Symmetry. This will look for a symmetry.yml in the config
# directory and configure Symmetry appropriately.
#
@@ -33,12 +33,12 @@
# Loaded before Active Record initializes since database.yml can have encrypted
# passwords in it
config.before_configuration do
# Check if already configured
unless ::SymmetricEncryption.cipher?
- config_file = Rails.root.join("config", "symmetric-encryption.yml")
+ config_file = Rails.root.join('config', 'symmetric-encryption.yml')
if config_file.file?
- ::SymmetricEncryption.load!(config_file, Rails.env)
+ ::SymmetricEncryption::Config.load!(config_file, Rails.env)
else
puts "\nSymmetric Encryption config not found."
puts "To generate one for the first time: rails generate symmetric_encryption:config\n\n"
end
end