Sha256: e5990059b3b9663ee54e192b68c48701f9634b7cd9983bdcdadeb657aa3539a9

Contents?: true

Size: 733 Bytes

Versions: 172

Compression:

Stored size: 733 Bytes

Contents

module ActiveJobHelpers
  def active_job_args_wrapper(args: [], params: nil)
    if DependencyHelper.active_job_wraps_args?
      wrapped_args = {}

      if params
        if DependencyHelper.rails7_present?
          wrapped_args["_aj_ruby2_keywords"] = ["params", "args"]
          wrapped_args["args"] = []
          wrapped_args["params"] = {
            "_aj_symbol_keys" => ["foo"]
          }.merge(params)
        else
          wrapped_args["_aj_symbol_keys"] = ["foo"]
          wrapped_args.merge!(params)
        end
      else
        wrapped_args["_aj_ruby2_keywords"] = ["args"]
        wrapped_args["args"] = args
      end

      [wrapped_args]
    else
      params.nil? ? args : args + [params]
    end
  end
end

Version data entries

172 entries across 172 versions & 1 rubygems

Version Path
appsignal-4.0.6-java spec/support/helpers/activejob_helpers.rb
appsignal-4.0.6 spec/support/helpers/activejob_helpers.rb
appsignal-4.0.5-java spec/support/helpers/activejob_helpers.rb
appsignal-4.0.5 spec/support/helpers/activejob_helpers.rb
appsignal-4.0.4-java spec/support/helpers/activejob_helpers.rb
appsignal-4.0.4 spec/support/helpers/activejob_helpers.rb
appsignal-4.0.3-java spec/support/helpers/activejob_helpers.rb
appsignal-4.0.3 spec/support/helpers/activejob_helpers.rb
appsignal-4.0.2-java spec/support/helpers/activejob_helpers.rb
appsignal-4.0.2 spec/support/helpers/activejob_helpers.rb
appsignal-4.0.1-java spec/support/helpers/activejob_helpers.rb
appsignal-4.0.1 spec/support/helpers/activejob_helpers.rb
appsignal-4.0.0-java spec/support/helpers/activejob_helpers.rb
appsignal-4.0.0 spec/support/helpers/activejob_helpers.rb
appsignal-3.13.1-java spec/support/helpers/activejob_helpers.rb
appsignal-3.13.1 spec/support/helpers/activejob_helpers.rb
appsignal-3.13.1.alpha.1-java spec/support/helpers/activejob_helpers.rb
appsignal-3.13.1.alpha.1 spec/support/helpers/activejob_helpers.rb
appsignal-4.0.0.beta.2-java spec/support/helpers/activejob_helpers.rb
appsignal-4.0.0.beta.2 spec/support/helpers/activejob_helpers.rb