Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
e44da0de
Commit
e44da0de
authored
Mar 29, 2014
by
Marc Boquet
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:CocoaPods/CocoaPods
parents
32645a9a
8eace6c0
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
89 additions
and
198 deletions
+89
-198
CHANGELOG.md
CHANGELOG.md
+2
-2
Gemfile.lock
Gemfile.lock
+6
-6
Rakefile
Rakefile
+46
-165
pod
bin/pod
+10
-1
cocoapods.rb
lib/cocoapods.rb
+21
-0
push.rb
lib/cocoapods/command/push.rb
+0
-16
gem_version.rb
lib/cocoapods/gem_version.rb
+1
-1
sources_manager.rb
lib/cocoapods/sources_manager.rb
+2
-1
cocoapods-integration-specs
spec/cocoapods-integration-specs
+1
-1
push_spec.rb
spec/functional/command/push_spec.rb
+0
-5
No files found.
CHANGELOG.md
View file @
e44da0de
...
...
@@ -2,8 +2,8 @@
To install or update CocoaPods see this
[
guide
](
http://docs.cocoapods.org/guides/installing_cocoapods.html
)
.
##
Master
[
CocoaPods
](
https://github.com/jverkoey/CocoaPods/compare/0.29.0...
master
)
##
0.30.0
[
CocoaPods
](
https://github.com/jverkoey/CocoaPods/compare/0.29.0...
0.30.0
)
###### Enhancements
...
...
Gemfile.lock
View file @
e44da0de
...
...
@@ -7,10 +7,10 @@ GIT
GIT
remote: https://github.com/CocoaPods/Core.git
revision:
d281be39c464418c0b0ee8ba4788c4d2ce074de6
revision:
76c726cb88ec60dc64c62e2a87b1845319e84569
branch: master
specs:
cocoapods-core (0.
29
.0)
cocoapods-core (0.
30
.0)
activesupport (>= 3.2.15, < 4)
fuzzy_match (~> 2.0.4)
json_pure (~> 1.8)
...
...
@@ -18,10 +18,10 @@ GIT
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
revision:
524d79df5e5e8d5af9c047682bd21de87c3bb593
revision:
607c0a9c40bf0f8a34504efade50fd2b9fd94842
branch: master
specs:
xcodeproj (0.15.
0
)
xcodeproj (0.15.
1
)
activesupport (~> 3.0)
colored (~> 1.2)
...
...
@@ -74,10 +74,10 @@ GIT
PATH
remote: .
specs:
cocoapods (0.
29
.0)
cocoapods (0.
30
.0)
activesupport (>= 3.2.15, < 4)
claide (~> 0.5.0)
cocoapods-core (= 0.
29
.0)
cocoapods-core (= 0.
30
.0)
cocoapods-downloader (~> 0.4.0)
cocoapods-try (~> 0.2.0)
colored (~> 1.2)
...
...
Rakefile
View file @
e44da0de
def
execute_command
(
command
)
if
ENV
[
'VERBOSE'
]
sh
(
command
)
else
output
=
`
#{
command
}
2>&1`
raise
output
unless
$?
.
success?
end
task
:build
do
title
"Building the gem"
end
#-----------------------------------------------------------------------------#
namespace
:gem
do
def
gem_version
require
File
.
expand_path
(
'../lib/cocoapods/gem_version.rb'
,
__FILE__
)
Pod
::
VERSION
end
def
gem_filename
"cocoapods-
#{
gem_version
}
.gem"
end
#--------------------------------------#
require
"bundler/gem_tasks"
desc
"Build a gem for the current version"
task
:build
do
sh
"gem build cocoapods.gemspec"
end
#--------------------------------------#
desc
"Install a gem version of the current code"
task
:install
=>
:build
do
sh
"gem install
#{
gem_filename
}
"
end
#--------------------------------------#
def
silent_sh
(
command
)
output
=
`
#{
command
}
2>&1`
unless
$?
.
success?
puts
output
exit
1
end
output
end
desc
"Run all specs, build and install gem, commit version change, tag version change, and push everything"
task
:release
do
unless
ENV
[
'SKIP_CHECKS'
]
if
`git symbolic-ref HEAD 2>/dev/null`
.
strip
.
split
(
'/'
).
last
!=
'master'
$stderr
.
puts
"[!] You need to be on the `master' branch in order to be able to do a release."
exit
1
end
if
`git tag`
.
strip
.
split
(
"
\n
"
).
include?
(
gem_version
)
$stderr
.
puts
"[!] A tag for version `
#{
gem_version
}
' already exists. Change the version in lib/cocoapods/gem_version.rb"
silent_sh
"open lib/cocoapods/gem_version.rb"
exit
1
end
diff_lines
=
`git diff --name-only`
.
strip
.
split
(
"
\n
"
)
diff_lines
.
delete
(
'CHANGELOG.md'
)
diff_lines
.
delete
(
'Gemfile.lock'
)
if
diff_lines
.
size
==
0
$stderr
.
puts
"[!] Change the version number yourself in lib/cocoapods/gem_version.rb"
exit
1
end
# Bootstrap task
#-----------------------------------------------------------------------------#
if
diff_lines
!=
[
'lib/cocoapods/gem_version.rb'
]
$stderr
.
puts
"[!] Only change the version number in a release commit!"
exit
1
end
desc
"Initializes your working copy to run the specs"
task
:bootstrap
,
:use_bundle_dir?
do
|
t
,
args
|
title
"Environment bootstrap"
puts
"You are about to release `
#{
gem_version
}
', is that correct? [y/n]
"
exit
if
$stdin
.
gets
.
strip
.
downcase
!=
'y'
puts
"Updating submodules
"
execute_command
"git submodule update --init --recursive"
puts
"Installing gems"
if
args
[
:use_bundle_dir?
]
execute_command
"env XCODEPROJ_BUILD=1 bundle install --path ./travis_bundle_dir"
else
execute_command
"env XCODEPROJ_BUILD=1 bundle install"
end
require
'date'
# First check if the required gems have been pushed
gem_spec
=
eval
(
File
.
read
(
File
.
expand_path
(
'../cocoapods.gemspec'
,
__FILE__
)))
gem_names
=
[
'xcodeproj'
,
'cocoapods-core'
,
'cocoapods-downloader'
,
'claide'
]
gem_names
.
each
do
|
gem_name
|
gem
=
gem_spec
.
dependencies
.
find
{
|
d
|
d
.
name
==
gem_name
}
required_version
=
gem
.
requirement
.
requirements
.
first
.
last
.
to_s
puts
"* Checking if
#{
gem_name
}
#{
required_version
}
exists on the gem host"
search_result
=
silent_sh
(
"gem search --all --pre --remote
#{
gem_name
}
"
)
remote_versions
=
search_result
.
match
(
/
#{
gem_name
}
\((.*)\)/m
)[
1
].
split
(
', '
)
unless
remote_versions
.
include?
(
required_version
)
$stderr
.
puts
"[!] The
#{
gem_name
}
version `
#{
required_version
}
' required by "
\
"this version of CocoaPods does not exist on the gem host. "
\
"Either push that first, or fix the version requirement."
exit
1
end
puts
"Checking for hg and bzr..."
if
`which hg`
.
strip
.
empty?
puts
"Please install Mercurial: `brew install hg`"
end
# Ensure that the branches are up to date with the remote
sh
"git pull"
puts
"* Updating Bundle"
silent_sh
(
'bundle update'
)
unless
ENV
[
'SKIP_SPECS'
]
puts
"* Running specs"
silent_sh
(
'rake spec:all'
)
if
`which bzr`
.
strip
.
empty?
puts
"Please install Bazaar: `brew install bzr`"
end
end
tmp
=
File
.
expand_path
(
'../tmp'
,
__FILE__
)
tmp_gems
=
File
.
join
(
tmp
,
'gems'
)
Rake
::
Task
[
'gem:build'
].
invoke
puts
"* Testing gem installation (tmp/gems)"
silent_sh
"rm -rf '
#{
tmp
}
'"
silent_sh
"gem install --install-dir='
#{
tmp_gems
}
'
#{
gem_filename
}
"
# Then release
sh
"git commit lib/cocoapods/gem_version.rb CHANGELOG.md Gemfile.lock -m 'Release
#{
gem_version
}
'"
sh
"git tag -a
#{
gem_version
}
-m 'Release
#{
gem_version
}
'"
sh
"git push origin master"
sh
"git push origin --tags"
sh
"gem push
#{
gem_filename
}
"
# Post release
#-----------------------------------------------------------------------------#
# Update the last version in CocoaPods-version.yml
puts
"* Updating last known version in Specs repo"
desc
"Updates the last know version of CocoaPods in the specs repo"
task
:post_release
do
title
"Updating last known version in Specs repo"
specs_branch
=
'master'
Dir
.
chdir
(
'../Specs'
)
do
puts
Dir
.
pwd
...
...
@@ -149,9 +58,9 @@ namespace :gem do
sh
"git commit
#{
yaml_file
}
-m 'CocoaPods release
#{
gem_version
}
'"
sh
"git push"
end
end
end
# Spec
#-----------------------------------------------------------------------------#
namespace
:spec
do
...
...
@@ -219,9 +128,6 @@ namespace :spec do
Rake
::
Task
[
'examples:build'
].
invoke
end
# Travis
#--------------------------------------#
#
# The integration 2 tests and the examples use the normal CocoaPods setup.
#
desc
"Run all specs and build all examples"
...
...
@@ -242,8 +148,6 @@ namespace :spec do
Rake
::
Task
[
'examples:build'
].
invoke
end
#--------------------------------------#
desc
"Rebuild all the fixture tarballs"
task
:rebuild_fixture_tarballs
do
tarballs
=
FileList
[
'spec/fixtures/**/*.tar.gz'
]
...
...
@@ -253,8 +157,6 @@ namespace :spec do
end
end
#--------------------------------------#
desc
"Unpacks all the fixture tarballs"
task
:unpack_fixture_tarballs
do
tarballs
=
FileList
[
'spec/fixtures/**/*.tar.gz'
]
...
...
@@ -266,15 +168,11 @@ namespace :spec do
end
end
#--------------------------------------#
desc
"Removes the stored VCR fixture"
task
:clean_vcr
do
sh
"rm -f spec/fixtures/vcr/tarballs.yml"
end
#--------------------------------------#
desc
"Rebuilds integration fixtures"
task
:rebuild_integration_fixtures
do
title
'Running Integration tests'
...
...
@@ -302,11 +200,10 @@ namespace :spec do
puts
"Integration fixtures updated, commit and push in the `spec/cocoapods-integration-specs` submodule"
end
#--------------------------------------#
task
:clean_env
=>
[
:clean_vcr
,
:unpack_fixture_tarballs
,
"ext:cleanbuild"
]
end
# Examples
#-----------------------------------------------------------------------------#
task
:examples
=>
"examples:build"
...
...
@@ -324,13 +221,14 @@ namespace :examples do
end
end
#--------------------------------------#
desc
"Build all examples"
task
:build
do
Dir
.
chdir
(
"examples/AFNetworking Example"
)
do
puts
"Installing Pods"
pod_command
=
ENV
[
'FROM_GEM'
]
?
'sandbox-pod'
:
'bundle exec ../../bin/sandbox-pod'
# pod_command = ENV['FROM_GEM'] ? 'sandbox-pod' : 'bundle exec ../../bin/sandbox-pod'
# TODO: The sandbox is blocking local git repos making bundler crash
pod_command
=
ENV
[
'FROM_GEM'
]
?
'sandbox-pod'
:
'bundle exec ../../bin/pod'
execute_command
"rm -rf Pods"
execute_command
"
#{
pod_command
}
install --verbose --no-repo-update"
...
...
@@ -347,37 +245,7 @@ namespace :examples do
sdk
=
Dir
.
glob
(
"
#{
`xcode-select -print-path`
.
chomp
}
/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk"
).
last
execute_command
"xcodebuild -workspace 'AFNetworking Examples.xcworkspace' -scheme 'AFNetworking iOS Example' clean install ONLY_ACTIVE_ARCH=NO -sdk
#{
sdk
}
"
end
end
end
#--------------------------------------#
end
#-----------------------------------------------------------------------------#
desc
"Initializes your working copy to run the specs"
task
:bootstrap
,
:use_bundle_dir?
do
|
t
,
args
|
title
"Environment bootstrap"
puts
"Updating submodules"
execute_command
"git submodule update --init --recursive"
puts
"Installing gems"
if
args
[
:use_bundle_dir?
]
execute_command
"env XCODEPROJ_BUILD=1 bundle install --path ./travis_bundle_dir"
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
...
...
@@ -388,9 +256,22 @@ task :spec => 'spec:all'
task
:default
=>
:spec
# Helpers
#-----------------------------------------------------------------------------#
# group helpers
def
execute_command
(
command
)
if
ENV
[
'VERBOSE'
]
sh
(
command
)
else
output
=
`
#{
command
}
2>&1`
raise
output
unless
$?
.
success?
end
end
def
gem_version
require
File
.
expand_path
(
'../lib/cocoapods/gem_version.rb'
,
__FILE__
)
Pod
::
VERSION
end
def
title
(
title
)
cyan_title
=
"
\033
[0;36m
#{
title
}
\033
[0m"
...
...
bin/pod
View file @
e44da0de
#!/usr/bin/env ruby
if
RUBY_VERSION
>
'1.8.7'
&&
Encoding
.
default_external
!=
Encoding
::
UTF_8
puts
"
\e
[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding."
if
ENV
[
"TRAVIS"
]
puts
<<-
DOC
Consider adding the following settings to .travis.yml
before_script:
- export LANG=en_US.UTF-8
\e
[0m
\n
DOC
else
puts
<<-
DOC
\e
[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
See https://github.com/CocoaPods/guides.cocoapods.org/issues/26 for
possible solutions.
\e
[0m
\n
DOC
end
end
if
$PROGRAM_NAME
==
__FILE__
&&
!
ENV
[
'COCOAPODS_NO_BUNDLER'
]
...
...
lib/cocoapods.rb
View file @
e44da0de
...
...
@@ -65,3 +65,24 @@ 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
lib/cocoapods/command/push.rb
View file @
e44da0de
...
...
@@ -42,7 +42,6 @@ module Pod
def
run
validate_podspec_files
test_trunk
check_repo_status
update_repo
add_specs_to_repo
...
...
@@ -58,21 +57,6 @@ module Pod
extend
Executable
executable
:git
# @return [void] Silently test the CocoaPods trunk service.
#
def
test_trunk
return
unless
@repo
==
"master"
require
'rest'
base_url
=
'https://trunk.cocoapods.org/api/v1'
podspec_files
.
each
do
|
spec_file
|
spec
=
Pod
::
Specification
.
from_file
(
spec_file
)
REST
.
post
(
"
#{
base_url
}
/pods"
,
spec
.
to_json
,
'Content-Type'
=>
'application/json; charset=utf-8'
,
'Authorization'
=>
"Token 9300632274827cd3e6dde24bf9c608c3"
)
end
rescue
Exception
# Nothing
end
# Performs a full lint against the podspecs.
#
def
validate_podspec_files
...
...
lib/cocoapods/gem_version.rb
View file @
e44da0de
module
Pod
# The version of the cocoapods command line tool.
#
VERSION
=
'0.
29
.0'
unless
defined?
Pod
::
VERSION
VERSION
=
'0.
30
.0'
unless
defined?
Pod
::
VERSION
end
lib/cocoapods/sources_manager.rb
View file @
e44da0de
...
...
@@ -206,7 +206,8 @@ module Pod
end
if
config
.
new_version_message?
&&
cocoapods_update?
(
versions
)
UI
.
puts
"
\n
CocoaPods
#{
versions
[
'last'
]
}
is available.
\n
"
.
green
UI
.
puts
"
\n
CocoaPods
#{
versions
[
'last'
]
}
is available.
\n
"
\
"To update use: [sudo] gem update cocoapods
\n
"
.
green
end
end
...
...
cocoapods-integration-specs
@
27a44d7c
Subproject commit 2
14c69d0c2e7abeba1c3df3d3a8809998a405d32
Subproject commit 2
7a44d7c15b58e8fa431ae774f13d348ad315721
spec/functional/command/push_spec.rb
View file @
e44da0de
...
...
@@ -5,11 +5,6 @@ module Pod
extend
SpecHelper
::
Command
extend
SpecHelper
::
TemporaryRepos
# Don't test push the spec to the trunk app
def
command
(
*
a
)
super
.
tap
{
|
cmd
|
cmd
.
stubs
(
:test_trunk
)
}
end
before
do
config
.
repos_dir
=
SpecHelper
.
tmp_repos_path
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment