operationable 0.4.6 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e99aa8134a2cb5932fd6366830aa2780550a7fd4
4
- data.tar.gz: 6fe6de53409a47b1e69915abe966a6af01b2730f
2
+ SHA256:
3
+ metadata.gz: c411980798c3f46780a091735a264b1647f16462d08bb76d2a97210890687610
4
+ data.tar.gz: 74cccd3d65e1a28d7c993566e75cd2d018056e86abd19c927ef5fdeaa248be4e
5
5
  SHA512:
6
- metadata.gz: 2d72f1b684cd1b1df4cb6853cb3379d3a7df59ef5b17873fdc42fe6114e639f2649c6c301f94faf6405abadcebf19caebf4adf941e1288169d24d46cc78cc46f
7
- data.tar.gz: 7d3cd7bd3a698e1efe2d71856bfe83493c1a187414bbc6ebcb84313ac8ed1d2f31f99f3dee2c0aefb7677ca846f7a0e58181fd89e2ad153a63e57a8107cf6b55
6
+ metadata.gz: f7a914e63e5ba714db548822154b8cb972290959f15041cf357fa4d0ac1c7a171fde9eb061eb71c3d054ac84c06911e363b0619c100dca6a1210199cd12e3ceb
7
+ data.tar.gz: 9da8dbac6b7f277ed3c80b15b51bdb7b63d7a6ccf1658e3d40cbea5a2c6f554226eb08b9af71733c2e841cd8be3171386db2a5180379f0ed48fcf54064288e3b
data/Gemfile CHANGED
@@ -3,5 +3,3 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  gem 'rails', '>= 4.2.0'
6
- gem 'resque-status', '>= 0.5.0'
7
- gem 'resque', '1.25.0'
@@ -2,8 +2,6 @@ require 'rails'
2
2
  require 'active_job'
3
3
  require 'active_support/dependencies'
4
4
  require 'forwardable'
5
- require 'resque'
6
- require 'resque-status'
7
5
 
8
6
  require "operationable/version"
9
7
  require 'operationable/builder'
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
  module Operationable
3
3
  class Callback
4
- attr_reader :props
4
+ attr_reader :props, :q_options
5
5
 
6
- def initialize(props)
6
+ def initialize(props, q_options)
7
7
  @props = props
8
+ @q_options = q_options
8
9
  end
9
10
 
10
11
  def record
@@ -12,7 +12,7 @@ module Operationable
12
12
 
13
13
  (queue.blank? ? self.class : job_class_name.constantize.method(perform_method)).call(
14
14
  q_options: q_options(callback_method_name, queue),
15
- props: {**props, **params}
15
+ props: props.merge(params)
16
16
  )
17
17
  end
18
18
 
@@ -24,7 +24,7 @@ module Operationable
24
24
  end
25
25
 
26
26
  def self.call(q_options:, props:)
27
- q_options[:callback_class_name].constantize.new(props).method(q_options[:callback_method_name]).call
27
+ q_options[:callback_class_name].constantize.new(props, q_options).method(q_options[:callback_method_name]).call
28
28
  end
29
29
  end
30
30
  end
@@ -14,7 +14,7 @@ module Operationable
14
14
  end
15
15
 
16
16
  def self.call(q_options:, props:)
17
- instance = q_options[:callback_class_name].constantize.new(props)
17
+ instance = q_options[:callback_class_name].constantize.new(props, q_options)
18
18
  q_options[:callback_names].each { |method_name| instance.method(method_name).call }
19
19
  end
20
20
 
@@ -16,7 +16,7 @@ module Operationable
16
16
  end
17
17
 
18
18
  def serialize
19
- stringify_arguments(extract_props(record, user)).deep_symbolize_keys
19
+ stringify_arguments(extract_props(record, user))
20
20
  end
21
21
 
22
22
  private
@@ -1,3 +1,3 @@
1
1
  module Operationable
2
- VERSION = "0.4.6"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: operationable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Suhodolov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-05-19 00:00:00.000000000 Z
12
+ date: 2020-12-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activejob
@@ -121,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubyforge_project:
125
- rubygems_version: 2.6.10
124
+ rubygems_version: 3.1.4
126
125
  signing_key:
127
126
  specification_version: 4
128
127
  summary: Implementation of command pattern to avoid ActiveRecord callbacks and get