terminal-notifier 1.7.0 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96140bb35740bd35bddea3e2e202a32cf1617a1f
4
- data.tar.gz: 2f170c56de4b2721ec500173a4103bd86fe60390
3
+ metadata.gz: eb346770c5841b855bd10ed29ef4978737796f04
4
+ data.tar.gz: a0a5aafa6599e3f25b9a77008caef94b5e1bd2ad
5
5
  SHA512:
6
- metadata.gz: 29ec5f7c96e9be0a0610a9151634edd0eb1e9761a48d6ed86a3b4e2d60338cf30a75bf1fd13068cb653bd32ffcf640f2fdbe9867c56cdb689b1d4eb4a8b319aa
7
- data.tar.gz: 0ac46c139e48faf4d4140b6ae8f451b115c870e499450af99dd28989eb8768094fb2ab8c4d5ab893b1e44837988dbc4738cfa337ec736f016bce69e82ad61728
6
+ metadata.gz: cb29172445667301209d649c57c0859c2f2efd49732d1626cd0372739d2d2ad2bd5f183dd341b3c7a1a1573a11710eb8a716f6838ffac1e3b6c750dc5a88d32a
7
+ data.tar.gz: ed36e3f179a80f957e1e55b375e59080a4590e40f7d5b0f0c536671f511c7b0d01409a7f22ce20a174bf423069b56298e2b111d9e6292594a2da9b9c9dccb68b
@@ -0,0 +1,9 @@
1
+ All the works are available under the MIT license. Except for ‘Terminal.icns’, which is a copy of Apple’s Terminal.app icon and as such is copyright of Apple.
2
+
3
+ Copyright (C) 2012-2016 Eloy Durán eloy.de.enige@gmail.com, Julien Blanchard julien@sideburns.eu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -123,13 +123,13 @@ in Sound Preferences. Use 'default' for the default notification sound.
123
123
 
124
124
  -------------------------------------------------------------------------------
125
125
 
126
- `-reply`
126
+ `-reply` **[10.9+ only]**
127
127
 
128
128
  The notification will be displayed as a reply type alert.
129
129
 
130
130
  -------------------------------------------------------------------------------
131
131
 
132
- `-actions VALUE1,VALUE2,"VALUE 3"`
132
+ `-actions VALUE1,VALUE2,"VALUE 3"` **[10.9+ only]**
133
133
 
134
134
  The notification actions avalaible.
135
135
  When you provide more than one value, a dropdown will be displayed.
@@ -138,14 +138,14 @@ Does not work when -reply is used
138
138
 
139
139
  -------------------------------------------------------------------------------
140
140
 
141
- `-dropdownLabel VALUE`
141
+ `-dropdownLabel VALUE` **[10.9+ only]**
142
142
 
143
143
  The notification actions dropdown title (only when multiples -actions values are provided).
144
144
  Does not work when -reply is used
145
145
 
146
146
  -------------------------------------------------------------------------------
147
147
 
148
- `-closeLabel VALUE`
148
+ `-closeLabel VALUE` **[10.9+ only]**
149
149
 
150
150
  The notification "Close" button label.
151
151
 
@@ -259,7 +259,7 @@ All the works are available under the MIT license. **Except** for
259
259
  ‘Terminal.icns’, which is a copy of Apple’s Terminal.app icon and as such is
260
260
  copyright of Apple.
261
261
 
262
- Copyright (C) 2012-2015 Eloy Durán <eloy.de.enige@gmail.com>, Julien Blanchard
262
+ Copyright (C) 2012-2016 Eloy Durán <eloy.de.enige@gmail.com>, Julien Blanchard
263
263
  <julien@sideburns.eu>
264
264
 
265
265
  Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -224,8 +224,10 @@ isMavericks()
224
224
  options[@"output"] = @"json";
225
225
  }
226
226
 
