after-commit-on-action 0.0.2 → 0.0.3

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
2
  SHA1:
3
- metadata.gz: 0fd49ecc681cf7a8835affb2e14a76b8aef32658
4
- data.tar.gz: 263a3d6c1dfb0070641ee53ccea951dac48aef6b
3
+ metadata.gz: 189507c06941a49a9554380a81b956f0793ee0e1
4
+ data.tar.gz: eb04383070c0318d4815188b7f00a59e28d01c78
5
5
  SHA512:
6
- metadata.gz: 69b37a045c16772cb52e321ddc5d02b82fc3f77f3721ddb83d395a0d1f93ed38f142e8d2b37a1c8fe6c20776b3fc042e17e138c3486f466fe7e831a21a9619a1
7
- data.tar.gz: 080fce8ac5ba01487c1f0b25671a3074759b4df4deb45b408f9df12fa006f1bd1e09f00d01051c78bd9dd4a62da9a0e20c39f6d6055d524d586da0a356c7bcb1
6
+ metadata.gz: 8d4b1f4cbc4b0497a8246ef4264f6b3400750c5194207e86e996239ab832490d6f4f53e2035b00d127a7c02d2b1281be36e1c6ba75f26c1a05e967897e09367f
7
+ data.tar.gz: fb7c19eb2080bb980d14004ae8eb9b3ed8837050473ee02029cc85d272dac5cae82da67d35a8c5c0a2fb73a957a2fbd8d7a6282955303f670080fe9adf17f5b6
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'after-commit-on-action'
3
- s.version = '0.0.2'
4
- s.date = '2010-07-09'
3
+ s.version = '0.0.3'
4
+ s.date = '2016-04-06'
5
5
  s.summary = "Adds callbacks such as after_commit_on_create, after_commit_on_update to your ActiveRecord objects and observers."
6
6
  s.description = "Adds the following callbacks to your ActiveRecord objects and observers: after_commit_on_create, after_commit_on_update, after_commit_on_save, after_commit_on_destroy."
7
7
  s.authors = ["Yunus Sasmaz"]
@@ -2,10 +2,23 @@ module AfterCommitOnAction
2
2
  extend ActiveSupport::Concern
3
3
 
4
4
  included do
5
- after_commit(on: :create) { |obj| obj.send :notify_observers, :after_commit_on_create }
6
- after_commit(on: :update) { |obj| obj.send :notify_observers, :after_commit_on_update }
7
- after_commit(if: :persisted?) { |obj| obj.send :notify_observers, :after_commit_on_save }
8
- after_commit(on: :destroy) { |obj| obj.send :notify_observers, :after_commit_on_destroy }
5
+ after_commit(on: :create) do |obj|
6
+ obj.send :notify_observers, :after_commit_on_create
7
+ end
8
+
9
+ after_commit(on: :update) do |obj|
10
+ obj.send :notify_observers, :after_commit_on_update
11
+ end
12
+
13
+ # Without the `if: :persisted?` condition,
14
+ # this callback would be fired on destroy as well.
15
+ after_commit(if: :persisted?) do |obj|
16
+ obj.send :notify_observers, :after_commit_on_save
17
+ end
18
+
19
+ after_commit(on: :destroy) do |obj|
20
+ obj.send :notify_observers, :after_commit_on_destroy
21
+ end
9
22
  end
10
23
  end
11
24
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: after-commit-on-action
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yunus Sasmaz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2010-07-09 00:00:00.000000000 Z
11
+ date: 2016-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -81,10 +81,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  version: '0'
82
82
  requirements: []
83
83
  rubyforge_project:
84
- rubygems_version: 2.2.2
84
+ rubygems_version: 2.4.7
85
85
  signing_key:
86
86
  specification_version: 4
87
87
  summary: Adds callbacks such as after_commit_on_create, after_commit_on_update to
88
88
  your ActiveRecord objects and observers.
89
89
  test_files: []
90
- has_rdoc: