chicanery 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +24 -22
- data/lib/chicanery.rb +1 -1
- data/lib/chicanery/cctray.rb +7 -2
- metadata +21 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06154319be2516602f494511de80525664d02791
|
4
|
+
data.tar.gz: b9e358c36d08ce74769bbfa967e9e5ee7663f069
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5ac4d6a5a033b0f1e61de5c3d5224efaa24c5168294715034b9c13ef6f14ada9fcf3216e0d9421675f1ea6568a09705ae4faaa659e252b3575cf81fb05ab789
|
7
|
+
data.tar.gz: d42d771ef47adfbb434a1e4b65192263c597d1731e7d952769b1d64c1261e30997513462522f8670c312c73b06f7177443b56eaab27f925a83d5b0502e1ac7ba
|
data/Gemfile.lock
CHANGED
@@ -1,37 +1,39 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
chicanery (0.1.
|
4
|
+
chicanery (0.1.6)
|
5
5
|
nokogiri (~> 1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
addressable (2.3.
|
11
|
-
crack (0.4.
|
12
|
-
safe_yaml (~> 0.
|
13
|
-
diff-lcs (1.2.
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
10
|
+
addressable (2.3.6)
|
11
|
+
crack (0.4.2)
|
12
|
+
safe_yaml (~> 1.0.0)
|
13
|
+
diff-lcs (1.2.5)
|
14
|
+
docile (1.1.5)
|
15
|
+
mini_portile (0.6.0)
|
16
|
+
multi_json (1.10.1)
|
17
|
+
nokogiri (1.6.3.1)
|
18
|
+
mini_portile (= 0.6.0)
|
18
19
|
rake (0.9.6)
|
19
|
-
rspec (2.
|
20
|
-
rspec-core (~> 2.
|
21
|
-
rspec-expectations (~> 2.
|
22
|
-
rspec-mocks (~> 2.
|
23
|
-
rspec-core (2.
|
24
|
-
rspec-expectations (2.
|
20
|
+
rspec (2.99.0)
|
21
|
+
rspec-core (~> 2.99.0)
|
22
|
+
rspec-expectations (~> 2.99.0)
|
23
|
+
rspec-mocks (~> 2.99.0)
|
24
|
+
rspec-core (2.99.1)
|
25
|
+
rspec-expectations (2.99.2)
|
25
26
|
diff-lcs (>= 1.1.3, < 2.0)
|
26
|
-
rspec-mocks (2.
|
27
|
-
safe_yaml (0.
|
28
|
-
simplecov (0.
|
29
|
-
|
30
|
-
|
27
|
+
rspec-mocks (2.99.2)
|
28
|
+
safe_yaml (1.0.3)
|
29
|
+
simplecov (0.9.0)
|
30
|
+
docile (~> 1.1.0)
|
31
|
+
multi_json
|
32
|
+
simplecov-html (~> 0.8.0)
|
31
33
|
simplecov-gem-adapter (1.0.1)
|
32
34
|
simplecov
|
33
|
-
simplecov-html (0.
|
34
|
-
vcr (2.
|
35
|
+
simplecov-html (0.8.0)
|
36
|
+
vcr (2.9.2)
|
35
37
|
webmock (1.9.3)
|
36
38
|
addressable (>= 2.2.7)
|
37
39
|
crack (>= 0.3.2)
|
data/lib/chicanery.rb
CHANGED
data/lib/chicanery/cctray.rb
CHANGED
@@ -15,7 +15,9 @@ module Chicanery
|
|
15
15
|
class Server < Chicanery::Site
|
16
16
|
def jobs
|
17
17
|
jobs = {}
|
18
|
-
|
18
|
+
response_body = get
|
19
|
+
File.open("#{Time.now.to_i}.xml", 'w') {|f| f.puts response_body} if ENV['CHICANERY_CAPTURE']
|
20
|
+
Nokogiri::XML(response_body).css("Project").each do |project|
|
19
21
|
job = {
|
20
22
|
activity: project[:activity] == 'Sleeping' ? :sleeping : :building,
|
21
23
|
last_build_status: parse_build_status(project[:lastBuildStatus]),
|
@@ -23,6 +25,9 @@ module Chicanery
|
|
23
25
|
url: project[:webUrl],
|
24
26
|
last_label: project[:lastBuildLabel]
|
25
27
|
}
|
28
|
+
project.css('message').each do |message|
|
29
|
+
job[:breaker] = message[:text] if message[:kind] == 'Breakers'
|
30
|
+
end
|
26
31
|
jobs[project[:name]] = job unless filtered project[:name]
|
27
32
|
end
|
28
33
|
raise "could not find any jobs in response: [#{response_body}]" if jobs.empty?
|
@@ -30,7 +35,7 @@ module Chicanery
|
|
30
35
|
end
|
31
36
|
|
32
37
|
def parse_build_time time
|
33
|
-
return nil if time.nil? || time.empty?
|
38
|
+
return nil if time.nil? || time.empty? || time == '0'
|
34
39
|
DateTime.parse(time).to_time.to_i
|
35
40
|
end
|
36
41
|
|
metadata
CHANGED
@@ -1,111 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chicanery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Ryall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '2'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: simplecov
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: simplecov-gem-adapter
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: vcr
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: webmock
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - <
|
101
|
+
- - "<"
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '1.10'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - <
|
108
|
+
- - "<"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '1.10'
|
111
111
|
description: trigger various events related to a continuous integration environment
|
@@ -116,8 +116,8 @@ executables:
|
|
116
116
|
extensions: []
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
|
-
- .gitignore
|
120
|
-
- .travis.yml
|
119
|
+
- ".gitignore"
|
120
|
+
- ".travis.yml"
|
121
121
|
- Gemfile
|
122
122
|
- Gemfile.lock
|
123
123
|
- LICENSE.txt
|
@@ -160,17 +160,17 @@ require_paths:
|
|
160
160
|
- lib
|
161
161
|
required_ruby_version: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
|
-
- -
|
163
|
+
- - ">="
|
164
164
|
- !ruby/object:Gem::Version
|
165
165
|
version: '0'
|
166
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
167
|
requirements:
|
168
|
-
- -
|
168
|
+
- - ">="
|
169
169
|
- !ruby/object:Gem::Version
|
170
170
|
version: '0'
|
171
171
|
requirements: []
|
172
172
|
rubyforge_project:
|
173
|
-
rubygems_version: 2.
|
173
|
+
rubygems_version: 2.2.2
|
174
174
|
signing_key:
|
175
175
|
specification_version: 4
|
176
176
|
summary: polls various resources related to a ci environment and performs custom notifications
|