crier 0.1.0 → 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 +5 -9
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,15 +1,14 @@
|
|
|
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
|
|
8
8
|
- Nicholas Jakobsen
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: rails
|
|
@@ -20,7 +19,7 @@ dependencies:
|
|
|
20
19
|
version: '5'
|
|
21
20
|
- - "<"
|
|
22
21
|
- !ruby/object:Gem::Version
|
|
23
|
-
version: '
|
|
22
|
+
version: '9'
|
|
24
23
|
type: :runtime
|
|
25
24
|
prerelease: false
|
|
26
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -30,7 +29,7 @@ dependencies:
|
|
|
30
29
|
version: '5'
|
|
31
30
|
- - "<"
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
32
|
+
version: '9'
|
|
34
33
|
- !ruby/object:Gem::Dependency
|
|
35
34
|
name: bundler
|
|
36
35
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -87,10 +86,8 @@ files:
|
|
|
87
86
|
- lib/crier/notification.rb
|
|
88
87
|
- lib/crier/version.rb
|
|
89
88
|
- lib/tasks/crier_tasks.rake
|
|
90
|
-
homepage:
|
|
91
89
|
licenses: []
|
|
92
90
|
metadata: {}
|
|
93
|
-
post_install_message:
|
|
94
91
|
rdoc_options: []
|
|
95
92
|
require_paths:
|
|
96
93
|
- lib
|
|
@@ -105,8 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
105
102
|
- !ruby/object:Gem::Version
|
|
106
103
|
version: '0'
|
|
107
104
|
requirements: []
|
|
108
|
-
rubygems_version:
|
|
109
|
-
signing_key:
|
|
105
|
+
rubygems_version: 4.0.10
|
|
110
106
|
specification_version: 4
|
|
111
107
|
summary: Simple notification for the whole town
|
|
112
108
|
test_files: []
|