travis 1.6.8.travis.447.6 → 1.6.8.travis.449.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NWIwZjJmMDBlNWJmOTk4ZjBhZWNmNTZmZDljMGE3MjM1MGM0YjE0Mw==
4
+ YTVhYjUwNzI3ODI1ODhjOTQ5MjVjMmFhYzlmNGM4NzdiYTExMTM1Yg==
5
5
  data.tar.gz: !binary |-
6
- YjVjZmI4MTUwMzE0NDZjNzkzMjQ2YzExNjQ4OTk5NDFhMTZkMjI1Nw==
6
+ NDEwNjJjNTI5ODBkZDRmYzIxYWY4MWM5NjZmYjA5MDhiMGQzYzg0Mg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTJlNGRmMTE2YTk1MzQ1ZGYwMjJlZTY0YzZjMWJjNDhjY2IyNDg5ZTNmZTkx
10
- MTRhMzgwNWU0MGI2YThhYjU0YmQ2YjAxNzE3OGZiMTExZmJmYjk5YTkxMDZm
11
- MTg2Y2JlMmIyYTk2MDMzYTdmZmZlZDgyM2M5MWQ4YjEwYTE4ZTI=
9
+ OWEyZDc1NjQwZTFjZDhkZjg3M2Q4MGZkNzhkMThkZWY3YmQ2NWVlYWFkMmIw
10
+ ZjFiYjg2OGQ3NDVjNjkyZGJkNDU1MWE0YzFkMmU0YWM5NzU0MmZlOWYzNTVm
11
+ MGY1ZDEwOWQ4NTlkMGYzMjUzYmVhYTA4MmI5Njc3N2Q3MGQxYmM=
12
12
  data.tar.gz: !binary |-
13
- NDlmOGY2OTQwZmRiY2E3MDNhMGZhZjNlZDU2MWIyMGI3NDZmYjlhZGU5MWUw
14
- MDI3YjQ3MDk2ZjRkZTkxZjU0ZjM4ZWM0NDM3MDMxZTAxOGM5MDgxNGUzMjYz
15
- ZTMxYTg1ZWJhNzYwMGI1NmVkNjZmMjM2ZWYyOWE0MTA2YmNmYjY=
13
+ NDljZDU0MWFmZmZjZWQ3YzYyZTRkYzQwYTk4ZDFlNTM5N2I2OTJkODVjYWNm
14
+ NTc5MzE1OTRmOWM5NTEyZjBmZWIyY2M5Y2M2YmI4NWQzNTg3YTg4MzA4ZDcx
15
+ NzJlNWFkMTI0NWI1ODY3ZTlmNzNlZDMzY2EyOWMwN2JmZTYyNDU=
data/README.md CHANGED
@@ -1567,6 +1567,11 @@ If you have the old `travis-cli` gem installed, you should `gem uninstall travis
1567
1567
 
1568
1568
  ## Version History
1569
1569
 
1570
+ **1.6.8** (not yet released)
1571
+
1572
+ * Display annotations in `travis show`.
1573
+ * Improve annotation support in the Ruby library.
1574
+
1570
1575
  **1.6.7** (January 30, 2014)
1571
1576
 
1572
1577
  * Properly display OS for projects tested on multiple operating systems.
@@ -40,6 +40,18 @@ module Travis
40
40
  say color("Allow Failure: ", :info) + entity.allow_failures?.inspect
41
41
  say color("Config: ", :info) + config unless config.empty?
42
42
  end
43
+
44
+ if entity.respond_to? :annotations and entity.annotations.any?
45
+ empty_line
46
+ say color("Annotations:", :bold)
47
+ entity.annotations.each do |annotation|
48
+ say [
49
+ color("#{annotation.provider_name} #{annotation.status}:", [annotation.color, :bold]),
50
+ color(annotation.description, annotation.color),
51
+ color("(%s)" % annotation.url, :info)
52
+ ].compact.join(" ").rstrip
53
+ end
54
+ end
43
55
  end
44
56
  end
45
57
  end
data/lib/travis/client.rb CHANGED
@@ -2,6 +2,7 @@ require 'backports/2.0.0' if RUBY_VERSION < '2.0.0'
2
2
  require 'travis/client/error'
3
3
  require 'travis/client/states'
4
4
  require 'travis/client/restartable'
5
+ require 'travis/client/not_loadable'
5
6
  require 'travis/client/methods'
6
7
  require 'travis/client/session'
7
8
  require 'travis/client/entity'
@@ -3,13 +3,19 @@ require 'travis/client'
3
3
  module Travis
4
4
  module Client
5
5
  class Annotation < Entity
6
+ include NotLoadable, States
6
7
  attributes :job_id, :provider_name, :status, :url, :description
8
+ alias state status
7
9
 
8
10
  # @!parse attr_reader :job
9
11
  has :job
10
12
 
11
13
  one :annotation
12
14
  many :annotations
15
+
16
+ def inspect_info
17
+ "#{provider_name}: #{status}"
18
+ end
13
19
  end
14
20
  end
15
21
  end
@@ -3,6 +3,8 @@ require 'travis/client'
3
3
  module Travis
4
4
  module Client
5
5
  class Commit < Entity
6
+ include NotLoadable
7
+
6
8
  # @!parse attr_reader :sha, :branch, :message, :committed_at, :author_name, :author_email, :committer_name, :committer_email, :compare_url
7
9
  attributes :sha, :branch, :message, :committed_at, :author_name, :author_email, :committer_name, :committer_email, :compare_url
8
10
  time :committed_at
@@ -21,14 +23,6 @@ module Travis
21
23
  def inspect_info
22
24
  short_sha + " " + subject.inspect
23
25
  end
24
-
25
- def missing?(attribute)
26
- false
27
- end
28
-
29
- def complete?
30
- true
31
- end
32
26
  end
33
27
  end
34
28
  end
@@ -3,6 +3,8 @@ require 'travis/client'
3
3
  module Travis
4
4
  module Client
5
5
  class WeakEntity < Entity
6
+ include NotLoadable
7
+
6
8
  def self.weak?
7
9
  true
8
10
  end
@@ -19,14 +21,6 @@ module Travis
19
21
  return object if id? object
20
22
  raise "weak entities do not have id fields"
21
23
  end
22
-
23
- def missing?(attribute)
24
- false
25
- end
26
-
27
- def complete?
28
- true
29
- end
30
24
  end
31
25
  end
32
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: travis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.8.travis.447.6
4
+ version: 1.6.8.travis.449.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase