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 +8 -8
- data/bin/slather +2 -0
- data/lib/slather/project.rb +10 -3
- data/lib/slather/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDFkYzUwNDJlZmUyYTc5YmI0ZjMzMmNhNTBlZTY1NTc0ZWJmNTA5Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGE4NTI0NWVkYzdjYmQyYTU2YTY2NmNhMDdmOTFlMGQ0MjI0MjhiZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDBlY2Q0NmUwZDBiN2VjMjQzYWU4OTZkY2U2ZGRkOGEwMWU2MDRiM2U5MmM3
|
10
|
+
MjgwMTBkZDEyOGFlMmRkMDg1NWIzYzA3MTJhZTJiODAwZTdjZjAwZDVkNjZl
|
11
|
+
M2U4ZDY5YWY1NmU3OTdiZjRkMGJlODIyOTg0MmIyZmM5NjFlYzg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
data/lib/slather/project.rb
CHANGED
@@ -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["#{
|
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 "
|
48
|
+
puts "build_directory: #{build_directory}"
|
42
49
|
puts "gcno files:"
|
43
|
-
puts Dir["#{
|
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!!!!!"
|
data/lib/slather/version.rb
CHANGED