apple_sim_utils 0.1.0 → 0.1.1
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 +4 -4
- data/lib/apple_sim_utils/command.rb +7 -17
- data/lib/apple_sim_utils/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 955b74a3847528b5b2c2cfc251dcd205a57e4f02
|
4
|
+
data.tar.gz: bd76986e89e5b760ad6206cd384ca56d11511bad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 745086bb894f57f49d5834446ec2b0a969291644fb8e49a3e74e4c98e1d07ebd39d17c0736edb02bd282e407df00283253ce17053c1c5670971e3fa577be4ca6
|
7
|
+
data.tar.gz: c5b2e072fc6151d09813e74d7d39fe29338d494f60666bfef07d2bc61b44bb1814bb5bb4cf88b0f022a2caca2feb5e6436b719b45558e8eb4f9e23bef927d43d
|
@@ -6,12 +6,14 @@ module AppleSimUtils
|
|
6
6
|
@path = get_command_path
|
7
7
|
end
|
8
8
|
|
9
|
-
private
|
10
|
-
|
11
9
|
def run(*command)
|
12
|
-
cmd = command.join(' ')
|
10
|
+
cmd = ([@path] + command).join(' ')
|
13
11
|
sto, ste, status = Open3.capture3(cmd)
|
14
12
|
if status.success?
|
13
|
+
unless ste.empty?
|
14
|
+
puts ste
|
15
|
+
return ste
|
16
|
+
end
|
15
17
|
sto
|
16
18
|
else
|
17
19
|
puts ste
|
@@ -19,24 +21,12 @@ module AppleSimUtils
|
|
19
21
|
end
|
20
22
|
end
|
21
23
|
|
24
|
+
private
|
25
|
+
|
22
26
|
def get_command_path
|
23
27
|
cmd = `which applesimutils`.strip
|
24
28
|
return cmd unless cmd.empty?
|
25
29
|
raise "You should install applesimutils. Read https://github.com/wix/AppleSimulatorUtils"
|
26
30
|
end
|
27
|
-
|
28
|
-
protected
|
29
|
-
|
30
|
-
def method_missing(method, *args, &_block)
|
31
|
-
if respond_to_missing?
|
32
|
-
run(%W(#{@path} #{method}) + args)
|
33
|
-
else
|
34
|
-
super
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
def respond_to_missing?
|
39
|
-
true
|
40
|
-
end
|
41
31
|
end
|
42
32
|
end
|