Ruby core extensions and class utilities for Hanami
- Drop support for Ruby 3.1
- Drop support for Ruby 3.0
- [Tim Riley] Remove
Hanami::Utils::Escape(which was not public as of 2.0.0) (#410)
- [hi-tech-jazz]
Hanami::Utils::Blank.blank?to check if the current object is non-nil
- [Luca Guidi] Official support for Ruby 3.2
- [Tim Riley] Make
Hanami::Utils::Callbacks::ChainandHanami::Utils::Callbacks::Callbackcomparable via#==based on their contents, rather than their object identity
- [Benjamin Klotz] Ensure
Hanami::Utils::String.underscoreto replace"."(dot character) into underscore
- [Luca Guidi] Removed
Hanami::Loggerin favor ofDry::Logger
- [Luca Guidi] Removed
Hanami::Utils::BasicObject(moved todry-coreasDry::Core::BasicObject) - [Luca Guidi] Removed
Hanami::Interactor
- [Luca Guidi] Official support for Ruby: MRI 3.0 and 3.1
- [Rob Jacoby] Allow
Hanami::Logger#initializeto acceptFile::NULLasstream:argument
- [Luca Guidi] Drop support for Ruby: MRI 2.6 and 2.7.
No changes.
- [Luca Guidi] Drop support for Ruby: MRI 2.5.
- [Luca Guidi] Transform
Utils::Stringfrom class to module
- [Gustavo Caso] Introduce
Hanami::Middlewarenamespace - [Luca Guidi] Introduce
Callbacks::Chain#dup
- [Luca Guidi] Drop support for Ruby: MRI 2.3, and 2.4.
- [Luca Guidi] Remove
Utils::Duplicable - [Luca Guidi] Remove
Utils::Inflector - [Luca Guidi] Remove
Utils::String.singularize, and.pluralize - [Luca Guidi] Remove
Utils::String#singularize, and#pluralize - [Luca Guidi] Remove instance level interface for
Utils::Hash - [Luca Guidi] Transform
Utils::Hashfrom class to module - [Luca Guidi] Remove
Utils.reload! - [Gustavo Caso] Remove
Utils::File.rewrite - [Vladimir Suvorov] Remove
Utils::Class.load_from_pattern!
- [Hiếu Nguyễn] Ensure
Hanami::Interactor#initializeto accept keyword arguments while working with Ruby 3
- [Luca Guidi] Official support for Ruby: MRI 3.0
- [Khai Le] Allow
Hanami::Loggerto filter sensitive data for an array of hashes
- [Hiếu Nguyễn] Ensure
Hanami::Loggerto not mutateHashinput when filtering sensitive data
- [Luca Guidi] Official support for Ruby: MRI 2.7
- [ippachi]
Utils::Files.append: don't check breakline if file is empty
- [Ivan Kabluchkov] Ensure
Hanami::Loggerfilters to not crash when logger stream is a closed tempfile - [Luca Guidi] Ensure
Utils::Files.appendto append contents properly when existing file doesn't end with a newline
- [Luca Guidi] Let
Utils::BasicObjectto lookup constants at the top-level namespace
- [Mauro Morales] Ensure
Utils::Inflector.pluralizeand.singularizeto work with words that contain an underscore (_)
- [Vladislav Yashin & Luca Guidi] Added
Utils::BasicObject#instance_of?,#is_a?, and#kind_of
- [Luca Guidi] Official support for Ruby: MRI 2.6
- [Luca Guidi] Support
bundler2.0+
- [Alfonso Uceda] Fix
Hashserialization forUtils::Logger - [Jeff Dickey] Add missing
pathnamerequire inlib/hanami/utils.rb
- [Luca Guidi] Official support for JRuby 9.2.0.0
- [graywolf] Add
Utils::Files.inject_line_before_lastand.inject_line_after_last
- [graywolf] Don't show
FixnumRuby warning for 2.4+ - [Luca Guidi] Fix pluralization of
"fee"
- [Luca Guidi & Marion Schleifer] Deprecate
Utils::Stringas Ruby type. Please useUtils::Stringclass methods instead ofUtils::String.new(""). - [Luca Guidi & Marion Schleifer] Deprecate
Utils::Hashas Ruby type. Please useUtils::Hashclass methods instead ofUtils::Hash.new({}). - [Luca Guidi & Marion Schleifer] Deprecate
Utils::String.pluralizeand.singularize. - [Semyon Pupkov] Deprecate
Utils::Class.load_from_pattern!
- [Luca Guidi] Use different colors for each
Hanami::Loggerlevel
- [Oana Sipos & Sean Collins & Luca Guidi] Colored logging
- [Luca Guidi] Make
Hanami::Loggerto properly log hash messages
- [Luca Guidi] Official support for Ruby: MRI 2.5
- [Sean Collins & Luca Guidi] Make
Utils::Files.writeidempotent: ensure to truncate the file before to write - [Sean Collins & Luca Guidi] Don't erase file contents when invoking
Utils::Files.touch
- [Sean Collins & Luca Guidi] Deprecate
Utils::Files.rewritein favor of.write
- [Luca Guidi] Introduce
Utils::Hash.deep_stringifyto recursively stringify a hash
- [Yuta Tokitake] Ensure
Interactor#callto accept non-keyword arguments
- [Luca Guidi] Introduce
Utils::Hash.deep_serializeto recursively serialize input into::Hash
- [Alfonso Uceda] Auto create directory for
Hanami::Logger
- [Marion Duprey] Allow
Hanami::Interactor#callto accept arguments.#initializeshould be used for Dependency Injection, while#callshould be used for input - [Marion Schleifer] Introduce
Utils::Hash.stringify - [Marion Schleifer] Introduce
Utils::String.titleize,.capitalize,.classify,.underscore,.dasherize,.demodulize,.namespace,.pluralize,.singularize, and.rsub - [Luca Guidi] Introduce
Utils::Files: a set of utils for file manipulations - [Luca Guidi] Introduce
Utils::String.transforma pipelined transformations for strings - [Marion Duprey & Gabriel Gizotti] Filter sensitive informations for
Hanami::Logger
- [Luca Guidi] Make
Hanami::Utils::BasicObjectto be fully compatible with Ruby'sppand to be inspected by Pry. - [Thiago Kenji Okada] Fix pluralization/singularization for
"release" => "releases"
- [Malina Sulca] Fix pluralization/singularization for
"exercise" => "exercises" - [Xavier Barbosa] Fix pluralization/singularization for
"area" => "areas"
- [Anton Davydov] Fix pluralization/singularization for
"phrase" => "phrases"
- [Luca Guidi] Introduced
Utils::Hash.symbolizeand.deep_symbolize - [Luca Guidi] Introduced
Utils::Hash.deep_dup
- [choallin] Ensure
Utils::String#classifyto return output identical to the input for already classified strings. - [Marion Duprey & Jonas Amundsen] Ensure
Utils::Hash#initializeto accept frozenHashas argument.
- [Luca Guidi] Allow
Hanami::Logger#initializeto accept arguments to be compliant with Ruby'sLogger
- [Luca Guidi] Use
$stdoutinstead ofSTDOUTas default stream forHanami::Logger
- [Luca Guidi] Removed
Utils::Attributes - [Luca Guidi] Removed deprecated
Hanami::Interactor::Result#failing? - [Luca Guidi] Removed deprecated
Utils::Json.loadand.dump
- [Anton Davydov] Made
Utils::Blankprivate API
- [Luca Guidi] Official support for Ruby: MRI 2.4
- [alexd16] Introduced
Utils::Hash#deep_symbolize!for deep symbolization - [Luca Guidi] Introduced
Hanami::Utils.reload!as a mechanism to force code reloading in development
- [alexd16 & Alfonso Uceda & Luca Guidi] Don't deeply symbolize
Hanami::Interactor::Resultpayload - [Alfonso Uceda]
Hanami::Interactor::Result: Don't transform objects that respond to#to_hash(like entities) - [Bhanu Prakash] Use
Utils::Json.generateinstead of the deprecated.dumpforHanami::LoggerJSON formatter - [Luca Guidi]
Hanami::Logger: when aHashmessage is passed, don't nest it under:messagekey, but unwrap at the top level
- [alexd16]
Utils::Hash#symbolize!no longer symbolizes deep structures - [Luca Guidi & Alfonso Uceda] Improve readability for default logger formatter
- [Luca Guidi] Use ISO-8601 time format for JSON logger formatter
- [Grachev Mikhail] Introduced
Hanami::Interactor::Result#failure?
- [Paweł Świątkowski]
Utils::Inflector.pluralizePluralize -en to -ens instead of -ina
- [Grachev Mikhail] Deprecate
Hanami::Interactor::Result#failing?in favor of#failure?
- [Luca Guidi] Introduced
Utils::Json.parseand.generate
- [Luca Guidi] Ensure
Utils::Jsonparsing to not eval untrusted input
- [Luca Guidi] Deprecated
Utils::Json.loadin favor of.parse - [Luca Guidi] Deprecated
Utils::Json.dumpin favor of.generate
– [Luca Guidi] Introduced Utils.require! to recursively require Ruby files with an order that is consistent across platforms
– [Luca Guidi] Introduced Utils::FileList as cross-platform ordered list of files, alternative to Dir.glob
- [Luca Guidi] Make
Utils::BasicObjectpretty printable - [Grachev Mikhail] Added
Interactor::Result#successful?and#failing?
- [Pascal Betz] Ensure
Utils::Class.load!to lookup constant only within the given namespace
- [Luca Guidi] Make
Utils::Hashonly compatible with objects that respond to#to_hash - [Luca Guidi] Official support for Ruby: MRI 2.3+ and JRuby 9.1.5.0+
- [Andrey Morskov] Introduced
Hanami::Utils::Blank - [Anton Davydov] Allow to specify a default log level for
Hanami::Logger - [Anton Davydov] Introduced default and JSON formatters for
Hanami::Logger - [Erol Fornoles] Allow deep indifferent access for
Hanami::Utils::Attributes - [Anton Davydov] Introduced
Hanami::Utils::Jsonwhich is a proxy forMultiJson(frommulti_jsongem), or fallback toJSONfrom Ruby standard library.
- [Hiếu Nguyễn] Ensure
Hanami::Utils::String#classifyto return already classified strings as they are. Eg."AwesomeProject"should return"AwesomeProject", not"Awesomeproject". - [TheSmartnik] Fix English pluralization for words ending with
"rses" - [Rogério Ramos] Fix English pluralization for words ending with
"ice"
- [Luca Guidi] Drop support for Ruby 2.0, 2.1 and Rubinius. Official support for JRuby 9.0.5.0+.
- [Yuuji Yaginuma]
Hanami::Utils::Escape: fixed Ruby warning forString#charswith a block, which is deprecated. UsingString#each_charnow. - [Sean Collins] Allow non string objects to be escaped by
Hanami::Utils::Escape.
- [Luca Guidi] Renamed the project
- [Anton Davydov] Ensure
Lotus::Utils::String#classifyto work properly with dashes (eg."app-store" => "App::Store")
- [Luca Guidi] Official support for Ruby 2.3
- [Luca Guidi] Custom inflections
- [Luca Guidi] Introduced
Lotus::Utils::Duplicableas a safe dup logic for Ruby types - [Luca Guidi] Added
Lotus::Utils::String#rsubreplace rightmost occurrence
- [Luca Guidi] Fix
Lotus::Utils::PathPrefix#joinand#relative_joinby rejecting arguments that are equal to the separator - [Karim Kiatlottiavi] Fix
Encoding::UndefinedConversionErrorinLotus::Utils::Escape.encode
- [Luca Guidi] Deprecate Ruby 2.0 and 2.1
- [Luca Guidi] Removed
Lotus::Utils::Callbacks#addin favor of#append - [Luca Guidi] Removed pattern support for
Utils::Class.load!(eg.Articles(Controller|::Controller))
- [Luca Guidi] Added
Lotus::Utils::String#capitalize - [Trung Lê] Official support for JRuby 9k+
- [Thiago Felippe] Ensure
Lotus::Utils::PathPrefix#joinwon't remote duplicate entries (eg/admin/dashboard/admin)
- [Luca Guidi] Extracted
Lotus::Loggerfromhanamirb
- [Luca Guidi]
Lotus::Interactor::Resultcontains only objects explicitly exposed viaLotus::Interactor.expose.
- [François Beausoleil] Improved
Lotus::Utils::Kernelmessages forTypeError.
- [Luca Guidi] Ensure
Lotus::Utils::Attributes#to_hto return::Hash
- [Luca Guidi & Alfonso Uceda Pompa] Introduced
Lotus::Utils::Inflector,Lotus::Utils::String#pluralizeand#singularize
- [Luca Guidi] Ensure
Lotus::Utils::Attributes#to_hto safely return nested::Hashinstances for complex data structures. - [Luca Guidi] Let
Lotus::Interactor#errorto return a falsey value for control flow. (eg.check_permissions or error "You can't access")
- [Luca Guidi] Introduced
Lotus::Utils::Escape. It implements OWASP/ESAPI suggestions for HTML, HTML attribute and URL escape utilities. - [Luca Guidi] Introduced
Lotus::Utils::String#dasherize - [Luca Guidi] Introduced
Lotus::Utils::String#titleize
- [Luca Guidi] Introduced
Lotus::Interactor - [Luca Guidi] Introduced
Lotus::Utils::BasicObject
- [Alfonso Uceda Pompa] Aliased
Lotus::Utils::Attributes#getwith#[] - [Simone Carletti] Introduced
Lotus::Utils::Callbacks::Chain#prependand#append
- [Luca Guidi] Deprecated
Lotus::Utils::Callbacks::Chain#addin favor of#append
- [Luca Guidi] Ensure to return the right offending object if a missing method is called with Utils::String and Hash (eg.
Utils::Hash.new(a: 1).all? {|_, v| v.foo }blamevinstead ofHash) - [Luca Guidi] Raise an error if try to coerce non numeric strings into Integer, Float & BigDecimal (eg.
Utils::Kernel.Integer("hello") # => raise TypeError)
- [Luca Guidi] Official support for Ruby 2.2
- [Luca Guidi] Introduced
Utils::Attributes - [Luca Guidi] Added
Utils::Hash#stringify!
- [Luca Guidi] Allow
Utils::Class.load!to accept any object that implements#to_s - [Trung Lê] Allow
Utils::Class.load!to accept a class - [Luca Guidi] Introduced
Utils::Class.load_from_pattern! - [Luca Guidi] Introduced
Utils.jruby?andUtils.rubinius? - [Luca Guidi] Introduced
Utils::Deprecation - [Luca Guidi] Official support for Rubinius 2.3+
- [Luca Guidi] Official support for JRuby 1.7+ (with 2.0 mode)
- [Janko Marohnić] Implemented
Utils::PathPrefixrelativness and absolutness - [Luca Guidi] Made
Utils::PathPrefix#joinand#relative_jointo return a new instance of that class - [Luca Guidi] Implemented
Utils::Hash#deep_dup - [Luca Guidi] Made
Utils::PathPrefix#jointo accept multiple argument
- [Luca Guidi] Made
Utils::PathPrefix#joinremove trailing occurrences for@separatorfrom the output - [Luca Guidi] Made
Utils::PathPrefix#relative_jointo correctly replace all the instances of@separatorfrom the output
- [Luca Guidi] Deprecated
Utils::Class.load!with a pattern likeArticles(Controller|::Controller), useUtils::Class.load_from_pattern!instead
- [Celso Fernandes] Add BigDecimal coercion to Lotus::Utils::Kernel
- [Luca Guidi] Define
Booleanconstant, if missing - [Luca Guidi] Use composition over inheritance for
Lotus::Utils::PathPrefix - [Luca Guidi] Use composition over inheritance for
Lotus::Utils::Hash - [Luca Guidi] Use composition over inheritance for
Lotus::Utils::String
- [Luca Guidi] Improved error message for
Utils::Class.load! - [Tom Kadwill] Improved error
NameErrormessage by passing in the whole constant name toUtils::Class.load! - [Luca Guidi]
Utils::Hash#to_hreturn instances of::Hashin case of nested symbolized data structure - [Luca Guidi] Raise
TypeErrorifnilis passed toPathPrefix#relative_join - [Peter Suschlik] Define
Lotus::Utils::Hash#respond_to_missing? - [Peter Suschlik] Define
Lotus::Utils::String#responds_to_missing? - [Luca Guidi] Ensure
Utils::Hash#inspectoutput to be the same of::Hash#inspect
- [Luca Guidi] Implemented
Lotus::Utils::Kernel.Symbol - [Luca Guidi] Made
Kernel.Pathnameto raise an error whennilis passed as argument - [Luca Guidi] Implemented
Lotus::Utils::LoadPaths#freezein order to prevent modification after the object has been frozen - [Luca Guidi] Implemented Lotus::Utils::LoadPaths#push, also aliased as #<<
- [Luca Guidi] Use composition over inheritance for
Lotus::Utils::LoadPaths - [Luca Guidi] Introduced
Lotus::Utils::LoadPaths - [Luca Guidi] Introduced
Lotus::Utils::String#namespace, in order to return the top level Ruby namespace for the given string - [Luca Guidi] Implemented
Lotus::Utils::Kernel.Pathname
- [Luca Guidi] Implemented
Lotus::Utils::LoadPaths#initialize_copyin order to safely#dupand#clone
- [Luca Guidi] Implemented
Lotus::Utils::Callbacks::Chain#freezein order to prevent modification after the object has been frozen - [Luca Guidi] All the
Utils::Kernelmethods will raiseTypeErrorin case of failed coercion. - [Luca Guidi] Made
Kernel.Timeto raise an error whennilis passed as argument - [Luca Guidi] Made
Kernel.DateTimeto raise an error whennilis passed as argument - [Luca Guidi] Made
Kernel.Dateto raise an error whennilis passed as argument - [Luca Guidi] Made
Kernel.Booleanto return false whennilis passed as argument - [Luca Guidi] Made
Kernel.Stringto return an empty string whennilis passed as argument - [Luca Guidi] Made
Kernel.Floatto return0.0whennilis passed as argument - [Luca Guidi] Made
Kernel.Integerto return0whennilis passed as argument - [Luca Guidi] Made
Kernel.Hashto return an emptyHashwhennilis passed as argument - [Luca Guidi] Made
Kernel.Setto return an emptySetwhennilis passed as argument - [Luca Guidi] Made
Kernel.Arrayto return an emptyArraywhennilis passed as argument - [Luca Guidi] Use composition over inheritance for
Lotus::Utils::Callbacks::Chain
- [Luca Guidi] Implemented
Lotus::Utils::Kernel.Time - [Luca Guidi] Implemented
Lotus::Utils::Kernel.DateTime - [Luca Guidi] Implemented
Lotus::Utils::Kernel.Date - [Luca Guidi] Implemented
Lotus::Utils::Kernel.Float - [Luca Guidi] Implemented
Lotus::Utils::Kernel.Boolean - [Luca Guidi] Implemented
Lotus::Utils::Kernel.Hash - [Luca Guidi] Implemented
Lotus::Utils::Kernel.Set - [Luca Guidi] Implemented
Lotus::Utils::Kernel.String - [Luca Guidi] Implemented
Lotus::Utils::Kernel.Integer - [Luca Guidi] Implemented
Lotus::Utils::Kernel.Array
- [Christopher Keele] Add missing stdlib
Setrequire toUtils::ClassAttribute
- [Luca Guidi] Introduced
Lotus::Utils::String#demodulize - [Luca Guidi] Introduced
Lotus::Utils::IO.silence_warnings - [Luca Guidi] Introduced class loading mechanism from a string:
Utils::Class.load! - [Luca Guidi] Introduced callbacks support for classes
- [Luca Guidi] Introduced inheritable class level attributes
- [Luca Guidi] Introduced
Utils::Hash - [Luca Guidi] Introduced
Utils::String - [Luca Guidi] Introduced
Utils::PathPrefix - [Luca Guidi] Official support for MRI 2.0+