notifier 1.2.1 → 1.2.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/notifier/version.rb +1 -1
- data/lib/notifier.rb +4 -2
- data/test/{notifier/notifier_test.rb → notifier_test.rb} +2 -1
- data/test/test_helper.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8372bdfe560b7af14829350fbf06a4eec6efa573f6b87fe992dab61cc1dd74cd
|
4
|
+
data.tar.gz: bb4ebe4172bcea05940571909984b82d1e64eb146068ccffb00a6c028fe1313e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f37a5e1fe74a4308edc897948c6450c272a4498a4a2abcf378133e1d8741235274b589809f77286eccfa28f1afce555ff36a4b33d33b3083ea42eedb587c0667
|
7
|
+
data.tar.gz: 8f67cf67140471f8621088032eda74d715150777482ad1afdfd5585949b473911e8a33c9ca87885576b4c05c910921832e2eced3bb371c25466eec1b260f846e
|
data/lib/notifier/version.rb
CHANGED
data/lib/notifier.rb
CHANGED
@@ -39,9 +39,11 @@ module Notifier
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def notifiers
|
42
|
-
constants.filter_map do |name|
|
42
|
+
notifiers = constants.filter_map do |name|
|
43
43
|
const_get(name) unless skip_constants.include?(name.to_s)
|
44
|
-
end
|
44
|
+
end
|
45
|
+
|
46
|
+
notifiers.sort_by(&:name) + [Placebo]
|
45
47
|
end
|
46
48
|
|
47
49
|
def supported_notifiers
|
@@ -28,8 +28,9 @@ class NotifierTest < Minitest::Test
|
|
28
28
|
test "returns first available notifier" do
|
29
29
|
Notifier::Snarl.stubs(:supported?).returns(true)
|
30
30
|
Notifier::Knotify.stubs(:supported?).returns(true)
|
31
|
+
Notifier::Hud.stubs(:supported?).returns(true)
|
31
32
|
|
32
|
-
assert_equal Notifier::
|
33
|
+
assert_equal Notifier::Hud, Notifier.notifier
|
33
34
|
end
|
34
35
|
|
35
36
|
test "prefers default notifier" do
|
data/test/test_helper.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
ENV.delete("NOTIFIER")
|
4
|
+
|
3
5
|
require "simplecov"
|
4
6
|
SimpleCov.start
|
5
7
|
|
@@ -8,8 +10,6 @@ require "notifier"
|
|
8
10
|
require "minitest/utils"
|
9
11
|
require "minitest/autorun"
|
10
12
|
|
11
|
-
Notifier.default_notifier = :hud
|
12
|
-
|
13
13
|
module Snarl
|
14
14
|
def self.show_message(*)
|
15
15
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
@@ -133,8 +133,8 @@ files:
|
|
133
133
|
- lib/notifier/terminal_notifier.rb
|
134
134
|
- lib/notifier/version.rb
|
135
135
|
- notifier.gemspec
|
136
|
-
- test/notifier/notifier_test.rb
|
137
136
|
- test/notifier/snarl_test.rb
|
137
|
+
- test/notifier_test.rb
|
138
138
|
- test/test_helper.rb
|
139
139
|
homepage: http://rubygems.org/gems/notifier
|
140
140
|
licenses: []
|
@@ -162,6 +162,6 @@ specification_version: 4
|
|
162
162
|
summary: Send system notifications on several platforms with a simple and unified
|
163
163
|
API. Currently supports Libnotify, OSD, KDE (Knotify and Kdialog) and Snarl
|
164
164
|
test_files:
|
165
|
-
- test/notifier/notifier_test.rb
|
166
165
|
- test/notifier/snarl_test.rb
|
166
|
+
- test/notifier_test.rb
|
167
167
|
- test/test_helper.rb
|