xctest-runner 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/VERSION +1 -1
- data/bin/xctest-runner +1 -0
- data/lib/xctest-runner.rb +3 -1
- data/lib/xctest-runner/build-environment.rb +4 -4
- data/spec/lib/xctest-runner_spec.rb +11 -0
- data/xctest-runner.gemspec +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: d10f874c2b67ee948c32d8d6efd58d11e2002a5b
|
4
|
+
data.tar.gz: fd82cfd507ab49523a8c873c96c7d84e0e81289b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52bef96bef8d7eaeaf66c3e922dd68ff2ac31b9e2e27a9c832b9642f658f18868db8665620ef96a3da3c8424707d5a1bc49179bfc50c71448e61d4f886e92a75
|
7
|
+
data.tar.gz: 5009425e9b2e198eeda199301642b419bd8fafc5448a5a2b674f99b84b7a138f601632e40ab889dacb9c89d1b565545a9479410f5163f137c0df1b37af76760c
|
data/README.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
data/bin/xctest-runner
CHANGED
@@ -11,6 +11,7 @@ require 'optparse'
|
|
11
11
|
opts = {}
|
12
12
|
opt = OptionParser.new
|
13
13
|
opt.on('--scheme NAME', 'build the scheme NAME') {|v| opts[:scheme] = v }
|
14
|
+
opt.on('--project NAME', 'build the project NAME') {|v| opts[:project] = v }
|
14
15
|
opt.on('--workspace NAME', 'build the workspace NAME') {|v| opts[:workspace] = v }
|
15
16
|
opt.on('--sdk SDK', 'use SDK as the name or path of the base SDK when building the project') {|v| opts[:sdk] = v }
|
16
17
|
opt.on('--arch ARCH', 'build each target for the architecture ARCH') {|v| opts[:arch] = v }
|
data/lib/xctest-runner.rb
CHANGED
@@ -13,6 +13,7 @@ class XCTestRunner
|
|
13
13
|
def initialize(opts = {})
|
14
14
|
@clean = opts[:clean] || false
|
15
15
|
@scheme = opts[:scheme] || nil
|
16
|
+
@project = opts[:project] || nil
|
16
17
|
@workspace = opts[:workspace] || nil
|
17
18
|
@sdk = opts[:sdk] || 'iphonesimulator'
|
18
19
|
@configuration = opts[:configuration] || 'Debug'
|
@@ -20,7 +21,7 @@ class XCTestRunner
|
|
20
21
|
@test_class = opts[:test] || 'Self'
|
21
22
|
@suffix = opts[:suffix] || ''
|
22
23
|
|
23
|
-
@scheme = default_scheme unless @scheme
|
24
|
+
@scheme = default_scheme(build_command) unless @scheme
|
24
25
|
@env = current_environment(build_command)
|
25
26
|
@arch = default_build_arch if @arch.nil?
|
26
27
|
@build_option = nil
|
@@ -81,6 +82,7 @@ class XCTestRunner
|
|
81
82
|
unless @build_option
|
82
83
|
options = []
|
83
84
|
options << "-scheme #{@scheme}" if @scheme
|
85
|
+
options << "-project #{@project}" if @project
|
84
86
|
options << "-workspace #{@workspace}" if @workspace
|
85
87
|
options << "-sdk #{@sdk}" if @sdk
|
86
88
|
options << "-configuration #{@configuration}" if @configuration
|
@@ -20,16 +20,16 @@ class XCTestRunner
|
|
20
20
|
env
|
21
21
|
end
|
22
22
|
|
23
|
-
def xcodebuild_list
|
24
|
-
execute_command("
|
23
|
+
def xcodebuild_list(build_command)
|
24
|
+
execute_command("#{build_command} -list")
|
25
25
|
end
|
26
26
|
|
27
|
-
def default_scheme
|
27
|
+
def default_scheme(build_command)
|
28
28
|
unless @default_scheme
|
29
29
|
scheme = nil
|
30
30
|
is_scheme = false
|
31
31
|
|
32
|
-
output = xcodebuild_list
|
32
|
+
output = xcodebuild_list(build_command)
|
33
33
|
output.each_line do |line|
|
34
34
|
line = line.strip
|
35
35
|
if line =~ /\w+:/
|
@@ -90,6 +90,17 @@ describe XCTestRunner do
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
+
context '-project option' do
|
94
|
+
let(:arguments) {
|
95
|
+
{:project => 'Sample'}
|
96
|
+
}
|
97
|
+
|
98
|
+
it 'has some build arguments' do
|
99
|
+
expect(opts.count).to eq 4
|
100
|
+
expect(opts['-project']).to eq 'Sample'
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
93
104
|
context '-sdk option' do
|
94
105
|
let(:arguments) {
|
95
106
|
{:sdk => 'iphoneos'}
|
data/xctest-runner.gemspec
CHANGED