Skip to content

Commit

Permalink
[CocoaPods] Update to CocoaPods 0.36 plugin API
Browse files Browse the repository at this point in the history
Closes #29
  • Loading branch information
kylef committed Mar 11, 2015
1 parent abf1f66 commit 1c728eb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,14 @@ $ slather coverage -x --output-directory path/to/xml_report
### Coverage for code included via CocoaPods

If you're trying to compute the coverage of code that has been included via
CocoaPods, you will need to tell slather where to find the source files for
your Pod.
CocoaPods, you will need to tell CocoaPods to use the slather plugin by
adding the following to your `Podfile`.

```ruby
plugin 'slather'
```

You will also need to tell slather where to find the source files for your Pod.

```yml
# .slather.yml
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods_plugin.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'slather'

Pod::HooksManager.register(:post_install) do |installer_context|
Pod::HooksManager.register('slather', :post_install) do |installer_context|
sandbox_root = installer_context.sandbox_root
sandbox = Pod::Sandbox.new(sandbox_root)
project = Xcodeproj::Project.open(sandbox.project_path)
Expand Down
4 changes: 2 additions & 2 deletions slather.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rake", "~> 10.3"
spec.add_development_dependency "rspec", "~> 2.14"
spec.add_development_dependency "pry", "~> 0.9"
spec.add_development_dependency "cocoapods", "~> 0.34"
spec.add_development_dependency "cocoapods", "~> 0.36.0"
spec.add_development_dependency "json_spec", "~> 1.1.4"

spec.add_dependency "clamp", "~> 0.6"
spec.add_dependency "xcodeproj", "~> 0.20.0"
spec.add_dependency "xcodeproj", "~> 0.23.0"
spec.add_dependency "nokogiri", "~> 1.6.3"
end
2 changes: 1 addition & 1 deletion spec/slather/cocoapods_plugin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
sandbox_root = 'Pods'
sandbox = Pod::Sandbox.new(sandbox_root)
context = Pod::Installer::HooksContext.generate(sandbox, [])
Pod::HooksManager.run(:post_install, context)
Pod::HooksManager.run(:post_install, context, {'slather' => nil})
end
end
end
Expand Down

0 comments on commit 1c728eb

Please sign in to comment.