travis-surveillance 0.0.5 → 0.0.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.
- data/bin/travis-surveillance +25 -5
- data/lib/travis/surveillance/cli.rb +1 -1
- data/lib/travis/surveillance/version.rb +1 -1
- data/spec/support/builds/21.json +16 -0
- data/spec/support/builds/22.json +16 -0
- data/spec/support/builds/23.json +16 -0
- data/spec/support/builds/24.json +16 -0
- data/spec/support/builds/25.json +16 -0
- data/spec/support/builds/26.json +16 -0
- data/spec/support/builds/27.json +16 -0
- data/spec/support/builds/28.json +16 -0
- data/spec/support/builds/29.json +16 -0
- data/spec/support/builds/30.json +16 -0
- data/spec/support/builds/31.json +16 -0
- data/spec/support/pusher/dylanegan-travis-surveillance-build-started-31.json +14 -0
- data/spec/travis/surveillance/project_spec.rb +1 -1
- data/spec/travis/surveillance/surveyor_spec.rb +7 -0
- metadata +26 -2
data/bin/travis-surveillance
CHANGED
@@ -1,10 +1,30 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
3
|
+
begin
|
4
|
+
require 'travis/surveillance/cli'
|
4
5
|
|
5
|
-
|
6
|
-
|
6
|
+
Travis::Surveillance::CLI.run
|
7
|
+
rescue LoadError => e
|
8
|
+
$stderr.puts <<-EOS
|
9
|
+
#{'*'*50}
|
10
|
+
Could not find 'travis/surveillance/cli'
|
7
11
|
|
8
|
-
|
12
|
+
This may happen if you're using rubygems as your package manager, but it is not
|
13
|
+
being required through some mechanism before executing the travis-surveillance command.
|
9
14
|
|
10
|
-
|
15
|
+
You may need to do one of the following in your shell:
|
16
|
+
|
17
|
+
# for bash/zsh
|
18
|
+
export RUBYOPT=rubygems
|
19
|
+
|
20
|
+
# for csh, etc.
|
21
|
+
set RUBYOPT=rubygems
|
22
|
+
|
23
|
+
For background, please see http://gist.github.com/54177.
|
24
|
+
#{'*'*50}
|
25
|
+
EOS
|
26
|
+
|
27
|
+
raise e
|
28
|
+
|
29
|
+
exit(1)
|
30
|
+
end
|
@@ -36,7 +36,7 @@ module Travis
|
|
36
36
|
|
37
37
|
table = Terminal::Table.new title: "Build Matrix", headings: ['Job', 'State', 'Duration', 'Runtime', 'ENV'], style: { width: 120 } do |t|
|
38
38
|
latest.jobs.each do |job|
|
39
|
-
t << [job.number, job.state, job.duration, job.runtime, job.config.env]
|
39
|
+
t << [job.number, job.state, job.duration, job.runtime, (job.config.env.length > 30 ? "#{job.config.env[0..30]}..." : job.config.env)]
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"id":21,
|
3
|
+
"number":"21",
|
4
|
+
"config":{
|
5
|
+
"language":"ruby"
|
6
|
+
},
|
7
|
+
"started_at":"2012-08-04T13:28:29Z",
|
8
|
+
"commit":"af0d1c46e019ff61f1faaba7003ebf912ab245d6",
|
9
|
+
"branch":"master",
|
10
|
+
"message":"Test",
|
11
|
+
"compare_url":"https://github.com/dylanegan/travis-surveillance/compare/74791a0faacf...af0d1c46e019",
|
12
|
+
"committed_at":"2012-08-04T13:28:22Z",
|
13
|
+
"author_name":"Dylan Egan",
|
14
|
+
"committer_name":"Dylan Egan",
|
15
|
+
"status":null
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"id":22,
|
3
|
+
"number":"22",
|
4
|
+
"config":{
|
5
|
+
"language":"ruby"
|
6
|
+
},
|
7
|
+
"started_at":"2012-08-04T13:28:29Z",
|
8
|
+
"commit":"af0d1c46e019ff61f1faaba7003ebf912ab245d6",
|
9
|
+
"branch":"master",
|
10
|
+
"message":"Test",
|
11
|
+
"compare_url":"https://github.com/dylanegan/travis-surveillance/compare/74791a0faacf...af0d1c46e019",
|
12
|
+
"committed_at":"2012-08-04T13:28:22Z",
|
13
|
+
"author_name":"Dylan Egan",
|
14
|
+
"committer_name":"Dylan Egan",
|
15
|
+
"status":null
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"id":23,
|
3
|
+
"number":"23",
|
4
|
+
"config":{
|
5
|
+
"language":"ruby"
|
6
|
+
},
|
7
|
+
"started_at":"2012-08-04T13:28:29Z",
|
8
|
+
"commit":"af0d1c46e019ff61f1faaba7003ebf912ab245d6",
|
9
|
+
"branch":"master",
|
10
|
+
"message":"Test",
|
11
|
+
"compare_url":"https://github.com/dylanegan/travis-surveillance/compare/74791a0faacf...af0d1c46e019",
|
12
|
+
"committed_at":"2012-08-04T13:28:22Z",
|
13
|
+
"author_name":"Dylan Egan",
|
14
|
+
"committer_name":"Dylan Egan",
|
15
|
+
"status":null
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"id":24,
|
3
|
+
"number":"24",
|
4
|
+
"config":{
|
5
|
+
"language":"ruby"
|
6
|
+
},
|
7
|
+
"started_at":"2012-08-04T13:28:29Z",
|
8
|
+
"commit":"af0d1c46e019ff61f1faaba7003ebf912ab245d6",
|
9
|
+
"branch":"master",
|
10
|
+
"message":"Test",
|
11
|
+
"compare_url":"https://github.com/dylanegan/travis-surveillance/compare/74791a0faacf...af0d1c46e019",
|
12
|
+
"committed_at":"2012-08-04T13:28:22Z",
|
13
|
+
"author_name":"Dylan Egan",
|
14
|
+
"committer_name":"Dylan Egan",
|
15
|
+
"status":null
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"id":25,
|
3
|
+
"number":"25",
|
4
|
+
"config":{
|
5
|
+
"language":"ruby"
|
6
|
+
},
|
7
|
+
"started_at":"2012-08-04T13:28:29Z",
|
8
|
+
"commit":"af0d1c46e019ff61f1faaba7003ebf912ab245d6",
|
9
|
+
"branch":"master",
|
10
|
+
"message":"Test",
|
11
|
+
"compare_url":"https://github.com/dylanegan/travis-surveillance/compare/74791a0faacf...af0d1c46e019",
|
12
|
+
"committed_at":"2012-08-04T13:28:22Z",
|
13
|
+
"author_name":"Dylan Egan",
|
14
|
+
"committer_name":"Dylan Egan",
|
15
|
+
"status":null
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"id":26,
|
3
|
+
"number":"26",
|
4
|
+
"config":{
|
5
|
+
"language":"ruby"
|
6
|
+
},
|
7
|
+
"started_at":"2012-08-04T13:28:29Z",
|
8
|
+
"commit":"af0d1c46e019ff61f1faaba7003ebf912ab245d6",
|
9
|
+
"branch":"master",
|
10
|
+
"message":"Test",
|
11
|
+
"compare_url":"https://github.com/dylanegan/travis-surveillance/compare/74791a0faacf...af0d1c46e019",
|
12
|
+
"committed_at":"2012-08-04T13:28:22Z",
|
13
|
+
"author_name":"Dylan Egan",
|
14
|
+
"committer_name":"Dylan Egan",
|
15
|
+
"status":null
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"id":27,
|
3
|
+
"number":"27",
|
4
|
+
"config":{
|
5
|
+
"language":"ruby"
|
6
|
+
},
|
7
|
+
"started_at":"2012-08-04T13:28:29Z",
|
8
|
+
"commit":"af0d1c46e019ff61f1faaba7003ebf912ab245d6",
|
9
|
+
"branch":"master",
|
10
|
+
"message":"Test",
|
11
|
+
"compare_url":"https://github.com/dylanegan/travis-surveillance/compare/74791a0faacf...af0d1c46e019",
|
12
|
+
"committed_at":"2012-08-04T13:28:22Z",
|
13
|
+
"author_name":"Dylan Egan",
|
14
|
+
"committer_name":"Dylan Egan",
|
15
|
+
"status":null
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"id":28,
|
3
|
+
"number":"28",
|
4
|
+
"config":{
|
5
|
+
"language":"ruby"
|
6
|
+
},
|
7
|
+
"started_at":"2012-08-04T13:28:29Z",
|
8
|
+
"commit":"af0d1c46e019ff61f1faaba7003ebf912ab245d6",
|
9
|
+
"branch":"master",
|
10
|
+
"message":"Test",
|
11
|
+
"compare_url":"https://github.com/dylanegan/travis-surveillance/compare/74791a0faacf...af0d1c46e019",
|
12
|
+
"committed_at":"2012-08-04T13:28:22Z",
|
13
|
+
"author_name":"Dylan Egan",
|
14
|
+
"committer_name":"Dylan Egan",
|
15
|
+
"status":null
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"id":29,
|
3
|
+
"number":"29",
|
4
|
+
"config":{
|
5
|
+
"language":"ruby"
|
6
|
+
},
|
7
|
+
"started_at":"2012-08-04T13:28:29Z",
|
8
|
+
"commit":"af0d1c46e019ff61f1faaba7003ebf912ab245d6",
|
9
|
+
"branch":"master",
|
10
|
+
"message":"Test",
|
11
|
+
"compare_url":"https://github.com/dylanegan/travis-surveillance/compare/74791a0faacf...af0d1c46e019",
|
12
|
+
"committed_at":"2012-08-04T13:28:22Z",
|
13
|
+
"author_name":"Dylan Egan",
|
14
|
+
"committer_name":"Dylan Egan",
|
15
|
+
"status":null
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"id":30,
|
3
|
+
"number":"30",
|
4
|
+
"config":{
|
5
|
+
"language":"ruby"
|
6
|
+
},
|
7
|
+
"started_at":"2012-08-04T13:28:29Z",
|
8
|
+
"commit":"af0d1c46e019ff61f1faaba7003ebf912ab245d6",
|
9
|
+
"branch":"master",
|
10
|
+
"message":"Test",
|
11
|
+
"compare_url":"https://github.com/dylanegan/travis-surveillance/compare/74791a0faacf...af0d1c46e019",
|
12
|
+
"committed_at":"2012-08-04T13:28:22Z",
|
13
|
+
"author_name":"Dylan Egan",
|
14
|
+
"committer_name":"Dylan Egan",
|
15
|
+
"status":null
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"id":31,
|
3
|
+
"number":"31",
|
4
|
+
"config":{
|
5
|
+
"language":"ruby"
|
6
|
+
},
|
7
|
+
"started_at":"2012-08-04T13:28:29Z",
|
8
|
+
"commit":"af0d1c46e019ff61f1faaba7003ebf912ab245d6",
|
9
|
+
"branch":"master",
|
10
|
+
"message":"Test",
|
11
|
+
"compare_url":"https://github.com/dylanegan/travis-surveillance/compare/74791a0faacf...af0d1c46e019",
|
12
|
+
"committed_at":"2012-08-04T13:28:22Z",
|
13
|
+
"author_name":"Dylan Egan",
|
14
|
+
"committer_name":"Dylan Egan",
|
15
|
+
"status":null
|
16
|
+
}
|
@@ -27,7 +27,7 @@ describe Travis::Surveillance::Project do
|
|
27
27
|
|
28
28
|
it "should limit the stored builds to 10" do
|
29
29
|
@project.stub :build_for, nil do
|
30
|
-
|
30
|
+
11.times { |i| @project.add_build({ 'id' => i + 21 }) }
|
31
31
|
@project.builds.size.must_equal 10
|
32
32
|
end
|
33
33
|
end
|
@@ -16,6 +16,13 @@ describe Travis::Surveillance::Surveyor do
|
|
16
16
|
@project.builds.last.number.must_equal "1"
|
17
17
|
end
|
18
18
|
|
19
|
+
it "should handle build:started when over 10 builds" do
|
20
|
+
@surveyor.socket.simulate_received('build:started', pusher_json_for(@project.slug, 'build:started'), 'common')
|
21
|
+
10.times { |i| @project.add_build({ 'id' => i + 21 }) }
|
22
|
+
@surveyor.socket.simulate_received('build:started', pusher_json_for(@project.slug, 'build:started:31'), 'common')
|
23
|
+
@project.builds.last.number.must_equal "31"
|
24
|
+
end
|
25
|
+
|
19
26
|
it "should handle build:finished" do
|
20
27
|
@surveyor.socket.simulate_received('build:started', pusher_json_for(@project.slug, 'build:started'), 'common')
|
21
28
|
@surveyor.socket.simulate_received('build:finished', pusher_json_for(@project.slug, 'build:finished'), 'common')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: travis-surveillance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: clamp
|
@@ -134,6 +134,17 @@ files:
|
|
134
134
|
- spec/support/builds/1.json
|
135
135
|
- spec/support/builds/11.json
|
136
136
|
- spec/support/builds/12.json
|
137
|
+
- spec/support/builds/21.json
|
138
|
+
- spec/support/builds/22.json
|
139
|
+
- spec/support/builds/23.json
|
140
|
+
- spec/support/builds/24.json
|
141
|
+
- spec/support/builds/25.json
|
142
|
+
- spec/support/builds/26.json
|
143
|
+
- spec/support/builds/27.json
|
144
|
+
- spec/support/builds/28.json
|
145
|
+
- spec/support/builds/29.json
|
146
|
+
- spec/support/builds/30.json
|
147
|
+
- spec/support/builds/31.json
|
137
148
|
- spec/support/builds/dylanegan-travis-surveillance-existing.json
|
138
149
|
- spec/support/jobs/1.json
|
139
150
|
- spec/support/jobs/11.json
|
@@ -142,6 +153,7 @@ files:
|
|
142
153
|
- spec/support/projects/dylanegan-travis-surveillance-existing.json
|
143
154
|
- spec/support/projects/dylanegan-travis-surveillance.json
|
144
155
|
- spec/support/pusher/dylanegan-travis-surveillance-build-finished.json
|
156
|
+
- spec/support/pusher/dylanegan-travis-surveillance-build-started-31.json
|
145
157
|
- spec/support/pusher/dylanegan-travis-surveillance-build-started.json
|
146
158
|
- spec/support/pusher/dylanegan-travis-surveillance-job-finished.json
|
147
159
|
- spec/support/pusher/dylanegan-travis-surveillance-job-started-2.json
|
@@ -183,6 +195,17 @@ test_files:
|
|
183
195
|
- spec/support/builds/1.json
|
184
196
|
- spec/support/builds/11.json
|
185
197
|
- spec/support/builds/12.json
|
198
|
+
- spec/support/builds/21.json
|
199
|
+
- spec/support/builds/22.json
|
200
|
+
- spec/support/builds/23.json
|
201
|
+
- spec/support/builds/24.json
|
202
|
+
- spec/support/builds/25.json
|
203
|
+
- spec/support/builds/26.json
|
204
|
+
- spec/support/builds/27.json
|
205
|
+
- spec/support/builds/28.json
|
206
|
+
- spec/support/builds/29.json
|
207
|
+
- spec/support/builds/30.json
|
208
|
+
- spec/support/builds/31.json
|
186
209
|
- spec/support/builds/dylanegan-travis-surveillance-existing.json
|
187
210
|
- spec/support/jobs/1.json
|
188
211
|
- spec/support/jobs/11.json
|
@@ -191,6 +214,7 @@ test_files:
|
|
191
214
|
- spec/support/projects/dylanegan-travis-surveillance-existing.json
|
192
215
|
- spec/support/projects/dylanegan-travis-surveillance.json
|
193
216
|
- spec/support/pusher/dylanegan-travis-surveillance-build-finished.json
|
217
|
+
- spec/support/pusher/dylanegan-travis-surveillance-build-started-31.json
|
194
218
|
- spec/support/pusher/dylanegan-travis-surveillance-build-started.json
|
195
219
|
- spec/support/pusher/dylanegan-travis-surveillance-job-finished.json
|
196
220
|
- spec/support/pusher/dylanegan-travis-surveillance-job-started-2.json
|