active_spy 1.3.4 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd8af5ef2d2ca9a598b4e4281f4294a38ca06111
4
- data.tar.gz: 18c1075f1a80d95a0b86f6fa14394568eed58d50
3
+ metadata.gz: 1732d9b22155f6b8762ffef93232642a03c07605
4
+ data.tar.gz: ba46f9dde95f707d572518ff00ea04e4e43e50c3
5
5
  SHA512:
6
- metadata.gz: b5f1c15a7b3df2e3569a15171241fb15b03b24e3ee596143f9b2638f32039421eb5260d99ca3f8535f5b9ba524200689ff4e94981c53cccf554e9a49f8c328de
7
- data.tar.gz: b993c8c2260dde7eb909e5b59f7fa1f77fb7fa01df36c235a837ba90d239efca7723e69bb2754a87eccfcf09b938144f68942e4aec981fcb8f8e298b79b50ceb
6
+ metadata.gz: f44a21ca9d0f213636d60ae01a598d98a55c6fd71104c00c9d475be6d94aca872bed2dd435bbac743ca7bdf8c404fdd6d8a7673ec1676576feef688dbcd72631
7
+ data.tar.gz: 3d264f47f021d5512328b170c6df093262b6105016bfad1fad36a799bc7e732e18c0a2767e4a679aa3914f52783c1830424f5974b5ed3a4c13dadf8a27311d33
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.4
1
+ 1.3.5
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.4 ruby lib
5
+ # stub: active_spy 1.3.5 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "active_spy"
9
- s.version = "1.3.4"
9
+ s.version = "1.3.5"
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-15"
14
+ s.date = "2014-08-28"
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 = [
@@ -20,8 +20,10 @@ module ActiveSpy
20
20
  ::Rails.logger.warn("[EVENT][#{hook['post_class']}] Listener result: #{result}")
21
21
  if result.is_a? Array
22
22
  handle_array_result(hook, result, params)
23
- else
23
+ elsif result.is_a? ActiveRecord::Base
24
24
  handle_model_result(hook, result, params)
25
+ else
26
+ render nothing: true
25
27
  end
26
28
  end
27
29
 
@@ -35,7 +37,7 @@ module ActiveSpy
35
37
  if result.errors.present?
36
38
  ::Rails.logger.warn("[EVENT][#{hook['post_class']}] Error receiving event #{params}")
37
39
  ::Rails.logger.warn("[EVENT][#{hook['post_class']}] Result errors: #{result.errors}")
38
- render json: result.errors
40
+ render json: result.errors, status: :unprocessable_entity
39
41
  else
40
42
  render nothing: true
41
43
  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
4
+ version: 1.3.5
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-15 00:00:00.000000000 Z
11
+ date: 2014-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport