kensa 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/kensa.gemspec +37 -39
- data/lib/heroku/kensa.rb +1 -1
- data/lib/heroku/kensa/client.rb +17 -15
- metadata +3 -3
data/kensa.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{kensa}
|
8
|
-
s.version = "1.1.
|
8
|
+
s.version = "1.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Blake Mizerany", "Pedro Belo", "Adam Wiggins"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-02-21}
|
13
13
|
s.default_executable = %q{kensa}
|
14
14
|
s.description = %q{Kensa is a command-line tool to help add-on providers integrating their services with Heroku. It manages manifest files, and provides a TDD-like approach for programmers to test and develop their APIs.}
|
15
15
|
s.email = %q{pedro@heroku.com}
|
@@ -18,49 +18,47 @@ Gem::Specification.new do |s|
|
|
18
18
|
"README.md"
|
19
19
|
]
|
20
20
|
s.files = [
|
21
|
-
".
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
"test/sso_test.rb"
|
21
|
+
"README.md",
|
22
|
+
"Rakefile",
|
23
|
+
"bin/kensa",
|
24
|
+
"kensa.gemspec",
|
25
|
+
"lib/heroku/kensa.rb",
|
26
|
+
"lib/heroku/kensa/check.rb",
|
27
|
+
"lib/heroku/kensa/client.rb",
|
28
|
+
"lib/heroku/kensa/http.rb",
|
29
|
+
"lib/heroku/kensa/manifest.rb",
|
30
|
+
"lib/heroku/kensa/sso.rb",
|
31
|
+
"set-env.sh",
|
32
|
+
"test/all_check_test.rb",
|
33
|
+
"test/deprovision_check_test.rb",
|
34
|
+
"test/helper.rb",
|
35
|
+
"test/manifest_check_test.rb",
|
36
|
+
"test/manifest_test.rb",
|
37
|
+
"test/plan_change_check_test.rb",
|
38
|
+
"test/provision_check_test.rb",
|
39
|
+
"test/provision_response_check_test.rb",
|
40
|
+
"test/resources/runner.rb",
|
41
|
+
"test/resources/server.rb",
|
42
|
+
"test/sso_check_test.rb",
|
43
|
+
"test/sso_test.rb"
|
45
44
|
]
|
46
45
|
s.homepage = %q{http://provider.heroku.com/resources}
|
47
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
48
46
|
s.require_paths = ["lib"]
|
49
47
|
s.rubygems_version = %q{1.3.6}
|
50
48
|
s.summary = %q{Tool to help Heroku add-on providers integrating their services}
|
51
49
|
s.test_files = [
|
52
50
|
"test/all_check_test.rb",
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
51
|
+
"test/deprovision_check_test.rb",
|
52
|
+
"test/helper.rb",
|
53
|
+
"test/manifest_check_test.rb",
|
54
|
+
"test/manifest_test.rb",
|
55
|
+
"test/plan_change_check_test.rb",
|
56
|
+
"test/provision_check_test.rb",
|
57
|
+
"test/provision_response_check_test.rb",
|
58
|
+
"test/resources/runner.rb",
|
59
|
+
"test/resources/server.rb",
|
60
|
+
"test/sso_check_test.rb",
|
61
|
+
"test/sso_test.rb"
|
64
62
|
]
|
65
63
|
|
66
64
|
if s.respond_to? :specification_version then
|
data/lib/heroku/kensa.rb
CHANGED
data/lib/heroku/kensa/client.rb
CHANGED
@@ -33,21 +33,17 @@ module Heroku
|
|
33
33
|
when "manifest"
|
34
34
|
run_check ManifestCheck
|
35
35
|
when "provision"
|
36
|
-
run_check ManifestCheck
|
37
|
-
run_check ProvisionCheck
|
36
|
+
run_check ManifestCheck, ProvisionCheck
|
38
37
|
when "deprovision"
|
39
38
|
id = @args.shift || abort("! no id specified; see usage")
|
40
|
-
run_check ManifestCheck
|
41
|
-
run_check DeprovisionCheck, :id => id
|
39
|
+
run_check ManifestCheck, DeprovisionCheck, :id => id
|
42
40
|
when "planchange"
|
43
41
|
id = @args.shift || abort("! no id specified; see usage")
|
44
42
|
plan = @args.shift || abort("! no plan specified; see usage")
|
45
|
-
run_check ManifestCheck
|
46
|
-
run_check PlanChangeCheck, :id => id, :plan => plan
|
43
|
+
run_check ManifestCheck, PlanChangeCheck, :id => id, :plan => plan
|
47
44
|
when "sso"
|
48
45
|
id = @args.shift || abort("! no id specified; see usage")
|
49
|
-
run_check ManifestCheck
|
50
|
-
run_check SsoCheck, :id => id
|
46
|
+
run_check ManifestCheck, SsoCheck, :id => id
|
51
47
|
else
|
52
48
|
abort "! Unknown test '#{check}'; see usage"
|
53
49
|
end
|
@@ -74,7 +70,7 @@ module Heroku
|
|
74
70
|
resource = RestClient::Resource.new(host, user, password)
|
75
71
|
resource['provider/addons'].post(resolve_manifest, headers)
|
76
72
|
puts "-----> Manifest for \"#{data['id']}\" was pushed successfully"
|
77
|
-
puts " Continue at #{(heroku_host)}/addons/#{data['id']}"
|
73
|
+
puts " Continue at #{(heroku_host)}/provider/addons/#{data['id']}"
|
78
74
|
rescue RestClient::UnprocessableEntity => e
|
79
75
|
abort("FAILED: #{e.http_body}")
|
80
76
|
rescue RestClient::Unauthorized
|
@@ -125,12 +121,18 @@ module Heroku
|
|
125
121
|
File.exists?(filename)
|
126
122
|
end
|
127
123
|
|
128
|
-
def run_check(
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
124
|
+
def run_check(*args)
|
125
|
+
options = {}
|
126
|
+
options = args.pop if args.last.is_a?(Hash)
|
127
|
+
|
128
|
+
args.each do |klass|
|
129
|
+
screen = Screen.new
|
130
|
+
data = Yajl::Parser.parse(resolve_manifest)
|
131
|
+
check = klass.new(data.merge(@options.merge(options)), screen)
|
132
|
+
result = check.call
|
133
|
+
screen.finish
|
134
|
+
exit 1 if !result
|
135
|
+
end
|
134
136
|
end
|
135
137
|
|
136
138
|
def running_on_windows?
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 1.1.
|
8
|
+
- 3
|
9
|
+
version: 1.1.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Blake Mizerany
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-02-
|
19
|
+
date: 2011-02-21 00:00:00 -08:00
|
20
20
|
default_executable: kensa
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|