travis 1.5.9.travis.361.4 → 1.5.9.travis.362.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +1 -0
- data/lib/travis/cli/monitor.rb +18 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGRlZmY3OWEwNGNjODg0ZTA4Y2U2ZDk1YTZjYTgyZWM3N2NmNWE5OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OGVkNzMzMzM4YWEzOGNiYjI0MmJmNWRmZDcxNTZiM2E1NDgwNWY4Yg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGM4M2IxZjZlNGIwNjYzNmRiYmVlOGUyODNjMzEwMDJlNmEzN2RkNjQ5NzQ4
|
10
|
+
N2U2MTk2YjdkZmI4Mjk3YjYwNWE1ZDNhZGM3NjU4NTdhNDkwNWExNWJhOGNm
|
11
|
+
NTkxNTkxYWI4NTNiMTAyYmYxODExY2E2ODEwNDljYmMwMjhiM2E=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjNmNTU2YzQ3YTZkYTRlMzZjNWE5Mjg1MDZlMmM4NjE5NWVlYjZjNWI5Nzdh
|
14
|
+
MmI2MWJlMzQzYWI1MmNmZDE5NGMwYzE2NzI3ODQ2M2RiNTgzMzJkNjc3ZWI0
|
15
|
+
Y2VmMmFhNWY0MDczODE4Yzk3N2EzODJmZTFlZTk0NDVjZGM4ZWE=
|
data/README.md
CHANGED
@@ -1448,6 +1448,7 @@ If you have the old `travis-cli` gem installed, you should `gem uninstall travis
|
|
1448
1448
|
* Add `travis cache` to list and delete directory caches.
|
1449
1449
|
* Add `travis report` to give a report of the system, endpoint, configuration and last exception.
|
1450
1450
|
* Add `Cache` entity.
|
1451
|
+
* Keep `travis monitor` running on API errors.
|
1451
1452
|
|
1452
1453
|
**1.5.8** (October 24, 2013)
|
1453
1454
|
|
data/lib/travis/cli/monitor.rb
CHANGED
@@ -72,20 +72,27 @@ module Travis
|
|
72
72
|
entity.pull_request? ? pull? : push?
|
73
73
|
end
|
74
74
|
|
75
|
+
def display(entity, time)
|
76
|
+
say [
|
77
|
+
color(formatter.time(time), entity.color),
|
78
|
+
color(entity.inspect_info, [entity.color, :bold]),
|
79
|
+
color(entity.state, entity.color)
|
80
|
+
].join(" ")
|
81
|
+
notification.notify(entity.repository.slug, "#{entity.class.name[/[^:]+$/]} ##{entity.number} #{entity.state}")
|
82
|
+
end
|
83
|
+
|
84
|
+
def handle_event(event)
|
85
|
+
entity = event.job || event.build
|
86
|
+
time = entity.finished_at || entity.started_at
|
87
|
+
display(entity, time) if monitor? entity
|
88
|
+
rescue Travis::Client::Error => error
|
89
|
+
raise error if explode?
|
90
|
+
end
|
91
|
+
|
75
92
|
def run
|
76
93
|
listen(*repos) do |listener|
|
77
94
|
listener.on_connect { say description, "Monitoring #{"builds for " if builds?}%s:" }
|
78
|
-
listener.on(*events)
|
79
|
-
entity = event.job || event.build
|
80
|
-
time = entity.finished_at || entity.started_at
|
81
|
-
next unless monitor? entity
|
82
|
-
say [
|
83
|
-
color(formatter.time(time), entity.color),
|
84
|
-
color(entity.inspect_info, [entity.color, :bold]),
|
85
|
-
color(entity.state, entity.color)
|
86
|
-
].join(" ")
|
87
|
-
notification.notify(entity.repository.slug, "#{entity.class.name[/[^:]+$/]} ##{entity.number} #{entity.state}")
|
88
|
-
end
|
95
|
+
listener.on(*events) { |e| handle_event(e) }
|
89
96
|
end
|
90
97
|
end
|
91
98
|
end
|