gwtf 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/gwtf.rb +6 -0
- data/lib/gwtf/notifier/pushover.rb +40 -0
- data/lib/gwtf/version.rb +1 -1
- metadata +93 -116
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 09ead8722aa497dbe491ebbf3aee02ba9302d23c
|
4
|
+
data.tar.gz: fc0cee0c5cf5f3d30f40d6d1abd43c5ccb84d25a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b39753735b7087eec792a783505df3641adf81abb5b3659a841c93e30ea7c26b1ac4e98b5190f932a4044e798d064c97ee66d9ef99dd24e7198ee2654a22906d
|
7
|
+
data.tar.gz: da5aede4267581b5b5498683834772b6815deb72bfd674251f36a79c804faa041aec9a394e7fca7c6513871c573b437fc18e27b9b4dfb8b141f69cca8f47abfd
|
data/lib/gwtf.rb
CHANGED
@@ -69,6 +69,12 @@ module Gwtf
|
|
69
69
|
require 'gwtf/notifier/notifo'
|
70
70
|
|
71
71
|
return Notifier::Notifo
|
72
|
+
when "pushover"
|
73
|
+
gem 'pushover'
|
74
|
+
require 'pushover'
|
75
|
+
require 'gwtf/notifier/pushover'
|
76
|
+
|
77
|
+
return Notifier::Pushover
|
72
78
|
else
|
73
79
|
raise "Do not know how to handle addresses of type #{protocol} for #{address}"
|
74
80
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Gwtf
|
2
|
+
module Notifier
|
3
|
+
class Pushover<Base
|
4
|
+
def notify
|
5
|
+
config_file = File.join(Etc.getpwuid.dir, ".pushover")
|
6
|
+
|
7
|
+
raise "Please configure pushover in ~/.pushover" unless File.exist?(config_file)
|
8
|
+
|
9
|
+
config = YAML.load_file(config_file)
|
10
|
+
|
11
|
+
raise "Config needs to be a hash" unless config.is_a?(Hash)
|
12
|
+
raise "Config must include :app_token" unless config[:app_token]
|
13
|
+
|
14
|
+
uri = URI.parse(recipient)
|
15
|
+
|
16
|
+
raise "Recipient must have a host portion" unless uri.host
|
17
|
+
|
18
|
+
::Pushover.token = config[:app_token]
|
19
|
+
::Pushover.user = uri.host
|
20
|
+
|
21
|
+
if item.project == "default"
|
22
|
+
msg = "%s: %s" % [ item.item_id, item.subject ]
|
23
|
+
else
|
24
|
+
msg = "%s:%s: %s" % [ item.project, item.item_id, item.subject ]
|
25
|
+
end
|
26
|
+
|
27
|
+
result = ::Pushover.notification(
|
28
|
+
:title => config.fetch(:title, "gwtf"),
|
29
|
+
:sound => config.fetch(:sound, "pushover"),
|
30
|
+
:message => msg
|
31
|
+
)
|
32
|
+
|
33
|
+
unless result.code == 200
|
34
|
+
raise("Failed to notify via pushover: %s" % responce.inspect)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
data/lib/gwtf/version.rb
CHANGED
metadata
CHANGED
@@ -1,158 +1,135 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: gwtf
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease: false
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 9
|
9
|
-
- 0
|
10
|
-
version: 0.9.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.10.0
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- R.I.Pienaar
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2015-09-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
22
14
|
name: rake
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 3
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
33
20
|
type: :development
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: rdoc
|
37
21
|
prerelease: false
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rdoc
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
47
34
|
type: :development
|
48
|
-
version_requirements: *id002
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: json
|
51
35
|
prerelease: false
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: json
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
61
48
|
type: :runtime
|
62
|
-
version_requirements: *id003
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
|
-
name: gli
|
65
49
|
prerelease: false
|
66
|
-
|
67
|
-
|
68
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: gli
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
69
59
|
- - ~>
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
hash: 15
|
72
|
-
segments:
|
73
|
-
- 1
|
74
|
-
- 6
|
75
|
-
- 0
|
60
|
+
- !ruby/object:Gem::Version
|
76
61
|
version: 1.6.0
|
77
62
|
type: :runtime
|
78
|
-
version_requirements: *id004
|
79
|
-
- !ruby/object:Gem::Dependency
|
80
|
-
name: chronic
|
81
63
|
prerelease: false
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.6.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: chronic
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
91
76
|
type: :runtime
|
92
|
-
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
93
83
|
description: A Unix cli centric todo manager
|
94
84
|
email: rip@devco.net
|
95
|
-
executables:
|
85
|
+
executables:
|
96
86
|
- gwtf
|
97
87
|
extensions: []
|
98
|
-
|
99
88
|
extra_rdoc_files: []
|
100
|
-
|
101
|
-
files:
|
89
|
+
files:
|
102
90
|
- bin/gwtf
|
103
|
-
- lib/
|
104
|
-
- lib/gwtf/commands/show_command.rb
|
105
|
-
- lib/gwtf/commands/open_command.rb
|
106
|
-
- lib/gwtf/commands/shell_command.rb
|
107
|
-
- lib/gwtf/commands/notify_command.rb
|
91
|
+
- lib/gwtf.rb
|
108
92
|
- lib/gwtf/commands/done_command.rb
|
109
|
-
- lib/gwtf/commands/log_command.rb
|
110
93
|
- lib/gwtf/commands/edit_command.rb
|
111
|
-
- lib/gwtf/commands/new_command.rb
|
112
94
|
- lib/gwtf/commands/list_command.rb
|
95
|
+
- lib/gwtf/commands/log_command.rb
|
96
|
+
- lib/gwtf/commands/new_command.rb
|
97
|
+
- lib/gwtf/commands/notify_command.rb
|
98
|
+
- lib/gwtf/commands/open_command.rb
|
113
99
|
- lib/gwtf/commands/remind_command.rb
|
114
|
-
- lib/gwtf/
|
115
|
-
- lib/gwtf/
|
100
|
+
- lib/gwtf/commands/shell_command.rb
|
101
|
+
- lib/gwtf/commands/show_command.rb
|
102
|
+
- lib/gwtf/item.rb
|
103
|
+
- lib/gwtf/items.rb
|
116
104
|
- lib/gwtf/notifier/base.rb
|
105
|
+
- lib/gwtf/notifier/boxcar.rb
|
106
|
+
- lib/gwtf/notifier/email.rb
|
117
107
|
- lib/gwtf/notifier/notifo.rb
|
108
|
+
- lib/gwtf/notifier/pushover.rb
|
118
109
|
- lib/gwtf/version.rb
|
119
|
-
- lib/
|
120
|
-
- lib/gwtf/items.rb
|
121
|
-
- lib/gwtf.rb
|
122
|
-
has_rdoc: true
|
110
|
+
- lib/objhash.rb
|
123
111
|
homepage: http://devco.net/
|
124
112
|
licenses: []
|
125
|
-
|
113
|
+
metadata: {}
|
126
114
|
post_install_message:
|
127
115
|
rdoc_options: []
|
128
|
-
|
129
|
-
require_paths:
|
116
|
+
require_paths:
|
130
117
|
- lib
|
131
118
|
- lib
|
132
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
none: false
|
143
|
-
requirements:
|
144
|
-
- - ">="
|
145
|
-
- !ruby/object:Gem::Version
|
146
|
-
hash: 3
|
147
|
-
segments:
|
148
|
-
- 0
|
149
|
-
version: "0"
|
119
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - '>='
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - '>='
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0'
|
150
129
|
requirements: []
|
151
|
-
|
152
130
|
rubyforge_project:
|
153
|
-
rubygems_version:
|
131
|
+
rubygems_version: 2.0.14
|
154
132
|
signing_key:
|
155
|
-
specification_version:
|
133
|
+
specification_version: 4
|
156
134
|
summary: Go With The Flow
|
157
135
|
test_files: []
|
158
|
-
|