1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/test
Martin Spickermann bd10796419 Bugfix: ActiveSupport::EncryptedConfiguration reading of comment-only encrypted files (#34014)
* Fix reading comment only encrypted files

When a encrypted file contains only comments then reading that files raises an error:

    NoMethodError: undefined method `deep_symbolize_keys' for false:FalseClass
        activesupport/lib/active_support/encrypted_configuration.rb:33:in `config'
        test/encrypted_configuration_test.rb:52:in `block in <class:EncryptedConfigurationTest>'

This happens because the previous implementation returned a `{}` fallback for blank YAML strings. But it did not handle YAML strings that are present but still do not contain any _usefull_ YAML - like the file created by `Rails::Generators::EncryptedFileGenerator` which looks like this:

    # aws:
    #   access_key_id: 123
    #   secret_access_key: 345

* Fix coding style violation

* Add backwardscompatible with Psych versions that were shipped with Ruby <2.5

* Do not rely on railties for Active Support test

* Simplify error handling

* Improve test naming

* Simplify file creation in test
2018-10-05 08:06:33 +09:00
..
autoloading_fixtures
cache Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
concurrency
core_ext Prefix Module#parent, Module#parents, and Module#parent_name with module 2018-10-02 12:51:35 -04:00
dependencies
deprecation A regression in deprecate_methods was introduced in a982a42: 2018-07-30 18:12:56 -04:00
file_fixtures
fixtures
json Remove unused require "active_support/core_ext/regexp" 2018-07-29 14:51:00 +09:00
messages
metadata Remove redundant travel_back 2018-08-31 16:19:58 +09:00
notifications
testing Merge pull request #33162 from utilum/stop_using_mocha 2018-08-22 18:20:25 +02:00
xml_mini Add Style/RedundantFreeze to remove redudant .freeze 2018-09-29 07:18:44 +00:00
abstract_unit.rb Remove private def 2018-09-23 21:27:44 +05:30
array_inquirer_test.rb
autoload_test.rb
benchmarkable_test.rb Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
broadcast_logger_test.rb Merge pull request #34055 from Edouard-chin/ec-logger-fix 2018-10-03 16:45:53 -04:00
callback_inheritance_test.rb Define callbacks on descendants. 2018-02-06 16:05:39 -05:00
callbacks_test.rb Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
class_cache_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
clean_backtrace_test.rb Use backtrace cleaner to clean up backtrace for verbose query logs 2018-08-14 09:15:28 +10:00
clean_logger_test.rb
concern_test.rb
configurable_test.rb
constantize_test_cases.rb
current_attributes_test.rb
dependencies_test.rb Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
dependencies_test_helpers.rb
deprecation_test.rb Raise a better exception when a invalid depreation behavior is set 2018-05-18 13:35:09 -04:00
descendants_tracker_test_cases.rb
descendants_tracker_with_autoloading_test.rb
descendants_tracker_without_autoloading_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
digest_test.rb
encrypted_configuration_test.rb Bugfix: ActiveSupport::EncryptedConfiguration reading of comment-only encrypted files (#34014) 2018-10-05 08:06:33 +09:00
encrypted_file_test.rb
evented_file_update_checker_test.rb Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
executor_test.rb Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
file_update_checker_shared_tests.rb Allow rubocop check more files 2018-04-19 23:25:39 +03:00
file_update_checker_test.rb
gzip_test.rb Fix CustomCops/AssertNot to allow it to have failure message 2018-05-13 11:32:47 +09:00
hash_with_indifferent_access_test.rb Fix HashWithIndifferentAccess#without bug 2018-09-28 18:28:56 +10:00
i18n_test.rb
inflector_test.rb
inflector_test_cases.rb
key_generator_test.rb Remove unused requires 2018-08-17 12:51:14 +09:00
lazy_load_hooks_test.rb Use class_eval or instance_eval when triggering lazy load hooks: 2018-07-03 23:29:43 -04:00
log_subscriber_test.rb cpu_time and allocations are 0 when JRuby is used 2018-07-30 15:10:30 +00:00
logger_test.rb Enable Performance/UnfreezeString cop 2018-09-23 08:56:55 +09:00
message_encryptor_test.rb
message_verifier_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
multibyte_chars_test.rb Enable Performance/UnfreezeString cop 2018-09-23 08:56:55 +09:00
multibyte_conformance_test.rb Remove unused require 2018-06-07 15:34:31 +03:00
multibyte_grapheme_break_conformance_test.rb Remove unused require 2018-06-07 15:34:31 +03:00
multibyte_normalization_conformance_test.rb Remove unused require 2018-06-07 15:34:31 +03:00
multibyte_proxy_test.rb
multibyte_test_helpers.rb Add Style/RedundantFreeze to remove redudant .freeze 2018-09-29 07:18:44 +00:00
notifications_test.rb Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
number_helper_i18n_test.rb
number_helper_test.rb
option_merger_test.rb
ordered_hash_test.rb
ordered_options_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
reloader_test.rb Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
rescuable_test.rb
safe_buffer_test.rb Handle more unsafe String methods (#33990) 2018-09-27 20:50:21 -04:00
security_utils_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
share_lock_test.rb Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
silence_logger_test.rb Don't use deprecated LoggerSilence 2018-10-04 08:23:49 +09:00
string_inquirer_test.rb
subscriber_test.rb
tagged_logging_test.rb Merge pull request #27792 from tjoyal/sandbox-tagged-logging 2018-09-11 19:33:59 -04:00
test_case_test.rb added tests for assert_no_difference with multiple expressions 2018-07-08 15:15:16 +02:00
time_travel_test.rb Add #unfreeze_time to ActiveSupport::Testing::TimeHelpers 2018-09-10 22:32:41 +01:00
time_zone_test.rb Allow Time.zone.at to receive a second argument 2018-05-30 13:47:39 +01:00
time_zone_test_helpers.rb Fix exception in AS::Timezone.all when any tzinfo data is missing 2018-04-18 21:45:13 +02:00
transliterate_test.rb
xml_mini_test.rb