Sha256: ce86abbc82847d7c512246a12ba547933fb4a57e3b09317f60b768abaf10524d

Contents?: true

Size: 744 Bytes

Versions: 4

Compression:

Stored size: 744 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.to_s.strip
      end

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

      def inspect_info
        short_sha + " " + subject.inspect
      end

      def missing?(attribute)
        false
      end

      def complete?
        true
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
travis-1.6.8.travis.447.6 lib/travis/client/commit.rb
travis-1.6.7.travis.446.6 lib/travis/client/commit.rb
travis-1.6.7 lib/travis/client/commit.rb
travis-1.6.7.travis.445.6 lib/travis/client/commit.rb