Class: Pod::Command::Setup
- Inherits:
-
Pod::Command
- Object
- Pod::Command
- Pod::Command::Setup
- Defined in:
- lib/cocoapods/command/setup.rb
Class Method Summary collapse
Instance Method Summary collapse
- #add_master_repo_command ⇒ Object
-
#initialize(argv) ⇒ Setup
constructor
A new instance of Setup.
- #master_repo_url ⇒ Object
- #run ⇒ Object
- #update_master_repo_remote_command ⇒ Object
Methods inherited from Pod::Command
Methods included from Pod::Config::Mixin
Constructor Details
#initialize(argv) ⇒ Setup
Returns a new instance of Setup.
18 19 20 |
# File 'lib/cocoapods/command/setup.rb', line 18 def initialize(argv) super unless argv.empty? end |
Class Method Details
.banner ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/cocoapods/command/setup.rb', line 4 def self. %{Setup CocoaPods environment: $ pod setup Creates a directory at `~/.cocoapods' which will hold your spec-repos. This is where it will create a clone of the public `master' spec-repo from: https://github.com/CocoaPods/Specs If the clone already exists, it will ensure that it points to the correct remote.} end |
Instance Method Details
#add_master_repo_command ⇒ Object
26 27 28 |
# File 'lib/cocoapods/command/setup.rb', line 26 def add_master_repo_command @command ||= Repo.new(ARGV.new(['add', 'master', master_repo_url])) end |
#master_repo_url ⇒ Object
22 23 24 |
# File 'lib/cocoapods/command/setup.rb', line 22 def master_repo_url 'git://github.com/CocoaPods/Specs.git' end |
#run ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/cocoapods/command/setup.rb', line 34 def run if (config.repos_dir + 'master').exist? update_master_repo_remote_command.run else add_master_repo_command.run end end |