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
575996d2
Commit
575996d2
authored
Sep 13, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning
parent
bb500057
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
12 deletions
+31
-12
pod
bin/pod
+4
-2
install.rb
lib/cocoa_pods/command/install.rb
+2
-9
config.rb
lib/cocoa_pods/config.rb
+5
-1
dependency.rb
lib/cocoa_pods/dependency.rb
+19
-0
installer.rb
lib/cocoa_pods/installer.rb
+1
-0
No files found.
bin/pod
View file @
575996d2
#!/usr/bin/env macruby
$:.unshift File.expand_path('../../lib', __FILE__)
$:.unshift File.expand_path('../../vendor/rubygems/lib', __FILE__)
if $0 == __FILE__
$:.unshift File.expand_path('../../lib', __FILE__)
require 'rubygems'
end
require 'cocoa_pods'
...
...
lib/cocoa_pods/command/install.rb
View file @
575996d2
...
...
@@ -2,20 +2,13 @@ module Pod
class
Command
class
Install
<
Command
def
run
if
spec
=
Specification
.
from_podfile
(
podfile
)
if
config
.
project_podfile
.
exist?
spec
=
Specification
.
from_podfile
(
config
.
project_podfile
)
Installer
.
new
(
spec
,
config
.
project_pods_root
).
install!
else
$stderr
.
puts
"No Podfile found in current working directory."
end
end
def
pods_root
Pathname
.
new
(
Dir
.
pwd
)
+
'Pods'
end
def
podfile
File
.
join
(
Dir
.
pwd
,
'Podfile'
)
end
end
end
end
lib/cocoa_pods/config.rb
View file @
575996d2
...
...
@@ -18,13 +18,17 @@ module Pod
end
def
project_root
Pathname
.
new
(
Dir
.
pwd
)
Pathname
.
pwd
end
def
project_pods_root
project_root
+
'Pods'
end
def
project_podfile
project_root
+
'Podfile'
end
module
Mixin
def
config
Config
.
instance
...
...
lib/cocoa_pods/dependency.rb
View file @
575996d2
...
...
@@ -5,5 +5,24 @@ require 'rubygems/dependency'
module
Pod
class
Dependency
<
Gem
::
Dependency
attr_accessor
:part_of_other_pod
unless
public_method_defined?
(
:merge
)
def
merge
other
unless
name
==
other
.
name
then
raise
ArgumentError
,
"
#{
self
}
and
#{
other
}
have different names"
end
default
=
Gem
::
Requirement
.
default
self_req
=
self
.
requirement
other_req
=
other
.
requirement
return
self
.
class
.
new
name
,
self_req
if
other_req
==
default
return
self
.
class
.
new
name
,
other_req
if
self_req
==
default
self
.
class
.
new
name
,
self_req
.
as_list
.
concat
(
other_req
.
as_list
)
end
end
end
end
lib/cocoa_pods/installer.rb
View file @
575996d2
...
...
@@ -24,6 +24,7 @@ module Pod
end
def
install!
puts
"Installing dependencies defined in:
#{
@top_level_specification
.
defined_in_file
}
"
install_dependent_specifications!
generate_project
write_files!
...
...
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