notifyor 0.5.9 → 0.6.0
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/notifyor/growl.rb +12 -1
- data/lib/notifyor/growl/adapters/libnotify_notifier.rb +14 -0
- data/lib/notifyor/util/os_analyzer.rb +23 -0
- data/lib/notifyor/version.rb +1 -1
- 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: a861fe6c36b3592bf74b9afe711ab8de22618cea
|
4
|
+
data.tar.gz: ecb693808505195952efaccc89b6a5f96037e2d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16cf82af9309476da346619354c0c494d1716b10eecd01f260340903df8f7f178e7f3f933a0c56f601ae0359fa6b48c185594724d4e1c38c90c9ce2fbb420314
|
7
|
+
data.tar.gz: b9c667ad5bef798beacb48b6d403083bdb63bbd134266f2344969f9aaed79e579a0f16b636774719a0d47b2ee98786fbd0d8f12cfb8d8bbb930b30771360143b
|
data/lib/notifyor/growl.rb
CHANGED
@@ -1,10 +1,21 @@
|
|
1
|
+
require 'notifyor/util/os_analyzer'
|
1
2
|
module Notifyor
|
2
3
|
module Growl
|
3
4
|
extend self
|
4
5
|
|
5
6
|
def adapter
|
6
7
|
return @adapter if @adapter
|
7
|
-
self.adapter =
|
8
|
+
self.adapter =
|
9
|
+
case ::Notifyor::Util::OSAnalyzer.os
|
10
|
+
when :macosx
|
11
|
+
:terminal_notifier
|
12
|
+
when :linux
|
13
|
+
:libnotify_notifier
|
14
|
+
when :unix
|
15
|
+
:libnotify_notifier
|
16
|
+
else
|
17
|
+
raise 'Operating system not recognized.'
|
18
|
+
end
|
8
19
|
@adapter
|
9
20
|
end
|
10
21
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'rbconfig'
|
2
|
+
module Notifyor
|
3
|
+
module Util
|
4
|
+
module OSAnalyzer
|
5
|
+
extend self
|
6
|
+
def os
|
7
|
+
host_os = RbConfig::CONFIG['host_os']
|
8
|
+
case host_os
|
9
|
+
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
|
10
|
+
:windows
|
11
|
+
when /darwin|mac os/
|
12
|
+
:macosx
|
13
|
+
when /linux/
|
14
|
+
:linux
|
15
|
+
when /solaris|bsd/
|
16
|
+
:unix
|
17
|
+
else
|
18
|
+
raise "unknown os: #{host_os.inspect}"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/notifyor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notifyor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erwin Schens
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -124,10 +124,12 @@ files:
|
|
124
124
|
- lib/notifyor/cli.rb
|
125
125
|
- lib/notifyor/configuration.rb
|
126
126
|
- lib/notifyor/growl.rb
|
127
|
+
- lib/notifyor/growl/adapters/libnotify_notifier.rb
|
127
128
|
- lib/notifyor/growl/adapters/terminal_notifier.rb
|
128
129
|
- lib/notifyor/plugin.rb
|
129
130
|
- lib/notifyor/remote/connection.rb
|
130
131
|
- lib/notifyor/util/formatter.rb
|
132
|
+
- lib/notifyor/util/os_analyzer.rb
|
131
133
|
- lib/notifyor/version.rb
|
132
134
|
- spec/spec_helper.rb
|
133
135
|
- spec/test_app/README.rdoc
|