calasmash 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/calasmash/version.rb +1 -1
- data/lib/calasmash.rb +40 -11
- metadata +2 -2
data/lib/calasmash/version.rb
CHANGED
data/lib/calasmash.rb
CHANGED
@@ -4,6 +4,7 @@ require 'optparse'
|
|
4
4
|
require 'socket'
|
5
5
|
require 'cfpropertylist'
|
6
6
|
require 'find'
|
7
|
+
require 'open3'
|
7
8
|
|
8
9
|
module Calasmash
|
9
10
|
class Runner
|
@@ -78,13 +79,26 @@ module Calasmash
|
|
78
79
|
|
79
80
|
def compile
|
80
81
|
puts "Compiling..."
|
81
|
-
IO.popen("xcodebuild -workspace #{@options[:workspace]} -scheme #{@options[:scheme]} -sdk iphonesimulator CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO") {|output|
|
82
|
-
puts output.read
|
83
|
-
}
|
84
82
|
|
85
|
-
|
86
|
-
|
87
|
-
|
83
|
+
status = nil
|
84
|
+
xcode_command = "xcodebuild -workspace #{@options[:workspace]} -scheme #{@options[:scheme]} -sdk iphonesimulator CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO"
|
85
|
+
Open3.popen3 xcode_command do |stdin, out, err, wait_thr|
|
86
|
+
|
87
|
+
[out, err].each do |stream|
|
88
|
+
Thread.new do
|
89
|
+
until (line = stream.gets).nil? do
|
90
|
+
puts line
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
wait_thr.join
|
96
|
+
status = wait_thr.value.exitstatus
|
97
|
+
end
|
98
|
+
|
99
|
+
if status != 0
|
100
|
+
puts "Compilation failed: #{status}"
|
101
|
+
exit status
|
88
102
|
end
|
89
103
|
end
|
90
104
|
|
@@ -122,12 +136,27 @@ module Calasmash
|
|
122
136
|
cucumber_command = "cucumber OS=ios7 SDK_VERSION=7.0 DEVICE_TARGET=simulator"
|
123
137
|
cucumber_command += optional_params
|
124
138
|
|
125
|
-
|
126
|
-
|
127
|
-
|
139
|
+
status = nil
|
140
|
+
Open3.popen3 cucumber_command do |stdin, out, err, wait_thr|
|
141
|
+
|
142
|
+
[out, err].each do |stream|
|
143
|
+
Thread.new do
|
144
|
+
until (line = stream.gets).nil? do
|
145
|
+
puts line
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
wait_thr.join
|
151
|
+
status = wait_thr.value.exitstatus
|
152
|
+
end
|
153
|
+
|
154
|
+
if status != 0
|
155
|
+
puts "Cucumber failed: #{status}"
|
156
|
+
end
|
128
157
|
|
129
|
-
# exit with whatever status
|
130
|
-
exit
|
158
|
+
# exit with whatever status Cucumber has exited
|
159
|
+
exit status
|
131
160
|
end
|
132
161
|
|
133
162
|
def app_path
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calasmash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-10-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|