227
- options[@"timeout"] = @"0";
228
- if (defaults[@"timeout"]) options[@"timeout"] = defaults[@"timeout"];
227
+ options[@"uuid"] = [NSString stringWithFormat:@"%ld", self.hash];
228
+ options[@"timeout"] = defaults[@"timeout"] ? defaults[@"timeout"] : @"0";
229
+
230
+ if (options[@"reply"] || defaults[@"timeout"] || defaults[@"actions"]) options[@"waitForResponse"] = @YES;
229
231
 
230
232
  if (defaults[@"open"]) {
231
233
  /*
@@ -303,37 +305,32 @@ isMavericks()
303
305
  // content image
304
306
  userNotification.contentImage = [self getImageFromURL:options[@"contentImage"]];
305
307
  }
306
- }
307
-
308
- if (sound != nil) {
309
- userNotification.soundName = [sound isEqualToString: @"default"] ? NSUserNotificationDefaultSoundName : sound;
310
- }
311
-
312
- // Actions
313
- if (options[@"actions"]){
314
- [userNotification setValue:@YES forKey:@"_showsButtons"];
315
- NSArray *myActions = [options[@"actions"] componentsSeparatedByString:@","];
316
- if (myActions.count > 1) {
317
- [userNotification setValue:@YES forKey:@"_alwaysShowAlternateActionMenu"];
318
- [userNotification setValue:myActions forKey:@"_alternateActionButtonTitles"];
319
-
320
- //Main Actions Title
321
- if(options[@"dropdownLabel"]){
322
- userNotification.actionButtonTitle = options[@"dropdownLabel"];
323
- userNotification.hasActionButton = true;
308
+ // Actions
309
+ if (options[@"actions"]){
310
+ [userNotification setValue:@YES forKey:@"_showsButtons"];
311
+ NSArray *myActions = [options[@"actions"] componentsSeparatedByString:@","];
312
+ if (myActions.count > 1) {
313
+ [userNotification setValue:@YES forKey:@"_alwaysShowAlternateActionMenu"];
314
+ [userNotification setValue:myActions forKey:@"_alternateActionButtonTitles"];
315
+
316
+ //Main Actions Title
317
+ if(options[@"dropdownLabel"]){
318
+ userNotification.actionButtonTitle = options[@"dropdownLabel"];
319
+ userNotification.hasActionButton = true;
320
+ }
321
+ }else{
322
+ userNotification.actionButtonTitle = options[@"actions"];
324
323
  }
325
- }else{
326
- userNotification.actionButtonTitle = options[@"actions"];
324
+ }else if (options[@"reply"]) {
325
+ [userNotification setValue:@YES forKey:@"_showsButtons"];
326
+ userNotification.hasReplyButton = 1;
327
+ userNotification.responsePlaceholder = options[@"reply"];
327
328
  }
328
- }else if (options[@"reply"]) {
329
- [userNotification setValue:@YES forKey:@"_showsButtons"];
330
- userNotification.hasReplyButton = 1;
331
- userNotification.responsePlaceholder = options[@"reply"];
332
- }
333
329
 
334
- // Close button
335
- if(options[@"closeLabel"]){
336
- userNotification.otherButtonTitle = options[@"closeLabel"];
330
+ // Close button
331
+ if(options[@"closeLabel"]){
332
+ userNotification.otherButtonTitle = options[@"closeLabel"];
333
+ }
337
334
  }
338
335
 
339
336
  if (sound != nil) {
@@ -415,6 +412,8 @@ isMavericks()
415
412
  - (void)userNotificationCenter:(NSUserNotificationCenter *)center
416
413
  didDeliverNotification:(NSUserNotification *)userNotification;
417
414
  {
415
+ if (!userNotification.userInfo[@"waitForResponse"]) exit(0);
416
+
418
417
  currentNotification = userNotification;
419
418
 
420
419
  dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
@@ -427,6 +426,7 @@ isMavericks()
427
426
  }
428
427
  if (notificationStillPresent) [NSThread sleepForTimeInterval:0.20f];
429
428
  } while (notificationStillPresent);
429
+
430
430
  dispatch_async(dispatch_get_main_queue(), ^{
431
431
  NSDictionary *udict = @{@"activationType" : @"closed", @"activationValue" : userNotification.otherButtonTitle};
432
432
  [self Quit:udict notification:userNotification];
@@ -443,7 +443,6 @@ isMavericks()
443
443
  NSDictionary *udict = @{@"activationType" : @"timeout"};
444
444
  [self Quit:udict notification:userNotification];
445
445
  exit(0);
446
-
447
446
  });
448
447
  }
449
448
  }
@@ -590,15 +589,4 @@ isMavericks()
590
589
  }
591
590
  }
592
591
 
593
- - (void) bye; {
594
- //Look for the notification sent, remove it when found
595
- NSString *UUID = currentNotification.userInfo[@"uuid"];
596
- for (NSUserNotification *nox in [[NSUserNotificationCenter defaultUserNotificationCenter] deliveredNotifications]) {
597
- if ([nox.userInfo[@"uuid"] isEqualToString:UUID ]){
598
- [[NSUserNotificationCenter defaultUserNotificationCenter] removeDeliveredNotification:nox];
599
- [[NSUserNotificationCenter defaultUserNotificationCenter] removeDeliveredNotification:nox];
600
- }
601
- }
602
- }
603
-
604
592
  @end
@@ -17,11 +17,11 @@
17
17
  <key>CFBundlePackageType</key>
18
18
  <string>APPL</string>
19
19
  <key>CFBundleShortVersionString</key>
20
- <string>1.7.0</string>
20
+ <string>1.7.1</string>
21
21
  <key>CFBundleSignature</key>
22
22
  <string>????</string>
23
23
  <key>CFBundleVersion</key>
24
- <string>15</string>
24
+ <string>16</string>
25
25
  <key>LSMinimumSystemVersion</key>
26
26
  <string>${MACOSX_DEPLOYMENT_TARGET}</string>
27
27
  <key>LSUIElement</key>
@@ -3,7 +3,7 @@
3
3
  <plist version="1.0">
4
4
  <dict>
5
5
  <key>BuildMachineOSBuild</key>
6
- <string>16B2333a</string>
6
+ <string>15G1004</string>
7
7
  <key>CFBundleDevelopmentRegion</key>
8
8
  <string>en</string>
9
9
  <key>CFBundleExecutable</key>
@@ -19,7 +19,7 @@
19
19
  <key>CFBundlePackageType</key>
20
20
  <string>APPL</string>
21
21
  <key>CFBundleShortVersionString</key>
22
- <string>1.7.0</string>
22
+ <string>1.7.1</string>
23
23
  <key>CFBundleSignature</key>
24
24
  <string>????</string>
25
25
  <key>CFBundleSupportedPlatforms</key>
@@ -27,7 +27,7 @@
27
27
  <string>MacOSX</string>
28
28
  </array>
29
29
  <key>CFBundleVersion</key>
30
- <string>15</string>
30
+ <string>16</string>
31
31
  <key>DTCompiler</key>
32
32
  <string>com.apple.compilers.llvm.clang.1_0</string>
33
33
  <key>DTPlatformBuild</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: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-10-01 00:00:00.000000000 Z
12
+ date: 2016-10-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bacon
@@ -66,6 +66,7 @@ files:
66
66
  - README.markdown
67
67
  - bin/terminal-notifier
68
68
  - lib/terminal-notifier.rb
69
+ - vendor/terminal-notifier/LICENSE.md
69
70
  - vendor/terminal-notifier/README.markdown
70
71
  - vendor/terminal-notifier/Ruby/Gemfile
71
72
  - vendor/terminal-notifier/Ruby/Gemfile.lock
@@ -118,8 +119,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
119
  version: '0'
119
120
  requirements: []
120
121
  rubyforge_project:
121
- rubygems_version: 2.5.1
122
+ rubygems_version: 2.4.5.1
122
123
  signing_key:
123
124
  specification_version: 4
124
125
  summary: Send User Notifications on Mac OS X 10.8 or higher.
125
126
  test_files: []
127
+ has_rdoc: