reset-sim 1.1 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/reset-sim +27 -32
- 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: 27098c4ccbd598b01cffe8c3e215f17d62af8b7e
|
4
|
+
data.tar.gz: 2b9483db8a67d1eb2627fb540d478cad3dd5e9c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 073e05f09bf7547e2e3e968c6f89c38807f8afbb75eec856aef9424fc582e4303079a679033c464117ded000506d2a2ea8c0ff21047d5366b5800eed0b35fd2c
|
7
|
+
data.tar.gz: 0ca6b429904122e65703fe52195f294afc4aa6fc109cb5571967052b7d1c2153146957fdfee2f33fa1ec7e92e65a8f3fb64a48d1ba93cc6bb27ecd2207f2fdc2
|
data/bin/reset-sim
CHANGED
@@ -5,43 +5,38 @@ def osascript(script)
|
|
5
5
|
end
|
6
6
|
|
7
7
|
osascript <<-END
|
8
|
-
tell application "iOS Simulator"
|
9
|
-
activate
|
10
|
-
end tell
|
11
8
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
tell
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
9
|
+
-- assume most people are on xcode7 or greater
|
10
|
+
-- so try that first
|
11
|
+
set simulator_app_name to missing value
|
12
|
+
try
|
13
|
+
tell application "Simulator" to activate
|
14
|
+
set simulator_app_name to "Simulator"
|
15
|
+
on error number -1728
|
16
|
+
log "Trying legacy iOS Simulator application..."
|
17
|
+
try
|
18
|
+
tell application "iOS Simulator" to activate
|
19
|
+
set simulator_app_name to "iOS Simulator"
|
20
|
+
on error number -1728
|
21
|
+
log "No Simulator application installed"
|
22
|
+
end try
|
23
|
+
end try
|
27
24
|
|
28
|
-
osascript <<-END
|
29
|
-
tell application "Simulator"
|
30
|
-
activate
|
31
|
-
end tell
|
32
25
|
|
33
|
-
|
34
|
-
tell
|
35
|
-
tell
|
36
|
-
tell menu bar
|
37
|
-
tell menu
|
38
|
-
|
26
|
+
if simulator_app_name is not equal to missing value
|
27
|
+
tell application "System Events"
|
28
|
+
tell process simulator_app_name
|
29
|
+
tell menu bar 1
|
30
|
+
tell menu bar item simulator_app_name
|
31
|
+
tell menu simulator_app_name
|
32
|
+
click menu item "Reset Content and Settings…"
|
33
|
+
end tell
|
39
34
|
end tell
|
40
35
|
end tell
|
41
|
-
|
42
|
-
|
43
|
-
|
36
|
+
tell window 1
|
37
|
+
click button "Reset"
|
38
|
+
end tell
|
44
39
|
end tell
|
45
40
|
end tell
|
46
|
-
end
|
41
|
+
end if
|
47
42
|
END
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reset-sim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Rickert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|