Ruby core extentions and class utilities for Hanami
- [Luca Guidi] Renamed the project
- [Anton Davydov] Ensure
Lotus::Utils::String#classify
to 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::Duplicable
as a safe dup logic for Ruby types - [Luca Guidi] Added
Lotus::Utils::String#rsub
replace rightmost occurrence
- [Luca Guidi] Fix
Lotus::Utils::PathPrefix#join
and#relative_join
by rejecting arguments that are equal to the separator - [Karim Kiatlottiavi] Fix
Encoding::UndefinedConversionError
inLotus::Utils::Escape.encode
- [Luca Guidi] Deprecate Ruby 2.0 and 2.1
- [Luca Guidi] Removed
Lotus::Utils::Callbacks#add
in 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#join
won't remote duplicate entries (eg/admin/dashboard/admin
)
- [Luca Guidi] Extracted
Lotus::Logger
fromhanamirb
- [Luca Guidi]
Lotus::Interactor::Result
contains only objects explicitly exposed viaLotus::Interactor.expose
.
- [François Beausoleil] Improved
Lotus::Utils::Kernel
messages forTypeError
.
- [Luca Guidi] Ensure
Lotus::Utils::Attributes#to_h
to return::Hash
- [Luca Guidi & Alfonso Uceda Pompa] Introduced
Lotus::Utils::Inflector
,Lotus::Utils::String#pluralize
and#singularize
- [Luca Guidi] Ensure
Lotus::Utils::Attributes#to_h
to safely return nested::Hash
instances for complex data structures. - [Luca Guidi] Let
Lotus::Interactor#error
to 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#get
with#[]
- [Simone Carletti] Introduced
Lotus::Utils::Callbacks::Chain#prepend
and#append
- [Luca Guidi] Deprecated
Lotus::Utils::Callbacks::Chain#add
in 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 }
blamev
instead 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::PathPrefix
relativness and absolutness - [Luca Guidi] Made
Utils::PathPrefix
#join
and#relative_join
to return a new instance of that class - [Luca Guidi] Implemented
Utils::Hash#deep_dup
- [Luca Guidi] Made
Utils::PathPrefix#join
to accept multiple argument
- [Luca Guidi] Made
Utils::PathPrefix#join
remove trailing occurrences for@separator
from the output - [Luca Guidi] Made
Utils::PathPrefix#relative_join
to correctly replace all the instances of@separator
from 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
Boolean
constant, 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
NameError
message by passing in the whole constant name toUtils::Class.load!
- [Luca Guidi]
Utils::Hash#to_h
return instances of::Hash
in case of nested symbolized data structure - [Luca Guidi] Raise
TypeError
ifnil
is 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#inspect
output to be the same of::Hash#inspect
- [Luca Guidi] Implemented
Lotus::Utils::Kernel.Symbol
- [Luca Guidi] Made
Kernel.Pathname
to raise an error whennil
is passed as argument - [Luca Guidi] Implemented
Lotus::Utils::LoadPaths#freeze
in 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_copy
in order to safely#dup
and#clone
- [Luca Guidi] Implemented
Lotus::Utils::Callbacks::Chain#freeze
in order to prevent modification after the object has been frozen - [Luca Guidi] All the
Utils::Kernel
methods will raiseTypeError
in case of failed coercion. - [Luca Guidi] Made
Kernel.Time
to raise an error whennil
is passed as argument - [Luca Guidi] Made
Kernel.DateTime
to raise an error whennil
is passed as argument - [Luca Guidi] Made
Kernel.Date
to raise an error whennil
is passed as argument - [Luca Guidi] Made
Kernel.Boolean
to return false whennil
is passed as argument - [Luca Guidi] Made
Kernel.String
to return an empty string whennil
is passed as argument - [Luca Guidi] Made
Kernel.Float
to return0.0
whennil
is passed as argument - [Luca Guidi] Made
Kernel.Integer
to return0
whennil
is passed as argument - [Luca Guidi] Made
Kernel.Hash
to return an emptyHash
whennil
is passed as argument - [Luca Guidi] Made
Kernel.Set
to return an emptySet
whennil
is passed as argument - [Luca Guidi] Made
Kernel.Array
to return an emptyArray
whennil
is 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
Set
require 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+