xcov 0.4 → 0.5

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: 61d71177e02e5309208870af2792be985ee85401
4
- data.tar.gz: 278e621bda56cfade3452f8704b84fbfe0e9ab2c
3
+ metadata.gz: 74b4b027c48a06ae5c565d14ca7056f4b16f7e85
4
+ data.tar.gz: a433237612938cd44bdc600d9f6e44519e8dfa92
5
5
  SHA512:
6
- metadata.gz: 472c701c1c429a60bb9a3bb57a8f19cc68f671d789fb629a18b4367cf24c7da3d9261505aeab5d91db029fa64989a45e4df7f32d5b043b0d77138594376d8fa5
7
- data.tar.gz: a6895a791a25380b32cac92820920aed33297177d24199b9a0e39c9c6838e9b9f7fd3676f57054ce2367d7e8e8560ea526c6c6eaea68f1b269d528f55211d7d7
6
+ metadata.gz: 9352b7e868175b3987ff7c963b19505ae415accda365d312dada36a573092ae36f13d315b46a02d1bcdc9202908d74e9f6976e50a4816318466f552f46b40410
7
+ data.tar.gz: 4594aa1fd03814dd815d64bceaabbf324192d4687b593c2d9606071b09daa09dfa3ee18d013c654b26993a78f229f34736639a05db6d398b0f6d4cb639efa13f
data/README.md CHANGED
@@ -61,6 +61,10 @@ xcov(
61
61
 
62
62
  ## Changelog
63
63
 
64
+ ### v.0.5
65
+ * Fixed bug using the `derived_data_path` option
66
+ * Fixed bug sorting multiple `.xccoverage` files by datetime
67
+
64
68
  ### v.0.4
65
69
  * Additional flag to enable coverage reports for `.xctest` targets
66
70
 
data/lib/xcov/runner.rb CHANGED
@@ -17,9 +17,8 @@ module Xcov
17
17
 
18
18
  def parse_xccoverage
19
19
  # Find .xccoverage file
20
- product_builds_path = Pathname.new(Xcov.project.default_build_settings(key: "SYMROOT"))
21
- test_logs_path = product_builds_path.parent.parent + "Logs/Test/"
22
- xccoverage_files = Dir["#{test_logs_path}*.xccoverage"].sort_by { |filename| File.mtime(filename) }
20
+ test_logs_path = derived_data_path + "Logs/Test/"
21
+ xccoverage_files = Dir["#{test_logs_path}*.xccoverage"].sort_by { |filename| File.mtime(filename) }.reverse
23
22
 
24
23
  unless test_logs_path.directory? && !xccoverage_files.empty?
25
24
  ErrorHandler.handle_error("CoverageNotFound")
@@ -37,17 +36,17 @@ module Xcov
37
36
 
38
37
  # Copy images to output resources folder
39
38
  Dir[File.join(File.dirname(__FILE__), "../../assets/images/*")].each do |path|
40
- FileUtils.cp_r(path, resources_path)
39
+ FileUtils.cp_r(path, resources_path)
41
40
  end
42
41
 
43
42
  # Copy stylesheets to output resources folder
44
43
  Dir[File.join(File.dirname(__FILE__), "../../assets/stylesheets/*")].each do |path|
45
- FileUtils.cp_r(path, resources_path)
44
+ FileUtils.cp_r(path, resources_path)
46
45
  end
47
46
 
48
47
  # Copy javascripts to output resources folder
49
48
  Dir[File.join(File.dirname(__FILE__), "../../assets/javascripts/*")].each do |path|
50
- FileUtils.cp_r(path, resources_path)
49
+ FileUtils.cp_r(path, resources_path)
51
50
  end
52
51
 
53
52
  # Convert report to xCov model objects
@@ -55,7 +54,7 @@ module Xcov
55
54
 
56
55
  # Create HTML report
57
56
  File.open(File.join(output_path, "index.html"), "wb") do |file|
58
- file.puts report.html_value
57
+ file.puts report.html_value
59
58
  end
60
59
 
61
60
  # Post result
@@ -92,5 +91,16 @@ module Xcov
92
91
  exit_status
93
92
  end
94
93
 
94
+ # Auxiliar methods
95
+
96
+ def derived_data_path
97
+ # If DerivedData path was supplied, return
98
+ return Pathname.new(Xcov.config[:derived_data_path]) unless Xcov.config[:derived_data_path].nil?
99
+
100
+ # Otherwise check project file
101
+ product_builds_path = Pathname.new(Xcov.project.default_build_settings(key: "SYMROOT"))
102
+ return product_builds_path.parent.parent
103
+ end
104
+
95
105
  end
96
106
  end
data/lib/xcov/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Xcov
2
2
 
3
- VERSION = "0.4"
3
+ VERSION = "0.5"
4
4
  DESCRIPTION = "xCov is a friendly visualizer for Xcode's code coverage files"
5
5
 
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcov
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.4'
4
+ version: '0.5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Vidal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-03 00:00:00.000000000 Z
11
+ date: 2016-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane_core