currency_cloud 0.7 → 0.7.1

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: 9d6cc6e85c0ee4e1d64341df25e70cc470f27e2a
4
- data.tar.gz: fb7dc0195ec0f39ff88d35739dee63e0c5b5a02a
3
+ metadata.gz: 05d3528f511962b03532b5118e6aa1f12e93dee1
4
+ data.tar.gz: 90e96cf501b438ca7f3c93f4b20ee4ba0ac5a16c
5
5
  SHA512:
6
- metadata.gz: f00785918f0a998f708a2dfde29b667f804c019afbb25aae4c2d0af8e37bbd7cbe627f4ee328dd789da163d8670b7e09a37241cb21808dae2302d9f5a5a58d59
7
- data.tar.gz: cc23502771aaa44dfa7ec5610af08279dde6de96cb7ed3df47a526624acbc1f344ad57c9a38cdf38568a535be09f2d3945a2dd3d7b346d6fb92cef01ef528747
6
+ metadata.gz: 8fada2f9e4281e22a143fbe0339f3b0d9379fc18195ac189524c3ea5ddd1ace4709601cb492174e0f6a19f39f902e0a640b50e684296ad2992e4845280cf3331
7
+ data.tar.gz: e2a7fd923bc03e71561a4e70efa055e1aac5226045d6ca1fd51091d7fa7b2cf56337ea5a43cd1da7ee66498c7cb6b0933bcffda41f3907dc0357f1d0485c0f66
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  # Currency Cloud
4
4
 
5
5
  This is the official Ruby SDK for v2 of Currency Cloud's API. Additional documentation
6
- for each API endpoint can be found at [connect.currencycloud.com][connect]
6
+ for each API endpoint can be found at [connect.currencycloud.com][connect]. If you have any queries or you require support, please contact our implementation team at implementation@currencycloud.com.
7
7
 
8
8
  ## Installation
9
9
 
@@ -150,4 +150,4 @@ Copyright (c) 2015 Currency Cloud. See [LICENSE][license] for details.
150
150
  [httparty]: https://github.com/jnunemaker/httparty
151
151
  [json]: https://github.com/intridea/multi_json
152
152
  [semver]: http://semver.org/
153
- [license]: LICENSE.md
153
+ [license]: LICENSE.md
@@ -27,12 +27,12 @@ module CurrencyCloud
27
27
  should_retry = opts[:should_retry].nil? ? true : opts.delete(:should_retry)
28
28
 
29
29
  params = process_params(params)
30
- options = process_options(verb, opts)
31
30
  full_url = build_url(route)
32
31
 
33
32
  response = nil
34
33
  retry_count = should_retry ? 0 : 2
35
34
  while retry_count < 3
35
+ options = process_options(verb, opts)
36
36
  response = yield(full_url, params, options)
37
37
  break unless response.code == 401 && should_retry
38
38
  session.reauthenticate
@@ -40,11 +40,11 @@ module CurrencyCloud
40
40
  def authenticate
41
41
  validate
42
42
  params = {:login_id => login_id, :api_key => api_key}
43
- @token = request.post('authenticate/api', params, :should_retry => false)['auth_token']
43
+ CurrencyCloud.token = @token = request.post('authenticate/api', params, :should_retry => false)['auth_token']
44
44
  end
45
45
 
46
46
  def reauthenticate
47
- token = nil
47
+ CurrencyCloud.token = @token = nil
48
48
  authenticate
49
49
  end
50
50
 
@@ -3,6 +3,6 @@
3
3
  module CurrencyCloud
4
4
 
5
5
  ApiVersion = 'v2' # API Version
6
- Version = '0.7' # Gem Version
6
+ Version = '0.7.1' # Gem Version
7
7
 
8
8
  end
@@ -33,5 +33,8 @@ describe 'Authentication', :vcr => true do
33
33
 
34
34
  response = CurrencyCloud::Beneficiary.find
35
35
  expect(response).to_not be_nil
36
+
37
+ #should have changed after reauthentication
38
+ expect(CurrencyCloud.token).to eq('038022bcd2f372cac7bab448db7b5c3b')
36
39
  end
37
40
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: currency_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.7'
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liam McAndrew
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-05 00:00:00.000000000 Z
12
+ date: 2015-06-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
204
  version: '0'
205
205
  requirements: []
206
206
  rubyforge_project:
207
- rubygems_version: 2.4.5
207
+ rubygems_version: 2.4.6
208
208
  signing_key:
209
209
  specification_version: 4
210
210
  summary: Ruby SDK for the Currency Cloud API