Sha256: ed47e6c3a2fb6408a30438dfb57e88fc4e55b61d3713f32cc39927f683df4789

Contents?: true

Size: 299 Bytes

Versions: 23

Compression:

Stored size: 299 Bytes

Contents

require 'travis/cli'
require 'pp'

module Travis
  module CLI
    class Raw < ApiCommand
      skip :authenticate
      on('--[no-]json', 'display as json')

      def run(resource)
        reply = session.get_raw(resource)
        json? ? say(reply.to_json) : pp(reply)
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
travis-1.0.2 lib/travis/cli/raw.rb
travis-1.0.1 lib/travis/cli/raw.rb
travis-1.0.0 lib/travis/cli/raw.rb