custom_active_record_observer 0.1.0 → 0.2.0
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 +4 -4
- data/LICENSE +13 -0
- data/lib/custom_active_record_observer/version.rb +1 -1
- data/lib/custom_active_record_observer.rb +1 -1
- metadata +11 -36
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b13cc7f8b0aceb704bd1d8e1e1fad0835574c65d
|
|
4
|
+
data.tar.gz: 219db492b79a927aaecc9afe16d5d4d8fc6270e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3d0ad899787e4a3e447cc3255b373875f541d731698bd200f48688d7645132e6bb83593657daa2b1a0929c563a5eb0ec69470ef9c8bc9655864fced1f03d26d4
|
|
7
|
+
data.tar.gz: ef7562bcbce78b0b2a0cc29ceb64ba14d8222c31621d761bb63e26c0152a27862bdb415e6fd019f429e82fa0a1217c6a22bfbabbb218de13a1ecd1610865082a
|
data/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2017 OnApp Ltd.
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
|
@@ -6,7 +6,7 @@ module CustomActiveRecordObserver
|
|
|
6
6
|
mattr_accessor :schema
|
|
7
7
|
@@schema = Schema.new
|
|
8
8
|
|
|
9
|
-
def self.observe(*class_names, handler
|
|
9
|
+
def self.observe(*class_names, handler: proc {}, &block)
|
|
10
10
|
class_names.each do |class_name|
|
|
11
11
|
DSL.new(block).actions_and_rules.each do |(action, rule)|
|
|
12
12
|
schema.add_rule(class_name, action, rule, handler)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: custom_active_record_observer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OnApp Ltd.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-11-
|
|
11
|
+
date: 2017-11-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -78,41 +78,15 @@ dependencies:
|
|
|
78
78
|
- - ">="
|
|
79
79
|
- !ruby/object:Gem::Version
|
|
80
80
|
version: '0'
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
- - ">="
|
|
86
|
-
- !ruby/object:Gem::Version
|
|
87
|
-
version: '0'
|
|
88
|
-
type: :development
|
|
89
|
-
prerelease: false
|
|
90
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
91
|
-
requirements:
|
|
92
|
-
- - ">="
|
|
93
|
-
- !ruby/object:Gem::Version
|
|
94
|
-
version: '0'
|
|
95
|
-
- !ruby/object:Gem::Dependency
|
|
96
|
-
name: pry
|
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
|
98
|
-
requirements:
|
|
99
|
-
- - ">="
|
|
100
|
-
- !ruby/object:Gem::Version
|
|
101
|
-
version: '0'
|
|
102
|
-
type: :development
|
|
103
|
-
prerelease: false
|
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
105
|
-
requirements:
|
|
106
|
-
- - ">="
|
|
107
|
-
- !ruby/object:Gem::Version
|
|
108
|
-
version: '0'
|
|
109
|
-
description:
|
|
110
|
-
email:
|
|
111
|
-
- support@onapp.com
|
|
81
|
+
description: |2
|
|
82
|
+
This gem delivers a simple DSL based on the after_commit callback
|
|
83
|
+
which can be used as an alternative to hooks from inside the model
|
|
84
|
+
email: support@onapp.com
|
|
112
85
|
executables: []
|
|
113
86
|
extensions: []
|
|
114
87
|
extra_rdoc_files: []
|
|
115
88
|
files:
|
|
89
|
+
- LICENSE
|
|
116
90
|
- README.md
|
|
117
91
|
- Rakefile
|
|
118
92
|
- lib/custom_active_record_observer.rb
|
|
@@ -131,7 +105,7 @@ files:
|
|
|
131
105
|
- lib/custom_active_record_observer/rules/update_rule.rb
|
|
132
106
|
- lib/custom_active_record_observer/schema.rb
|
|
133
107
|
- lib/custom_active_record_observer/version.rb
|
|
134
|
-
homepage:
|
|
108
|
+
homepage: https://github.com/OnApp/custom_active_record_observer
|
|
135
109
|
licenses:
|
|
136
110
|
- Apache 2.0
|
|
137
111
|
metadata: {}
|
|
@@ -143,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
143
117
|
requirements:
|
|
144
118
|
- - ">="
|
|
145
119
|
- !ruby/object:Gem::Version
|
|
146
|
-
version:
|
|
120
|
+
version: 2.2.0
|
|
147
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
122
|
requirements:
|
|
149
123
|
- - ">="
|
|
@@ -154,5 +128,6 @@ rubyforge_project:
|
|
|
154
128
|
rubygems_version: 2.5.2
|
|
155
129
|
signing_key:
|
|
156
130
|
specification_version: 4
|
|
157
|
-
summary:
|
|
131
|
+
summary: A small handy library to track create/update/destroy actions on active_record
|
|
132
|
+
models
|
|
158
133
|
test_files: []
|