Commit d6dd337b authored by Luis de la Rosa's avatar Luis de la Rosa

Merge remote-tracking branch 'upstream/master'

parents 8d077cd5 cbf504ca
......@@ -30,4 +30,14 @@ examples/RelativePathProject/RelativePathProject/RelativePathProject.xcodeproj
coverage/
.coveralls.yml
# IDEs
*.xccheckout
.idea/
# RVM files
/.rvmrc
/.ruby-version
/.ruby-gemset
# Bundler files
/.bundle
[submodule "spec/fixtures/integration/ASIHTTPRequest"]
path = spec/fixtures/integration/ASIHTTPRequest
url = https://github.com/pokeb/asi-http-request.git
[submodule "spec/fixtures/integration/SSZipArchive"]
path = spec/fixtures/integration/SSZipArchive
url = https://github.com/samsoffes/ssziparchive.git
[submodule "spec/fixtures/integration/JSONKit"]
path = spec/fixtures/integration/JSONKit
url = https://github.com/johnezang/JSONKit.git
[submodule "spec/fixtures/integration/sstoolkit"]
path = spec/fixtures/integration/sstoolkit
url = https://github.com/samsoffes/sstoolkit.git
ignore = dirty
[submodule "spec/fixtures/spec-repos/master"]
path = spec/fixtures/spec-repos/master
url = https://github.com/CocoaPods/Specs.git
......
recipe :ruby
Kicker::Recipes::Ruby.runner_bin = 'bacon'
Kicker::Recipes::Ruby.runner_bin = 'bacon --quiet'
process do |files|
specs = files.take_and_map do |file|
......
# Sets Travis to run the Ruby specs on OS X machines which are required to
# build the native extensions of Xcodeproj.
#
language: objective-c
env:
# This is what 10.8.x comes with and we want to support that.
- RVM_RUBY_VERSION=system NOEXEC_DISABLE=1 XCODEPROJ_BUILD=1 BUNDLE_WITHOUT='debugging:documentation' RUBY_VERSION_SPECIFIC='sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2' SSL_CERT_FILE=/usr/local/share/cacert.pem GIT_AUTHOR_NAME=CocoaPods GIT_AUTHOR_EMAIL=cocoapods@example.com PYTHONPATH=/usr/local/lib/python2.7/site-packages
- RVM_RUBY_VERSION=2.0.0-p247 NOEXEC_DISABLE=1 XCODEPROJ_BUILD=1 BUNDLE_WITHOUT='debugging:documentation' RUBY_VERSION_SPECIFIC='sudo gem install bundler --no-ri --no-rdoc' GIT_AUTHOR_NAME=CocoaPods GIT_AUTHOR_EMAIL=cocoapods@example.com PYTHONPATH=/usr/local/lib/python2.7/site-packages
- RVM_RUBY_VERSION=system
- RVM_RUBY_VERSION=1.8.7-p358
before_install:
- export LANG=en_US.UTF-8
- curl http://curl.haxx.se/ca/cacert.pem -o /usr/local/share/cacert.pem
# - sh -c 'if [ "$RVM_RUBY_VERSION" != "system" ]; then rvm install $RVM_RUBY_VERSION --without-tcl --without-tk; fi'
- source ~/.rvm/scripts/rvm && rvm use $RVM_RUBY_VERSION
- brew update && brew install bzr
install: eval $RUBY_VERSION_SPECIFIC && rake bootstrap[use_bundle_dir]
script: bundle exec rake spec:ci
- source ~/.rvm/scripts/rvm
- if [[ $RVM_RUBY_VERSION != 'system' ]]; then rvm install $RVM_RUBY_VERSION; fi
- rvm use $RVM_RUBY_VERSION
- if [[ $RVM_RUBY_VERSION == 'system' ]]; then export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future; fi
- if [[ $RVM_RUBY_VERSION == 'system' ]]; then sudo gem install bundler --no-ri --no-rdoc; else gem install bundler --no-ri --no-rdoc; fi
# CocoaPods/CocoaPods specific
- ./bin/pod repo update --silent
install:
- bundle install --without=debugging documentation --path ./travis_bundle_dir
script: rake spec
notifications:
campfire:
on_success: change
on_failure: always
rooms:
- secure: "qOE5zmgaHe/qQu3W9rmj7wygA5Ivl+cx50fqWGag2bdRl8ly5yj1NVoOKk/O\nZmQc4Lze+301uvTXi+r5v8A/tF6W1kUZw7yBiKuXoYFUGmDiVR9o2I/FPwkL\ngSzPJttrXTQfkQ4PbnrkX+JO+5bLWrKaO0hKXT4B2yUu4UXLVk0="
......@@ -3,17 +3,230 @@
To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
## Master
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.30.0...master)
[CocoaPods-Core](https://github.com/CocoaPods/Core/compare/0.30.0...master)
##### Bug Fixes
* Fixed support for file references in the workspace generated by CocoaPods.
[Kyle Fuller][kylef]
[Fabio Pelosin][irrationalfab]
[Xcodeproj#105](https://github.com/CocoaPods/Xcodeproj/pull/150)
## 0.32.1
##### Bug Fixes
* Fixed the Podfile `default_subspec` attribute in nested subspecs.
[Fabio Pelosin][irrationalfab]
[#2050](https://github.com/CocoaPods/CocoaPods/issues/2050)
## 0.32.0
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/master...0.31.1)
[CocoaPods-Core](https://github.com/CocoaPods/Core/compare/master...0.31.1)
##### Enhancements
* Allow to update only a list of given pods with `pod update [POD_NAMES...]`.
[Marius Rackwitz](https://github.com/mrackwitz)
[CocoaPods#760](https://github.com/CocoaPods/CocoaPods/issues/760)
* `pod update` prints the previous version of the updated pods.
[Andrea Mazzini](https://github.com/andreamazz)
[#2008](https://github.com/CocoaPods/CocoaPods/issues/2008)
* `pod update` falls back to `pod install` if no Lockfile is present.
[Marius Rackwitz](https://github.com/mrackwitz)
* File references in the Pods project for development Pods now are absolute if
the dependency is specified with an absolute paths.
[Samuel Ford](https://github.com/samuelwford)
[#1042](https://github.com/CocoaPods/CocoaPods/issues/1042)
* Added `deprecated` and `deprecated_in_favor_of` attributes to Specification
DSL.
[Paul Young](https://github.com/paulyoung)
[Core#87](https://github.com/CocoaPods/Core/pull/87)
* Numerous improvements to the validator and to the linter.
* Validate the reachability of screenshot URLs in podspecs while linting a
specification.
[Kyle Fuller](https://github.com/kylef)
[#2010](https://github.com/CocoaPods/CocoaPods/issues/2010)
* Support HTTP redirects when linting homepage and screenshots.
[Boris Bügling](https://github.com/neonichu)
[#2027](https://github.com/CocoaPods/CocoaPods/pull/2027)
* The linter now checks `framework` and `library` attributes for invalid
strings.
[Paul Williamson](https://github.com/squarefrog)
[Fabio Pelosin](irrationalfab)
[Core#66](https://github.com/CocoaPods/Core/issues/66)
[Core#96](https://github.com/CocoaPods/Core/pull/96)
[Core#105](https://github.com/CocoaPods/Core/issues/105)
* The Linter will not check for comments anymore.
[Fabio Pelosin][irrationalfab]
[Core#108](https://github.com/CocoaPods/Core/issues/108)
* Removed legacy checks from the linter.
[Fabio Pelosin][irrationalfab]
[Core#108](https://github.com/CocoaPods/Core/issues/108)
* Added logic to handle subspecs and platform scopes to linter check of
the `requries_arc` attribute.
[Fabio Pelosin][irrationalfab]
[CocoaPods#2005](https://github.com/CocoaPods/CocoaPods/issues/2005)
* The linter no longer considers empty a Specification if it only specifies the
`resource_bundle` attribute.
[Joshua Kalpin][Kapin]
[#63](https://github.com/CocoaPods/Core/issues/63)
[#95](https://github.com/CocoaPods/Core/pull/95)
* `pod lib create` is now using the `configure` file instead of the
`_CONFIGURE.rb` file.
[Piet Brauer](https://github.com/pietbrauer)
[Orta Therox](https://github.com/orta)
* `pod lib create` now disallows any pod name that begins with a `.`
[Dustin Clark](https://github.com/clarkda)
[#2026](https://github.com/CocoaPods/CocoaPods/pull/2026)
[Core#97](https://github.com/CocoaPods/Core/pull/97)
[Core#98](https://github.com/CocoaPods/Core/issues/98)
* Prevent the user from using `pod` commands as root.
[Kyle Fuller](https://github.com/kylef)
[#1815](https://github.com/CocoaPods/CocoaPods/issues/1815)
* Dependencies declared with external sources now support HTTP downloads and
have improved support for all the options supported by the downloader.
[Fabio Pelosin][irrationalfab]
* An informative error message is presented when merge conflict is detected in
a YAML file.
[Luis de la Rosa](https://github.com/luisdelarosa)
[#69](https://github.com/CocoaPods/Core/issues/69)
[#100](https://github.com/CocoaPods/Core/pull/100)
##### Bug Fixes
* Fixed the Podfile `default_subspec` attribute in nested subspecs.
[Fabio Pelosin][irrationalfab]
[#1021](https://github.com/CocoaPods/CocoaPods/issues/1021)
## 0.31.1
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.31.1...0.31.0)
[CocoaPods-Core](https://github.com/CocoaPods/Core/compare/0.31.1...0.31.0)
##### Minor Enhancements
* The specification now strips the indentation of the `prefix_header` and
`prepare_command` to aide their declaration as a here document (similarly to
what it already does with the description).
[Fabio Pelosin][irrationalfab]
[Core#51](https://github.com/CocoaPods/Core/issues/51)
##### Bug Fixes
* Fix linting for Pods which declare a private repo as the source.
[Boris Bügling](https://github.com/neonichu)
[Core#82](https://github.com/CocoaPods/Core/issues/82)
## 0.31.0
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.30.0...0.31.0)
[CocoaPods-Core](https://github.com/CocoaPods/Core/compare/0.30.0...0.31.0)
##### Enhancements
* Warnings are not promoted to errors anymore to maximise compatibility with
existing libraries.
[Fabio Pelosin](https://github.com/irrationalfab)
[#1629](https://github.com/CocoaPods/CocoaPods/issues/1629)
* Include the versions of the Pods to the output of `pod list`.
[Stefan Damm](https://github.com/StefanDamm)
[Robert Zuber](https://github.com/z00b)
[#1617](https://github.com/CocoaPods/CocoaPods/issues/1617)
* Generated prefix header file will now have unique prefix_header_contents for
Pods with subspecs.
[Luis de la Rosa](https://github.com/luisdelarosa)
[#1449](https://github.com/CocoaPods/CocoaPods/issues/1449)
* The linter will now check the reachability of the homepage of Podspecs during
a full lint.
[Richard Lee](https://github.com/dlackty)
[Fabio Pelosin](https://github.com/irrationalfab)
[#1704](https://github.com/CocoaPods/CocoaPods/issues/1704)
[Core#70](https://github.com/CocoaPods/Core/pull/70)
* Improved detection of the last version of a specification in `pod spec`
subcommands.
[Laurent Sansonetti](https://github.com/lrz)
[#1953](https://github.com/CocoaPods/CocoaPods/pull/1953)
* Display advised settings for Travis CI in the warning related presented when
the terminal encoding is not set to UTF-8.
[Richard Lee](https://github.com/dlackty)
[#1933](https://github.com/CocoaPods/CocoaPods/issues/1933)
[#1941](https://github.com/CocoaPods/CocoaPods/pull/1941)
* Unset the `CDPATH` env variable before shelling-out to `prepare_command`.
[Marc Boquet](https://github.com/apalancat)
[#1943](https://github.com/CocoaPods/CocoaPods/pull/1943)
##### Bug Fixes
* Fix for when using s.version as the :tag for a git repository in a Podspec
* Resolve crash related to the I18n deprecation warning.
[Eloy Durán](https://github.com/alloy)
[#1950](https://github.com/CocoaPods/CocoaPods/issues/1950)
* Fix compilation issues related to the native Extension of Xcodeproj.
[Eloy Durán](https://github.com/alloy)
* Robustness against user Git configuration and against merge commits in `pod
repo` subcommands.
[Boris Bügling](https://github.com/neonichu)
[#1949](https://github.com/CocoaPods/CocoaPods/issues/1949)
[#1978](https://github.com/CocoaPods/CocoaPods/pull/1978)
* Gracefully inform the user if the `:head` option is not supported for a given
download strategy.
[Boris Bügling](https://github.com/neonichu)
[#1947](https://github.com/CocoaPods/CocoaPods/issues/1947)
[#1958](https://github.com/CocoaPods/CocoaPods/pull/1958)
* Cleanup a pod directory if error occurs while downloading.
[Alex Rothenberg](https://github.com/alexrothenberg)
[#1842](https://github.com/CocoaPods/CocoaPods/issues/1842)
[#1960](https://github.com/CocoaPods/CocoaPods/pull/1960)
* No longer warn for Github repositories with OAuth authentication.
[Boris Bügling](https://github.com/neonichu)
[#1928](https://github.com/CocoaPods/CocoaPods/issues/1928)
[Core#77](https://github.com/CocoaPods/Core/pull/77)
* Fix for when using `s.version` as the `:tag` for a git repository in a
Podspec.
[Joel Parsons](https://github.com/joelparsons)
[#1721](https://github.com/CocoaPods/CocoaPods/issues/1721)
[Core#72](https://github.com/CocoaPods/Core/pull/72)
* Improved escaping of paths in Git downloader.
[Vladimir Burdukov](https://github.com/chipp)
[cocoapods-downloader#14](https://github.com/CocoaPods/cocoapods-downloader/pull/14)
* Podspec without explicitly set `requires_arc` attribute no longer passes the
lint.
[Richard Lee](https://github.com/dlackty)
[#1840](https://github.com/CocoaPods/CocoaPods/issues/1840)
[Core#71](https://github.com/CocoaPods/Core/pull/71)
* Properly quote headers in the `-isystem` compiler flag of the aggregate
targets.
[Eloy Durán](https://github.com/alloy)
[#1862](https://github.com/CocoaPods/CocoaPods/issues/1862)
[#1894](https://github.com/CocoaPods/CocoaPods/pull/1894)
## 0.30.0
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.29.0...0.30.0)
......@@ -2108,3 +2321,6 @@ allowing you to automate Xcode related tasks.
[5]: https://github.com/tomaz/appledoc
[6]: https://github.com/CocoaPods/CocoaPods/compare/0.5.1...0.6.0
[7]: https://github.com/CocoaPods/CocoaPods/compare/0.3.10...0.5.0
[irrationalfab]: https://github.com/irrationalfab
[kylef]: (https://github.com/kylef)
......@@ -14,15 +14,20 @@ group :development do
gem 'claide', :git => 'https://github.com/CocoaPods/CLAide.git', :branch => 'master'
gem 'cocoapods-try', :git => 'https://github.com/CocoaPods/cocoapods-try.git', :branch => 'master'
gem 'rake', '~> 10.1.0' # Ruby 1.8.7
gem "mocha"
gem "bacon"
gem "mocha-on-bacon"
gem 'prettybacon', :git => 'https://github.com/irrationalfab/PrettyBacon.git', :branch => 'master'
gem 'rake', '~> 10.1.0' # Ruby 1.8.7
gem 'prettybacon'
gem 'webmock', "< 1.16"
# For the integration tests
gem "diffy"
# Lock the current lowest requirement for ActiveSupport 3 to ensure we don't
# re-introduce https://github.com/CocoaPods/CocoaPods/issues/1950
gem 'i18n', '0.6.4'
gem 'mime-types', '< 2' # v2 is 1.9.x only
gem 'coveralls', :require => false
# Explicitly add this, otherwise it might sometimes be missing:
......@@ -31,11 +36,8 @@ group :development do
end
group :debugging do
# Only while we test the trunk app.
gem 'cocoapods-trunk', :git => "https://github.com/alloy/cocoapods-trunk.git"
gem "rb-fsevent"
gem "kicker", :git => "https://github.com/alloy/kicker.git", :branch => "master"
gem "kicker"
gem "awesome_print"
gem "pry"
# The released gem leads to stack too deep when profiling a full run.
......
......@@ -7,10 +7,10 @@ GIT
GIT
remote: https://github.com/CocoaPods/Core.git
revision: 76c726cb88ec60dc64c62e2a87b1845319e84569
revision: e8216e010d9d1141a234da4d9d01cbd8416785b1
branch: master
specs:
cocoapods-core (0.30.0)
cocoapods-core (0.32.1)
activesupport (>= 3.2.15, < 4)
fuzzy_match (~> 2.0.4)
json_pure (~> 1.8)
......@@ -18,19 +18,19 @@ GIT
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
revision: 4cc95f412d47fe8b31c5619c6705070b7849663f
revision: 60c297e6dd8b04ba055b1350d72a7ef0f1092879
branch: master
specs:
xcodeproj (0.15.3)
xcodeproj (0.16.1)
activesupport (~> 3.0)
colored (~> 1.2)
GIT
remote: https://github.com/CocoaPods/cocoapods-downloader.git
revision: d064235f1ddc2823cb5f5f1d32f51f36e719051a
revision: 224c8a191ef6b98d538d6228b0549d05194944ee
branch: master
specs:
cocoapods-downloader (0.4.0)
cocoapods-downloader (0.5.0)
GIT
remote: https://github.com/CocoaPods/cocoapods-try.git
......@@ -39,32 +39,6 @@ GIT
specs:
cocoapods-try (0.2.0)
GIT
remote: https://github.com/alloy/cocoapods-trunk.git
revision: febc522b4e462bacd013a48adb704c769586bd7e
specs:
cocoapods-trunk (0.0.1)
json (~> 1.8)
nap (>= 0.6)
netrc
GIT
remote: https://github.com/alloy/kicker.git
revision: 87b0047202c0320d4ef62e1f1a4b2cbdefadf008
branch: master
specs:
kicker (3.0.0)
listen (~> 1.3.0)
notify (~> 0.5.2)
GIT
remote: https://github.com/irrationalfab/PrettyBacon.git
revision: eaf7e6c786fd5ccc6fb88e943bf7c5e6c27569a3
branch: master
specs:
prettybacon (0.0.1)
bacon (~> 1.2)
GIT
remote: https://github.com/ruby-prof/ruby-prof.git
revision: b56c1268ba001f5eb55f940ca1c83bc6b83a9752
......@@ -74,18 +48,18 @@ GIT
PATH
remote: .
specs:
cocoapods (0.30.0)
cocoapods (0.32.1)
activesupport (>= 3.2.15, < 4)
claide (~> 0.5.0)
cocoapods-core (= 0.30.0)
cocoapods-downloader (~> 0.4.0)
cocoapods-core (= 0.32.1)
cocoapods-downloader (~> 0.5.0)
cocoapods-try (~> 0.2.0)
colored (~> 1.2)
escape (~> 0.0.4)
json_pure (~> 1.8)
nap (~> 0.5)
nap (~> 0.7)
open4 (~> 1.3)
xcodeproj (~> 0.15.0)
xcodeproj (~> 0.16.1)
GEM
remote: http://rubygems.org/
......@@ -93,6 +67,7 @@ GEM
activesupport (3.2.17)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
addressable (2.3.6)
awesome_print (1.2.0)
bacon (1.2.0)
coderay (1.1.0)
......@@ -103,15 +78,20 @@ GEM
simplecov (>= 0.7)
term-ansicolor
thor
diffy (3.0.3)
crack (0.4.2)
safe_yaml (~> 1.0.0)
diffy (3.0.4)
docile (1.1.3)
escape (0.0.4)
ffi (1.9.3)
fuzzy_match (2.0.4)
github-markup (1.1.0)
i18n (0.6.9)
json (1.8.1)
github-markup (1.1.1)
posix-spawn (~> 0.3.8)
i18n (0.6.4)
json_pure (1.8.1)
kicker (3.0.0)
listen (~> 1.3.0)
notify (~> 0.5.2)
listen (1.3.1)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
......@@ -124,11 +104,12 @@ GEM
mocha-on-bacon (0.2.2)
mocha (>= 0.13.0)
multi_json (1.9.2)
nap (0.6.0)
netrc (0.7.7)
nap (0.7.0)
notify (0.5.2)
open4 (1.3.3)
posix-spawn (0.3.8)
prettybacon (0.0.2)
bacon (~> 1.2)
pry (0.9.12.6)
coderay (~> 1.0)
method_source (~> 0.8)
......@@ -145,6 +126,7 @@ GEM
redcarpet (2.3.0)
rest-client (1.6.7)
mime-types (>= 1.16)
safe_yaml (1.0.2)
simplecov (0.8.2)
docile (~> 1.1.0)
multi_json
......@@ -154,7 +136,10 @@ GEM
term-ansicolor (1.3.0)
tins (~> 1.0)
thor (0.19.1)
tins (1.0.1)
tins (1.1.0)
webmock (1.15.2)
addressable (>= 2.2.7)
crack (>= 0.3.2)
yajl-ruby (1.1.0)
yard (0.8.7.4)
......@@ -168,16 +153,16 @@ DEPENDENCIES
cocoapods!
cocoapods-core!
cocoapods-downloader!
cocoapods-trunk!
cocoapods-try!
coveralls
diffy
github-markup
kicker!
i18n (= 0.6.4)
kicker
mime-types (< 2)
mocha
mocha-on-bacon
prettybacon!
prettybacon
pry
pygments.rb
rake (~> 10.1.0)
......@@ -185,5 +170,6 @@ DEPENDENCIES
redcarpet (< 3.0.0)
ruby-prof!
simplecov
webmock (< 1.16)
xcodeproj!
yard
......@@ -31,15 +31,6 @@ task :bootstrap, :use_bundle_dir? do |t, args|
else
execute_command "env XCODEPROJ_BUILD=1 bundle install"
end
puts "Checking for hg and bzr..."
if `which hg`.strip.empty?
puts "Please install Mercurial: `brew install hg`"
end
if `which bzr`.strip.empty?
puts "Please install Bazaar: `brew install bzr`"
end
end
# Post release
......@@ -77,7 +68,7 @@ end
namespace :spec do
def specs(dir)
FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ')
FileList["spec/#{dir}_spec.rb"].shuffle.join(' ')
end
#--------------------------------------#
......@@ -89,7 +80,7 @@ namespace :spec do
#--------------------------------------#
unit_specs_command = "bundle exec bacon #{specs('unit/**')}"
unit_specs_command = "bundle exec bacon #{specs('unit/**/*')}"
desc "Run the unit specs"
task :unit => :unpack_fixture_tarballs do
......@@ -104,8 +95,9 @@ namespace :spec do
#--------------------------------------#
desc "Run the functional specs"
task :functional => :unpack_fixture_tarballs do
sh "bundle exec bacon #{specs('functional/**')}"
task :functional, [:spec] => :unpack_fixture_tarballs do |t, args|
args.with_defaults(:spec => '**/*')
sh "bundle exec bacon #{specs("functional/#{args[:spec]}")}"
end
#--------------------------------------#
......@@ -128,9 +120,10 @@ namespace :spec do
#
task :all => :unpack_fixture_tarballs do
ENV['GENERATE_COVERAGE'] = 'true'
puts "\033[0;32mUsing #{`ruby --version`}\033[0m"
title 'Running the specs'
sh "bundle exec bacon #{specs('**')}"
sh "bundle exec bacon #{specs('**/*')}"
title 'Running Integration tests'
sh "bundle exec bacon spec/integration.rb"
......@@ -139,26 +132,6 @@ namespace :spec do
Rake::Task['examples:build'].invoke
end
# The integration 2 tests and the examples use the normal CocoaPods setup.
#
desc "Run all specs and build all examples"
task :ci => :unpack_fixture_tarballs do
title 'Running the specs'
sh "bundle exec bacon #{specs('**')}"
require 'pathname'
unless Pathname.new(ENV['HOME']+'/.cocoapods/repos/master').exist?
title 'Ensuring specs repo is up to date'
sh "./bin/pod setup"
end
title 'Running Integration tests'
sh "bundle exec bacon spec/integration.rb"
title 'Running examples'
Rake::Task['examples:build'].invoke
end
desc "Rebuild all the fixture tarballs"
task :rebuild_fixture_tarballs do
tarballs = FileList['spec/fixtures/**/*.tar.gz']
......@@ -187,7 +160,8 @@ namespace :spec do
desc "Rebuilds integration fixtures"
task :rebuild_integration_fixtures do
title 'Running Integration tests'
`bundle exec bacon spec/integration.rb`
sh 'rm -rf spec/cocoapods-integration-specs/tmp'
Rake::Task['spec:integration'].invoke
title 'Storing fixtures'
# Copy the files to the files produced by the specs to the after folders
......
......@@ -29,8 +29,8 @@ s.files = Dir["lib/**/*.rb"] + %w{ bin/pod bin/sandbox-pod README.md LICENSE CHA
# Link with the version of CocoaPods-Core
s.add_runtime_dependency 'cocoapods-core', "= #{Pod::VERSION}"
s.add_runtime_dependency 'claide', '~> 0.5.0'
s.add_runtime_dependency 'cocoapods-downloader', '~> 0.4.0'
s.add_runtime_dependency 'xcodeproj', '~> 0.15.0'
s.add_runtime_dependency 'cocoapods-downloader', '~> 0.5.0'
s.add_runtime_dependency 'xcodeproj', '~> 0.16.1'
s.add_runtime_dependency 'cocoapods-try', '~> 0.2.0'
s.add_runtime_dependency 'colored', '~> 1.2'
......@@ -38,7 +38,7 @@ s.files = Dir["lib/**/*.rb"] + %w{ bin/pod bin/sandbox-pod README.md LICENSE CHA
s.add_runtime_dependency 'json_pure', '~> 1.8'
s.add_runtime_dependency 'open4', '~> 1.3'
s.add_runtime_dependency 'activesupport', '>= 3.2.15', '< 4'
s.add_runtime_dependency 'nap', '~> 0.5'
s.add_runtime_dependency 'nap', '~> 0.7'
s.add_development_dependency 'bacon', '~> 1.1'
......
......@@ -9,7 +9,10 @@ require 'active_support/core_ext/string/inflections'
require 'active_support/core_ext/array/conversions'
# TODO check what this actually does by the time we're going to add support for
# other locales.
I18n.enforce_available_locales = false
require 'i18n'
if I18n.respond_to?(:enforce_available_locales=)
I18n.enforce_available_locales = false
end
module Pod
require 'pathname'
......@@ -19,6 +22,11 @@ module Pod
require 'cocoapods/config'
require 'cocoapods/downloader'
# Loaded immediately after dependencies to ensure proper override of their
# UI methods.
#
require 'cocoapods/user_interface'
# Indicates an user error. This is defined in cocoapods-core.
#
class Informative < PlainInformative
......@@ -38,7 +46,6 @@ module Pod
autoload :Project, 'cocoapods/project'
autoload :Resolver, 'cocoapods/resolver'
autoload :Sandbox, 'cocoapods/sandbox'
autoload :UI, 'cocoapods/user_interface'
autoload :Validator, 'cocoapods/validator'
module Generator
......@@ -65,24 +72,3 @@ if ENV['COCOA_PODS_ENV'] == 'development'
# require 'awesome_print'
# require 'pry'
end
# TODO remove for CocoaPods 0.31
#
module Pod
class Specification
def pre_install(&block)
UI.warn "[#{self}] The pre install hook of the specification " \
"DSL has been deprecated, use the `resource_bundles` or the " \
"`prepare_command` attributes."
UI.puts "[#{self}] The pre_install hook will be removed in the next release".red
@pre_install_callback = block
end
def post_install(&block)
UI.warn "[#{self}] The post install hook of the specification " \
"DSL has been deprecated, use the `resource_bundles` or the " \
"`prepare_command` attributes."
UI.puts "[#{self}] The post_install hook will be removed in the next release".red
@post_install_callback = block
end
end
end
......@@ -43,11 +43,14 @@ module Pod
end
def self.run(argv)
help! "You cannot run CocoaPods as root." if Process.uid == 0
argv = CLAide::ARGV.new(argv)
if argv.flag?('version')
UI.puts VERSION
exit 0
end
super(argv)
UI.print_warnings
end
......
......@@ -26,6 +26,7 @@ module Pod
super
help! "A name for the Pod is required." unless @name
help! "The Pod name cannot contain spaces." if @name.match(/\s/)
help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
end
def run
......@@ -54,7 +55,7 @@ module Pod
# @return [void]
#
def clone_template
UI.section("Creating `#{@name}` Pod") do
UI.section("Cloning `#{template_repo_url}` into `#{@name}`.") do
git!"clone '#{template_repo_url}' #{@name}"
end
end
......@@ -64,9 +65,13 @@ module Pod
# @return [void]
#
def configure_template
UI.section("Configuring template") do
UI.section("Configuring #{@name} template.") do
Dir.chdir(@name) do
ruby! "_CONFIGURE.rb #{@name}"
if File.exists? "configure"
system "./configure #{@name}"
else
UI.warn "Template does not have a configure file."
end
end
end
end
......
......@@ -24,7 +24,7 @@ module Pod
update_if_necessary!
sets = SourcesManager.all_sets
sets.each { |set| UI.pod(set, :name) }
sets.each { |set| UI.pod(set, :name_and_version) }
UI.puts "\n#{sets.count} pods were found"
end
......
......@@ -28,13 +28,15 @@ module Pod
# Runs the installer.
#
# @param [update] whether the installer should be run in update mode.
# @param [Hash, Boolean, nil] update
# Pods that have been requested to be updated or true if all Pods
# should be updated
#
# @return [void]
#
def run_install_with_update(update)
installer = Installer.new(config.sandbox, config.podfile, config.lockfile)
installer.update_mode = update
installer.update = update
installer.install!
end
end
......@@ -76,10 +78,40 @@ module Pod
self.summary = 'Update outdated project dependencies'
self.description = <<-DESC
Updates the Pods identified by the specified POD_NAMES. If no POD_NAMES are
specified it updates all the Pods ignoring the contents of the Podfile.lock.
This command is reserved to the update of dependencies and pod install should
be used to install changes to the Podfile.
DESC
self.arguments = '[POD_NAMES...]'
def initialize(argv)
@pods = argv.arguments! unless argv.arguments.empty?
super
end
def run
verify_podfile_exists!
verify_lockfile_exists!
run_install_with_update(true)
if @pods
verify_lockfile_exists!
# Check if all given pods are installed
missing_pods = @pods.select { |pod| !config.lockfile.pod_names.include?(pod) }
if missing_pods.length > 0
raise Informative, (missing_pods.length > 1 \
? "Pods %s are not installed and cannot be updated" \
: "Pod %s is not installed and cannot be updated"
) % missing_pods.map { |p| "`#{p}'" }.join(', ')
end
run_install_with_update(:pods => @pods)
else
UI.puts "Update all pods".yellow unless @pods
run_install_with_update(true)
end
end
end
......
......@@ -480,7 +480,7 @@ Pod::Spec.new do |s|
DESC
s.homepage = "#{data[:homepage]}"
# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
# s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
......
This diff is collapsed.
module Pod
module ExternalSources
# Abstract class that defines the common behaviour of external sources.
#
class AbstractExternalSource
# @return [String] the name of the Pod described by this external source.
#
attr_reader :name
# @return [Hash{Symbol => String}] the hash representation of the
# external source.
#
attr_reader :params
# @return [String] the path where the podfile is defined to resolve
# relative paths.
#
attr_reader :podfile_path
# @param [String] name @see name
# @param [Hash] params @see params
# @param [String] podfile_path @see podfile_path
#
def initialize(name, params, podfile_path)
@name = name
@params = params
@podfile_path = podfile_path
end
# @return [Bool] whether an external source source is equal to another
# according to the {#name} and to the {#params}.
#
def ==(other)
return false if other.nil?
name == other.name && params == other.params
end
public
# @!group Subclasses hooks
# Fetches the external source from the remote according to the params.
#
# @param [Sandbox] sandbox
# the sandbox where the specification should be stored.
#
# @return [void]
#
def fetch(sandbox)
raise "Abstract method"
end
# @return [String] a string representation of the source suitable for UI.
#
def description
raise "Abstract method"
end
protected
# @return [String] The uri of the podspec appending the name of the file
# and expanding it if necessary.
#
# @note If the declared path is expanded only if the represents a path
# relative to the file system.
#
def normalized_podspec_path(declared_path)
if File.extname(declared_path) == '.podspec'
path_with_ext = declared_path
else
path_with_ext = "#{declared_path}/#{name}.podspec"
end
podfile_dir = File.dirname(podfile_path || '')
File.expand_path(path_with_ext, podfile_dir)
end
private
# @! Subclasses helpers
# Pre-downloads a Pod passing the options to the downloader and informing
# the sandbox.
#
# @param [Sandbox] sandbox
# The sandbox where the Pod should be downloaded.
#
# @note To prevent a double download of the repository the pod is
# marked as pre-downloaded indicating to the installer that only
# clean operations are needed.
#
# @todo The downloader configuration is the same of the
# #{PodSourceInstaller} and it needs to be kept in sync.
#
# @return [void]
#
def pre_download(sandbox)
title = "Pre-downloading: `#{name}` #{description}"
UI.titled_section(title, { :verbose_prefix => "-> " }) do
target = sandbox.root + name
target.rmtree if target.exist?
downloader = Config.instance.downloader(target, params)
downloader.download
store_podspec(sandbox, target + "#{name}.podspec")
sandbox.store_pre_downloaded_pod(name)
if downloader.options_specific?
source = params
else
source = downloader.checkout_options
end
sandbox.store_checkout_source(name, source)
end
end
# Stores the podspec in the sandbox and marks it as from an external
# source.
#
# @param [Sandbox] sandbox
# The sandbox where the specification should be stored.
#
# @param [Pathname, String] spec
# The path of the specification or its contents.
#
# @note All the concrete implementations of #{fetch} should invoke this
# method.
#
# @note The sandbox ensures that the podspec exists and that the names
# match.
#
# @return [void]
#
def store_podspec(sandbox, spec)
sandbox.store_podspec(name, spec, true)
end
end
end
end
module Pod
module ExternalSources
# Provides support for fetching a specification file from a source handled
# by the downloader. Supports all the options of the downloader
#
# @note The podspec must be in the root of the repository and should have a
# name matching the one of the dependency.
#
class DownloaderSource < AbstractExternalSource
# @see AbstractExternalSource#fetch
#
def fetch(sandbox)
pre_download(sandbox)
end
# @see AbstractExternalSource#description
#
def description
strategy = Downloader.strategy_from_options(params)
options = params.dup
url = options.delete(strategy)
result = "from `#{url}`"
options.each do |key, value|
result << ", #{key} `#{value}`"
end
result
end
end
end
end
module Pod
module ExternalSources
# Provides support for fetching a specification file from a path local to
# the machine running the installation.
#
# Works with the {LocalPod::LocalSourcedPod} class.
#
class PathSource < AbstractExternalSource
# @see AbstractExternalSource#fetch
#
def fetch(sandbox)
title = "Fetching podspec for `#{name}` #{description}"
UI.titled_section(title, { :verbose_prefix => "-> " }) do
podspec = podspec_path
unless podspec.exist?
raise Informative, "No podspec found for `#{name}` in " \
"`#{declared_path}`"
end
store_podspec(sandbox, podspec)
is_absolute = absolute?(declared_path)
sandbox.store_local_path(name, podspec.dirname, is_absolute)
end
end
# @see AbstractExternalSource#description
#
def description
"from `#{params[:path] || params[:local]}`"
end
private
# @!group Helpers
# @return [String] The path as declared by the user.
#
def declared_path
result = params[:path] || params[:local]
result.to_s if result
end
# @return [Pathname] The absolute path of the podspec.
#
def podspec_path
Pathname(normalized_podspec_path(declared_path))
end
# @return [Bool]
#
def absolute?(path)
Pathname(path).absolute? || path.to_s.start_with?('~')
end
end
end
end
module Pod
module ExternalSources
# Provides support for fetching a specification file from an URL. Can be
# http, file, etc.
#
class PodspecSource < AbstractExternalSource
# @see AbstractExternalSource#fetch
#
def fetch(sandbox)
title = "Fetching podspec for `#{name}` #{description}"
UI.titled_section(title, { :verbose_prefix => "-> " }) do
require 'open-uri'
open(podspec_uri) { |io| store_podspec(sandbox, io.read) }
end
end
# @see AbstractExternalSource#description
#
def description
"from `#{params[:podspec]}`"
end
private
# @!group Helpers
# @return [String] The uri of the podspec appending the name of the file
# and expanding it if necessary.
#
# @note If the declared path is expanded only if the represents a path
# relative to the file system.
#
def podspec_uri
declared_path = params[:podspec].to_s
if declared_path.match(%r{^.+://})
declared_path
else
normalized_podspec_path(declared_path)
end
end
end
end
end
module Pod
# The version of the cocoapods command line tool.
#
VERSION = '0.30.0' unless defined? Pod::VERSION
VERSION = '0.32.1' unless defined? Pod::VERSION
end
......@@ -40,9 +40,12 @@ module Pod
# added to the top of the prefix header. For OS X `Cocoa/Cocoa.h`
# is imported.
#
# @note Only unique prefix_header_contents are added to the prefix header.
#
# @return [String]
#
# @todo Subspecs can specify prefix header information too.
# @todo Check to see if we have a similar duplication issue with file_accessor.prefix_header.
#
def generate
result = "#ifdef __OBJC__\n"
......@@ -53,12 +56,18 @@ module Pod
result << %|\n#import "#{import}"|
end
file_accessors.each do |file_accessor|
unique_prefix_header_contents = file_accessors.collect do |file_accessor|
file_accessor.spec_consumer.prefix_header_contents
end.compact.uniq
result << "\n"
unique_prefix_header_contents.each do |prefix_header_contents|
result << prefix_header_contents
result << "\n"
if prefix_header_contents = file_accessor.spec_consumer.prefix_header_contents
result << prefix_header_contents
result << "\n"
end
end
file_accessors.each do |file_accessor|
if prefix_header = file_accessor.prefix_header
result << Pathname(prefix_header).read
end
......
......@@ -44,13 +44,13 @@ module Pod
# @return [Xcodeproj::Config]
#
def generate
header_search_path_flags = target.sandbox.public_headers.search_paths.map {|path| '-isystem'+path}
header_search_path_flags = target.sandbox.public_headers.search_paths
@xcconfig = Xcodeproj::Config.new({
'OTHER_LDFLAGS' => XCConfigHelper.default_ld_flags(target),
'HEADER_SEARCH_PATHS' => XCConfigHelper.quote(target.sandbox.public_headers.search_paths),
'PODS_ROOT' => target.relative_pods_root,
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1',
'OTHER_CFLAGS' => '$(inherited) ' + XCConfigHelper.quote(header_search_path_flags)
'OTHER_CFLAGS' => '$(inherited) ' + XCConfigHelper.quote(header_search_path_flags, '-isystem')
})
target.pod_targets.each do |pod_target|
......
......@@ -13,10 +13,13 @@ module Pod
# @param [Array<String>] strings
# a list of strings.
#
# @param [String] optional prefix, such as a flag or option.
#
# @return [String] the resulting string.
#
def self.quote(strings)
strings.sort.map { |s| %W|"#{s}"| }.join(" ")
def self.quote(strings, prefix = nil)
prefix = "#{prefix} " if prefix
strings.sort.map { |s| %W|#{prefix}"#{s}"| }.join(" ")
end
# @return [String] the default linker flags. `-ObjC` is always included
......
......@@ -64,11 +64,12 @@ module Pod
@lockfile = lockfile
end
# @return [Bool] Whether the installer is in update mode. In update mode
# the contents of the Lockfile are not taken into account for
# deciding what Pods to install.
# @return [Hash, Boolean, nil] Pods that have been requested to be
# updated or true if all Pods should be updated.
# If all Pods should been updated the contents of the Lockfile are
# not taken into account for deciding what Pods to install.
#
attr_accessor :update_mode
attr_accessor :update
# Installs the Pods.
#
......@@ -169,7 +170,7 @@ module Pod
end
analyzer = Analyzer.new(sandbox, podfile, lockfile)
analyzer.update_mode = update_mode
analyzer.update = update
@analysis_result = analyzer.analyze
@aggregate_targets = analyzer.result.targets
end
......@@ -235,7 +236,13 @@ module Pod
title_options = { :verbose_prefix => "-> ".green }
root_specs.sort_by(&:name).each do |spec|
if pods_to_install.include?(spec.name)
UI.titled_section("Installing #{spec}".green, title_options) do
if sandbox_state.changed.include?(spec.name) && sandbox.manifest
previous = sandbox.manifest.version(spec.name)
title = "Installing #{spec.name} #{spec.version} (was #{previous})"
else
title = "Installing #{spec}"
end
UI.titled_section(title.green, title_options) do
install_source_of_pod(spec.name)
end
else
......@@ -295,9 +302,10 @@ module Pod
pod_names = pod_targets.map(&:pod_name).uniq
pod_names.each do |pod_name|
path = sandbox.pod_dir(pod_name)
local = sandbox.local?(pod_name)
@pods_project.add_pod_group(pod_name, path, local)
path = sandbox.pod_dir(pod_name)
was_absolute = sandbox.local_path_was_absolute?(pod_name)
@pods_project.add_pod_group(pod_name, path, local, was_absolute)
end
if config.podfile_path
......
......@@ -33,7 +33,7 @@ module Pod
@podfile = podfile
@lockfile = lockfile
@update_mode = false
@update = false
@allow_pre_downloads = true
@archs_by_target_def = {}
end
......@@ -91,11 +91,30 @@ module Pod
# @!group Configuration
# @return [Hash, Boolean, nil] Pods that have been requested to be
# updated or true if all Pods should be updated
#
attr_accessor :update
# @return [Bool] Whether the version of the dependencies which did non
# change in the Podfile should be locked.
#
attr_accessor :update_mode
alias_method :update_mode?, :update_mode
def update_mode?
!!update
end
# @return [Symbol] Whether and how the dependencies in the Podfile
# should be updated.
#
def update_mode
if !update
:none
elsif update == true
:all
elsif update[:pods] != nil
:selected
end
end
# @return [Bool] Whether the analysis allows pre-downloads and thus
# modifications to the sandbox.
......@@ -219,10 +238,15 @@ module Pod
# that prevent the resolver to update a Pod.
#
def generate_version_locking_dependencies
if update_mode?
if update_mode == :all
[]
else
result.podfile_state.unchanged.map do |pod|
locking_pods = result.podfile_state.unchanged
if update_mode == :selected
# If selected Pods should been updated, filter them out of the list
locking_pods = locking_pods.select { |pod| !update[:pods].include?(pod) }
end
locking_pods.map do |pod|
lockfile.dependency_to_lock_pod_named(pod)
end
end
......@@ -252,10 +276,14 @@ module Pod
deps_to_fetch = []
deps_to_fetch_if_needed = []
deps_with_external_source = podfile.dependencies.select { |dep| dep.external_source }
if update_mode?
if update_mode == :all
deps_to_fetch = deps_with_external_source
else
pods_to_fetch = result.podfile_state.added + result.podfile_state.changed
if update_mode == :selected
pods_to_fetch += update[:pods]
end
deps_to_fetch = deps_with_external_source.select { |dep| pods_to_fetch.include?(dep.root_name) }
deps_to_fetch_if_needed = deps_with_external_source.select { |dep| result.podfile_state.unchanged.include?(dep.root_name) }
deps_to_fetch += deps_to_fetch_if_needed.select { |dep| sandbox.specification(dep.root_name).nil? || !dep.external_source[:local].nil? || !dep.external_source[:path].nil? }
......@@ -316,7 +344,7 @@ module Pod
def generate_sandbox_state
sandbox_state = nil
UI.section "Comparing resolved specification to the sandbox manifest" do
sandbox_analyzer = SandboxAnalyzer.new(sandbox, result.specifications, update_mode, lockfile)
sandbox_analyzer = SandboxAnalyzer.new(sandbox, result.specifications, update_mode?, lockfile)
sandbox_state = sandbox_analyzer.analyze
sandbox_state.print
end
......
......@@ -63,6 +63,12 @@ module Pod
def install!
download_source unless predownloaded? || local?
run_prepare_command
rescue Informative
raise
rescue Object => e
UI.notice("Error installing #{root_spec.name}")
clean!
raise
end
# Cleans the installations if appropriate.
......@@ -95,8 +101,18 @@ module Pod
def download_source
root.rmtree if root.exist?
if head_pod?
downloader.download_head
@specific_source = downloader.checkout_options
begin
downloader.download_head
@specific_source = downloader.checkout_options
rescue RuntimeError => e
if e.message == 'Abstract method'
raise Informative, "The pod '" + root_spec.name + "' does not " +
"support the :head option, as it uses a " + downloader.name +
" source. Remove that option to use this pod."
else
raise
end
end
else
downloader.download
unless downloader.options_specific?
......@@ -114,12 +130,17 @@ module Pod
# Runs the prepare command bash script of the spec.
#
# @note Unsets the `CDPATH` env variable before running the
# shell script to avoid issues with relative paths
# (issue #1694).
#
# @return [void]
#
def run_prepare_command
return unless root_spec.prepare_command
UI.section(" > Running prepare command", '', 1) do
Dir.chdir(root) do
ENV.delete('CDPATH')
prepare_command = root_spec.prepare_command.strip_heredoc.chomp
full_command = "\nset -e\n" + prepare_command
bash!(full_command)
......
......@@ -81,21 +81,22 @@ module Pod
#
def create_workspace
all_projects = user_project_paths.sort.push(sandbox.project_path).uniq
projpaths = all_projects.map do |path|
path.relative_path_from(workspace_path.dirname).to_s
file_references = all_projects.map do |path|
relative_path = path.relative_path_from(workspace_path.dirname).to_s
Xcodeproj::Workspace::FileReference.new(relative_path, 'group')
end
if workspace_path.exist?
workspace = Xcodeproj::Workspace.new_from_xcworkspace(workspace_path)
new_projpaths = projpaths - workspace.projpaths
unless new_projpaths.empty?
workspace.projpaths.concat(new_projpaths)
new_file_references = file_references - workspace.file_references
unless new_file_references.empty?
workspace.file_references.concat(new_file_references)
workspace.save_as(workspace_path)
end
else
UI.notice "From now on use `#{workspace_path.basename}`."
workspace = Xcodeproj::Workspace.new(*projpaths)
workspace = Xcodeproj::Workspace.new(*file_references)
workspace.save_as(workspace_path)
end
end
......
......@@ -69,6 +69,7 @@ module Pod
@head_pods = []
@checkout_sources = {}
@development_pods = {}
@pods_with_absolute_path = []
end
# @return [Lockfile] the manifest which contains the information about the
......@@ -159,6 +160,16 @@ module Pod
end
end
# Returns true if the path as originally specified was absolute.
#
# @param [String] name
#
# @return [Bool] true if originally absolute
#
def local_path_was_absolute?(name)
@pods_with_absolute_path.include? name
end
# @return [Pathname] the directory where to store the documentation.
#
def documentation_dir
......@@ -338,11 +349,15 @@ module Pod
# @param [#to_s] path
# The local path where the Pod is stored.
#
# @param [Bool] was_absolute
# True if the specified local path was absolute.
#
# @return [void]
#
def store_local_path(name, path)
def store_local_path(name, path, was_absolute = false)
root_name = Specification.root_name(name)
development_pods[root_name] = path.to_s
@pods_with_absolute_path << root_name if was_absolute
end
# @return [Hash{String=>String}] The path of the Pods with a local source
......
......@@ -152,7 +152,7 @@ module Pod
sources.each do |source|
UI.section "Updating spec repo `#{source.name}`" do
Dir.chdir(source.data_provider.repo) do
output = git!("pull")
output = git!("pull --no-rebase --no-commit")
UI.puts output if show_output && !config.verbose?
end
check_version_information(source.data_provider.repo)
......
......@@ -158,8 +158,8 @@ module Pod
# Prints the textual representation of a given set.
#
def pod(set, mode = :normal, statistics_provider = nil)
if mode == :name
puts_indented set.name
if mode == :name_and_version
puts_indented "#{set.name} #{set.versions.first.version}"
else
pod = Specification::Set::Presenter.new(set, statistics_provider)
title("\n-> #{pod.name} (#{pod.version})".green, '', 1) do
......
......@@ -196,6 +196,9 @@ module Pod
# Perform analysis for a given spec (or subspec)
#
def perform_extensive_analysis(spec)
validate_homepage(spec)
validate_screenshots(spec)
spec.available_platforms.each do |platform|
UI.message "\n\n#{spec} - Analyzing on #{platform} platform.".green.reversed
@consumer = spec.consumer(platform)
......@@ -208,18 +211,75 @@ module Pod
perform_extensive_subspec_analysis(spec) unless @no_subspecs
end
# Recurively perform the extensive analysis on all subspecs
# Recursively perform the extensive analysis on all subspecs
#
def perform_extensive_subspec_analysis(spec)
spec.subspecs.each do |subspec|
@subspec_name = subspec.name
perform_extensive_analysis(subspec)
end
spec.subspecs.each do |subspec|
@subspec_name = subspec.name
perform_extensive_analysis(subspec)
end
end
attr_accessor :consumer
attr_accessor :subspec_name
MAX_HTTP_REDIRECTS = 3
# Performs validation of a URL
#
def validate_url(url)
require 'rest'
begin
redirects = 0
resp = nil
loop do
resp = ::REST.head(url)
if resp.status_code >= 400
resp = ::REST.get(url)
end
if [301, 302, 303, 307, 308].include? resp.status_code
url = resp.headers['location'].first
redirects += 1
else
break
end
break unless redirects < MAX_HTTP_REDIRECTS
end
rescue
warning "There was a problem validating the URL #{url}."
resp = nil
end
if resp && !resp.success?
warning "The URL (#{url}) is not reachable."
end
resp
end
# Performs validations related to the `homepage` attribute.
#
def validate_homepage(spec)
if spec.homepage
validate_url(spec.homepage)
end
end
# Performs validation related to the `screenshots` attribute.
#
def validate_screenshots(spec)
spec.screenshots.compact.each do |screenshot|
request = validate_url(screenshot)
if request && !(request.headers['content-type'] && request.headers['content-type'].first =~ /image\/.*/i)
warning "The screenshot #{screenshot} is not a valid image."
end
end
end
def setup_validation_environment
validation_dir.rmtree if validation_dir.exist?
validation_dir.mkpath
......
Subproject commit 27a44d7c15b58e8fa431ae774f13d348ad315721
Subproject commit 367aaee9111972a40d0569155f40cf6bb63e4634
This is a Bazaar control directory.
Do not change any files in this directory.
See http://bazaar.canonical.com/ for more information about Bazaar.
Bazaar-NG meta directory, format 1
Bazaar Branch Format 7 (needs bzr 1.6)
2 fred@sharpnoodles.com-20131030202140-gg5dfrrtaotfxlrh
Bazaar Working Tree Format 6 (bzr 1.14)
Bazaar repository format 2a (needs bzr 1.16 or later)
B+Tree Graph Index 2
node_ref_lists=1
key_elements=1
len=1
row_lengths=1
xQ
;0޺tK-R4n?'oCwK;l-W.6l
"ǰ^c:BMF@,B
\ No newline at end of file
B+Tree Graph Index 2
node_ref_lists=0
key_elements=1
len=0
row_lengths=
B+Tree Graph Index 2
node_ref_lists=1
key_elements=2
len=3
row_lengths=1
xM0@a֜ Lg ԅ71P,ȏ-+M W'ܦ5CH>xi& ("ükA boax{oļ#PB][а^IR`2
4i,FE;;t
"tJ57sL :*7}v e
\ No newline at end of file
B+Tree Graph Index 2
node_ref_lists=0
key_elements=1
len=1
row_lengths=1
x PLZ
8'@8x0ы&V|6Hcr7eyhZCbr"&s?-
\ No newline at end of file
B+Tree Graph Index 2
node_ref_lists=0
key_elements=1
len=0
row_lengths=
Pod::Spec.new do |s|
s.name = "BazaarSource"
s.version = "0.0.1"
s.summary = "A short description of BazaarSource."
s.homepage = "http://EXAMPLE/BazaarSource"
s.license = 'MIT (example)'
s.author = { "Fred McCann" => "fred@sharpnoodles.com" }
s.source = { :git => "http://EXAMPLE/BazaarSource.git", :tag => "0.0.1" }
s.source_files = 'Classes', 'Classes/**/*.{h,m}'
end
Subproject commit 90e5fbce17d66e5341f105c1eb26133a01686838
Subproject commit 65a8282c0b5a6f84bc6266d73bbe7475ef75659d
Subproject commit 287a78804972c1c4ce41d9e2771e4beb63764a16
[ui]
username = Eloy Duran <eloy.de.enige@gmail.com>
Removed comments.
\ No newline at end of file
data/MercurialSource.podspec.i
data/README.i
1 3d2759856083e6dbb5b5d0b702aa625b5b21a10a
Pod::Spec.new do |s|
s.name = "MercurialSource"
s.version = "0.0.1"
s.summary = "A short description of MercurialSource."
s.homepage = "http://EXAMPLE/MercurialSource"
s.license = 'MIT (example)'
s.author = { "Dan Cutting" => "dcutting@gmail.com" }
s.source = { :git => "http://EXAMPLE/MercurialSource.git", :tag => "0.0.1" }
s.source_files = 'Classes', 'Classes/**/*.{h,m}'
end
This is a Subversion repository; use the 'svnadmin' tool to examine
it. Do not add, delete, or modify files here unless you know how
to avoid corrupting the repository.
Visit http://subversion.tigris.org/ for more information.
### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to:
### - a single user,
### - a group of users defined in a special [groups] section,
### - an alias defined in a special [aliases] section,
### - all authenticated users, using the '$authenticated' token,
### - only anonymous users, using the '$anonymous' token,
### - anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').
[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
# [/foo/bar]
# harry = rw
# &joe = r
# * =
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.
[users]
# harry = harryssecret
# sally = sallyssecret
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository. (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)
### Visit http://subversion.tigris.org/ for more information.
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
# anon-access = read
# auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
# password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control. Unless you specify a path
### starting with a /, the file's location is relative to the the
### directory containing this file. If you don't specify an
### authz-db, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
# authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa. The default realm
### is repository's uuid.
# realm = My First Repository
[sasl]
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### These options specify the desired strength of the security layer
### that you want SASL to provide. 0 means no encryption, 1 means
### integrity-checking only, values larger than 1 are correlated
### to the effective key length for encryption (e.g. 128 means 128-bit
### encryption). The values below are the defaults.
# min-encryption = 0
# max-encryption = 256
### This file controls the configuration of the FSFS filesystem.
[memcached-servers]
### These options name memcached servers used to cache internal FSFS
### data. See http://www.danga.com/memcached/ for more information on
### memcached. To use memcached with FSFS, run one or more memcached
### servers, and specify each of them as an option like so:
# first-server = 127.0.0.1:11211
# remote-memcached = mymemcached.corp.example.com:11212
### The option name is ignored; the value is of the form HOST:PORT.
### memcached servers can be shared between multiple repositories;
### however, if you do this, you *must* ensure that repositories have
### distinct UUIDs and paths, or else cached data from one repository
### might be used by another accidentally. Note also that memcached has
### no authentication for reads or writes, so you must ensure that your
### memcached servers are only accessible by trusted users.
[caches]
### When a cache-related error occurs, normally Subversion ignores it
### and continues, logging an error if the server is appropriately
### configured (and ignoring it with file:// access). To make
### Subversion never ignore cache errors, uncomment this line.
# fail-stop = true
[rep-sharing]
### To conserve space, the filesystem can optionally avoid storing
### duplicate representations. This comes at a slight cost in performace,
### as maintaining a database of shared representations can increase
### commit times. The space savings are dependent upon the size of the
### repository, the number of objects it contains and the amount of
### duplication between them, usually a function of the branching and
### merging process.
###
### The following parameter enables rep-sharing in the repository. It can
### be switched on and off at will, but for best space-saving results
### should be enabled consistently over the life of the repository.
# enable-rep-sharing = false
K 8
svn:date
V 27
2011-11-18T22:35:00.555031Z
END
K 10
svn:author
V 4
eloy
K 8
svn:date
V 27
2011-11-18T22:36:39.964845Z
K 7
svn:log
V 14
Initial commit
END
K 10
svn:author
V 4
eloy
K 8
svn:date
V 27
2011-11-18T23:25:58.501852Z
K 7
svn:log
V 5
tag 1
END
K 10
svn:author
V 4
eloy
K 8
svn:date
V 27
2011-11-18T23:26:30.617415Z
K 7
svn:log
V 12
unintersting
END
K 10
svn:author
V 3
lbm
K 8
svn:date
V 27
2012-12-03T12:33:18.707618Z
K 7
svn:log
V 24
Added SvnSource podspec
END
K 10
svn:author
V 4
eloy
K 8
svn:date
V 27
2011-11-18T22:36:55.378137Z
K 7
svn:log
V 13
Second commit
END
K 10
svn:author
V 4
eloy
K 8
svn:date
V 27
2011-11-18T22:38:20.653871Z
K 7
svn:log
V 10
add subdir
END
K 10
svn:author
V 4
eloy
K 8
svn:date
V 27
2011-11-18T23:14:35.265756Z
K 7
svn:log
V 25
Add proper svn structure.
END
K 10
svn:author
V 4
eloy
K 8
svn:date
V 27
2011-11-18T23:15:57.343475Z
K 7
svn:log
V 13
tag a version
END
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment