forked from CocoaPods/Specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Rakefile which runs
spec lint
against all specs. And fix a few …
…specs.
- Loading branch information
Showing
4 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.swp | ||
*.swo | ||
.DS_Store | ||
.DS_Store | ||
.gems |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
GEMS_DIR = '.gems' | ||
|
||
desc "Installs the latest versions of the CocoaPods gems in `.gems'" | ||
task :install_gems do | ||
unless File.exist?(GEMS_DIR) | ||
sh "gem install cocoapods --install-dir='#{GEMS_DIR}' --no-rdoc --no-ri" | ||
end | ||
end | ||
|
||
desc "Run `pod spec lint` on all specs" | ||
task :lint => :install_gems do | ||
gems = Dir.glob(File.join(GEMS_DIR, 'gems', '*')) | ||
pod = File.join(gems.find { |path| path =~ /cocoapods-[\d\.]+$/ }, 'bin/pod') | ||
specs = FileList['**/*.podspec'] | ||
failures = [] | ||
specs.each do |spec| | ||
begin | ||
sh "macruby -I '#{gems.join("/lib' -I '")}/lib' '#{pod}' spec lint '#{spec}'" | ||
rescue | ||
failures << spec | ||
end | ||
end | ||
unless failures.empty? | ||
puts | ||
puts "The following specs did not pass `spec lint`:" | ||
puts failures.join("\n") | ||
exit 1 | ||
end | ||
end | ||
|
||
task :default => :lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ Pod::Spec.new do |s| | |
s.platform = :ios | ||
s.summary = 'URLCache subclass with on-disk cache support on iPhone/iPad.' | ||
s.homepage = 'https://github.com/rs/SDURLCache' | ||
s.author = { 'Olivier Poitrey' => '[email protected]' } | ||
s.source = { :git => 'https://github.com/rs/SDURLCache.git', :tag => '1.2' } | ||
s.source_files = 'SDURLCache.h', 'SDURLCache.m' | ||
end |