kensa 1.4.5 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -5
- data/Gemfile.lock +9 -25
- data/kensa.gemspec +2 -0
- data/lib/heroku/kensa/check.rb +18 -0
- data/lib/heroku/kensa/version.rb +1 -1
- data/test/provision_response_check_test.rb +21 -0
- metadata +36 -4
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
kensa (1.4.
|
4
|
+
kensa (1.4.6)
|
5
5
|
launchy (>= 0.3.2)
|
6
6
|
mechanize (~> 2.6.0)
|
7
7
|
rest-client (>= 1.4.0, < 1.7.0)
|
@@ -11,11 +11,10 @@ GEM
|
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
13
|
addressable (2.3.3)
|
14
|
-
archive-tar-minitar (0.5.2)
|
15
14
|
artifice (0.6)
|
16
15
|
rack-test
|
16
|
+
coderay (1.0.8)
|
17
17
|
colorize (0.5.8)
|
18
|
-
columnize (0.3.6)
|
19
18
|
contest (0.1.3)
|
20
19
|
coveralls (0.6.7)
|
21
20
|
colorize
|
@@ -30,10 +29,6 @@ GEM
|
|
30
29
|
tilt
|
31
30
|
launchy (2.2.0)
|
32
31
|
addressable (~> 2.3)
|
33
|
-
linecache (0.46)
|
34
|
-
rbx-require-relative (> 0.0.4)
|
35
|
-
linecache19 (0.5.12)
|
36
|
-
ruby_core_source (>= 0.1.4)
|
37
32
|
mechanize (2.6.0)
|
38
33
|
domain_name (~> 0.5, >= 0.5.1)
|
39
34
|
mime-types (~> 1.17, >= 1.17.2)
|
@@ -42,37 +37,26 @@ GEM
|
|
42
37
|
nokogiri (~> 1.4)
|
43
38
|
ntlm-http (~> 0.1, >= 0.1.1)
|
44
39
|
webrobots (>= 0.0.9, < 0.2)
|
40
|
+
method_source (0.8.1)
|
45
41
|
mime-types (1.21)
|
46
42
|
multi_json (1.7.3)
|
47
43
|
net-http-digest_auth (1.2.1)
|
48
44
|
net-http-persistent (2.8)
|
49
45
|
nokogiri (1.5.9)
|
50
46
|
ntlm-http (0.1.1)
|
47
|
+
pry (0.9.11.4)
|
48
|
+
coderay (~> 1.0.5)
|
49
|
+
method_source (~> 0.8)
|
50
|
+
slop (~> 3.4)
|
51
51
|
rack (1.5.2)
|
52
52
|
rack-protection (1.5.0)
|
53
53
|
rack
|
54
54
|
rack-test (0.6.2)
|
55
55
|
rack (>= 1.0)
|
56
56
|
rake (10.0.4)
|
57
|
-
rbx-require-relative (0.0.9)
|
58
57
|
rest-client (1.6.7)
|
59
58
|
mime-types (>= 1.16)
|
60
59
|
rr (1.0.4)
|
61
|
-
ruby-debug (0.10.4)
|
62
|
-
columnize (>= 0.1)
|
63
|
-
ruby-debug-base (~> 0.10.4.0)
|
64
|
-
ruby-debug-base (0.10.4)
|
65
|
-
linecache (>= 0.3)
|
66
|
-
ruby-debug-base19 (0.11.25)
|
67
|
-
columnize (>= 0.3.1)
|
68
|
-
linecache19 (>= 0.5.11)
|
69
|
-
ruby_core_source (>= 0.1.4)
|
70
|
-
ruby-debug19 (0.11.6)
|
71
|
-
columnize (>= 0.3.1)
|
72
|
-
linecache19 (>= 0.5.11)
|
73
|
-
ruby-debug-base19 (>= 0.11.19)
|
74
|
-
ruby_core_source (0.1.5)
|
75
|
-
archive-tar-minitar (>= 0.5.2)
|
76
60
|
simplecov (0.7.1)
|
77
61
|
multi_json (~> 1.0)
|
78
62
|
simplecov-html (~> 0.7.1)
|
@@ -81,6 +65,7 @@ GEM
|
|
81
65
|
rack (~> 1.5, >= 1.5.2)
|
82
66
|
rack-protection (~> 1.4)
|
83
67
|
tilt (~> 1.3, >= 1.3.4)
|
68
|
+
slop (3.4.3)
|
84
69
|
term-ansicolor (1.1.3)
|
85
70
|
thor (0.18.1)
|
86
71
|
tilt (1.3.6)
|
@@ -100,9 +85,8 @@ DEPENDENCIES
|
|
100
85
|
fakefs
|
101
86
|
haml
|
102
87
|
kensa!
|
88
|
+
pry
|
103
89
|
rake
|
104
90
|
rr
|
105
|
-
ruby-debug
|
106
|
-
ruby-debug19
|
107
91
|
sinatra (>= 0.9)
|
108
92
|
timecop (>= 0.3.5)
|
data/kensa.gemspec
CHANGED
@@ -31,9 +31,11 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.add_development_dependency(%q<coveralls>)
|
32
32
|
s.add_development_dependency(%q<fakefs>, [">= 0"])
|
33
33
|
s.add_development_dependency(%q<haml>, [">= 0"])
|
34
|
+
s.add_development_dependency(%q<rake>)
|
34
35
|
s.add_development_dependency(%q<rr>, [">= 0"])
|
35
36
|
s.add_development_dependency(%q<sinatra>, [">= 0.9"])
|
36
37
|
s.add_development_dependency(%q<timecop>, [">= 0.3.5"])
|
38
|
+
s.add_development_dependency(%q<pry>)
|
37
39
|
s.add_runtime_dependency(%q<launchy>, [">= 0.3.2"])
|
38
40
|
s.add_runtime_dependency(%q<mechanize>, ["~> 2.6.0"])
|
39
41
|
s.add_runtime_dependency(%q<rest-client>, ["< 1.7.0", ">= 1.4.0"])
|
data/lib/heroku/kensa/check.rb
CHANGED
@@ -221,6 +221,24 @@ module Heroku
|
|
221
221
|
end
|
222
222
|
end
|
223
223
|
|
224
|
+
check "syslog_drain_url is returned if required" do
|
225
|
+
return true unless data.has_key?("requires") && data["requires"].include?("syslog_drain")
|
226
|
+
|
227
|
+
drain_url = response['syslog_drain_url']
|
228
|
+
|
229
|
+
if !drain_url || drain_url.empty?
|
230
|
+
error "must return a syslog_drain_url"
|
231
|
+
else
|
232
|
+
true
|
233
|
+
end
|
234
|
+
|
235
|
+
unless drain_url =~ /\A(https|syslog):\/\/[\S]+\Z/
|
236
|
+
error "must return a syslog_drain_url like syslog://log.example.com:9999"
|
237
|
+
else
|
238
|
+
true
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
224
242
|
end
|
225
243
|
end
|
226
244
|
|
data/lib/heroku/kensa/version.rb
CHANGED
@@ -76,6 +76,27 @@ class ProvisionResponseCheckTest < Test::Unit::TestCase
|
|
76
76
|
@response["config"]["MYADDON_URL"] = "http://localhost/abc"
|
77
77
|
assert_valid
|
78
78
|
end
|
79
|
+
|
80
|
+
describe "when syslog drain is required" do
|
81
|
+
setup do
|
82
|
+
@data["requires"] = ["syslog_drain"]
|
83
|
+
end
|
84
|
+
|
85
|
+
test "response is invalid without a syslog_drain_url" do
|
86
|
+
@response['syslog_drain_url'] = ''
|
87
|
+
assert_invalid
|
88
|
+
end
|
89
|
+
|
90
|
+
test "response is invalid if syslog_drain_url is invalid" do
|
91
|
+
@response['syslog_drain_url'] = 'ftp://host.example.com'
|
92
|
+
assert_invalid
|
93
|
+
end
|
94
|
+
|
95
|
+
test "response is valid with a syslog_drain_url" do
|
96
|
+
@response['syslog_drain_url'] = 'syslog://log.example.com:9999'
|
97
|
+
assert_valid
|
98
|
+
end
|
99
|
+
end
|
79
100
|
end
|
80
101
|
|
81
102
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kensa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2013-10-
|
17
|
+
date: 2013-10-19 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: artifice
|
@@ -112,6 +112,22 @@ dependencies:
|
|
112
112
|
- - ! '>='
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
|
+
- !ruby/object:Gem::Dependency
|
116
|
+
name: rake
|
117
|
+
requirement: !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ! '>='
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
type: :development
|
124
|
+
prerelease: false
|
125
|
+
version_requirements: !ruby/object:Gem::Requirement
|
126
|
+
none: false
|
127
|
+
requirements:
|
128
|
+
- - ! '>='
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
115
131
|
- !ruby/object:Gem::Dependency
|
116
132
|
name: rr
|
117
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,6 +176,22 @@ dependencies:
|
|
160
176
|
- - ! '>='
|
161
177
|
- !ruby/object:Gem::Version
|
162
178
|
version: 0.3.5
|
179
|
+
- !ruby/object:Gem::Dependency
|
180
|
+
name: pry
|
181
|
+
requirement: !ruby/object:Gem::Requirement
|
182
|
+
none: false
|
183
|
+
requirements:
|
184
|
+
- - ! '>='
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
type: :development
|
188
|
+
prerelease: false
|
189
|
+
version_requirements: !ruby/object:Gem::Requirement
|
190
|
+
none: false
|
191
|
+
requirements:
|
192
|
+
- - ! '>='
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
163
195
|
- !ruby/object:Gem::Dependency
|
164
196
|
name: launchy
|
165
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -290,7 +322,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
290
322
|
version: '0'
|
291
323
|
segments:
|
292
324
|
- 0
|
293
|
-
hash:
|
325
|
+
hash: -1941356029524696932
|
294
326
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
295
327
|
none: false
|
296
328
|
requirements:
|
@@ -299,7 +331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
299
331
|
version: '0'
|
300
332
|
segments:
|
301
333
|
- 0
|
302
|
-
hash:
|
334
|
+
hash: -1941356029524696932
|
303
335
|
requirements: []
|
304
336
|
rubyforge_project: kensa
|
305
337
|
rubygems_version: 1.8.23
|