Sha256: 1c7304e0fbeecebb34e47b9bafba053602d18e5b7c9e450b202f3ba93f32db5c

Contents?: true

Size: 640 Bytes

Versions: 8

Compression:

Stored size: 640 Bytes

Contents

require 'travis/client'

module Travis
  module Client
    class Commit < Entity
      # @!parse attr_reader :sha, :branch, :message, :committed_at, :author_name, :author_email, :committer_name, :committer_email, :compare_url
      attributes :sha, :branch, :message, :committed_at, :author_name, :author_email, :committer_name, :committer_email, :compare_url
      time :committed_at

      one :commit
      many :commits

      def subject
        message.to_s.lines.first.strip
      end

      def short_sha
        sha.to_s[0..6]
      end

      def inspect_info
        short_sha + " " + subject.inspect
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
travis-1.2.3 lib/travis/client/commit.rb
travis-1.2.2 lib/travis/client/commit.rb
travis-1.2.1 lib/travis/client/commit.rb
travis-1.2.0 lib/travis/client/commit.rb
travis-1.1.3 lib/travis/client/commit.rb
travis-1.1.2 lib/travis/client/commit.rb
travis-1.1.1 lib/travis/client/commit.rb
travis-1.1.0 lib/travis/client/commit.rb