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-3.5.3-java spec/support/helpers/activejob_helpers.rb
appsignal-3.5.3 spec/support/helpers/activejob_helpers.rb
appsignal-3.5.2-java spec/support/helpers/activejob_helpers.rb
appsignal-3.5.2 spec/support/helpers/activejob_helpers.rb
appsignal-3.5.1-java spec/support/helpers/activejob_helpers.rb
appsignal-3.5.1 spec/support/helpers/activejob_helpers.rb
appsignal-3.5.0-java spec/support/helpers/activejob_helpers.rb
appsignal-3.5.0 spec/support/helpers/activejob_helpers.rb
appsignal-3.4.16-java spec/support/helpers/activejob_helpers.rb
appsignal-3.4.16 spec/support/helpers/activejob_helpers.rb
appsignal-3.4.15-java spec/support/helpers/activejob_helpers.rb
appsignal-3.4.15 spec/support/helpers/activejob_helpers.rb
appsignal-3.4.14-java spec/support/helpers/activejob_helpers.rb
appsignal-3.4.14 spec/support/helpers/activejob_helpers.rb
appsignal-3.4.13-java spec/support/helpers/activejob_helpers.rb
appsignal-3.4.13 spec/support/helpers/activejob_helpers.rb
appsignal-3.4.12-java spec/support/helpers/activejob_helpers.rb
appsignal-3.4.12 spec/support/helpers/activejob_helpers.rb
appsignal-3.4.11-java spec/support/helpers/activejob_helpers.rb
appsignal-3.4.11 spec/support/helpers/activejob_helpers.rb