terminal-notifier 3.0.0 → 3.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78c9a9b889e4da2b6154981a05925abdbc29f29c50591d233e599b0de4cdff08
4
- data.tar.gz: 07c78da6932247a170a8b30289f7720089f82a1fd7120f769164295be777abdc
3
+ metadata.gz: d14d285bfc92eb5d67ada9d4fd9eea0d7cb0c0a0faae9dc5767d28831993b5cd
4
+ data.tar.gz: 65acaba321e1e12bc69e405616ee3665f01ca86d10a75508d96acaaf6235b1d3
5
5
  SHA512:
6
- metadata.gz: 94d37dc8ec053c61311c09931d7ab5d6a37922669fcf355d1a2569d86f0afc7ff913200e977e21d933329d4aaeb56b6e84bbdabe718694e9d8fc8f917e936976
7
- data.tar.gz: 3552e9814c3a24a63e898d3aaab4c6bbf12c8231d0ab55dfade43db566605dc9f1e18f053c85f2251f90b4c37e6d0bcf3b42d27c4a6bbb90fdc24388235464db
6
+ metadata.gz: d87f938a9c0bf33736ec38b08349364dad5ac87ac7409eafa6fef0b6c150b7af66593b59e981db13dae59c26407a148330243bff0e3b4e8fc1c1a2e604d49f6a
7
+ data.tar.gz: be7dcff41b265ba4e52d04327a1efbcc9ebd8e4ed2b119fefd194e98422fc7a05c273842be0d8c3fb2e4ce14931f40f0d8e9119e4bebf62759594eefec30c1f9
@@ -6,5 +6,5 @@ module TerminalNotifier
6
6
  #
7
7
  # Note: this is *not* TerminalNotifier.version, which returns the macOS
8
8
  # product version the tool is running on.
9
- VERSION = '3.0.0'
9
+ VERSION = '3.1.0'
10
10
  end
@@ -210,22 +210,23 @@ module TerminalNotifier
210
210
  # Removes a notification that was previously sent with the specified
211
211
  # ‘group’ ID, if one exists.
212
212
  #
213
- # If no ‘group’ ID is given, all notifications are removed.
214
- # rubocop:disable Naming/PredicateMethod -- `remove` is the public API name
215
- def remove(group = 'ALL', verbose = false)
213
+ # If no ‘group’ ID is given, all notifications are removed. Scheduled
214
+ # notifications that have not fired yet are cancelled.
215
+ def remove(group = 'ALL', verbose = false) # rubocop:disable Naming/PredicateMethod
216
216
  TerminalNotifier.execute(verbose, remove: group)
217
217
  TerminalNotifier.succeeded?
218
218
  end
219
- # rubocop:enable Naming/PredicateMethod
220
219
  module_function :remove
221
220
 
222
221
  LIST_FIELDS = %i[group title subtitle message delivered_at].freeze
223
222
 
223
+ LIST_ALL = %w[ALL PENDING].freeze
224
+
224
225
  # If a ‘group’ ID is given, and a notification for that group exists,
225
226
  # returns a hash with details about the notification.
226
227
  #
227
- # If nogroupID is given, an array of hashes describing all
228
- # notifications.
228
+ # If ‘ALL’ or PENDING’ is given, an array of hashes. ‘PENDING’ lists the
229
+ # notifications not yet fired, whose :delivered_at is when they are due.
229
230
  #
230
231
  # If no information is available this will return `nil`.
231
232
  def list(group = 'ALL', verbose = false)
@@ -235,7 +236,7 @@ module TerminalNotifier
235
236
  # Drop the header row.
236
237
  notifications = output.split("\n")[1..].to_a.map { |line| TerminalNotifier.parse_list_row(line) }
237
238
 
238
- group == 'ALL' ? notifications : notifications.first
239
+ LIST_ALL.include?(group) ? notifications : notifications.first
239
240
  end
240
241
  module_function :list
241
242
 
@@ -17,11 +17,11 @@
17
17
  <key>CFBundlePackageType</key>
18
18
  <string>APPL</string>
19
19
  <key>CFBundleShortVersionString</key>
20
- <string>3.0.0</string>
20
+ <string>3.1.0</string>
21
21
  <key>CFBundleSignature</key>
22
22
  <string>????</string>
23
23
  <key>CFBundleVersion</key>
24
- <string>16</string>
24
+ <string>17</string>
25
25
  <key>LSMinimumSystemVersion</key>
26
26
  <string>10.14</string>
27
27
  <key>LSUIElement</key>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terminal-notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran