active_spy 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/active_spy.gemspec +3 -3
- data/app/controllers/active_spy/notifications_controller.rb +1 -0
- data/lib/active_spy/spy/spy_list.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56617f3765e3e7026148c98c1285bec0a7e8d672
|
4
|
+
data.tar.gz: 8ec5dd20bda1b57a6ccfbdb504fe55902b11f5e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57d0d785bfa03abedaff77350567b59948338a59b7f2efd05752075127671c81d1b3dedd583759c0c37430949a3de4b15f58d424ec15a1cc15e68ec7018f6e78
|
7
|
+
data.tar.gz: 784ec1190721e1b8e235a7a6469bca8676758ee317cc43133e424f73a03f01576bfd9407f3c41d25edd1f5a17314bf0f024b54dd74f4b7e5e47933240155ad16
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.2
|
data/active_spy.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: active_spy 1.3.
|
5
|
+
# stub: active_spy 1.3.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "active_spy"
|
9
|
-
s.version = "1.3.
|
9
|
+
s.version = "1.3.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Douglas Camata"]
|
14
|
-
s.date = "2014-08-
|
14
|
+
s.date = "2014-08-14"
|
15
15
|
s.description = " Watch for a method call in any class and run before/after callbacks.\n You can even watch your Rails models for events (like create, update,\n destroy), send these events to a event-runner instance and it redirect these\n events to other apps that are subscrived for them. This gem also provides\n classes that you can use to process the received events too.\n"
|
16
16
|
s.email = "d.camata@gmail.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -12,6 +12,7 @@ module ActiveSpy
|
|
12
12
|
listener = "#{hook['post_class']}Listener".constantize
|
13
13
|
result = listener.new.handle(params['event'])
|
14
14
|
if result.errors.present?
|
15
|
+
Rails.logger.warn("[EVENT][#{hook['post_class']}] Error on save #{result}: #{result.errors}")
|
15
16
|
render json: result.errors
|
16
17
|
else
|
17
18
|
render json: result
|
@@ -66,7 +66,11 @@ module ActiveSpy
|
|
66
66
|
define_method method do |*args, &block|
|
67
67
|
send(:invoke_callback, method, :before)
|
68
68
|
result = old_method.bind(self).call(*args, &block)
|
69
|
-
|
69
|
+
if defined?(Rails)
|
70
|
+
send(:invoke_callback, method, :after) if result
|
71
|
+
else
|
72
|
+
send(:invoke_callback, method, :after)
|
73
|
+
end
|
70
74
|
result
|
71
75
|
end
|
72
76
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_spy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Douglas Camata
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|