xctasks 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/lib/xctasks/test_task.rb +2 -0
- data/lib/xctasks/version.rb +1 -1
- data/spec/test_task_spec.rb +56 -0
- 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: 44c29bdc01e0cd8764098668cd35d90d008c8430
|
4
|
+
data.tar.gz: e5320e35f36890b7a3d1c41ca7c9c94dc94291e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ee30720c15e74fab78fe11e83a3e93f864f73e728eb48a32da3efb0290e221beba7d914812fceb594679339fa67e748e6348715b3f41e8cb62cb6323303550c
|
7
|
+
data.tar.gz: 830d2731cab1d7200fd60feebd63bc4c744e9fae1f0616fdb929b57170a20c1776562022056d3ec5a3296fca29a181341769eb2dba1789a69f927d3059e7a51a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# XCTasks Changelog
|
2
2
|
|
3
|
+
## v0.2.2
|
4
|
+
|
5
|
+
* Added pre-flight validation of workspace and schemes dir
|
6
|
+
|
7
|
+
## v0.2.1
|
8
|
+
|
9
|
+
* Restore terminal output color to normal after reporting test results.
|
10
|
+
|
3
11
|
## v0.2.0
|
4
12
|
|
5
13
|
* Further refinements to shell escaping [@tayhalla]
|
data/Gemfile.lock
CHANGED
data/lib/xctasks/test_task.rb
CHANGED
@@ -293,6 +293,8 @@ module XCTasks
|
|
293
293
|
def define_rake_tasks
|
294
294
|
namespace self.namespace_name do
|
295
295
|
task (prepare_dependency ? { prepare: prepare_dependency} : :prepare ) do
|
296
|
+
fail "No such workspace: #{workspace}" unless File.exists?(workspace)
|
297
|
+
fail "Invalid schemes directory: #{schemes_dir}" unless schemes_dir.nil? || File.exists?(schemes_dir)
|
296
298
|
File.truncate(output_log, 0) if output_log && File.exists?(output_log)
|
297
299
|
if schemes_dir
|
298
300
|
FileUtils::Verbose.mkdir_p "#{workspace}/xcshareddata/xcschemes"
|
data/lib/xctasks/version.rb
CHANGED
data/spec/test_task_spec.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'xctasks/test_task'
|
3
|
+
require 'tempfile'
|
3
4
|
|
4
5
|
describe XCTasks::TestTask do
|
5
6
|
before(:each) do
|
@@ -15,10 +16,65 @@ describe XCTasks::TestTask do
|
|
15
16
|
end
|
16
17
|
|
17
18
|
Rake.application = rake
|
19
|
+
|
20
|
+
Dir.mktmpdir.tap do |path|
|
21
|
+
FileUtils.touch(path + '/LayerKit.xcworkspace')
|
22
|
+
FileUtils.mkdir_p(path + '/Tests/Schemes')
|
23
|
+
Dir.chdir(path)
|
24
|
+
end
|
18
25
|
end
|
19
26
|
|
20
27
|
let(:rake) { Rake::Application.new }
|
21
28
|
|
29
|
+
describe "test:prepare" do
|
30
|
+
subject { Rake.application['test:prepare'] }
|
31
|
+
|
32
|
+
context "when the given workspace does not exist" do
|
33
|
+
let!(:task) do
|
34
|
+
XCTasks::TestTask.new do |t|
|
35
|
+
t.workspace = 'Invalid.xcworkspace'
|
36
|
+
t.schemes_dir = 'Tests/Schemes'
|
37
|
+
t.runner = :xcpretty
|
38
|
+
t.subtasks = { unit: 'Unit Tests', functional: 'Functional Tests' }
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
it "fails" do
|
43
|
+
expect { subject.invoke }.to raise_error(RuntimeError, "No such workspace: Invalid.xcworkspace")
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
context "when the given schemes_dir is nil" do
|
48
|
+
let!(:task) do
|
49
|
+
XCTasks::TestTask.new do |t|
|
50
|
+
t.workspace = 'LayerKit.xcworkspace'
|
51
|
+
t.schemes_dir = nil
|
52
|
+
t.runner = :xcpretty
|
53
|
+
t.subtasks = { unit: 'Unit Tests', functional: 'Functional Tests' }
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
it "succeeds" do
|
58
|
+
expect { subject.invoke }.not_to raise_error
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
context "when the given schemes_dir does not exist" do
|
63
|
+
let!(:task) do
|
64
|
+
XCTasks::TestTask.new do |t|
|
65
|
+
t.workspace = 'LayerKit.xcworkspace'
|
66
|
+
t.schemes_dir = 'this/path/is/invalid'
|
67
|
+
t.runner = :xcpretty
|
68
|
+
t.subtasks = { unit: 'Unit Tests', functional: 'Functional Tests' }
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
it "fails" do
|
73
|
+
expect { subject.invoke }.to raise_error(RuntimeError, "Invalid schemes directory: this/path/is/invalid")
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
22
78
|
describe 'simple task' do
|
23
79
|
let!(:task) do
|
24
80
|
XCTasks::TestTask.new do |t|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xctasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Watters
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|