ghunit 1.0.3 → 1.0.5
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/ghunit/project.rb +35 -2
- 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: 63824f5fdb56f2b3030584f509eedddc8a213113
|
4
|
+
data.tar.gz: f09b4e77865153c4d4253b3ed985f68aedb2be55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b45dd7c6617090494abee3b35af536d258273b63ca68002a94666a8a2d58b31291e617df6aa461bdbd4d07f90e8425d4c88de00c8ba85b084623ee4d855b2d85
|
7
|
+
data.tar.gz: f9065ab432fedb4031d2987534e7c598b94fb7d6b9f5d91bc2594ef3c963b7e39878e8f3dabd75d741628581611a9704edce25a8134c3fba3f616e20d0e3f94e
|
data/lib/ghunit/project.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'xcodeproj'
|
2
|
-
require 'xcodeproj/ext'
|
3
2
|
require 'fileutils'
|
4
3
|
require 'logger'
|
5
4
|
require 'colorize'
|
@@ -153,7 +152,8 @@ class GHUnit::Project
|
|
153
152
|
end
|
154
153
|
|
155
154
|
# Get main target prefix header
|
156
|
-
|
155
|
+
debug_settings = main_target.build_settings("Debug")
|
156
|
+
prefix_header = debug_settings["GCC_PREFIX_HEADER"] if debug_settings
|
157
157
|
|
158
158
|
# Clear default OTHER_LDFLAGS (otherwise CocoaPods gives a warning)
|
159
159
|
test_target.build_configurations.each do |c|
|
@@ -277,6 +277,39 @@ Make sure to open the .xcworkspace.
|
|
277
277
|
EOS
|
278
278
|
end
|
279
279
|
|
280
|
+
def sync_test_target_membership
|
281
|
+
test_target = find_test_target
|
282
|
+
if !test_target
|
283
|
+
logger.error "No test target to add to"
|
284
|
+
return false
|
285
|
+
end
|
286
|
+
|
287
|
+
tests_group = project.groups.select { |g| g.name == test_target_name }.first
|
288
|
+
if !tests_group
|
289
|
+
logger.error "No test group to add to"
|
290
|
+
return false
|
291
|
+
end
|
292
|
+
|
293
|
+
sources_phase = main_target.build_phases.select { |p|
|
294
|
+
p.class == Xcodeproj::Project::Object::PBXSourcesBuildPhase }.first
|
295
|
+
|
296
|
+
if !sources_phase
|
297
|
+
logger.error "No main target source phase found"
|
298
|
+
return false
|
299
|
+
end
|
300
|
+
|
301
|
+
logger.debug "Adding to test target: "
|
302
|
+
sources_phase.files_references.each do |file_ref|
|
303
|
+
next if file_ref.path == "main.m"
|
304
|
+
test_file = tests_group.find_file_by_path(file_ref.path)
|
305
|
+
if !test_file
|
306
|
+
logger.debug " #{file_ref.path}"
|
307
|
+
test_target.add_file_references([file_ref])
|
308
|
+
end
|
309
|
+
end
|
310
|
+
project.save
|
311
|
+
end
|
312
|
+
|
280
313
|
def install_run_tests_script
|
281
314
|
run_script_name = "Run Tests (CLI)"
|
282
315
|
# Find run script build phase and install RunTests.sh
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ghunit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriel Handford
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
103
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.
|
104
|
+
rubygems_version: 2.4.5
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: GHUnit
|