cocoapods-coverage 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7d0b29f2ec73a0766b448d03f3ce80e9ff46872e
4
+ data.tar.gz: 321db632eb4c35c290e7ec2873426d85e605046d
5
+ SHA512:
6
+ metadata.gz: f42cb054b47b268c4c98992fe7a7419777f56880a99857de7a444a07f1e54b55b2bfee56434b285ef4a4732787c831198f2db2fbe83b067eee47f8590e94f7f7
7
+ data.tar.gz: e98ce51ecb6508d50beb2888861b0a2c9d6c05ac31f76b03a2553dfc76da98bd0c1ee6fabb82484942baf6eb0a05a41d185ec8afcc6b2e33590593b7f493dc37
@@ -0,0 +1,3 @@
1
+ .DS_Store
2
+ pkg
3
+ .idea/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cocoapods-coverage.gemspec
4
+ gemspec
@@ -0,0 +1,42 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ cocoapods-coverage (0.0.2)
5
+ cocoapods-testing
6
+ slather
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ CFPropertyList (2.2.8)
12
+ activesupport (3.2.19)
13
+ i18n (~> 0.6, >= 0.6.4)
14
+ multi_json (~> 1.0)
15
+ clamp (0.6.3)
16
+ cocoapods-testing (0.0.3)
17
+ xctasks
18
+ colored (1.2)
19
+ i18n (0.6.11)
20
+ mini_portile (0.6.0)
21
+ multi_json (1.10.1)
22
+ nokogiri (1.6.3.1)
23
+ mini_portile (= 0.6.0)
24
+ rake (10.3.2)
25
+ slather (1.2.1)
26
+ clamp (~> 0.6)
27
+ xcodeproj (~> 0.17)
28
+ xcodeproj (0.19.1)
29
+ CFPropertyList (~> 2.2)
30
+ activesupport (~> 3.0)
31
+ colored (~> 1.2)
32
+ xctasks (0.4.1)
33
+ nokogiri (~> 1.6, >= 1.6.3.1)
34
+ rake (~> 10.0, >= 10.0.0)
35
+
36
+ PLATFORMS
37
+ ruby
38
+
39
+ DEPENDENCIES
40
+ bundler (~> 1.3)
41
+ cocoapods-coverage!
42
+ rake
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Boris Bügling <boris@icculus.org>
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,11 @@
1
+ # cocoapods-coverage
2
+
3
+ A description of cocoapods-coverage.
4
+
5
+ ## Installation
6
+
7
+ $ gem install cocoapods-coverage
8
+
9
+ ## Usage
10
+
11
+ $ pod spec coverage POD_NAME
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'cocoapods_coverage.rb'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'cocoapods-coverage'
8
+ spec.version = CocoapodsCoverage::VERSION
9
+ spec.authors = ['Boris Bügling']
10
+ spec.email = ['boris@bügling.com']
11
+ spec.summary = %q{Generate code coverage statistics for Pods.}
12
+ spec.homepage = 'https://github.com/viteinfinite/cocoapods-coverage'
13
+ spec.license = 'MIT'
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ['lib']
19
+
20
+ spec.add_dependency 'cocoapods-testing'
21
+ spec.add_dependency 'slather'
22
+
23
+ spec.add_development_dependency 'bundler', '~> 1.3'
24
+ spec.add_development_dependency 'rake'
25
+ end
@@ -0,0 +1,3 @@
1
+ module CocoapodsCoverage
2
+ VERSION = '0.0.2'
3
+ end
@@ -0,0 +1 @@
1
+ require 'pod/command/lib/coverage'
@@ -0,0 +1,51 @@
1
+ require 'cocoapods_testing'
2
+ require 'slather'
3
+ require 'xcodeproj'
4
+
5
+ module Pod
6
+ class Command
7
+ class Lib
8
+ # @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
9
+ # in the `plugins.json` file, once your plugin is released.
10
+ #
11
+ class Coverage < Lib
12
+ self.summary = 'Generate code coverage statistics for Pods.'
13
+
14
+ self.description = <<-DESC
15
+ Longer description of cocoapods-coverage.
16
+ DESC
17
+
18
+ def run
19
+ test_with_coverage
20
+
21
+ Pod::Command::Lib::Testing.handle_workspaces_in_dir(Pathname.pwd) do |workspace, _path|
22
+ workspace.file_references.each do |file_ref|
23
+ next unless file_ref.path.end_with? '.xcodeproj'
24
+ next if file_ref.path == 'Pods/Pods.xcodeproj'
25
+ slather(file_ref.path)
26
+ end
27
+ end
28
+ end
29
+
30
+ def slather(project_path)
31
+ project = Slather::Project.open(project_path)
32
+
33
+ if ENV['TRAVIS'] == 'true'
34
+ project.coverage_service = :coveralls
35
+ else
36
+ project.coverage_service = :terminal
37
+ end
38
+
39
+ project.post
40
+ end
41
+
42
+ def test_with_coverage
43
+ args = CLAide::ARGV.new(['GCC_GENERATE_TEST_COVERAGE_FILES=YES',
44
+ 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES'])
45
+ tester = Pod::Command::Lib::Testing.new(args)
46
+ tester.run
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
metadata ADDED
@@ -0,0 +1,111 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cocoapods-coverage
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Boris Bügling
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-09-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: cocoapods-testing
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: slather
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description:
70
+ email:
71
+ - boris@bügling.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - Gemfile
78
+ - Gemfile.lock
79
+ - LICENSE.txt
80
+ - README.md
81
+ - Rakefile
82
+ - cocoapods_coverage.gemspec
83
+ - lib/cocoapods_coverage.rb
84
+ - lib/cocoapods_plugin.rb
85
+ - lib/pod/command/lib/coverage.rb
86
+ homepage: https://github.com/viteinfinite/cocoapods-coverage
87
+ licenses:
88
+ - MIT
89
+ metadata: {}
90
+ post_install_message:
91
+ rdoc_options: []
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ requirements: []
105
+ rubyforge_project:
106
+ rubygems_version: 2.0.14
107
+ signing_key:
108
+ specification_version: 4
109
+ summary: Generate code coverage statistics for Pods.
110
+ test_files: []
111
+ has_rdoc: