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
0a81b9ef
Commit
0a81b9ef
authored
Nov 28, 2013
by
Fred McCann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bazaar] Add Bazaar support
parent
89ac71d1
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
112 additions
and
1 deletion
+112
-1
spec.rb
lib/cocoapods/command/spec.rb
+1
-1
external_sources.rb
lib/cocoapods/external_sources.rb
+30
-0
README
spec/fixtures/bzr-repo/.bzr/README
+3
-0
branch-format
spec/fixtures/bzr-repo/.bzr/branch-format
+1
-0
branch.conf
spec/fixtures/bzr-repo/.bzr/branch/branch.conf
+0
-0
format
spec/fixtures/bzr-repo/.bzr/branch/format
+1
-0
last-revision
spec/fixtures/bzr-repo/.bzr/branch/last-revision
+1
-0
tags
spec/fixtures/bzr-repo/.bzr/branch/tags
+0
-0
conflicts
spec/fixtures/bzr-repo/.bzr/checkout/conflicts
+1
-0
dirstate
spec/fixtures/bzr-repo/.bzr/checkout/dirstate
+0
-0
format
spec/fixtures/bzr-repo/.bzr/checkout/format
+1
-0
views
spec/fixtures/bzr-repo/.bzr/checkout/views
+0
-0
format
spec/fixtures/bzr-repo/.bzr/repository/format
+1
-0
5b3f31ef63699074fdad6fa3b0e55305.cix
...r/repository/indices/5b3f31ef63699074fdad6fa3b0e55305.cix
+0
-0
5b3f31ef63699074fdad6fa3b0e55305.iix
...r/repository/indices/5b3f31ef63699074fdad6fa3b0e55305.iix
+0
-0
5b3f31ef63699074fdad6fa3b0e55305.rix
...r/repository/indices/5b3f31ef63699074fdad6fa3b0e55305.rix
+9
-0
5b3f31ef63699074fdad6fa3b0e55305.six
...r/repository/indices/5b3f31ef63699074fdad6fa3b0e55305.six
+5
-0
5b3f31ef63699074fdad6fa3b0e55305.tix
...r/repository/indices/5b3f31ef63699074fdad6fa3b0e55305.tix
+9
-0
c70a743dc767dc376699c48c5e9cf925.cix
...r/repository/indices/c70a743dc767dc376699c48c5e9cf925.cix
+8
-0
c70a743dc767dc376699c48c5e9cf925.iix
...r/repository/indices/c70a743dc767dc376699c48c5e9cf925.iix
+0
-0
c70a743dc767dc376699c48c5e9cf925.rix
...r/repository/indices/c70a743dc767dc376699c48c5e9cf925.rix
+0
-0
c70a743dc767dc376699c48c5e9cf925.six
...r/repository/indices/c70a743dc767dc376699c48c5e9cf925.six
+5
-0
c70a743dc767dc376699c48c5e9cf925.tix
...r/repository/indices/c70a743dc767dc376699c48c5e9cf925.tix
+0
-0
pack-names
spec/fixtures/bzr-repo/.bzr/repository/pack-names
+0
-0
5b3f31ef63699074fdad6fa3b0e55305.pack
...zr/repository/packs/5b3f31ef63699074fdad6fa3b0e55305.pack
+0
-0
c70a743dc767dc376699c48c5e9cf925.pack
...zr/repository/packs/c70a743dc767dc376699c48c5e9cf925.pack
+0
-0
BazaarSource.podspec
spec/fixtures/bzr-repo/BazaarSource.podspec
+10
-0
README
spec/fixtures/bzr-repo/README
+1
-0
external_sources_spec.rb
spec/unit/external_sources_spec.rb
+25
-0
No files found.
lib/cocoapods/command/spec.rb
View file @
0a81b9ef
...
...
@@ -512,7 +512,7 @@ Pod::Spec.new do |s|
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the location from where the source should be retrieved.
# Supports git, hg, svn and HTTP.
# Supports git, hg,
bzr,
svn and HTTP.
#
s.source = { :git => "
#{
data
[
:source_url
]
}
",
#{
data
[
:ref_type
]
}
=> "
#{
data
[
:ref
]
}
" }
...
...
lib/cocoapods/external_sources.rb
View file @
0a81b9ef
...
...
@@ -16,6 +16,7 @@ module Pod
klass
=
if
params
.
key?
(
:git
)
then
GitSource
elsif
params
.
key?
(
:svn
)
then
SvnSource
elsif
params
.
key?
(
:hg
)
then
MercurialSource
elsif
params
.
key?
(
:bzr
)
then
BazaarSource
elsif
params
.
key?
(
:podspec
)
then
PodspecSource
elsif
params
.
key?
(
:path
)
then
PathSource
end
...
...
@@ -261,6 +262,35 @@ module Pod
#-------------------------------------------------------------------------#
# Provides support for fetching a specification file from a Bazaar
# source remote.
#
# Supports all the options of the downloader (is similar to the git key of
# `source` attribute of a specification).
#
# @note The podspec must be in the root of the repository and should have a
# name matching the one of the dependency.
#
class
BazaarSource
<
AbstractExternalSource
# @see AbstractExternalSource#fetch
#
def
fetch
(
sandbox
)
pre_download
(
sandbox
)
end
# @see AbstractExternalSource#description
#
def
description
"from `
#{
params
[
:bzr
]
}
`"
.
tap
do
|
description
|
description
<<
", tag `
#{
params
[
:tag
]
}
`"
if
params
[
:tag
]
description
<<
", revision `
#{
params
[
:revision
]
}
`"
if
params
[
:revision
]
end
end
end
#-------------------------------------------------------------------------#
# Provides support for fetching a specification file from an URL. Can be
# http, file, etc.
#
...
...
spec/fixtures/bzr-repo/.bzr/README
0 → 100644
View file @
0a81b9ef
This is a Bazaar control directory.
Do not change any files in this directory.
See http://bazaar.canonical.com/ for more information about Bazaar.
spec/fixtures/bzr-repo/.bzr/branch-format
0 → 100644
View file @
0a81b9ef
Bazaar-NG meta directory, format 1
spec/fixtures/bzr-repo/.bzr/branch/branch.conf
0 → 100644
View file @
0a81b9ef
spec/fixtures/bzr-repo/.bzr/branch/format
0 → 100644
View file @
0a81b9ef
Bazaar Branch Format 7 (needs bzr 1.6)
spec/fixtures/bzr-repo/.bzr/branch/last-revision
0 → 100644
View file @
0a81b9ef
2 fred@sharpnoodles.com-20131030202140-gg5dfrrtaotfxlrh
spec/fixtures/bzr-repo/.bzr/branch/tags
0 → 100644
View file @
0a81b9ef
spec/fixtures/bzr-repo/.bzr/checkout/conflicts
0 → 100644
View file @
0a81b9ef
BZR conflict list format 1
spec/fixtures/bzr-repo/.bzr/checkout/dirstate
0 → 100644
View file @
0a81b9ef
File added
spec/fixtures/bzr-repo/.bzr/checkout/format
0 → 100644
View file @
0a81b9ef
Bazaar Working Tree Format 6 (bzr 1.14)
spec/fixtures/bzr-repo/.bzr/checkout/views
0 → 100644
View file @
0a81b9ef
spec/fixtures/bzr-repo/.bzr/repository/format
0 → 100644
View file @
0a81b9ef
Bazaar repository format 2a (needs bzr 1.16 or later)
spec/fixtures/bzr-repo/.bzr/repository/indices/5b3f31ef63699074fdad6fa3b0e55305.cix
0 → 100644
View file @
0a81b9ef
File added
spec/fixtures/bzr-repo/.bzr/repository/indices/5b3f31ef63699074fdad6fa3b0e55305.iix
0 → 100644
View file @
0a81b9ef
File added
spec/fixtures/bzr-repo/.bzr/repository/indices/5b3f31ef63699074fdad6fa3b0e55305.rix
0 → 100644
View file @
0a81b9ef
B+Tree Graph Index 2
node_ref_lists=1
key_elements=1
len=1
row_lengths=1
xQ
;0tK-R4n?'oCwK;l-W.6l
"ǰ^c:BMF@,B
\ No newline at end of file
spec/fixtures/bzr-repo/.bzr/repository/indices/5b3f31ef63699074fdad6fa3b0e55305.six
0 → 100644
View file @
0a81b9ef
B+Tree Graph Index 2
node_ref_lists=0
key_elements=1
len=0
row_lengths=
spec/fixtures/bzr-repo/.bzr/repository/indices/5b3f31ef63699074fdad6fa3b0e55305.tix
0 → 100644
View file @
0a81b9ef
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}ve
\ No newline at end of file
spec/fixtures/bzr-repo/.bzr/repository/indices/c70a743dc767dc376699c48c5e9cf925.cix
0 → 100644
View file @
0a81b9ef
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
spec/fixtures/bzr-repo/.bzr/repository/indices/c70a743dc767dc376699c48c5e9cf925.iix
0 → 100644
View file @
0a81b9ef
File added
spec/fixtures/bzr-repo/.bzr/repository/indices/c70a743dc767dc376699c48c5e9cf925.rix
0 → 100644
View file @
0a81b9ef
File added
spec/fixtures/bzr-repo/.bzr/repository/indices/c70a743dc767dc376699c48c5e9cf925.six
0 → 100644
View file @
0a81b9ef
B+Tree Graph Index 2
node_ref_lists=0
key_elements=1
len=0
row_lengths=
spec/fixtures/bzr-repo/.bzr/repository/indices/c70a743dc767dc376699c48c5e9cf925.tix
0 → 100644
View file @
0a81b9ef
File added
spec/fixtures/bzr-repo/.bzr/repository/pack-names
0 → 100644
View file @
0a81b9ef
File added
spec/fixtures/bzr-repo/.bzr/repository/packs/5b3f31ef63699074fdad6fa3b0e55305.pack
0 → 100644
View file @
0a81b9ef
File added
spec/fixtures/bzr-repo/.bzr/repository/packs/c70a743dc767dc376699c48c5e9cf925.pack
0 → 100644
View file @
0a81b9ef
File added
spec/fixtures/bzr-repo/BazaarSource.podspec
0 → 100644
View file @
0a81b9ef
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
spec/fixtures/bzr-repo/README
0 → 100644
View file @
0a81b9ef
second commit
spec/unit/external_sources_spec.rb
View file @
0a81b9ef
...
...
@@ -148,6 +148,31 @@ module Pod
#---------------------------------------------------------------------------#
describe
ExternalSources
::
BazaarSource
do
before
do
dependency
=
Dependency
.
new
(
"BazaarSource"
,
:bzr
=>
fixture
(
'bzr-repo'
))
@external_source
=
ExternalSources
.
from_dependency
(
dependency
,
nil
)
end
it
"creates a copy of the podspec"
do
@external_source
.
fetch
(
config
.
sandbox
)
path
=
config
.
sandbox
.
root
+
'Local Podspecs/BazaarSource.podspec'
path
.
should
.
exist?
end
it
"marks a LocalPod as downloaded"
do
@external_source
.
fetch
(
config
.
sandbox
)
config
.
sandbox
.
predownloaded_pods
.
should
==
[
"BazaarSource"
]
end
it
"returns the description"
do
@external_source
.
description
.
should
.
match
%r|from `.*/bzr-repo`|
end
end
#---------------------------------------------------------------------------#
describe
ExternalSources
::
PodspecSource
do
before
do
...
...
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