as-notifications 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -2
- data/lib/as/notifications.rb +2 -2
- data/lib/as/notifications/fanout.rb +7 -0
- metadata +4 -4
data/README.md
CHANGED
@@ -4,8 +4,6 @@ AS::Notification -- Provides an instrumentation API for Ruby
|
|
4
4
|
AS::Notification is an extraction of ActiveSupport::Notifications from
|
5
5
|
[Rails](https://github.com/rails/rails/tree/master/activesupport).
|
6
6
|
|
7
|
-
**It will track activesupport 4.x once that's released.**
|
8
|
-
|
9
7
|
[![Build Status](https://travis-ci.org/bernd/as-notifications.png?branch=master)](https://travis-ci.org/bernd/as-notifications)
|
10
8
|
|
11
9
|
* [API documentation](http://rubydoc.info/github/bernd/as-notifications/master/AS/Notifications)
|
@@ -17,6 +15,8 @@ AS::Notification is an extraction of ActiveSupport::Notifications from
|
|
17
15
|
|
18
16
|
## Changes to ActiveSupport::Notifications
|
19
17
|
|
18
|
+
### v0.1.0
|
19
|
+
|
20
20
|
* Change module name from `ActiveSupport::Notifications` to
|
21
21
|
`AS::Notifications` to avoid conflicts with activesupport
|
22
22
|
* Change `require` calls for `active_support/notifications` to
|
@@ -24,6 +24,9 @@ AS::Notification is an extraction of ActiveSupport::Notifications from
|
|
24
24
|
* Disable loading `load_paths` file in tests
|
25
25
|
* Revert [rails/rails@45448a5](https://github.com/rails/rails/commit/45448a5)
|
26
26
|
changes to avoid `thread_safe` gem dependency
|
27
|
+
|
28
|
+
### v1.0.0
|
29
|
+
|
27
30
|
* Adjust `test/notifications/instrumenter_test.rb` and `test/abstract_unit.rb`
|
28
31
|
to unbreak the tests on Ruby 1.8.
|
29
32
|
* Include `define_singleton_method` and `public_send` [backports](https://github.com/marcandre/backports)
|
data/lib/as/notifications.rb
CHANGED
@@ -143,8 +143,8 @@ module AS
|
|
143
143
|
#
|
144
144
|
# == Default Queue
|
145
145
|
#
|
146
|
-
# Notifications ships with a queue implementation that consumes and
|
147
|
-
# to log subscribers
|
146
|
+
# Notifications ships with a queue implementation that consumes and publishes events
|
147
|
+
# to all log subscribers. You can use any queue implementation you want.
|
148
148
|
#
|
149
149
|
module Notifications
|
150
150
|
class << self
|
@@ -76,6 +76,13 @@ module AS
|
|
76
76
|
def initialize(pattern, delegate)
|
77
77
|
@pattern = pattern
|
78
78
|
@delegate = delegate
|
79
|
+
@can_publish = delegate.respond_to?(:publish)
|
80
|
+
end
|
81
|
+
|
82
|
+
def publish(name, *args)
|
83
|
+
if @can_publish
|
84
|
+
@delegate.publish name, *args
|
85
|
+
end
|
79
86
|
end
|
80
87
|
|
81
88
|
def start(name, id, payload)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: as-notifications
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-01 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Provides an instrumentation API for Ruby. It has been extracted from
|
15
15
|
rails activesupport.
|
@@ -43,7 +43,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
43
43
|
version: '0'
|
44
44
|
segments:
|
45
45
|
- 0
|
46
|
-
hash:
|
46
|
+
hash: 2475729035612698049
|
47
47
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
48
|
none: false
|
49
49
|
requirements:
|
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
52
|
version: '0'
|
53
53
|
segments:
|
54
54
|
- 0
|
55
|
-
hash:
|
55
|
+
hash: 2475729035612698049
|
56
56
|
requirements: []
|
57
57
|
rubyforge_project:
|
58
58
|
rubygems_version: 1.8.25
|