app-tools 1.12.0 → 1.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/gencov +34 -16
- data/lib/app_tools/version.rb +1 -1
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6aec02839ce2d8c9edadcd56d6d8336a96999b2
|
4
|
+
data.tar.gz: f7136e83521ca43302caab96a5bdab351fa1e6c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3db21985a67d7a98ed3683cde078724214377c6f0186660eb9b308cbe98b45d3e1653fe45e1d75bbf446a78652d373f0a5ff4228d48eaa32108f862eedff1561
|
7
|
+
data.tar.gz: 22d337c0ef4f637af3552ab5eb908f3206dbba7f92f6338e779ae3401bb46caff2daf24ae7b17017b13ea598c7020ad2c0bc68a0935f9faa78147b935f027517
|
data/bin/gencov
CHANGED
@@ -39,14 +39,25 @@ module AppTools
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
main do |xcfile,
|
42
|
+
main do |xcfile, source_dir|
|
43
43
|
if xcfile.end_with?(".xcodeproj")
|
44
44
|
xcflag = "-project"
|
45
45
|
elsif xcfile.end_with?(".xcworkspace")
|
46
46
|
xcflag = "-workspace"
|
47
47
|
end
|
48
48
|
|
49
|
+
xcfile = File.expand_path(xcfile)
|
50
|
+
|
51
|
+
if !File.exist?(xcfile)
|
52
|
+
exit_now! "Xcode file '#{xcfile}' does not exist"
|
53
|
+
end
|
54
|
+
|
49
55
|
scheme = options[:s]
|
56
|
+
derived_data_dir = File.expand_path(options[:d])
|
57
|
+
|
58
|
+
if !Dir.exist?(derived_data_dir)
|
59
|
+
exit_now! "DerivedData directory '#{derived_data_dir}' does not exist"
|
60
|
+
end
|
50
61
|
|
51
62
|
build_settings_file = Tempfile.new('gencov')
|
52
63
|
pid = Process.spawn("xcodebuild #{xcflag} #{xcfile} -scheme #{scheme} -sdk iphonesimulator -showBuildSettings",
|
@@ -61,28 +72,32 @@ module AppTools
|
|
61
72
|
end
|
62
73
|
end
|
63
74
|
|
64
|
-
|
75
|
+
coverage_filename = 'Coverage.profdata'
|
76
|
+
profdata_paths = `find #{derived_data_dir} -name #{coverage_filename}`.split(/\n/)
|
77
|
+
profdata_path = nil
|
78
|
+
app_path = nil
|
65
79
|
|
66
|
-
if
|
67
|
-
|
80
|
+
if profdata_paths.length > 0
|
81
|
+
profdata_path = profdata_paths[0]
|
82
|
+
else
|
83
|
+
exit_now! "Could not find #{coverage_filename}$ in '#{derived_data_dir}'"
|
68
84
|
end
|
69
85
|
|
70
86
|
app_name = build_settings['EXECUTABLE_NAME']
|
71
|
-
|
87
|
+
debug_sim_dir = 'Debug-iphonesimulator'
|
72
88
|
|
89
|
+
app_paths = `find #{derived_data_dir} -path */#{debug_sim_dir}/#{app_name}.app`.split(/\n/)
|
73
90
|
|
74
|
-
if
|
75
|
-
|
91
|
+
if app_paths.length > 0
|
92
|
+
app_path = app_paths[0]
|
93
|
+
else
|
94
|
+
exit_now! "Could not find '#{debug_sim_dir}/#{app_name}.app' under #{derived_data_dir}"
|
76
95
|
end
|
77
96
|
|
78
|
-
binary_path =
|
79
|
-
|
80
|
-
if $?.exitstatus != 0
|
81
|
-
exit_now! "Could not find #{app_name} under #{coverage_root}"
|
82
|
-
end
|
97
|
+
binary_path = File.join(app_path, app_name)
|
83
98
|
|
84
|
-
|
85
|
-
source_files = `find #{
|
99
|
+
source_dir = File.expand_path(source_dir)
|
100
|
+
source_files = `find #{source_dir} -type f \\( -name "*.m" -or -name "*.h" -or -name "*.swift" \\)`.lines
|
86
101
|
|
87
102
|
STDERR.puts("Found #{source_files.length} source files")
|
88
103
|
|
@@ -99,7 +114,9 @@ module AppTools
|
|
99
114
|
next
|
100
115
|
end
|
101
116
|
|
102
|
-
|
117
|
+
command = "xcrun llvm-cov report -instr-profile #{profdata_path} #{binary_path} '#{source_file}'"
|
118
|
+
#puts(command)
|
119
|
+
file_coverage = `#{command}`
|
103
120
|
|
104
121
|
file_coverage.each_line do |line|
|
105
122
|
if /^TOTAL *(.*)$/.match(line)
|
@@ -145,9 +162,10 @@ module AppTools
|
|
145
162
|
|
146
163
|
on("-s", "--scheme SCHEME", "Schema to use for the project or workspace")
|
147
164
|
on("-j", "--json", "Output in JSON format instead of YAML")
|
165
|
+
on("-d", "--deriveddata DERIVEDDATADIR", "Override location of DerivedData directory")
|
148
166
|
|
149
167
|
arg :xcfile, "The .xcodeproj or .xcworkspace file", :require
|
150
|
-
arg :
|
168
|
+
arg :source_dir, "The source directory to generate coverage for", :require
|
151
169
|
|
152
170
|
use_log_level_option :toggle_debug_on_signal => 'USR1'
|
153
171
|
|
data/lib/app_tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,125 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Lyon-Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.10'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.10'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: code-tools
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '5.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '5.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: methadone
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.9'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.9'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: CFPropertyList
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '2.3'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '2.3'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rubyzip
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '1.1'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.1'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: spaceship
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - ~>
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0.26'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - ~>
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.26'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: highline
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - ~>
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '1.7'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - ~>
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '1.7'
|
125
125
|
description: |
|
@@ -139,7 +139,6 @@ executables:
|
|
139
139
|
extensions: []
|
140
140
|
extra_rdoc_files: []
|
141
141
|
files:
|
142
|
-
- lib/app_tools/version.rb
|
143
142
|
- bin/app-tools
|
144
143
|
- bin/gencov
|
145
144
|
- bin/kcpass
|
@@ -148,6 +147,7 @@ files:
|
|
148
147
|
- bin/syncpp
|
149
148
|
- bin/upload2itunes
|
150
149
|
- bin/xcarchive2ipa
|
150
|
+
- lib/app_tools/version.rb
|
151
151
|
homepage: http://github.com/jlyonsmith/app-tools
|
152
152
|
licenses:
|
153
153
|
- MIT
|
@@ -158,17 +158,17 @@ require_paths:
|
|
158
158
|
- lib
|
159
159
|
required_ruby_version: !ruby/object:Gem::Requirement
|
160
160
|
requirements:
|
161
|
-
- - ~>
|
161
|
+
- - "~>"
|
162
162
|
- !ruby/object:Gem::Version
|
163
|
-
version: '2.
|
163
|
+
version: '2.2'
|
164
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
165
|
requirements:
|
166
|
-
- -
|
166
|
+
- - ">="
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
170
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.
|
171
|
+
rubygems_version: 2.4.5
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Tools for creating iPhone apps
|