foreign_office 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/foreign_office.rb +1 -0
- data/lib/foreign_office/foreign_office_helper.rb +15 -0
- data/lib/foreign_office/railtie.rb +8 -0
- data/lib/foreign_office/version.rb +1 -1
- data/test/dummy/log/test.log +11 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55270150e750fa6f209103448c796f3b34f8a762
|
4
|
+
data.tar.gz: 660fa594f55b965d17b480a021a32befe632ef33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a50cf24779141b53d93f9d3ac96c40f006e4e3720d497e0c765e89364f17f9eb9c47299160e8990ea9d0cc512c3456ef69081ece4e212fe90a4d3cf9df28e51
|
7
|
+
data.tar.gz: afb139d91e662406f4755090e8b408e003f8beb45f5a8b477db756c3c58f38d47e0abcdd3ff18ecdaa08619ac8e3a32bb0ee79079819d3fa99153cf3906d2ddb
|
data/lib/foreign_office.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
module ForeignOffice
|
2
|
+
module ForeignOfficeHelper
|
3
|
+
def listener_attrs(resource, key, subtype: nil)
|
4
|
+
data_attrs = "data-listener=true data-channel=#{resource.class.name}#{resource.id} data-key=#{key}"
|
5
|
+
data_attrs += " data-sub-type=#{subtype}" if subtype
|
6
|
+
data_attrs
|
7
|
+
end
|
8
|
+
|
9
|
+
def listener_attrs_raw(channel, key, subtype: nil)
|
10
|
+
data_attrs = "data-listener=true data-channel=#{channel} data-key=#{key}"
|
11
|
+
data_attrs += " data-sub-type=#{subtype}" if subtype
|
12
|
+
data_attrs
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/test/dummy/log/test.log
CHANGED
@@ -9,3 +9,14 @@ ForeignOffice.publish: {:channel=>"TestMeAgain", :object=>{:this=>"is another te
|
|
9
9
|
ForeignOffice#publish! attempt: 1 message: {:channel=>"TestMe", :object=>{:this=>"is a test"}}
|
10
10
|
ForeignOffice#publish! attempt: 1 message: {:channel=>"TestMeAgain", :object=>{:this=>"is another test"}}
|
11
11
|
ForeignOffice.publish: {:channel=>"TestMe", :object=>{:this=>"is a test"}}
|
12
|
+
ForeignOffice.publish: {:channel=>"TestMe", :object=>{:this=>"is a test"}}
|
13
|
+
ForeignOffice#publish! attempt: 1 message: {:channel=>"TestMe", :object=>{:this=>"is a test"}}
|
14
|
+
ForeignOffice.publish: {:channel=>"TestMe", :object=>{:this=>"is a test"}}
|
15
|
+
ForeignOffice.publish: {:channel=>"TestMe", :object=>{:this=>"is a test"}}
|
16
|
+
ForeignOffice.publish: {:channel=>"TestMeAgain", :object=>{:this=>"is another test"}}
|
17
|
+
ForeignOffice#publish! attempt: 1 message: {:channel=>"TestMe", :object=>{:this=>"is a test"}}
|
18
|
+
ForeignOffice#publish! attempt: 1 message: {:channel=>"TestMeAgain", :object=>{:this=>"is another test"}}
|
19
|
+
ForeignOffice.publish: {:channel=>"TestMe", :object=>{:this=>"is a test"}}
|
20
|
+
ForeignOffice.publish: {:channel=>"TestMe", :object=>{:this=>"is another test"}}
|
21
|
+
ForeignOffice.publish: {:channel=>"TestMe", :object=>{:this=>"is a test"}}
|
22
|
+
ForeignOffice.publish: {:channel=>"TestMeAgain", :object=>{:this=>"is another test"}}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreign_office
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Draut
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-02-
|
12
|
+
date: 2015-02-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -88,6 +88,8 @@ files:
|
|
88
88
|
- lib/foreign_office/busses/generic_bus.rb
|
89
89
|
- lib/foreign_office/busses/pubnub_bus.rb
|
90
90
|
- lib/foreign_office/busses/pusher_bus.rb
|
91
|
+
- lib/foreign_office/foreign_office_helper.rb
|
92
|
+
- lib/foreign_office/railtie.rb
|
91
93
|
- lib/foreign_office/test/client_exec.rb
|
92
94
|
- lib/foreign_office/test/fake_foreign_office.rb
|
93
95
|
- lib/foreign_office/version.rb
|