kensa 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -2
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/heroku/kensa/check.rb +11 -5
- data/lib/heroku/kensa/http.rb +2 -2
- data/lib/heroku/kensa/version.rb +1 -1
- metadata +35 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45bfe322d576fbad7d990762b52a23ea86c3a404
|
4
|
+
data.tar.gz: 92e962d2204a20079bc7bbac4cdb2812b19c901f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26932328a43a583a183c908f4b3663ee6e4b93344093435de6320cb0af42f4dcead77f481faf3f6c301d2f77d46704c3ef75289d3dd1deb83d6cf802efd2919d
|
7
|
+
data.tar.gz: 65637359593736537b2e7a4debd71f06f23ef5532eec72a3fe7abeaac12512d9ded48a5c6fdffc026cdf3efc68e12bffb26440bb8f13055704a2e56ad8225097
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -25,6 +25,6 @@ how to build your Heroku add-on:
|
|
25
25
|
|
26
26
|
## Meta #######################################################################
|
27
27
|
|
28
|
-
Maintained by the Heroku
|
28
|
+
Maintained by the Heroku Ecosystem Team (and you!).
|
29
29
|
|
30
30
|
Released under the MIT license. <https://github.com/heroku/kensa>
|
data/lib/heroku/kensa/check.rb
CHANGED
@@ -299,7 +299,7 @@ module Heroku
|
|
299
299
|
end
|
300
300
|
|
301
301
|
class DuplicateProvisionCheck < ApiCheck
|
302
|
-
include
|
302
|
+
include HTTPForChecks
|
303
303
|
|
304
304
|
READLEN = 1024 * 10
|
305
305
|
|
@@ -315,6 +315,8 @@ module Heroku
|
|
315
315
|
payload = create_provision_payload
|
316
316
|
|
317
317
|
code1, json1 = post(credentials, base_path, payload)
|
318
|
+
|
319
|
+
payload[:uuid] = SecureRandom.uuid
|
318
320
|
code2, json2 = post(credentials, base_path, payload)
|
319
321
|
|
320
322
|
json1 = OkJson.decode(json1)
|
@@ -333,7 +335,7 @@ module Heroku
|
|
333
335
|
end
|
334
336
|
|
335
337
|
class ProvisionCheck < ApiCheck
|
336
|
-
include
|
338
|
+
include HTTPForChecks
|
337
339
|
|
338
340
|
READLEN = 1024 * 10
|
339
341
|
|
@@ -366,6 +368,7 @@ module Heroku
|
|
366
368
|
sleep(1)
|
367
369
|
end
|
368
370
|
|
371
|
+
payload[:uuid] = SecureRandom.uuid
|
369
372
|
code, json = post(credentials, base_path, payload)
|
370
373
|
|
371
374
|
if code == 200
|
@@ -399,6 +402,7 @@ module Heroku
|
|
399
402
|
|
400
403
|
check "authentication" do
|
401
404
|
wrong_credentials = ['wrong', 'secret']
|
405
|
+
payload[:uuid] = SecureRandom.uuid
|
402
406
|
code, _ = post(wrong_credentials, base_path, payload)
|
403
407
|
error("expected 401, got #{code}") if code != 401
|
404
408
|
true
|
@@ -420,7 +424,7 @@ module Heroku
|
|
420
424
|
|
421
425
|
|
422
426
|
class DeprovisionCheck < ApiCheck
|
423
|
-
include
|
427
|
+
include HTTPForChecks
|
424
428
|
|
425
429
|
def call!
|
426
430
|
id = data[:id]
|
@@ -453,7 +457,7 @@ module Heroku
|
|
453
457
|
|
454
458
|
|
455
459
|
class PlanChangeCheck < ApiCheck
|
456
|
-
include
|
460
|
+
include HTTPForChecks
|
457
461
|
|
458
462
|
def call!
|
459
463
|
id = data[:id]
|
@@ -467,6 +471,7 @@ module Heroku
|
|
467
471
|
|
468
472
|
test "PUT #{path}"
|
469
473
|
check "response" do
|
474
|
+
payload[:uuid] = SecureRandom.uuid
|
470
475
|
code, _ = put(credentials, path, payload)
|
471
476
|
if code == 200
|
472
477
|
true
|
@@ -479,6 +484,7 @@ module Heroku
|
|
479
484
|
|
480
485
|
check "authentication" do
|
481
486
|
wrong_credentials = ['wrong', 'secret']
|
487
|
+
payload[:uuid] = SecureRandom.uuid
|
482
488
|
code, _ = put(wrong_credentials, path, payload)
|
483
489
|
error("expected 401, got #{code}") if code != 401
|
484
490
|
true
|
@@ -488,7 +494,7 @@ module Heroku
|
|
488
494
|
|
489
495
|
|
490
496
|
class SsoCheck < ApiCheck
|
491
|
-
include
|
497
|
+
include HTTPForChecks
|
492
498
|
|
493
499
|
def agent
|
494
500
|
@agent ||= Mechanize.new
|
data/lib/heroku/kensa/http.rb
CHANGED
@@ -2,7 +2,7 @@ require 'restclient'
|
|
2
2
|
|
3
3
|
module Heroku
|
4
4
|
module Kensa
|
5
|
-
module
|
5
|
+
module HTTPForChecks
|
6
6
|
|
7
7
|
def get(path, params={})
|
8
8
|
path = "#{path}?" + params.map { |k, v| "#{k}=#{v}" }.join("&") unless params.empty?
|
@@ -36,7 +36,7 @@ module Heroku
|
|
36
36
|
end
|
37
37
|
|
38
38
|
user, pass = credentials
|
39
|
-
body = RestClient::Resource.new(url, user, pass)[path].send(
|
39
|
+
body = RestClient::Resource.new(url, user: user, password: pass, verify_ssl: false)[path].send(
|
40
40
|
meth,
|
41
41
|
*args
|
42
42
|
).to_s
|
data/lib/heroku/kensa/version.rb
CHANGED
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: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Mizerany
|
@@ -13,202 +13,202 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2016-
|
16
|
+
date: 2016-04-18 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: launchy
|
20
20
|
requirement: !ruby/object:Gem::Requirement
|
21
21
|
requirements:
|
22
|
-
- - ~>
|
22
|
+
- - "~>"
|
23
23
|
- !ruby/object:Gem::Version
|
24
24
|
version: 2.2.0
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
28
28
|
requirements:
|
29
|
-
- - ~>
|
29
|
+
- - "~>"
|
30
30
|
- !ruby/object:Gem::Version
|
31
31
|
version: 2.2.0
|
32
32
|
- !ruby/object:Gem::Dependency
|
33
33
|
name: mechanize
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
35
35
|
requirements:
|
36
|
-
- - ~>
|
36
|
+
- - "~>"
|
37
37
|
- !ruby/object:Gem::Version
|
38
38
|
version: 2.6.0
|
39
39
|
type: :runtime
|
40
40
|
prerelease: false
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
42
42
|
requirements:
|
43
|
-
- - ~>
|
43
|
+
- - "~>"
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: 2.6.0
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: netrc
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
|
-
- - ~>
|
50
|
+
- - "~>"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 0.10.3
|
53
53
|
type: :runtime
|
54
54
|
prerelease: false
|
55
55
|
version_requirements: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- - ~>
|
57
|
+
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: 0.10.3
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
61
|
name: rest-client
|
62
62
|
requirement: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
|
-
- - ~>
|
64
|
+
- - "~>"
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '1.8'
|
67
67
|
type: :runtime
|
68
68
|
prerelease: false
|
69
69
|
version_requirements: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- - ~>
|
71
|
+
- - "~>"
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '1.8'
|
74
74
|
- !ruby/object:Gem::Dependency
|
75
75
|
name: colored
|
76
76
|
requirement: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- - ~>
|
78
|
+
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '1.2'
|
81
81
|
type: :runtime
|
82
82
|
prerelease: false
|
83
83
|
version_requirements: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
|
-
- - ~>
|
85
|
+
- - "~>"
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '1.2'
|
88
88
|
- !ruby/object:Gem::Dependency
|
89
89
|
name: artifice
|
90
90
|
requirement: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
|
-
- - ~>
|
92
|
+
- - "~>"
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0.6'
|
95
95
|
type: :development
|
96
96
|
prerelease: false
|
97
97
|
version_requirements: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
|
-
- - ~>
|
99
|
+
- - "~>"
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0.6'
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: contest
|
104
104
|
requirement: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
|
-
- - ~>
|
106
|
+
- - "~>"
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: 0.1.3
|
109
109
|
type: :development
|
110
110
|
prerelease: false
|
111
111
|
version_requirements: !ruby/object:Gem::Requirement
|
112
112
|
requirements:
|
113
|
-
- - ~>
|
113
|
+
- - "~>"
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: 0.1.3
|
116
116
|
- !ruby/object:Gem::Dependency
|
117
117
|
name: fakefs
|
118
118
|
requirement: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
|
-
- - ~>
|
120
|
+
- - "~>"
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: 0.4.2
|
123
123
|
type: :development
|
124
124
|
prerelease: false
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
|
-
- - ~>
|
127
|
+
- - "~>"
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: 0.4.2
|
130
130
|
- !ruby/object:Gem::Dependency
|
131
131
|
name: rake
|
132
132
|
requirement: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
|
-
- -
|
134
|
+
- - ">="
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
137
|
type: :development
|
138
138
|
prerelease: false
|
139
139
|
version_requirements: !ruby/object:Gem::Requirement
|
140
140
|
requirements:
|
141
|
-
- -
|
141
|
+
- - ">="
|
142
142
|
- !ruby/object:Gem::Version
|
143
143
|
version: '0'
|
144
144
|
- !ruby/object:Gem::Dependency
|
145
145
|
name: rr
|
146
146
|
requirement: !ruby/object:Gem::Requirement
|
147
147
|
requirements:
|
148
|
-
- - ~>
|
148
|
+
- - "~>"
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: 1.0.4
|
151
151
|
type: :development
|
152
152
|
prerelease: false
|
153
153
|
version_requirements: !ruby/object:Gem::Requirement
|
154
154
|
requirements:
|
155
|
-
- - ~>
|
155
|
+
- - "~>"
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: 1.0.4
|
158
158
|
- !ruby/object:Gem::Dependency
|
159
159
|
name: sinatra
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
161
161
|
requirements:
|
162
|
-
- - ~>
|
162
|
+
- - "~>"
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: 1.4.2
|
165
165
|
type: :development
|
166
166
|
prerelease: false
|
167
167
|
version_requirements: !ruby/object:Gem::Requirement
|
168
168
|
requirements:
|
169
|
-
- - ~>
|
169
|
+
- - "~>"
|
170
170
|
- !ruby/object:Gem::Version
|
171
171
|
version: 1.4.2
|
172
172
|
- !ruby/object:Gem::Dependency
|
173
173
|
name: timecop
|
174
174
|
requirement: !ruby/object:Gem::Requirement
|
175
175
|
requirements:
|
176
|
-
- - ~>
|
176
|
+
- - "~>"
|
177
177
|
- !ruby/object:Gem::Version
|
178
178
|
version: 0.6.1
|
179
179
|
type: :development
|
180
180
|
prerelease: false
|
181
181
|
version_requirements: !ruby/object:Gem::Requirement
|
182
182
|
requirements:
|
183
|
-
- - ~>
|
183
|
+
- - "~>"
|
184
184
|
- !ruby/object:Gem::Version
|
185
185
|
version: 0.6.1
|
186
186
|
- !ruby/object:Gem::Dependency
|
187
187
|
name: pry
|
188
188
|
requirement: !ruby/object:Gem::Requirement
|
189
189
|
requirements:
|
190
|
-
- -
|
190
|
+
- - ">="
|
191
191
|
- !ruby/object:Gem::Version
|
192
192
|
version: '0'
|
193
193
|
type: :development
|
194
194
|
prerelease: false
|
195
195
|
version_requirements: !ruby/object:Gem::Requirement
|
196
196
|
requirements:
|
197
|
-
- -
|
197
|
+
- - ">="
|
198
198
|
- !ruby/object:Gem::Version
|
199
199
|
version: '0'
|
200
200
|
- !ruby/object:Gem::Dependency
|
201
201
|
name: test-unit
|
202
202
|
requirement: !ruby/object:Gem::Requirement
|
203
203
|
requirements:
|
204
|
-
- -
|
204
|
+
- - ">="
|
205
205
|
- !ruby/object:Gem::Version
|
206
206
|
version: '0'
|
207
207
|
type: :development
|
208
208
|
prerelease: false
|
209
209
|
version_requirements: !ruby/object:Gem::Requirement
|
210
210
|
requirements:
|
211
|
-
- -
|
211
|
+
- - ">="
|
212
212
|
- !ruby/object:Gem::Version
|
213
213
|
version: '0'
|
214
214
|
description: Kensa is a command-line tool to help add-on providers integrating their
|
@@ -220,8 +220,8 @@ executables:
|
|
220
220
|
extensions: []
|
221
221
|
extra_rdoc_files: []
|
222
222
|
files:
|
223
|
-
- .gitignore
|
224
|
-
- .travis.yml
|
223
|
+
- ".gitignore"
|
224
|
+
- ".travis.yml"
|
225
225
|
- Gemfile
|
226
226
|
- Gemfile.lock
|
227
227
|
- LICENSE
|
@@ -265,17 +265,17 @@ require_paths:
|
|
265
265
|
- lib
|
266
266
|
required_ruby_version: !ruby/object:Gem::Requirement
|
267
267
|
requirements:
|
268
|
-
- -
|
268
|
+
- - ">="
|
269
269
|
- !ruby/object:Gem::Version
|
270
270
|
version: 1.9.0
|
271
271
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
272
272
|
requirements:
|
273
|
-
- -
|
273
|
+
- - ">="
|
274
274
|
- !ruby/object:Gem::Version
|
275
275
|
version: '0'
|
276
276
|
requirements: []
|
277
277
|
rubyforge_project:
|
278
|
-
rubygems_version: 2.
|
278
|
+
rubygems_version: 2.5.1
|
279
279
|
signing_key:
|
280
280
|
specification_version: 4
|
281
281
|
summary: Tool to help Heroku add-on providers integrating their services
|