diff --git a/temp_file/config/application.rb b/temp_file/config/application.rb index 01c2a06..0a9a878 100644 --- a/temp_file/config/application.rb +++ b/temp_file/config/application.rb @@ -20,12 +20,52 @@ if Rails.version.to_i>4 end end end + if RUBY_VERSION.to_f > 2.1 + if RUBY_VERSION.to_f>2.4 + module Psych + def self.load(yaml, permitted_classes: [Symbol], permitted_symbols: [], aliases: false, filename: nil, fallback: nil, symbolize_names: false, freeze: false, strict_integer: false) + return self.unsafe_load(yaml, filename: filename, fallback: fallback, symbolize_names: symbolize_names, freeze: freeze, strict_integer: strict_integer) + end + end + end class Time def new_offset(offset) DateTime.new(self.to_i).new_offset(offset) end end + class ActionController::Parameters + def any?(&block) + self.permit!.to_h.any?(&block) + end + end + module URI + def self.escape(uri) + self::DEFAULT_PARSER.escape(uri) + end + def self.unescape(uri) + self::DEFAULT_PARSER.unescape(uri) + end + def self.parse(uri) + uri = uri.strip + scheme, userinfo, host, port, + registry, path, opaque, query, fragment = self.split(uri) + + if scheme && self.scheme_list.include?(scheme.upcase) + self.scheme_list[scheme.upcase].new(scheme, userinfo, host, port, + registry, path, opaque, query, + fragment, self) + else + Generic.new(scheme, userinfo, host, port, + registry, path, opaque, query, + fragment, self) + end + end + class <