crier 0.1.1 → 0.1.2
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 +4 -4
- data/lib/crier/notification.rb +5 -1
- data/lib/crier/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8593661f6351d07a54212c66f60bd43b9c63bdc3c4e3f43d542ae088bfe64ea8
|
|
4
|
+
data.tar.gz: 3cd114a232c47265cf4a97dca544c9e0d516af4cae06c3dea8163f6a430b4b3d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e897e2444a150b1d395569cd18082a5462a36b1d0f164b04d4287b9e25ea3bbbb9e084ef7b0682399d8356a23a9ecc183e6c0ba61c1963b358ed448729d085c
|
|
7
|
+
data.tar.gz: 003ad685f0c813d2b15c3204a7244db0e16bb2f3c5b0861c54d14c4f6fabce9d8801678b0aea049508f838376f2d4b2a6897bf8afa805630d1f06b24119ff9dd
|
data/lib/crier/notification.rb
CHANGED
|
@@ -15,7 +15,11 @@ module Crier
|
|
|
15
15
|
store :metadata
|
|
16
16
|
|
|
17
17
|
scope :by, lambda {|user| where(:crier_id => user) }
|
|
18
|
-
|
|
18
|
+
# Public notifications, and private ones whose audience includes the user. The audience is
|
|
19
|
+
# matched with a subquery rather than a join: a join pairs every notification with every
|
|
20
|
+
# listener before any of them can be ruled out, and returns a public notification once per
|
|
21
|
+
# listener.
|
|
22
|
+
scope :heard_by, lambda {|user| where(:private => false).or(where(:id => Listening.where(:user_id => user.id).select(:notification_id))) }
|
|
19
23
|
scope :about, lambda {|subject| where(:subject_id => subject.id, :subject_type => subject.class.name) }
|
|
20
24
|
scope :in_scope, lambda {|scope| where(:scope => scope) }
|
|
21
25
|
|
data/lib/crier/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: crier
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Wallace
|
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
103
|
version: '0'
|
|
104
104
|
requirements: []
|
|
105
|
-
rubygems_version:
|
|
105
|
+
rubygems_version: 4.0.10
|
|
106
106
|
specification_version: 4
|
|
107
107
|
summary: Simple notification for the whole town
|
|
108
108
|
test_files: []
|