class SecretHub::Commands::Org
Public Instance Methods
delete_command()
click to toggle source
# File lib/secret_hub/commands/org.rb, line 36 def delete_command github.delete_org_secret org, key say "Deleted !txtblu!#{org} !txtpur!#{key}" end
list_command()
click to toggle source
# File lib/secret_hub/commands/org.rb, line 24 def list_command say "!txtblu!#{org}:" github.org_secrets(org).each do |secret| say "- !txtpur!#{secret}" end end
save_command()
click to toggle source
# File lib/secret_hub/commands/org.rb, line 31 def save_command github.put_org_secret org, key, value say "Saved !txtblu!#{org} !txtpur!#{key}" end
Private Instance Methods
key()
click to toggle source
# File lib/secret_hub/commands/org.rb, line 47 def key args['KEY'] end
org()
click to toggle source
# File lib/secret_hub/commands/org.rb, line 43 def org args['ORG'] end
value()
click to toggle source
# File lib/secret_hub/commands/org.rb, line 51 def value result = args['VALUE'] || ENV[key] if result result else raise InvalidInput, "Please provide a value, either in the command line or in the environment variable '#{key}'" end end