Class: Pod::Command::Trunk::Info
Constant Summary
BASE_URL, SCHEME_AND_HOST
Instance Method Summary
collapse
Constructor Details
#initialize(argv) ⇒ Info
Returns a new instance of Info.
12
13
14
15
|
# File 'lib/pod/command/trunk/info.rb', line 12
def initialize(argv)
@name = argv.shift_argument
super
end
|
Instance Method Details
#run ⇒ Object
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/pod/command/trunk/info.rb', line 22
def run
response = json(request_path(:get, "pods/#{@name}", ))
versions = response['versions'] || []
owners = response['owners'] || []
UI.title(@name) do
UI.labeled 'Versions', versions.map { |v| "#{v['name']} (#{v['created_at']})" }
UI.labeled 'Owners', owners.map { |o| "#{o['name']} <#{o['email']}>" }
end
end
|
#validate! ⇒ Object
17
18
19
20
|
# File 'lib/pod/command/trunk/info.rb', line 17
def validate!
super
help! 'Please specify a pod name.' unless @name
end
|