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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8ee60e9e4be478bcf133043dc0964460add92477
4
- data.tar.gz: 9adb1bb50315612ad35daef622299e9ab8f88d6f
3
+ metadata.gz: 62d1fd05f9cca7749256d14345f39d803570131e
4
+ data.tar.gz: 7e6a7b0c24c54dcb5e3ebaabdd082bb066308aa0
5
5
  SHA512:
6
- metadata.gz: 0c88319a7cc682c4c49efd3b144b0858eeebae0e04db3555c07cc3284dc264ce0f28d797dc4e27651e33d276ed32a6f17ee760e7ebe5a8390b88a05e5742329e
7
- data.tar.gz: e5f074fc62347bb9cbfc5642ed316273222f99cba4583b46dfedbf57b79d24683d89c12f86729fc916ec11d0046eac7eb879fef269b6d7d11fe90ddd149de92e
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, '/api/oauth/token', {}, {}, {}, Proc.new do |req|
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'
@@ -1,3 +1,3 @@
1
1
  module MangoPay
2
- VERSION = '3.0.10'
2
+ VERSION = '3.0.11'
3
3
  end
@@ -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.10
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-05-21 00:00:00.000000000 Z
12
+ date: 2014-06-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json