breamware / sidekiq-batch

Sidekiq Batch Jobs Implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

String#constantize

kmatrah opened this issue · comments

Hi! Nice gem!

I came across a little problem when using callbacks. Sidekiq::Batch::Callback::Worker#perform makes use of ActiveSupport String#constantize method. For non-Rails apps for which ActiveSupport is not embedded by default, it crashes. I solved the issue by providing my own version of String#constantize.

We can either add an explicit dependency to ActiveSupport or directly provide a version of String#constantize.

Could be replaced with the use of:

Object.const_get("NameOfClass")

Hi @kmatrah, can you create a pull request for that?

It should be resolved in master

Closing as it's fixed in 0.1.5