Sha256: 9c45f35e4438703747ac8b705963cefa6e69d55a0b29bc8a23fbbe9cd8a1859a

Contents?: true

Size: 859 Bytes

Versions: 12

Compression:

Stored size: 859 Bytes

Contents

module Pod
  class Command
    class Trunk
      class Info < Trunk
        self.summary = 'Returns information about a Pod.'
        self.arguments = [
          CLAide::Argument.new('NAME', true),
        ]

        def initialize(argv)
          @name = argv.shift_argument
          super
        end

        def validate!
          super
          help! 'Please specify a pod name.' unless @name
        end

        def run
          response = json(request_path(:get, "pods/#{@name}", auth_headers))
          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
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cocoapods-trunk-1.0.0.rc.1 lib/pod/command/trunk/info.rb
cocoapods-trunk-1.0.0.beta.4 lib/pod/command/trunk/info.rb
cocoapods-trunk-1.0.0.beta.3 lib/pod/command/trunk/info.rb
cocoapods-trunk-1.0.0.beta.2 lib/pod/command/trunk/info.rb
cocoapods-trunk-1.0.0.beta.1 lib/pod/command/trunk/info.rb
cocoapods-trunk-0.6.4 lib/pod/command/trunk/info.rb
cocoapods-trunk-0.6.3 lib/pod/command/trunk/info.rb
cocoapods-trunk-0.6.2 lib/pod/command/trunk/info.rb
cocoapods-trunk-0.6.1 lib/pod/command/trunk/info.rb
cocoapods-trunk-0.6.0 lib/pod/command/trunk/info.rb
cocoapods-trunk-0.5.1 lib/pod/command/trunk/info.rb
cocoapods-trunk-0.5.0 lib/pod/command/trunk/info.rb