This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
forked from mowens/cocoapods-links
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from sumup/feature/allowLinkingSubspecs
Improvements
- Loading branch information
Showing
7 changed files
with
76 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
require 'pod/pod' | ||
require 'pod/lockfile' | ||
require 'pod/command/link' | ||
require 'pod/command/register' | ||
require 'pod/command/unlink' | ||
require 'pod/command/list' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
require 'pod/links' | ||
|
||
module Pod | ||
class Command | ||
class Register < Command | ||
self.summary = 'Register pod for local pod development' | ||
self.description = <<-DESC | ||
The link functionality allows developers to easily test their pods. | ||
Linking is a two-step process: | ||
Using 'pod register' in a project folder will create a global link. | ||
Then, in some other pod, 'pod link <name>' will create a link to | ||
the local pod as a Development pod. | ||
This allows to easily test a pod because changes will be reflected immediately. | ||
When the link is no longer necessary, simply remove it with 'pod unlink <name>'. | ||
DESC | ||
|
||
self.arguments = [ | ||
CLAide::Argument.new('POD_NAME', false) | ||
] | ||
|
||
def initialize(argv) | ||
@pod = argv.shift_argument() | ||
super | ||
end | ||
|
||
# | ||
# We will register the pod as a local development pod. | ||
# If the pod is not explicitly given, we will use the first podspec for registering. | ||
# | ||
def run | ||
Pod::Command::Links.register @pod | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require File.expand_path('../../spec_helper', __FILE__) | ||
|
||
module Pod | ||
describe Command::Register do | ||
describe 'CLAide' do | ||
it 'registers itself' do | ||
Command.parse(['register']).should.be.instance_of Command::Register | ||
end | ||
end | ||
|
||
before do | ||
@command = Pod::Command::Register.new CLAide::ARGV.new [] | ||
end | ||
end | ||
end |