notify-push 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/README.md +11 -2
- data/Rakefile +14 -2
- data/VERSION +1 -1
- data/images/doc/terminal-notifier.png +0 -0
- data/lib/notify-push.rb +12 -2
- data/notify-push.gemspec +5 -4
- metadata +17 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 581cc05efeb0b564d252364f42aa1db17a5d6051
|
4
|
+
data.tar.gz: c56ef57c8b7807d72be9bf904b67bff07910dfb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8663dac87a2e3fa870929271b4630f2e901e4ab6426714da9c59158f4557a3e6310dc6ccae2b383ed7d8521c1dbb0c89f810aac8b8776ccddcf78bd1e1ddf958
|
7
|
+
data.tar.gz: e40672519d2a75536449008c685567aa3c1cba688cf30f093345321ca5fb112ac3f5d006a10061a32a73a7aa2c7d88704cc5910eb055e6c59fd708647a79961f
|
data/README.md
CHANGED
@@ -1,9 +1,18 @@
|
|
1
1
|
# notify-push
|
2
|
-
A general purpose popup notifier sender/receiver for using WebSockets (via Pusher).
|
2
|
+
A general purpose popup notifier sender/receiver for using WebSockets (via [Pusher](https://pusher.com)).
|
3
|
+
|
4
|
+
## Overview
|
5
|
+
`notify-push` employs a Receiver (*currently OS X only*) and Sender(s) to push messages from the Sender(s) to the Receiver.
|
6
|
+
|
7
|
+
|
8
|
+

|
9
|
+
|
10
|
+
**Example Use Case**:
|
11
|
+
You have `irssi` set up in a `screen` on a remote machine and you want to be notified on your laptop/desktop whenever your name gets highlighted.
|
3
12
|
|
4
13
|
## Disclaimer
|
5
14
|
|
6
|
-

|
7
16
|
|
8
17
|
## Installation
|
9
18
|
|
data/Rakefile
CHANGED
@@ -24,9 +24,21 @@ Jeweler::Tasks.new do |gem|
|
|
24
24
|
gem.licenses = ["GPL-2"]
|
25
25
|
gem.post_install_message = <<-EOS
|
26
26
|
---------------------------------------------------------------
|
27
|
-
|
27
|
+
If you have not done so, you will need to create a configuration file at:
|
28
|
+
|
29
|
+
~/.notify-pushrc
|
30
|
+
|
31
|
+
See the instructions/example at:
|
32
|
+
|
33
|
+
https://github.com/eriknomitch/notify-push#create--distribute-configuration-file
|
34
|
+
|
35
|
+
Or, modify this example. It's pretty straightforward:
|
36
|
+
|
37
|
+
pusher:
|
38
|
+
key: a1a2a3b1b2b3c1c2c3d1
|
39
|
+
secret: a1a2a3b1b2b3c1c3c1d1
|
40
|
+
app_id: 12345
|
28
41
|
|
29
|
-
See the example at https://github.com/eriknomitch/notify-push
|
30
42
|
---------------------------------------------------------------
|
31
43
|
EOS
|
32
44
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
Binary file
|
data/lib/notify-push.rb
CHANGED
@@ -63,18 +63,27 @@ module NotifyPush
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def self.start()
|
66
|
-
require "pusher"
|
67
66
|
|
68
67
|
# The only thing we require is a message.
|
69
68
|
# The others will be nil if not supplied.
|
70
69
|
raise "No message supplied." if ARGV[0].blank?
|
71
|
-
|
70
|
+
|
72
71
|
notification = {
|
73
72
|
message: ARGV[0],
|
74
73
|
title: ARGV[1],
|
75
74
|
subtitle: ARGV[2]
|
76
75
|
}
|
77
76
|
|
77
|
+
puts "Sending notification (backgrounded) with data:"
|
78
|
+
puts " message-> #{notification[:message]}"
|
79
|
+
puts " title-> #{notification[:title]}"
|
80
|
+
puts " subtitle-> #{notification[:subtitle]}"
|
81
|
+
|
82
|
+
# Daemonize now.
|
83
|
+
Process.daemon true
|
84
|
+
|
85
|
+
require "pusher"
|
86
|
+
|
78
87
|
# Strip the nil key/value pairs out so we don't have to
|
79
88
|
# worry about them on the Receiver end.
|
80
89
|
notification.delete_if {|key, value| value.blank?}
|
@@ -144,6 +153,7 @@ module NotifyPush
|
|
144
153
|
|
145
154
|
require "pusher-client"
|
146
155
|
|
156
|
+
|
147
157
|
socket = PusherClient::Socket.new configuration.pusher.key, {
|
148
158
|
secure: true
|
149
159
|
}
|
data/notify-push.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: notify-push 0.1.
|
5
|
+
# stub: notify-push 0.1.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "notify-push"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Erik Nomitch"]
|
14
|
-
s.date = "2015-06-
|
14
|
+
s.date = "2015-06-05"
|
15
15
|
s.description = "A general purpose popup notifier sender/receiver using WebSockets (via Pusher)"
|
16
16
|
s.email = "erik@nomitch.com"
|
17
17
|
s.executables = ["notify-push"]
|
@@ -28,6 +28,7 @@ Gem::Specification.new do |s|
|
|
28
28
|
"Rakefile",
|
29
29
|
"VERSION",
|
30
30
|
"bin/notify-push",
|
31
|
+
"images/doc/terminal-notifier.png",
|
31
32
|
"lib/notify-push.rb",
|
32
33
|
"notify-push.gemspec",
|
33
34
|
"ofe.json",
|
@@ -37,7 +38,7 @@ Gem::Specification.new do |s|
|
|
37
38
|
]
|
38
39
|
s.homepage = "http://github.com/eriknomitch/notify-push"
|
39
40
|
s.licenses = ["GPL-2"]
|
40
|
-
s.post_install_message = "---------------------------------------------------------------\
|
41
|
+
s.post_install_message = "---------------------------------------------------------------\nIf you have not done so, you will need to create a configuration file at:\n\n~/.notify-pushrc\n\nSee the instructions/example at:\n\nhttps://github.com/eriknomitch/notify-push#create--distribute-configuration-file\n\nOr, modify this example. It's pretty straightforward:\n\npusher:\n key: a1a2a3b1b2b3c1c2c3d1\n secret: a1a2a3b1b2b3c1c3c1d1\n app_id: 12345\n\n---------------------------------------------------------------\n"
|
41
42
|
s.rubygems_version = "2.4.6"
|
42
43
|
s.summary = "A general purpose popup notifier sender/receiver using WebSockets (via Pusher)"
|
43
44
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notify-push
|
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
|
- Erik Nomitch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pusher
|
@@ -196,6 +196,7 @@ files:
|
|
196
196
|
- Rakefile
|
197
197
|
- VERSION
|
198
198
|
- bin/notify-push
|
199
|
+
- images/doc/terminal-notifier.png
|
199
200
|
- lib/notify-push.rb
|
200
201
|
- notify-push.gemspec
|
201
202
|
- ofe.json
|
@@ -208,9 +209,21 @@ licenses:
|
|
208
209
|
metadata: {}
|
209
210
|
post_install_message: |
|
210
211
|
---------------------------------------------------------------
|
211
|
-
|
212
|
+
If you have not done so, you will need to create a configuration file at:
|
213
|
+
|
214
|
+
~/.notify-pushrc
|
215
|
+
|
216
|
+
See the instructions/example at:
|
217
|
+
|
218
|
+
https://github.com/eriknomitch/notify-push#create--distribute-configuration-file
|
219
|
+
|
220
|
+
Or, modify this example. It's pretty straightforward:
|
221
|
+
|
222
|
+
pusher:
|
223
|
+
key: a1a2a3b1b2b3c1c2c3d1
|
224
|
+
secret: a1a2a3b1b2b3c1c3c1d1
|
225
|
+
app_id: 12345
|
212
226
|
|
213
|
-
See the example at https://github.com/eriknomitch/notify-push
|
214
227
|
---------------------------------------------------------------
|
215
228
|
rdoc_options: []
|
216
229
|
require_paths:
|