slather 0.0.22 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjA0ZWQ0ZTIzOTkxMWZhNGQ4MzRkNGMwZTIwNGM0YzFiZjU5MmNjYQ==
4
+ MDFkYzUwNDJlZmUyYTc5YmI0ZjMzMmNhNTBlZTY1NTc0ZWJmNTA5Mg==
5
5
  data.tar.gz: !binary |-
6
- ODU4NDMwYmFjOGU4YzUxMTllNmMzZjNmZmVlZjRkZGIwNGQzODBkNg==
6
+ ZGE4NTI0NWVkYzdjYmQyYTU2YTY2NmNhMDdmOTFlMGQ0MjI0MjhiZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTViMmQ0NTBjNGY0YzU1M2RkNGM4ZTJkYzY0MjcwZDEyOTBmMmU3MDAxMjNi
10
- NjMzZjQ1OWJkY2E3NTM2OTM5N2UwODViYTZmZWE2MDA2NWJlNDQzOTUwZTJj
11
- NGJhODM2MTI0MzhkMjJkNzU4MjE3ZThmNGZlZWI2ZDI3OTkzODI=
9
+ ZDBlY2Q0NmUwZDBiN2VjMjQzYWU4OTZkY2U2ZGRkOGEwMWU2MDRiM2U5MmM3
10
+ MjgwMTBkZDEyOGFlMmRkMDg1NWIzYzA3MTJhZTJiODAwZTdjZjAwZDVkNjZl
11
+ M2U4ZDY5YWY1NmU3OTdiZjRkMGJlODIyOTg0MmIyZmM5NjFlYzg=
12
12
  data.tar.gz: !binary |-
13
- NzVmMTEzMmFlMDFlN2U5ZmY5YmE0ZWQ4YjRhNDc4NjYzNDAwMzM0ZGY5YzFh
14
- MTMwNjlmZGMwNzIzZDlkYzA0YjY4YThiZjUxNWE0ZDRmMDhmNzM4NDQ5Y2Ey
15
- MjJlMDgxODFmOTJlZDVmZWIyYmQ4OGY4M2M4ZDI1YzI5OTlkODM=
13
+ OWYzYWRlYjI4MmI5YjRjZmI0NzE5NzQyNmFiOWVmNWE3YmQ4OWNhMDBhYjU1
14
+ ZjE3MjJhZTZmNjA4YThhYmNlNmVjMTEyNmU4ZjY1NzMyMWE3NTU5OTg3MGM2
15
+ ZmE1ODY4Y2Y0MmY5YTIxZjdmM2IyMmUxMThkZThmZDA1ZDg2OTA=
data/bin/slather CHANGED
@@ -6,10 +6,12 @@ require File.join(File.dirname(__FILE__), '..', 'lib', 'slather')
6
6
  Clamp do
7
7
 
8
8
  parameter "xcodeproj", "Path to the xcodeproj", :attribute_name => :xcodeproj_path
9
+ option ["--build-directory", "-b"], "BUILD_DIRECTORY", "The directory where gcno files will be written to. Defaults to derived data."
9
10
 
10
11
  def execute
11
12
  puts "slathering..."
12
13
  project = Slather::Project.open(xcodeproj_path)
14
+ project.build_directory = build_directory
13
15
  project.post_to_coveralls
14
16
  puts "done!"
15
17
  end
@@ -5,13 +5,20 @@ require 'json'
5
5
  module Slather
6
6
  class Project < Xcodeproj::Project
7
7
 
8
+ attr_accessor :build_directory
9
+
8
10
  def derived_data_dir
9
11
  File.expand_path('~') + "/Library/Developer/Xcode/DerivedData/"
10
12
  end
11
13
  private :derived_data_dir
12
14
 
15
+ def build_directory
16
+ @build_directory || derived_data_dir
17
+ end
18
+ private :build_directory
19
+
13
20
  def coverage_files
14
- Dir["#{derived_data_dir}/**/*.gcno"].map do |file|
21
+ Dir["#{build_directory}/**/*.gcno"].map do |file|
15
22
  coverage_file = Slather::CoverallsCoverageFile.new(file)
16
23
  coverage_file.project = self
17
24
  # If there's no source file for this gcno, or the gcno is old, it probably belongs to another project.
@@ -38,9 +45,9 @@ module Slather
38
45
  private :coveralls_coverage_data
39
46
 
40
47
  def post_to_coveralls
41
- puts "derived_data_dir: #{derived_data_dir}"
48
+ puts "build_directory: #{build_directory}"
42
49
  puts "gcno files:"
43
- puts Dir["#{derived_data_dir}/**/*.gcno"]
50
+ puts Dir["#{build_directory}/**/*.gcno"]
44
51
  f = File.open('coveralls_json_file', 'w+')
45
52
  f.write(coveralls_coverage_data)
46
53
  puts "file data!!!!!"
@@ -1,3 +1,3 @@
1
1
  module Slather
2
- VERSION = "0.0.22"
2
+ VERSION = "0.0.23"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slather
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Larsen