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.5.2 lib/travis/cli/raw.rb
travis-1.5.1 lib/travis/cli/raw.rb
travis-1.5.0 lib/travis/cli/raw.rb
travis-1.4.0 lib/travis/cli/raw.rb
travis-1.3.1 lib/travis/cli/raw.rb
travis-1.3.0 lib/travis/cli/raw.rb
travis-1.2.8 lib/travis/cli/raw.rb
travis-1.2.7 lib/travis/cli/raw.rb
travis-1.2.6 lib/travis/cli/raw.rb
travis-1.2.5 lib/travis/cli/raw.rb
travis-1.2.4 lib/travis/cli/raw.rb
travis-1.2.3 lib/travis/cli/raw.rb
travis-1.2.2 lib/travis/cli/raw.rb
travis-1.2.1 lib/travis/cli/raw.rb
travis-1.2.0 lib/travis/cli/raw.rb
travis-1.1.3 lib/travis/cli/raw.rb
travis-1.1.2 lib/travis/cli/raw.rb
travis-1.1.1 lib/travis/cli/raw.rb
travis-1.1.0 lib/travis/cli/raw.rb
travis-1.0.3 lib/travis/cli/raw.rb