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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f11e00e55117bf997579f4d0cd0ba9acb4242d5e5045c519c36f938f637235d8
4
- data.tar.gz: f4091e3ef9660c00ad6620dc45d648adb686174549eda5ecc33cf7e4e654da41
3
+ metadata.gz: 8372bdfe560b7af14829350fbf06a4eec6efa573f6b87fe992dab61cc1dd74cd
4
+ data.tar.gz: bb4ebe4172bcea05940571909984b82d1e64eb146068ccffb00a6c028fe1313e
5
5
  SHA512:
6
- metadata.gz: 155c248f28980870789ac3a679ce2a8a89434be67d91164ad19444b9f7ce7de2c4b1796f007f417bb14f01ae0ba26f7c0aa20fcf599ed800b67bd054932feb0f
7
- data.tar.gz: 6ed42de3b14e5de5de1ce707f528203be37344afeb2c25ce394d36e28a959afa07cc6ec2957c601732e7ff1a94c69b5225f3283a3313e127e10ec332a3bfabe7
6
+ metadata.gz: f37a5e1fe74a4308edc897948c6450c272a4498a4a2abcf378133e1d8741235274b589809f77286eccfa28f1afce555ff36a4b33d33b3083ea42eedb587c0667
7
+ data.tar.gz: 8f67cf67140471f8621088032eda74d715150777482ad1afdfd5585949b473911e8a33c9ca87885576b4c05c910921832e2eced3bb371c25466eec1b260f846e
@@ -4,7 +4,7 @@ module Notifier
4
4
  module Version
5
5
  MAJOR = 1
6
6
  MINOR = 2
7
- PATCH = 1
7
+ PATCH = 2
8
8
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
9
9
  end
10
10
  end
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 + [Placebo]
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::Snarl, Notifier.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.1
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