mangopay 3.0.10 → 3.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mangopay/authorization_token.rb +1 -1
- data/lib/mangopay/version.rb +1 -1
- data/spec/lib/mangopay/hook_spec.rb +39 -39
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62d1fd05f9cca7749256d14345f39d803570131e
|
4
|
+
data.tar.gz: 7e6a7b0c24c54dcb5e3ebaabdd082bb066308aa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cba7b0b6b7160be2d3338e644475eb6f29c9303d5d7c2d97aeea90368dd0d39d0d687b36fc0c57aa0fbd189db483a5f9030344f784358177a3c9c131b8426b8d
|
7
|
+
data.tar.gz: 780a87a3ec7a9d9b63f4a760378e6478dbca05d7b05a7948fcc3652d7612501a84d435d477167f4b63d939cb396ff9ad792de0fc3865be3b392b518bef67e32c
|
@@ -15,7 +15,7 @@ module MangoPay
|
|
15
15
|
def get_token
|
16
16
|
token = storage.get
|
17
17
|
if token.nil? || token['timestamp'].nil? || token['timestamp'] <= Time.now
|
18
|
-
token = MangoPay.request(:post, '/
|
18
|
+
token = MangoPay.request(:post, '/v2/oauth/token', {}, {}, {}, Proc.new do |req|
|
19
19
|
cfg = MangoPay.configuration
|
20
20
|
req.basic_auth cfg.client_id, cfg.client_passphrase
|
21
21
|
req.body = 'grant_type=client_credentials'
|
data/lib/mangopay/version.rb
CHANGED
@@ -1,39 +1,39 @@
|
|
1
|
-
require_relative '../../spec_helper'
|
2
|
-
|
3
|
-
describe MangoPay::Hook do
|
4
|
-
include_context 'hooks'
|
5
|
-
|
6
|
-
describe 'CREATE' do
|
7
|
-
it 'creates a hook' do
|
8
|
-
expect(new_hook['Id']).to_not be_nil
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe 'UPDATE' do
|
13
|
-
it 'updates a hook' do
|
14
|
-
new_url = new_hook['Url'] + '.com'
|
15
|
-
updated_hook = MangoPay::Hook.update(new_hook['Id'], {
|
16
|
-
Url: new_url,
|
17
|
-
Tag: 'Updated Tag'
|
18
|
-
})
|
19
|
-
expect(updated_hook['Url']).to eq(new_url)
|
20
|
-
expect(updated_hook['Tag']).to eq('Updated Tag')
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
describe 'FETCH' do
|
25
|
-
|
26
|
-
it 'fetches a hook' do
|
27
|
-
hook = MangoPay::Hook.fetch(new_hook['Id'])
|
28
|
-
expect(hook['Id']).to eq(new_hook['Id'])
|
29
|
-
end
|
30
|
-
|
31
|
-
it 'fetches all the hooks' do
|
32
|
-
hooks = MangoPay::Hook.fetch()
|
33
|
-
expect(hooks).to be_kind_of(Array)
|
34
|
-
expect(hooks).not_to be_empty
|
35
|
-
end
|
36
|
-
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
1
|
+
require_relative '../../spec_helper'
|
2
|
+
|
3
|
+
describe MangoPay::Hook do
|
4
|
+
include_context 'hooks'
|
5
|
+
|
6
|
+
describe 'CREATE' do
|
7
|
+
it 'creates a hook' do
|
8
|
+
expect(new_hook['Id']).to_not be_nil
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe 'UPDATE' do
|
13
|
+
it 'updates a hook' do
|
14
|
+
new_url = new_hook['Url'] + '.com'
|
15
|
+
updated_hook = MangoPay::Hook.update(new_hook['Id'], {
|
16
|
+
Url: new_url,
|
17
|
+
Tag: 'Updated Tag'
|
18
|
+
})
|
19
|
+
expect(updated_hook['Url']).to eq(new_url)
|
20
|
+
expect(updated_hook['Tag']).to eq('Updated Tag')
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe 'FETCH' do
|
25
|
+
|
26
|
+
it 'fetches a hook' do
|
27
|
+
hook = MangoPay::Hook.fetch(new_hook['Id'])
|
28
|
+
expect(hook['Id']).to eq(new_hook['Id'])
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'fetches all the hooks' do
|
32
|
+
hooks = MangoPay::Hook.fetch()
|
33
|
+
expect(hooks).to be_kind_of(Array)
|
34
|
+
expect(hooks).not_to be_empty
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mangopay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geoffroy Lorieux
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-06-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|