breamware / sidekiq-batch

Sidekiq Batch Jobs Implementation
MIT License
357 stars 95 forks source link

String#constantize #15

Closed kmatrah closed 6 years ago

kmatrah commented 6 years ago

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.

robotmay commented 6 years ago

Could be replaced with the use of:

Object.const_get("NameOfClass")
nglx commented 6 years ago

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

nglx commented 6 years ago

It should be resolved in master

nglx commented 6 years ago

Closing as it's fixed in 0.1.5