ruby_pub_sub 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ *.swp
2
+ *.sqlite3
3
+
data/.pairs ADDED
@@ -0,0 +1,4 @@
1
+ pairs:
2
+ # <initials>: <Firstname> <Lastname>[; <email-id>]
3
+ ab: Adam Berlin; berlin.ab@gmail.com
4
+ bm: Ben Moss; bmoss@pivotallabs.com
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
@@ -0,0 +1,13 @@
1
+ language: ruby
2
+ rvm:
3
+ #- "1.8.7"
4
+ - "1.9.2"
5
+ - "1.9.3"
6
+ #- jruby-18mode # JRuby in 1.8 mode
7
+ #- jruby-19mode # JRuby in 1.9 mode
8
+ #- rbx-18mode
9
+ - rbx-19mode
10
+ script: bundle exec rspec spec
11
+
12
+ notifications:
13
+ email: false
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in pub_sub.gemspec
4
+ gemspec
5
+
6
+ gem 'with_model'
7
+ gem 'rspec'
8
+ gem 'activerecord'
9
+ gem 'rails'
10
+ gem 'sqlite3'
11
+ gem 'pivotal_git_scripts'
@@ -0,0 +1,113 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ruby_pub_sub (0.0.4)
5
+ activerecord (>= 3.2.9)
6
+ rails (>= 3.2.9)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (3.2.9)
12
+ actionpack (= 3.2.9)
13
+ mail (~> 2.4.4)
14
+ actionpack (3.2.9)
15
+ activemodel (= 3.2.9)
16
+ activesupport (= 3.2.9)
17
+ builder (~> 3.0.0)
18
+ erubis (~> 2.7.0)
19
+ journey (~> 1.0.4)
20
+ rack (~> 1.4.0)
21
+ rack-cache (~> 1.2)
22
+ rack-test (~> 0.6.1)
23
+ sprockets (~> 2.2.1)
24
+ activemodel (3.2.9)
25
+ activesupport (= 3.2.9)
26
+ builder (~> 3.0.0)
27
+ activerecord (3.2.9)
28
+ activemodel (= 3.2.9)
29
+ activesupport (= 3.2.9)
30
+ arel (~> 3.0.2)
31
+ tzinfo (~> 0.3.29)
32
+ activeresource (3.2.9)
33
+ activemodel (= 3.2.9)
34
+ activesupport (= 3.2.9)
35
+ activesupport (3.2.9)
36
+ i18n (~> 0.6)
37
+ multi_json (~> 1.0)
38
+ arel (3.0.2)
39
+ builder (3.0.4)
40
+ diff-lcs (1.1.3)
41
+ erubis (2.7.0)
42
+ hike (1.2.1)
43
+ i18n (0.6.1)
44
+ journey (1.0.4)
45
+ json (1.7.5)
46
+ mail (2.4.4)
47
+ i18n (>= 0.4.0)
48
+ mime-types (~> 1.16)
49
+ treetop (~> 1.4.8)
50
+ mime-types (1.19)
51
+ multi_json (1.5.0)
52
+ pivotal_git_scripts (1.1.4)
53
+ polyglot (0.3.3)
54
+ rack (1.4.1)
55
+ rack-cache (1.2)
56
+ rack (>= 0.4)
57
+ rack-ssl (1.3.2)
58
+ rack
59
+ rack-test (0.6.2)
60
+ rack (>= 1.0)
61
+ rails (3.2.9)
62
+ actionmailer (= 3.2.9)
63
+ actionpack (= 3.2.9)
64
+ activerecord (= 3.2.9)
65
+ activeresource (= 3.2.9)
66
+ activesupport (= 3.2.9)
67
+ bundler (~> 1.0)
68
+ railties (= 3.2.9)
69
+ railties (3.2.9)
70
+ actionpack (= 3.2.9)
71
+ activesupport (= 3.2.9)
72
+ rack-ssl (~> 1.3.2)
73
+ rake (>= 0.8.7)
74
+ rdoc (~> 3.4)
75
+ thor (>= 0.14.6, < 2.0)
76
+ rake (10.0.2)
77
+ rdoc (3.12)
78
+ json (~> 1.4)
79
+ rspec (2.12.0)
80
+ rspec-core (~> 2.12.0)
81
+ rspec-expectations (~> 2.12.0)
82
+ rspec-mocks (~> 2.12.0)
83
+ rspec-core (2.12.0)
84
+ rspec-expectations (2.12.0)
85
+ diff-lcs (~> 1.1.3)
86
+ rspec-mocks (2.12.0)
87
+ sprockets (2.2.2)
88
+ hike (~> 1.2)
89
+ multi_json (~> 1.0)
90
+ rack (~> 1.0)
91
+ tilt (~> 1.1, != 1.3.0)
92
+ sqlite3 (1.3.6)
93
+ thor (0.16.0)
94
+ tilt (1.3.3)
95
+ treetop (1.4.12)
96
+ polyglot
97
+ polyglot (>= 0.3.1)
98
+ tzinfo (0.3.35)
99
+ with_model (0.3.1)
100
+ activerecord (>= 2.3.5, < 4.0.0)
101
+ rspec (~> 2.11)
102
+
103
+ PLATFORMS
104
+ ruby
105
+
106
+ DEPENDENCIES
107
+ activerecord
108
+ pivotal_git_scripts
109
+ rails
110
+ rspec
111
+ ruby_pub_sub!
112
+ sqlite3
113
+ with_model
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Gust, LLC
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,122 @@
1
+ # PubSub
2
+
3
+ PubSub is a thin wrapper around ActiveSupport::Notifications, which provides an implementation of the Publish/Subscribe pattern.
4
+
5
+ http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html
6
+
7
+ The goal was to be able to create more loosly coupled models by pulling side effects of our models into their own class. We wanted this behavior for Active Record classes as well as non-Active Record classes.
8
+
9
+ The result was a library that was:
10
+ * easy to test
11
+ * easy to disable (when using the console, during unit tests, etc.)
12
+ * easy to understand (b/c of AS::Notifications syncronous publishing queue)
13
+
14
+ ## Installation
15
+
16
+ Add this line to your application's Gemfile:
17
+
18
+ gem 'pub_sub'
19
+
20
+ And then execute:
21
+
22
+ $ bundle
23
+
24
+ Or install it yourself as:
25
+
26
+ $ gem install pub_sub
27
+
28
+ ## Usage
29
+
30
+ ### Configuration
31
+
32
+ PubSub.disable # disables publishing
33
+ PubSub.enable # enables publishing
34
+
35
+ By default, PubSub looks for subscribers in app/models/pub_sub/*
36
+
37
+
38
+ ### Within a plain ruby project
39
+
40
+ PubSub::Subscriber => provides an interface to subscribe to a topic
41
+
42
+ #
43
+ # Subscribe to the 'user_created' topic.
44
+ #
45
+ class SendWelcomeEmailToUser < PubSub::Subscriber
46
+ subscribe_to("user_created")
47
+
48
+ def on_publish
49
+ write_user_to_file(options[:user])
50
+ end
51
+
52
+ private
53
+
54
+ def write_user_to_file(user)
55
+ File.open("/tmp/users.txt", "w+") do |file|
56
+ file << user.name
57
+ end
58
+ end
59
+ end
60
+
61
+
62
+ #
63
+ # Publish a message to the 'user_created' topic
64
+ #
65
+ PubSub.publish("user_created", user:
66
+ User.new(name: 'John Doe')
67
+ )
68
+
69
+
70
+ ### Within a Rails project
71
+
72
+ PubSub::ActiveRecord::Subscriber => provide an interface to subscribe to an ActiveRecord callback topic
73
+
74
+ #
75
+ # Subscribe to the after_create callback of User
76
+ #
77
+ # currently, PubSub loads all subscribers in app/models/pub_sub/*
78
+ #
79
+ class SendWelcomeEmailToUser < PubSub::ActiveRecord::Subscriber
80
+ subscribe_to(User, 'after_create')
81
+
82
+ def on_publish
83
+ ApplicationMailer.send_welcome_email(record)
84
+ end
85
+ end
86
+ => PubSub.subscribe("active_record::user::after_create")
87
+
88
+
89
+ #
90
+ # inside your application (controller, model, etc)
91
+ #
92
+ User.create(name: 'John Doe')
93
+ => PubSub.publish("active_record::user::after_create")
94
+
95
+ ## Backlog / To Do
96
+
97
+ http://www.pivotaltracker.com/projects/705655
98
+
99
+ Feel free to take a look.
100
+
101
+ ## Contributing
102
+
103
+ 1. Fork it
104
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
105
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
106
+ 4. Push to the branch (`git push origin my-new-feature`)
107
+ 5. Create new Pull Request
108
+
109
+ # Contributors
110
+
111
+ * Brent Wheeldon
112
+ * Cathy O'Connell
113
+ * Nick Monje
114
+ * Evan Goodberry
115
+ * Ben Moss
116
+ * Chien Kuo
117
+ * Edwin Chong
118
+ * Adam Berlin
119
+ * Rasheed Abdul-Aziz
120
+ * Ryan McGarvey
121
+ * Geoffrey Ducharme
122
+ * Alex Kramer
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
File without changes
@@ -0,0 +1,39 @@
1
+ require "pub_sub/version"
2
+ require "pub_sub/subscriber"
3
+ require "pub_sub/register"
4
+
5
+ require 'rails'
6
+ require 'active_record'
7
+
8
+ module PubSub
9
+ class << self
10
+ def enable
11
+ Register.enable
12
+ end
13
+
14
+ def disable
15
+ Register.disable
16
+ end
17
+
18
+ def enabled?
19
+ Register.enabled?
20
+ end
21
+
22
+ def disabled?
23
+ Register.disabled?
24
+ end
25
+
26
+ #
27
+ # Standardize on Pub/Sub naming
28
+ #
29
+ def publish(*args, &block)
30
+ Register.publish(*args, &block)
31
+ end
32
+
33
+ def subscribe(*args, &block)
34
+ Register.subscribe(*args, &block)
35
+ end
36
+ end
37
+ end
38
+
39
+ require_relative "pub_sub/active_record_extensions"
@@ -0,0 +1,38 @@
1
+ module PubSub
2
+ class ActiveRecordExtensions < Rails::Railtie
3
+ initializer "pub sub configuration of active record extensions" do
4
+ class ::ActiveRecord::Base
5
+ after_create :notify_of_after_create
6
+
7
+ private
8
+
9
+ def notify_of_after_create
10
+ notify_pub_sub_of_active_record_callback('after_create')
11
+ end
12
+
13
+ def notify_pub_sub_of_active_record_callback(callback)
14
+ message = "active_record::#{self.class.to_s.underscore}::#{callback}"
15
+ PubSub.publish(message, record: self)
16
+ end
17
+ end
18
+
19
+ config.after_initialize do
20
+ Dir[
21
+ File.expand_path("app/models/pub_sub/*.rb", Rails.root)
22
+ ].each { |file| require file }
23
+ end
24
+ end
25
+ end
26
+
27
+ module ActiveRecord
28
+ class Subscriber < PubSub::Subscriber
29
+ def self.subscribe_to(class_instance, callback)
30
+ super("active_record::#{class_instance.to_s.underscore}::#{callback}")
31
+ end
32
+
33
+ def record
34
+ options[:record]
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,46 @@
1
+ require "singleton"
2
+
3
+ module PubSub
4
+ class Register
5
+ include Singleton
6
+
7
+ attr_accessor :enabled
8
+
9
+ def initialize
10
+ @enabled = true
11
+ super
12
+ end
13
+
14
+ class << self
15
+ def enable
16
+ instance.enabled = true
17
+ end
18
+
19
+ def disable
20
+ instance.enabled = false
21
+ end
22
+
23
+ def enabled?
24
+ if instance.enabled.nil?
25
+ instance.enabled = true
26
+ end
27
+
28
+ instance.enabled
29
+ end
30
+
31
+ def disabled?
32
+ !instance.enabled
33
+ end
34
+
35
+ def publish(*args, &block)
36
+ return if disabled?
37
+
38
+ ActiveSupport::Notifications.publish(*args, &block)
39
+ end
40
+
41
+ def subscribe(*args, &block)
42
+ ActiveSupport::Notifications.subscribe(*args, &block)
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,34 @@
1
+ module PubSub
2
+ class Subscriber
3
+ attr_reader :options
4
+ alias :payload :options
5
+
6
+ def initialize(options)
7
+ @options = options
8
+ end
9
+
10
+ def self.subscribe_to(topic_name)
11
+ klass = self
12
+
13
+ @subscription = PubSub.subscribe(topic_name) do |topic, options|
14
+ publish(klass.new(options))
15
+ end
16
+ end
17
+
18
+ def self.publish(subscription)
19
+ subscription.on_publish
20
+ end
21
+
22
+ def self.subscription
23
+ @subscription
24
+ end
25
+
26
+ def self.topic
27
+ @subscription.instance_variable_get("@pattern")
28
+ end
29
+
30
+ def on_publish
31
+ raise "Please define an on_publish method for #{self.class.name}"
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,3 @@
1
+ module PubSub
2
+ VERSION = "0.0.4"
3
+ end
Binary file
Binary file
Binary file
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'pub_sub/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "ruby_pub_sub"
8
+ gem.version = PubSub::VERSION
9
+ gem.authors = ["Adam Berlin & Evan Goodberry"]
10
+ gem.email = ["pair+aberlin+egoodberry@pivotallabs.com"]
11
+ gem.description = %q{Publish/Subscribe for Ruby}
12
+ gem.summary = %q{Publish messages to subscribers within your application. Initially built as a replacement for Active Record's Observer pattern. It is a thin wrapper around ActiveSupport::Notifications which implements the Publish/Subscribe pattern. This gem is intended to create an easy to use and understand API around AS::Notifications.}
13
+ gem.homepage = ""
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+ require File.dirname(__FILE__) + '/lib/pub_sub'
20
+
21
+ gem.add_dependency('rails', '>= 3.2.9')
22
+ gem.add_dependency('activerecord', '>= 3.2.9')
23
+ end
@@ -0,0 +1,66 @@
1
+ require 'spec_helper'
2
+
3
+ describe PubSub do
4
+ describe "initial state" do
5
+ it "defaults enabled to true" do
6
+ PubSub::Register.instance.enabled = nil
7
+ PubSub.enabled?.should be_true
8
+ end
9
+ end
10
+
11
+ describe "#enable" do
12
+ it "enables PubSub" do
13
+ PubSub.disable
14
+ PubSub.enable
15
+ PubSub.enabled?.should be_true
16
+ end
17
+ end
18
+
19
+ describe "#disable" do
20
+ it "disables PubSub" do
21
+ PubSub.disable
22
+ PubSub.enabled?.should be_false
23
+ end
24
+ end
25
+
26
+ describe "#publish" do
27
+ context "when disabled" do
28
+ before { PubSub.disable }
29
+
30
+ it "does not publish" do
31
+ ActiveSupport::Notifications.should_receive(:publish).never
32
+ PubSub.publish
33
+ end
34
+ end
35
+ end
36
+
37
+ describe "active record configuration" do
38
+ with_model :FakeActiveRecordUser do
39
+ table do |t|
40
+ t.string :title
41
+ end
42
+ end
43
+
44
+ with_model :FakeActiveRecordResult do
45
+ table do |t|
46
+ t.string :title
47
+ end
48
+ end
49
+
50
+ before do
51
+ class FakeActiveRecordUserSubscriber < PubSub::ActiveRecord::Subscriber
52
+ subscribe_to(FakeActiveRecordUser, 'after_create')
53
+
54
+ def on_publish
55
+ FakeActiveRecordResult.create
56
+ end
57
+ end
58
+ end
59
+
60
+ it "successfully calls through to the subscriber" do
61
+ FakeActiveRecordResult.all.size.should == 0
62
+ FakeActiveRecordUser.create
63
+ FakeActiveRecordResult.all.size.should == 1
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,50 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # Require this file using `require "spec_helper"` to ensure that it is only
4
+ # loaded once.
5
+ #
6
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+ RSpec.configure do |config|
8
+ config.treat_symbols_as_metadata_keys_with_true_values = true
9
+ config.run_all_when_everything_filtered = true
10
+ config.filter_run :focus
11
+
12
+ # Run specs in random order to surface order dependencies. If you find an
13
+ # order dependency and want to debug it, you can fix the order by providing
14
+ # the seed, which is printed after each run.
15
+ # --seed 1234
16
+ config.order = 'random'
17
+
18
+ #
19
+ # Load the environment
20
+ #
21
+ require 'bundler'
22
+ Bundler.require
23
+
24
+ #
25
+ # Rails loads this during its setup
26
+ #
27
+ PubSub::ActiveRecordExtensions.run_initializers
28
+
29
+ #
30
+ # Test database
31
+ #
32
+ ActiveRecord::Base.establish_connection(
33
+ adapter: 'sqlite3',
34
+ database: 'db/test.sqlite3',
35
+ pool: 5,
36
+ timeout: 5000
37
+ )
38
+
39
+ #
40
+ # Use with_model
41
+ #
42
+ config.extend WithModel
43
+
44
+ #
45
+ # Ensure pubsub is enabled
46
+ #
47
+ config.before do
48
+ PubSub.enable
49
+ end
50
+ end
@@ -0,0 +1,55 @@
1
+ require 'spec_helper'
2
+
3
+ describe PubSub::Subscriber do
4
+ class FooBar < PubSub::Subscriber
5
+ end
6
+
7
+ describe ".topic" do
8
+ it "sets up a subscription" do
9
+ FooBar.class_eval do
10
+ subscribe_to("foo")
11
+ end
12
+
13
+ FooBar.topic.should == 'foo'
14
+ end
15
+ end
16
+
17
+ describe ".subscription" do
18
+ it "should be the result of the subscribe" do
19
+ subscription = stub
20
+
21
+ PubSub.should_receive(:subscribe).with('topic-name') { subscription }
22
+
23
+ FooBar.class_eval do
24
+ subscribe_to("topic-name")
25
+ end
26
+
27
+ FooBar.subscription.should be(subscription)
28
+ end
29
+ end
30
+
31
+ describe ".publish" do
32
+ it "notifies the subscription of the publish event" do
33
+ subscription = double
34
+ subscription.should_receive(:on_publish)
35
+ FooBar.publish(subscription)
36
+ end
37
+ end
38
+
39
+ describe "#on_publish" do
40
+ it "warns developers that they need to implement the interface" do
41
+ expect {FooBar.new({}).on_publish}.to raise_error(/Please define/)
42
+ end
43
+ end
44
+
45
+ describe "payload" do
46
+ let(:payload) { double }
47
+ it "has a payload" do
48
+ FooBar.new(payload).payload.should == payload
49
+ end
50
+
51
+ it "has options" do
52
+ FooBar.new(payload).options.should == payload
53
+ end
54
+ end
55
+ end
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby_pub_sub
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Adam Berlin & Evan Goodberry
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-12-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 3.2.9
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 3.2.9
30
+ - !ruby/object:Gem::Dependency
31
+ name: activerecord
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 3.2.9
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 3.2.9
46
+ description: Publish/Subscribe for Ruby
47
+ email:
48
+ - pair+aberlin+egoodberry@pivotallabs.com
49
+ executables: []
50
+ extensions: []
51
+ extra_rdoc_files: []
52
+ files:
53
+ - .gitignore
54
+ - .pairs
55
+ - .rspec
56
+ - .travis.yml
57
+ - Gemfile
58
+ - Gemfile.lock
59
+ - LICENSE.txt
60
+ - README.md
61
+ - Rakefile
62
+ - db/.gitkeep
63
+ - lib/pub_sub.rb
64
+ - lib/pub_sub/active_record_extensions.rb
65
+ - lib/pub_sub/register.rb
66
+ - lib/pub_sub/subscriber.rb
67
+ - lib/pub_sub/version.rb
68
+ - pkg/pub_sub-0.0.1.gem
69
+ - pkg/pub_sub-0.0.2.gem
70
+ - pkg/pub_sub-0.0.3.gem
71
+ - pkg/ruby_pub_sub-0.0.3.gem
72
+ - pkg/ruby_pub_sub-0.0.4.gem
73
+ - ruby_pub_sub.gemspec
74
+ - spec/integration/pub_sub_spec.rb
75
+ - spec/spec_helper.rb
76
+ - spec/unit/subscriber_spec.rb
77
+ homepage: ''
78
+ licenses: []
79
+ post_install_message:
80
+ rdoc_options: []
81
+ require_paths:
82
+ - lib
83
+ required_ruby_version: !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ! '>='
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ requirements: []
96
+ rubyforge_project:
97
+ rubygems_version: 1.8.23
98
+ signing_key:
99
+ specification_version: 3
100
+ summary: Publish messages to subscribers within your application. Initially built
101
+ as a replacement for Active Record's Observer pattern. It is a thin wrapper around
102
+ ActiveSupport::Notifications which implements the Publish/Subscribe pattern. This
103
+ gem is intended to create an easy to use and understand API around AS::Notifications.
104
+ test_files:
105
+ - spec/integration/pub_sub_spec.rb
106
+ - spec/spec_helper.rb
107
+ - spec/unit/subscriber_spec.rb