Sha256: 4ca6ffb1b70c4ff46bc3ecaa103494514e1bdf153e47bdeae1b20a79f74b8456

Contents?: true

Size: 380 Bytes

Versions: 152

Compression:

Stored size: 380 Bytes

Contents

require 'travis/cli'
require 'pp'

module Travis
  module CLI
    class Raw < ApiCommand
      description "makes an (authenticated) API call and prints out the result"

      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

152 entries across 152 versions & 1 rubygems

Version Path
travis-1.6.14 lib/travis/cli/raw.rb
travis-1.6.14.travis.539.6 lib/travis/cli/raw.rb
travis-1.6.13.travis.538.6 lib/travis/cli/raw.rb
travis-1.6.13 lib/travis/cli/raw.rb
travis-1.6.13.travis.536.6 lib/travis/cli/raw.rb
travis-1.6.12 lib/travis/cli/raw.rb
travis-1.6.13.travis.534.6 lib/travis/cli/raw.rb
travis-1.6.12.travis.531.6 lib/travis/cli/raw.rb
travis-1.6.12.travis.529.6 lib/travis/cli/raw.rb
travis-1.6.12.travis.528.6 lib/travis/cli/raw.rb
travis-1.6.12.travis.524.6 lib/travis/cli/raw.rb
travis-1.6.12.travis.523.6 lib/travis/cli/raw.rb
travis-1.6.12.travis.521.6 lib/travis/cli/raw.rb
travis-1.6.12.travis.520.6 lib/travis/cli/raw.rb
travis-1.6.12.travis.517.6 lib/travis/cli/raw.rb
travis-1.6.11 lib/travis/cli/raw.rb
travis-1.6.11.travis.516.6 lib/travis/cli/raw.rb
travis-1.6.11.travis.511.6 lib/travis/cli/raw.rb
travis-1.6.11.travis.510.6 lib/travis/cli/raw.rb
travis-1.6.11.travis.507.6 lib/travis/cli/raw.rb