Sha256: 3012df2c057aa25464af5d0479e37b9d643d64a061e8cdf3405e128d9c36e54e

Contents?: true

Size: 645 Bytes

Versions: 98

Compression:

Stored size: 645 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
    end
  end
end

Version data entries

98 entries across 98 versions & 1 rubygems

Version Path
travis-1.5.6 lib/travis/client/commit.rb
travis-1.5.6.travis.337.4 lib/travis/client/commit.rb
travis-1.5.6.travis.336.4 lib/travis/client/commit.rb
travis-1.5.6.travis.333.4 lib/travis/client/commit.rb
travis-1.5.6.travis.332.4 lib/travis/client/commit.rb
travis-1.5.6.travis.330.4 lib/travis/client/commit.rb
travis-1.5.6.travis.329.4 lib/travis/client/commit.rb
travis-1.5.6.travis.326.4 lib/travis/client/commit.rb
travis-1.5.6.travis.324.4 lib/travis/client/commit.rb
travis-1.5.6.travis.323.4 lib/travis/client/commit.rb
travis-1.5.6.travis.320.4 lib/travis/client/commit.rb
travis-1.5.6.travis.319.4 lib/travis/client/commit.rb
travis-1.5.6.travis.317.4 lib/travis/client/commit.rb
travis-1.5.6.travis.315.4 lib/travis/client/commit.rb
travis-1.5.6.travis.314.4 lib/travis/client/commit.rb
travis-1.5.6.travis.312.4 lib/travis/client/commit.rb
travis-1.5.6.travis.307.4 lib/travis/client/commit.rb
travis-1.5.6.travis.306.4 lib/travis/client/commit.rb
travis-1.5.6.travis.304.4 lib/travis/client/commit.rb
travis-1.5.6.travis.303.4 lib/travis/client/commit.rb