Method: PackageCloud::CLI::MasterToken#create
- Defined in:
- lib/package_cloud/cli/master_token.rb
#create(repo_name, token_name) ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/package_cloud/cli/master_token.rb', line 27 def create(repo_name, token_name) print "Looking for repository at #{repo_name}... " repo = client.repository(repo_name) print "success!\n" print "Attempting to create token named #{token_name}... " resp = repo.create_master_token(token_name) print "success!\n".color(:green) print "Master token #{resp['name']} with value #{resp['value']} created.\n" end |