palkan / active_delivery

Ruby framework for keeping all types of notifications (mailers, push notifications, whatever) in one place

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

resolve_class definition changed

benebrice opened this issue · comments

What did you do?

Upgrade from 0.4.4 to 1.0.0

What did you expect to happen?

Nothing breaking

What actually happened?

Breaking change on resolve_class definition for new delivery method.

Additional context

# before "name" was a String
def resolve_class(name)
    name.gsub(/Delivery$/, 'Pusher').safe_constantize
end

# after "name" is a Class
def resolve_class(name)
    name.to_s.gsub(/Delivery$/, 'Pusher').safe_constantize
end

@palkan Is that a normal update? Maybe if it's breaking we can add it to the change log?

Environment

Ruby Version: 2.7.2

Framework Version (Rails, whatever): 6.1.7.6

Active Delivery Version: 1.0.0

Is that a normal update? Maybe if it's breaking we can add it to the change log?

Yeah, it's a first major release and it's expected to ship with breaking changes. My bad is that I haven't announced the release candidate properly (it has been out a few months ago), we only tested it internally and reflected the changes we encountered.

Updated the change log. Thanks for reporting!