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
331c95f9
Commit
331c95f9
authored
Apr 17, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[#201] Added support for CocoaPods-version.txt
parent
0be7a1e9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
cocoapods.rb
lib/cocoapods.rb
+1
-1
command.rb
lib/cocoapods/command.rb
+15
-1
source.rb
lib/cocoapods/source.rb
+4
-0
No files found.
lib/cocoapods.rb
View file @
331c95f9
Encoding
.
default_external
=
Encoding
::
UTF_8
if
RUBY_VERSION
>
'1.8.7'
Encoding
.
default_external
=
Encoding
::
UTF_8
if
RUBY_VERSION
>
'1.8.7'
module
Pod
module
Pod
VERSION
=
'0.
5.1
'
VERSION
=
'0.
6.0.a
'
class
Informative
<
StandardError
class
Informative
<
StandardError
end
end
...
...
lib/cocoapods/command.rb
View file @
331c95f9
...
@@ -65,9 +65,23 @@ module Pod
...
@@ -65,9 +65,23 @@ module Pod
end
end
def
self
.
run
(
*
argv
)
def
self
.
run
(
*
argv
)
bin_version
=
Gem
::
Version
.
new
(
VERSION
)
last_version
=
bin_version
Source
.
all
.
each
{
|
source
|
file
=
source
.
repo
+
'CocoaPods-version.txt'
next
unless
file
.
exist?
repo_min_version
=
Gem
::
Version
.
new
(
YAML
.
load_file
(
file
)[
:min
])
repo_last_version
=
Gem
::
Version
.
new
(
YAML
.
load_file
(
file
)[
:last
])
last_version
=
repo_last_version
if
repo_last_version
&&
repo_last_version
>
last_version
if
repo_min_version
>
bin_version
raise
Informative
,
"
\n
[!] The repo `
#{
source
}
' requires CocoaPods version
#{
repo_version
}
\n
"
.
red
+
"
\n
Please, update your gem
\n\n
"
end
}
puts
"
\n
-> Cocoapods
#{
last_version
}
is available
\n
"
.
green
.
reversed
if
last_version
>
bin_version
Setup
.
new
(
ARGV
.
new
).
run_if_needed
Setup
.
new
(
ARGV
.
new
).
run_if_needed
parse
(
*
argv
).
run
parse
(
*
argv
).
run
rescue
Interrupt
rescue
Interrupt
puts
"[!] Cancelled"
.
red
puts
"[!] Cancelled"
.
red
Config
.
instance
.
verbose?
?
raise
:
exit
(
1
)
Config
.
instance
.
verbose?
?
raise
:
exit
(
1
)
...
...
lib/cocoapods/source.rb
View file @
331c95f9
...
@@ -83,5 +83,9 @@ module Pod
...
@@ -83,5 +83,9 @@ module Pod
set
if
text
.
downcase
.
include?
(
query
.
downcase
)
set
if
text
.
downcase
.
include?
(
query
.
downcase
)
end
.
compact
end
.
compact
end
end
def
to_s
@repo
.
basename
.
to_s
end
end
end
end
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