xcake 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 59b934c91bcb37c5f0d097d51c3e7a0871a9f1de
4
- data.tar.gz: 50b91a77213c6682a9eafae98400a62b09f04883
3
+ metadata.gz: a0fcc179fc45aaac5a2ddda294482388a957c656
4
+ data.tar.gz: 7ae7e339d3bb77f0cbd107ecb55fc7dc6f97afde
5
5
  SHA512:
6
- metadata.gz: 7288c8d779b598cf328b77635dc16e5c183c00a2e7765691b96f261b7dfabb0547c6bc199bc3420bbf09e6981995f0aed71735418d2878e2f44e39a16e105866
7
- data.tar.gz: 4eb8286ac978fc3cce5556e363fd2419a16b71a3306183219ed2db619063eac195f66a6f080383b3dac7afd70da3366cff15c344a0e991a4323cc34b3ad375c6
6
+ metadata.gz: 933ff2760e11899e5072c40e153c5097d4005778d115c4af68f022d85702e4db5013eaf6bc7113de5cfb60c2073190679711dc62345929dc38f2e0de4daaaa12
7
+ data.tar.gz: 23da41ae5939f3d965f210abdef79c687ef2fa5e22b1d1157846214851791004254634e3a46ddc199aba43ff39e12f07755d0549b3fb352e77dc7fa1a28d4bfe
data/CHANGELOG.md CHANGED
@@ -1,7 +1,10 @@
1
+ v0.7.1
2
+ ======
3
+ - Implemented syntax for declaring UI Test targets.
4
+
1
5
  v0.7.0
2
6
  ======
3
7
  - Simplified Target File Reference Generator.
4
- - Adds support for UI Tests.
5
8
  - Adds sample Cakefile to documentation.
6
9
  - Adds support for extension targets.
7
10
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xcake (0.7.0)
4
+ xcake (0.7.1)
5
5
  activesupport (< 5)
6
6
  claide (>= 0.9.1, < 2.0)
7
7
  cork
@@ -83,7 +83,7 @@ GEM
83
83
  thread_safe (~> 0.1)
84
84
  uber (0.0.15)
85
85
  unicode-display_width (1.1.0)
86
- xcodeproj (1.2.0)
86
+ xcodeproj (1.3.0)
87
87
  activesupport (>= 3)
88
88
  claide (>= 1.0.0, < 2.0)
89
89
  colored (~> 1.2)
@@ -42,6 +42,28 @@ module Xcake
42
42
  end
43
43
  end
44
44
 
45
+ # Defines a new ui test target.
46
+ #
47
+ # @param [Target] host target
48
+ # host target for which the unit tests are for.
49
+ #
50
+ # @param [Proc] block
51
+ # an optional block that configures the target through the DSL.
52
+ #
53
+ # @return [Target] the unit test target
54
+ # the newly created unit test target
55
+ #
56
+ def ui_tests_for(host_target)
57
+ target do |t|
58
+ t.name = "#{host_target.name}UITests"
59
+
60
+ t.type = :ui_test_bundle
61
+ configure_test_target_for_host_target(t, host_target)
62
+
63
+ yield(t) if block_given?
64
+ end
65
+ end
66
+
45
67
  # Defines a new unit test target.
46
68
  #
47
69
  # @param [Target] host target
@@ -58,22 +80,30 @@ module Xcake
58
80
  t.name = "#{host_target.name}Tests"
59
81
 
60
82
  t.type = :unit_test_bundle
61
- t.platform = host_target.platform
62
- t.deployment_target = host_target.deployment_target
63
- t.language = host_target.language
64
-
65
- host_path = "#{host_target.name}.app/#{host_target.name}"
66
- t.all_configurations.each do |c|
67
- c.settings['TEST_HOST'] = "$(BUILT_PRODUCTS_DIR)/#{host_path}"
68
- end
69
- t.all_configurations.each do |c|
70
- c.settings['BUNDLE_LOADER'] = '$(TEST_HOST)'
71
- end
83
+ configure_test_target_for_host_target(t, host_target)
72
84
 
73
85
  yield(t) if block_given?
74
86
  end
75
87
  end
76
88
 
89
+ private
90
+
91
+ def configure_test_target_for_host_target(test_target, host_target)
92
+ test_target.platform = host_target.platform
93
+ test_target.deployment_target = host_target.deployment_target
94
+ test_target.language = host_target.language
95
+
96
+ host_path = "#{host_target.name}.app/#{host_target.name}"
97
+ test_target.all_configurations.each do |c|
98
+ c.settings['TEST_HOST'] = "$(BUILT_PRODUCTS_DIR)/#{host_path}"
99
+ end
100
+ test_target.all_configurations.each do |c|
101
+ c.settings['BUNDLE_LOADER'] = '$(TEST_HOST)'
102
+ end
103
+ end
104
+
105
+ public
106
+
77
107
  # Defines a extension target.
78
108
  #
79
109
  # @param [Target] host target
data/lib/xcake/target.rb CHANGED
@@ -36,10 +36,6 @@ module Xcake
36
36
  #
37
37
  attr_accessor :language
38
38
 
39
- # @return [Target] the test target for this target
40
- #
41
- attr_accessor :test_target
42
-
43
39
  # @return [Array<Xcodeproj::Project::Object::AbstractBuildPhase>] the list
44
40
  # of custom build phases for the project.
45
41
  #
data/lib/xcake/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Xcake
2
- VERSION = '0.7.0'.freeze
2
+ VERSION = '0.7.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Campbell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-30 00:00:00.000000000 Z
11
+ date: 2016-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler