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
78d54274
Commit
78d54274
authored
May 29, 2012
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update spec repo fixture to latest 0.6 and fix CP version checking.
parent
378a4ae0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
7 deletions
+15
-7
repo.rb
lib/cocoapods/command/repo.rb
+2
-2
setup.rb
lib/cocoapods/command/setup.rb
+6
-3
master
spec/fixtures/spec-repos/master
+1
-1
setup_spec.rb
spec/functional/command/setup_spec.rb
+6
-1
No files found.
lib/cocoapods/command/repo.rb
View file @
78d54274
...
@@ -64,9 +64,9 @@ module Pod
...
@@ -64,9 +64,9 @@ module Pod
return
unless
yaml_file
.
exist?
return
unless
yaml_file
.
exist?
data
=
YAML
.
load_file
(
yaml_file
)
data
=
YAML
.
load_file
(
yaml_file
)
min_version
=
Gem
::
Version
.
new
(
data
[
'min'
])
min_version
=
Gem
::
Version
.
new
(
data
[
'min'
])
max_version
=
Gem
::
Version
.
new
(
data
[
'max'
])
max_version
=
Gem
::
Version
.
new
(
data
[
'max'
])
if
data
[
'max'
]
last_version
=
Gem
::
Version
.
new
(
data
[
'last'
])
last_version
=
Gem
::
Version
.
new
(
data
[
'last'
])
if
min_version
>
bin_version
||
max_version
<
bin_version
if
min_version
>
bin_version
||
(
max_version
&&
max_version
<
bin_version
)
version_msg
=
(
min_version
==
max_version
)
?
min_version
:
"
#{
min_version
}
-
#{
max_version
}
"
version_msg
=
(
min_version
==
max_version
)
?
min_version
:
"
#{
min_version
}
-
#{
max_version
}
"
raise
Informative
,
raise
Informative
,
"
\n
[!] The `
#{
dir
.
basename
.
to_s
}
' repo requires CocoaPods
#{
min_version
}
\n
"
.
red
+
"
\n
[!] The `
#{
dir
.
basename
.
to_s
}
' repo requires CocoaPods
#{
min_version
}
\n
"
.
red
+
...
...
lib/cocoapods/command/setup.rb
View file @
78d54274
...
@@ -89,9 +89,12 @@ module Pod
...
@@ -89,9 +89,12 @@ module Pod
else
else
add_master_repo_command
.
run
add_master_repo_command
.
run
end
end
hook
=
config
.
repos_dir
+
'master/.git/hooks/pre-commit'
# Mainly so the specs run with submodule repos
hook
.
open
(
'w'
)
{
|
f
|
f
<<
"#!/bin/sh
\n
rake lint"
}
if
(
dir
+
'.git/hooks'
).
exist?
`chmod +x '
#{
hook
}
'`
hook
=
dir
+
'.git/hooks/pre-commit'
hook
.
open
(
'w'
)
{
|
f
|
f
<<
"#!/bin/sh
\n
rake lint"
}
`chmod +x '
#{
hook
}
'`
end
puts
"Setup completed (
#{
push?
?
"push"
:
"read-only"
}
access)"
unless
config
.
silent
puts
"Setup completed (
#{
push?
?
"push"
:
"read-only"
}
access)"
unless
config
.
silent
end
end
end
end
...
...
master
@
dfa82b5f
Subproject commit
5f39221d0bf69ebc0a2dc5879deae271f208877b
Subproject commit
dfa82b5f886ea11be0f81fb5a23167779d8b417f
spec/functional/command/setup_spec.rb
View file @
78d54274
...
@@ -7,7 +7,12 @@ describe "Pod::Command::Setup" do
...
@@ -7,7 +7,12 @@ describe "Pod::Command::Setup" do
extend
SpecHelper
::
TemporaryRepos
extend
SpecHelper
::
TemporaryRepos
it
"runs with correct parameters"
do
it
"runs with correct parameters"
do
lambda
{
run_command
(
'setup'
)
}.
should
.
not
.
raise
begin
before
,
config
.
repos_dir
=
config
.
repos_dir
,
fixture
(
'spec-repos'
)
lambda
{
run_command
(
'setup'
)
}.
should
.
not
.
raise
ensure
config
.
repos_dir
=
before
end
end
end
it
"complains for wrong parameters"
do
it
"complains for wrong parameters"
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