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.15.travis.580.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.566.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.565.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.564.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.563.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.562.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.561.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.560.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.559.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.558.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.557.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.556.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.555.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.554.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.552.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.551.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.550.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.547.6 lib/travis/cli/raw.rb
travis-1.6.15.travis.544.6 lib/travis/cli/raw.rb
travis-1.6.14.travis.543.6 lib/travis/cli/raw.rb