app-tools 1.4.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/gencov +22 -8
  3. data/lib/app_tools/version.rb +1 -1
  4. metadata +21 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b6cd014f46a7658d6c7a790bdf02869c77acc428
4
- data.tar.gz: 9f480c93affe10fa98a6ba6257667aed69928507
3
+ metadata.gz: 399361630623e088fc722667474ad798ffd47e6d
4
+ data.tar.gz: 21d9b6ff6192c98ff2cb1e315c637e5ccea6b771
5
5
  SHA512:
6
- metadata.gz: f10f4012b90750f384e8cbd58d4e832d1c523313a80d766d945e811991b0079e7a845937a623602dcfa135f298e98187c2e9d01e8004fb151798e1547ee2d4b4
7
- data.tar.gz: ae31bd4356c6dc2a995164ce7f7930dd56da163674228ab7f8fb221667d30d0333b101492be20d629f09438806d0cf19e8ffeecf6e6ad2650ca645e869035eed
6
+ metadata.gz: 71883050cbcb0fc995c3e922aa0c0d0bf2fc7d142bf9773440f720bcfc068ef4f676bb9898a34f9ec4aad121d9e507b778ebffeeb4438c40d78fc5f3d7e8e55f
7
+ data.tar.gz: b2d463d12250d09b053ff0d60a45184069ac78fd31e121ca488e158e234a42015ac2a566d1397b7429328802fdb766ee597de6124b164b3416f43615bff02855
data/bin/gencov CHANGED
@@ -5,6 +5,7 @@ require 'methadone'
5
5
  require 'app_tools/version'
6
6
  require 'tempfile'
7
7
  require 'json'
8
+ require 'psych'
8
9
 
9
10
  module AppTools
10
11
  module GenCov
@@ -29,11 +30,11 @@ module AppTools
29
30
 
30
31
  def to_h
31
32
  {
32
- :total_files => @total_files,
33
- :total_regions => @total_regions,
34
- :missed_regions => @missed_regions,
35
- :total_lines => @total_lines,
36
- :missed_lines => @missed_lines
33
+ 'total_files' => @total_files,
34
+ 'total_regions' => @total_regions,
35
+ 'missed_regions' => @missed_regions,
36
+ 'total_lines' => @total_lines,
37
+ 'missed_lines' => @missed_lines
37
38
  }
38
39
  end
39
40
  end
@@ -65,9 +66,15 @@ module AppTools
65
66
  profdata_path = File.join(coverage_root, "Coverage.profdata")
66
67
  binary_path = `find #{coverage_root} -path *#{app_name}.app/#{app_name}`.chomp
67
68
 
69
+ if $?.exitstatus != 0
70
+ exit_now! "Unable to proceed"
71
+ end
72
+
68
73
  directory = File.expand_path(directory)
69
74
  source_files = `find #{directory} -type f \\( -name "*.m" -or -name "*.h" -or -name "*.swift" \\)`.lines
70
75
 
76
+ STDERR.puts("Found #{source_files.length} source files")
77
+
71
78
  m_cov = CovData.new
72
79
  total_h_files = 0
73
80
  swift_cov = CovData.new
@@ -109,18 +116,25 @@ module AppTools
109
116
  end
110
117
 
111
118
  n += 1
112
- if n % 100 == 0
113
- STDERR.puts n
119
+ if n % 10 == 0
120
+ STDERR.puts("Processed #{n}")
121
+ break
114
122
  end
115
123
  end
116
124
 
117
- puts(JSON.generate("coverage" => { ".swift" => swift_cov.to_h, ".m" => m_cov.to_h, ".h" => { "total_files" => total_h_files } }))
125
+ data = {"coverage" => { "swift_files" => swift_cov.to_h, "m_files" => m_cov.to_h, "h_files" => { "total_files" => total_h_files } }}
126
+ if options[:j]
127
+ puts(JSON.generate(data))
128
+ else
129
+ puts(Psych.dump(data))
130
+ end
118
131
  end
119
132
 
120
133
  description 'gencov - Generates formatted coverage data for a project'
121
134
  version AppTools::VERSION
122
135
 
123
136
  on("-s", "--scheme SCHEME", "Schema to use for the project or workspace")
137
+ on("-j", "--json", "Output in JSON format instead of YAML")
124
138
 
125
139
  arg :xcfile, "The .xcodeproj or .xcworkspace file", :require
126
140
  arg :directory, "The directory to generate coverage for", :require
@@ -1,3 +1,3 @@
1
1
  module AppTools
2
- VERSION = "1.4.1"
2
+ VERSION = "1.5.0"
3
3
  end
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.1
4
+ version: 1.5.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-03-11 00:00:00.000000000 Z
11
+ date: 2016-03-30 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.22'
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.22'
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: |
@@ -158,19 +158,18 @@ 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
163
  version: '2.0'
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.0.14
171
+ rubygems_version: 2.0.14.1
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Tools for creating iPhone apps
175
175
  test_files: []
176
- has_rdoc: