second_step 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/second_step/mac_os_notify.rb +3 -26
- data/lib/second_step/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f7de7d8999881171b6f36c0ab6482fe64e7203d
|
4
|
+
data.tar.gz: a32cb791fdb5582caf2bd7d529a394742b2a9ccf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0076cb65d37e1aa6d28acb01b0cc1aba971f01161f9ed3355a1adba786cfea9fd11aa7bc857c0dd033aeb40d6fe7bc896752a462a40aedd387cfb2c7f839460
|
7
|
+
data.tar.gz: 8c6dd713e06e472ae84939937a5599186f185a9a8c1d8026c0b85137c02c956c7b2d65ea41690575c734060cf51b9fe883e8825c487d03ced8bba000574f2873
|
@@ -67,7 +67,9 @@ end try
|
|
67
67
|
sender: 'com.getsecondstep.macos.mac-notify',
|
68
68
|
timeout: timeout)
|
69
69
|
if result
|
70
|
-
|
70
|
+
if result == :_contentclicked
|
71
|
+
result = notify_with_dialog(details.merge(from: from, actions: actions, action_text: action_text, ignore_label: ignore_label, show_details: show_details))
|
72
|
+
end
|
71
73
|
yield actions.include?(result) ? result : :ignore
|
72
74
|
else
|
73
75
|
raise NotificationError.new(result)
|
@@ -80,31 +82,6 @@ end try
|
|
80
82
|
TerminalNotifier.remove Process.pid
|
81
83
|
end
|
82
84
|
end
|
83
|
-
at_exit {
|
84
|
-
begin
|
85
|
-
unless Process.waitpid subprocess, Process::WNOHANG
|
86
|
-
puts "Waiting for notification in process #{subprocess} to finish..."
|
87
|
-
begin
|
88
|
-
Timeout.timeout(180) do
|
89
|
-
Process.wait subprocess
|
90
|
-
end
|
91
|
-
rescue Timeout::Error
|
92
|
-
puts "Process #{subprocess} not finishing... killing"
|
93
|
-
begin
|
94
|
-
Process.kill('HUP', subprocess)
|
95
|
-
Timeout.timeout(20) do
|
96
|
-
Process.wait subprocess
|
97
|
-
end
|
98
|
-
rescue Timeout::Error
|
99
|
-
puts "Process #{subprocess} not killing... terminating"
|
100
|
-
Process.kill(9, subprocess)
|
101
|
-
end
|
102
|
-
end
|
103
|
-
end
|
104
|
-
rescue Errno::ECHILD
|
105
|
-
true
|
106
|
-
end
|
107
|
-
}
|
108
85
|
end
|
109
86
|
end
|
110
87
|
end
|
data/lib/second_step/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: second_step
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|