maitre_d 0.7.0 → 0.7.1
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.
- checksums.yaml +4 -4
- data/README.textile +1 -1
- data/lib/maitre_d/api.rb +2 -2
- data/maitre_d.gemspec +1 -1
- data/spec/api/heroku/provisioning_spec.rb +7 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5887c3acaa5919c45a510a84790bb775981f8671c217cdecb00e309ba77692d0
|
4
|
+
data.tar.gz: b4b5aff28f23c8f5c3babb222f625edd97e8dba7308397f97e7981931bef4d04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a22aa34223c9931835013c46379aecc12181deee3e8127f6e24e43d7ac819e50aabdcff6f32692a07ccf1d1a3d6e6d5ce3854cd3f0c06aea8d18c08efdb47515
|
7
|
+
data.tar.gz: 4be65747aeaa43a1c34845e3c9f3acbe9fec96466f2510eb926f935b3f9d34bd475ad65cc5662f8919ede68af7a1615a9f3f42b49df43aee9cf0595555571a34
|
data/README.textile
CHANGED
data/lib/maitre_d/api.rb
CHANGED
@@ -17,8 +17,8 @@ class MaitreD::API
|
|
17
17
|
@endpoints ||= Sliver::API.new do |api|
|
18
18
|
api.connect :post, '/resources/sso', MaitreD::API::SSO
|
19
19
|
api.connect :post, '/resources', MaitreD::API::Create
|
20
|
-
api.connect :put, %r{/resources
|
21
|
-
api.connect :delete, %r{/resources
|
20
|
+
api.connect :put, %r{/resources/[\w-]+}, MaitreD::API::ChangePlan
|
21
|
+
api.connect :delete, %r{/resources/[\w-]+}, MaitreD::API::Delete
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
data/maitre_d.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'maitre_d'
|
6
|
-
s.version = '0.7.
|
6
|
+
s.version = '0.7.1'
|
7
7
|
s.authors = ['Pat Allan']
|
8
8
|
s.email = ['pat@freelancing-gods.com']
|
9
9
|
s.homepage = 'http://github.com/flying-sphinx/maitre_d'
|
@@ -10,6 +10,7 @@ describe 'Heroku Provisioning API', :type => :request do
|
|
10
10
|
describe 'Provisioning' do
|
11
11
|
let(:params) {
|
12
12
|
{
|
13
|
+
:uuid => SecureRandom.uuid,
|
13
14
|
:plan => 'basic',
|
14
15
|
:callback_url => 'https://domain/vendor/apps/app123%40heroku.com',
|
15
16
|
:heroku_id => 'app123@heroku.com'
|
@@ -63,7 +64,7 @@ describe 'Heroku Provisioning API', :type => :request do
|
|
63
64
|
}
|
64
65
|
|
65
66
|
it "returns a 401 if the HTTP authorisation does not match" do
|
66
|
-
put
|
67
|
+
put "/heroku/resources/#{SecureRandom.uuid}",
|
67
68
|
:params => JSON.dump(params),
|
68
69
|
:headers => {'HTTP_AUTHORIZATION' => 'Basic foobarbaz'}
|
69
70
|
|
@@ -71,7 +72,7 @@ describe 'Heroku Provisioning API', :type => :request do
|
|
71
72
|
end
|
72
73
|
|
73
74
|
it "returns the new resource configuration" do
|
74
|
-
put
|
75
|
+
put "/heroku/resources/#{SecureRandom.uuid}",
|
75
76
|
:params => JSON.dump(params),
|
76
77
|
:headers => {'HTTP_AUTHORIZATION' => authorisation}
|
77
78
|
|
@@ -79,7 +80,7 @@ describe 'Heroku Provisioning API', :type => :request do
|
|
79
80
|
end
|
80
81
|
|
81
82
|
it "returns a custom message" do
|
82
|
-
put
|
83
|
+
put "/heroku/resources/#{SecureRandom.uuid}",
|
83
84
|
:params => JSON.dump(params),
|
84
85
|
:headers => {'HTTP_AUTHORIZATION' => authorisation}
|
85
86
|
|
@@ -89,21 +90,21 @@ describe 'Heroku Provisioning API', :type => :request do
|
|
89
90
|
|
90
91
|
describe 'Deprovisioning' do
|
91
92
|
it "returns a 401 if the HTTP authorisation does not match" do
|
92
|
-
delete
|
93
|
+
delete "/heroku/resources/#{SecureRandom.uuid}",
|
93
94
|
:headers => {'HTTP_AUTHORIZATION' => 'Basic foobarbaz'}
|
94
95
|
|
95
96
|
expect(response.status).to eq(401)
|
96
97
|
end
|
97
98
|
|
98
99
|
it "returns with a status of 200" do
|
99
|
-
delete
|
100
|
+
delete "/heroku/resources/#{SecureRandom.uuid}",
|
100
101
|
:headers => {'HTTP_AUTHORIZATION' => authorisation}
|
101
102
|
|
102
103
|
expect(response.status).to eq(200)
|
103
104
|
end
|
104
105
|
|
105
106
|
it "returns a custom message" do
|
106
|
-
delete
|
107
|
+
delete "/heroku/resources/#{SecureRandom.uuid}",
|
107
108
|
:headers => {'HTTP_AUTHORIZATION' => authorisation}
|
108
109
|
|
109
110
|
expect(json_response['message']).to eq('Add-on removed.')
|