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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 764dc0a04e766ea678f0bde9321fd3328dd98a138094a129f36845c409dfad27
4
- data.tar.gz: ae4e4c87d345644f054f6b8ff2c56ede552d77ebe98012612f665a72dc31e520
3
+ metadata.gz: 5887c3acaa5919c45a510a84790bb775981f8671c217cdecb00e309ba77692d0
4
+ data.tar.gz: b4b5aff28f23c8f5c3babb222f625edd97e8dba7308397f97e7981931bef4d04
5
5
  SHA512:
6
- metadata.gz: c3a147e73fae54e2c366fd269aa1be216295e80dd909285b31e997501d592b2040591a8fc4e9204f4c034b7da36dc47cdcca89df2a07f0b089a0cb5e9102195a
7
- data.tar.gz: 42b838f44359b580ef759979c7bf3fd67acfb477ffb6bc972b7ffe9585767ad09b1077619a01507bd358592020af2a01b5c17a784be9e3e3b29f37cb1e5c54e9
6
+ metadata.gz: a22aa34223c9931835013c46379aecc12181deee3e8127f6e24e43d7ac819e50aabdcff6f32692a07ccf1d1a3d6e6d5ce3854cd3f0c06aea8d18c08efdb47515
7
+ data.tar.gz: 4be65747aeaa43a1c34845e3c9f3acbe9fec96466f2510eb926f935b3f9d34bd475ad65cc5662f8919ede68af7a1615a9f3f42b49df43aee9cf0595555571a34
@@ -10,7 +10,7 @@ h2. Installing
10
10
 
11
11
  Add the following to your Gemfile:
12
12
 
13
- <pre><code>gem 'maitre_d', '~> 0.7.0'</code></pre>
13
+ <pre><code>gem 'maitre_d', '~> 0.7.1'</code></pre>
14
14
 
15
15
  h3. With Rails
16
16
 
@@ -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/\d+}, MaitreD::API::ChangePlan
21
- api.connect :delete, %r{/resources/\d+}, MaitreD::API::Delete
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
@@ -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.0'
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 '/heroku/resources/7',
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 '/heroku/resources/7',
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 '/heroku/resources/7',
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 '/heroku/resources/28',
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 '/heroku/resources/28',
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 '/heroku/resources/28',
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.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maitre_d
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Allan