sub_pub 0.0.12 → 0.0.14
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 +7 -0
- data/.gitignore +1 -1
- data/.travis.yml +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/lib/sub_pub.rb +4 -0
- data/lib/sub_pub/railtie.rb +1 -1
- data/lib/sub_pub/register.rb +5 -0
- data/lib/sub_pub/subscriber.rb +4 -0
- data/lib/sub_pub/version.rb +1 -1
- data/spec/integration/sub_pub_spec.rb +19 -1
- metadata +8 -15
- data/pkg/sub_pub-0.0.3.gem +0 -0
- data/pkg/sub_pub-0.0.4.gem +0 -0
- data/pkg/sub_pub-0.0.6.gem +0 -0
- data/pkg/sub_pub-0.0.7.gem +0 -0
- data/pkg/sub_pub-0.0.8.gem +0 -0
- data/pkg/sub_pub-0.0.9.gem +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2c05979fc3b7a089c8cd4097cfc64afe78e45c47
|
4
|
+
data.tar.gz: 1d9685e3e04bee5f4814ff9b6744cb1708e612f4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d504b666e641901d31eacb9c73deee45096ffbb086ee45d89d7a332275332a71902d38e9b85cfee185ea5b5e3100d5097fe5d4728683d56f9a8098ea8b44db6f
|
7
|
+
data.tar.gz: 8a93dbda5a734f57703a958f2640ce075b4593495ac340e3a33926d32ab493a32aa372ea3d1fd2196157fc4df6058ba55c72e23a15143482ed22c37d94576878
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -11,6 +11,8 @@ The result was a library that was:
|
|
11
11
|
* easy to disable (when using the console, during unit tests, etc.)
|
12
12
|
* easy to understand (b/c of AS::Notifications syncronous publishing queue)
|
13
13
|
|
14
|
+
- [](https://travis-ci.org/gustly/sub_pub)
|
15
|
+
|
14
16
|
## Installation
|
15
17
|
|
16
18
|
Add this line to your application's Gemfile:
|
data/lib/sub_pub.rb
CHANGED
data/lib/sub_pub/railtie.rb
CHANGED
data/lib/sub_pub/register.rb
CHANGED
data/lib/sub_pub/subscriber.rb
CHANGED
data/lib/sub_pub/version.rb
CHANGED
@@ -8,7 +8,6 @@ describe SubPub do
|
|
8
8
|
|
9
9
|
model do
|
10
10
|
has_many :fake_active_record_results
|
11
|
-
validate :title, presence: true
|
12
11
|
end
|
13
12
|
end
|
14
13
|
|
@@ -120,6 +119,25 @@ describe SubPub do
|
|
120
119
|
end
|
121
120
|
end
|
122
121
|
|
122
|
+
describe "register subscription only once" do
|
123
|
+
before do
|
124
|
+
SubPub.scope = 'foo-bar'
|
125
|
+
|
126
|
+
class CreateAccountSubscriber < SubPub::Subscriber
|
127
|
+
subscribe_to("new_account_posted")
|
128
|
+
|
129
|
+
def on_publish
|
130
|
+
FakeActiveRecordUser.create(title: options[:title])
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
it "calls the subscriber properly" do
|
136
|
+
CreateAccountSubscriber.subscribe_to("new_account_posted")
|
137
|
+
SubPub::Register.instance.subscriptions.count.should == 1
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
123
141
|
describe "active record configuration" do
|
124
142
|
describe "after create" do
|
125
143
|
before do
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sub_pub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.14
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- zephyr-dev@googlegroups.com
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-04-08 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description: In process publish/subscribe for Ruby
|
15
14
|
email:
|
@@ -20,6 +19,7 @@ extra_rdoc_files: []
|
|
20
19
|
files:
|
21
20
|
- .gitignore
|
22
21
|
- .rspec
|
22
|
+
- .travis.yml
|
23
23
|
- Gemfile
|
24
24
|
- Gemfile.lock
|
25
25
|
- LICENSE.txt
|
@@ -36,12 +36,6 @@ files:
|
|
36
36
|
- lib/sub_pub/subscription.rb
|
37
37
|
- lib/sub_pub/version.rb
|
38
38
|
- lib/sub_pub_matchers.rb
|
39
|
-
- pkg/sub_pub-0.0.3.gem
|
40
|
-
- pkg/sub_pub-0.0.4.gem
|
41
|
-
- pkg/sub_pub-0.0.6.gem
|
42
|
-
- pkg/sub_pub-0.0.7.gem
|
43
|
-
- pkg/sub_pub-0.0.8.gem
|
44
|
-
- pkg/sub_pub-0.0.9.gem
|
45
39
|
- spec/integration/sub_pub_spec.rb
|
46
40
|
- spec/spec_helper.rb
|
47
41
|
- spec/unit/active_record_matchers_spec.rb
|
@@ -52,27 +46,26 @@ files:
|
|
52
46
|
- sub_pub.gemspec
|
53
47
|
homepage: ''
|
54
48
|
licenses: []
|
49
|
+
metadata: {}
|
55
50
|
post_install_message:
|
56
51
|
rdoc_options: []
|
57
52
|
require_paths:
|
58
53
|
- lib
|
59
54
|
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
55
|
requirements:
|
62
|
-
- -
|
56
|
+
- - '>='
|
63
57
|
- !ruby/object:Gem::Version
|
64
58
|
version: '0'
|
65
59
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
60
|
requirements:
|
68
|
-
- -
|
61
|
+
- - '>='
|
69
62
|
- !ruby/object:Gem::Version
|
70
63
|
version: '0'
|
71
64
|
requirements: []
|
72
65
|
rubyforge_project:
|
73
|
-
rubygems_version: 1.
|
66
|
+
rubygems_version: 2.1.11
|
74
67
|
signing_key:
|
75
|
-
specification_version:
|
68
|
+
specification_version: 4
|
76
69
|
summary: SubPub is a thin wrapper around ActiveSupport::Notifications, which provides
|
77
70
|
an implementation of the Publish/Subscribe pattern.
|
78
71
|
test_files:
|
data/pkg/sub_pub-0.0.3.gem
DELETED
Binary file
|
data/pkg/sub_pub-0.0.4.gem
DELETED
Binary file
|
data/pkg/sub_pub-0.0.6.gem
DELETED
Binary file
|
data/pkg/sub_pub-0.0.7.gem
DELETED
Binary file
|
data/pkg/sub_pub-0.0.8.gem
DELETED
Binary file
|
data/pkg/sub_pub-0.0.9.gem
DELETED
Binary file
|