-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds a new command for renaming yourself on trunk #92
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
@@ -18,6 +18,7 @@ class Trunk < Command | |||
require 'pod/command/trunk/deprecate' | |||
require 'pod/command/trunk/info' | |||
require 'pod/command/trunk/me' | |||
require 'pod/command/trunk/me_rename' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pod/command/trunk/me/rename
class Trunk | ||
# @CocoaPods 1.2.1+ | ||
# | ||
class Rename < Me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace under Me
def run | ||
email = netrc['trunk.cocoapods.org'] && netrc['trunk.cocoapods.org'].login | ||
body = { 'name' => @name, 'email' => email }.to_json | ||
json(request_path(:post, 'sessions', body, auth_headers)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what will this output on success?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing, good point 👍
Will it be confusing that the result of this |
describe Command::Trunk::Register do | ||
describe 'CLAide' do | ||
it 'registers it self' do | ||
Command.parse(%w[trunk me rename]).should.be.instance_of Command::Trunk::Rename |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use %()
to delimited the arrays
Is any workaround to rename trunk name? |
fixes CocoaPods/trunk.cocoapods.org#155
Overall the idea of re-registering with a new name to overwrite doesn't really make sense. As discussed in CocoaPods/trunk.cocoapods.org#155 I paired with @ashfurrow on adding a new command that allows you to just rename yourself.
Also, thanks @paynerc