1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove new lines

This commit is contained in:
Jorge Manrubia 2021-03-11 00:13:00 +01:00
parent 4e1f66f90b
commit 1406ac294f
59 changed files with 136 additions and 31 deletions

View file

@ -46,4 +46,3 @@ class ActionText::ModelEncryptionTest < ActiveSupport::TestCase
assert_equal expected_value, model.reload.send(attribute_name).body.to_html
end
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "active_support/core_ext/module"
require "active_support/core_ext/array"

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# The algorithm used for encrypting and decrypting +Message+ objects.

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "openssl"
require "base64"

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# Container of contfiguration options

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# Configuration API for +ActiveRecord::Encryption+

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# An encryption context configures the different entities used to perform encryption:

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# +ActiveRecord::Encryption+ uses encryption contexts to configure the different entities used to

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# A +KeyProvider+ that derives keys from passwords

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# This is the concern mixed in Active Record models to make them encryptable. It adds the +encrypts+

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# An +ActiveModel::Type+ that encrypts/decrypts strings of text

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# Encrypts encryptable columns when loading fixtures automatically

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# An encryptor that can encrypt data but can't decrypt it

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "openssl"
require "zip"
require "active_support/core_ext/numeric"

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# Implements a simple envelope encryption approach where:

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
module Errors

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
# Automatically expand encrypted arguments to support querying both encrypted and unencrypted data
#
# Active Record Encryption supports querying the db using deterministic attributes. For example:

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# A key is a container for a given +secret+

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "securerandom"
module ActiveRecord

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# A +KeyProvider+ serves keys:

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# Encrypts all the models belonging to the provided list of classes

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# A message defines the structure of the data we store in encrypted attributes. It contains:

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# A message serializer that serializes +Messages+ with JSON.
@ -51,9 +53,9 @@ module ActiveRecord
end
def headers_to_json(headers)
headers.collect do |key, value|
[key, value.is_a?(ActiveRecord::Encryption::Message) ? message_to_json(value) : encode_if_needed(value)]
end.to_h
headers.transform_values do |value|
value.is_a?(ActiveRecord::Encryption::Message) ? message_to_json(value) : encode_if_needed(value)
end
end
def encode_if_needed(value)

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# An encryptor that won't decrypt or encrypt. It will just return the passed

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# This is a wrapper for a hash of encryption properties. It is used by

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module ActiveRecord
module Encryption
# A +NullEncryptor+ that will raise an error when trying to encrypt data

View file

@ -555,7 +555,7 @@ db_namespace = namespace :db do
desc "Generate a set of keys for configuring Active Record encryption in a given environment"
task :init do
puts <<~MSG
Add this entry to the credentials of the target environment:
Add this entry to the credentials of the target environment:#{' '}
active_record_encryption:
master_key: #{SecureRandom.alphanumeric(32)}

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
class ActiveRecord::Encryption::Aes256GcmTest < ActiveSupport::TestCase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
class ActiveRecord::Encryption::CipherTest < ActiveSupport::TestCase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
require "models/post"

View file

@ -1,8 +1,10 @@
# frozen_string_literal: true
require "cases/encryption/helper"
require "models/book"
class ActiveRecord::Encryption::ConfigurableTest < ActiveRecord::TestCase
test 'can access context properties with top level getters' do
test "can access context properties with top level getters" do
assert_equal ActiveRecord::Encryption.key_provider, ActiveRecord::Encryption.context.key_provider
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
require "models/book"
require "models/post"

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
class ActiveRecord::Encryption::DerivedSecretKeyProviderTest < ActiveRecord::TestCase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
require "models/author"
require "models/book"

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
require "models/author"
require "models/book"

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
require "models/book"

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
class ActiveRecord::Encryption::EncryptingOnlyEncryptorTest < ActiveSupport::TestCase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
require "models/author"
@ -75,6 +77,4 @@ class ActiveRecord::Encryption::EncryptionSchemesTest < ActiveRecord::TestCase
end
author
end
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
class ActiveRecord::Encryption::EncryptorTest < ActiveSupport::TestCase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
class ActiveRecord::Encryption::EnvelopeEncryptionKeyProviderTest < ActiveRecord::TestCase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
require "models/book"

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/helper"
require "benchmark/ips"

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
class ActiveRecord::Encryption::KeyGeneratorTest < ActiveSupport::TestCase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
class ActiveRecord::Encryption::KeyProviderTest < ActiveRecord::TestCase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
class ActiveRecord::Encryption::KeyTest < ActiveSupport::TestCase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
require "models/author"
require "models/post"

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
class ActiveRecord::Encryption::MessageSerializerTest < ActiveSupport::TestCase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
class ActiveRecord::Encryption::MessageTest < ActiveSupport::TestCase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
class ActiveRecord::Encryption::NullEncryptorTest < ActiveSupport::TestCase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
require "models/book"
require "models/post"

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
require "models/book"

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
require "models/book"

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
class ActiveRecord::Encryption::StoragePerformanceTest < ActiveRecord::TestCase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
class ActiveRecord::EncryptionPropertiesTest < ActiveSupport::TestCase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
class ActiveRecord::Encryption::ReadOnlyNullEncryptorTest < ActiveSupport::TestCase

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require "cases/encryption/helper"
require "models/post"