money-open-exchange-rates 0.6.0 → 0.6.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: 41260f2f17ea64c1a2519d473a7c584225a4dd48
4
- data.tar.gz: 06b22a394ddb683769ce63bfd487bc9a621c3941
3
+ metadata.gz: 73bc7cbbe69a86d58f6376c4670c53996aa6675d
4
+ data.tar.gz: 79425bdbc492a05b9070791f919389a5e2f347b0
5
5
  SHA512:
6
- metadata.gz: 83f5bc3cc460e263bcdc3cd691cdac931686239323aa26ebd274f1db89e46ffa8091116e18dee550c3c8da4568f052086559d69fb42a056ea220a13cdfe3ba54
7
- data.tar.gz: f7535398b1e704cc7d65d09efb4595788521c0bd678ebed0ddb00d0fd00a0faba8123459c15d0bb94dd7280087f2add16068be80fbcfec5bd4726357c8b417c0
6
+ metadata.gz: f8d8f3a886a0dfefc7f1172ebd72c81f5353cd96cfaae5477ba6d1c0e16ec2b2c4f546da7bb9cae06a597b3b8919d30eb0b39a0ac3b065fc0e9ca52c6a15bd3a
7
+ data.tar.gz: 1cf0505b5695351d429deff4e42fe762295a259c1d99cd908bfde791bda134867ccf9a662aff0be576d0e9ffd481a32e2d5a9ff2900ebb0884d77913e2315c72
data/History.md CHANGED
@@ -1,4 +1,11 @@
1
1
 
2
+ v0.6.1 / 2016-09-21
3
+ ===================
4
+
5
+ * fix: Ensure correct url for historical api calls
6
+ * fix: Ensure correct url for api calls
7
+ * Add failing test for source_url
8
+
2
9
  v0.6.0 / 2016-09-13
3
10
  ==================
4
11
 
data/README.md CHANGED
@@ -45,6 +45,12 @@ moe.secure_connection = true
45
45
  # set historical date of the rate
46
46
  # see https://openexchangerates.org/documentation#historical-data
47
47
  moe.date = '2015-01-01'
48
+ # (optional)
49
+ # Set the base currency for all rates. By default, USD is used.
50
+ # OpenExchangeRates only allows USD as base currency
51
+ # for the free plan users.
52
+ moe.source = 'USD'
53
+
48
54
  # Store in cache
49
55
  moe.save_rates
50
56
 
@@ -19,10 +19,10 @@ class Money
19
19
  # OpenExchangeRatesBank base class
20
20
  class OpenExchangeRatesBank < Money::Bank::VariableExchange
21
21
  VERSION = ::OpenExchangeRatesBank::VERSION
22
- BASE_URL = 'http://openexchangerates.org/api'.freeze
22
+ BASE_URL = 'http://openexchangerates.org/api/'.freeze
23
23
  # OpenExchangeRates urls
24
24
  OER_URL = URI.join(BASE_URL, 'latest.json')
25
- OER_HISTORICAL_URL = URI.join(BASE_URL, '/historical/')
25
+ OER_HISTORICAL_URL = URI.join(BASE_URL, 'historical/')
26
26
  # OpenExchangeRates secure url
27
27
  SECURE_OER_URL = OER_URL.clone
28
28
  SECURE_OER_URL.scheme = 'https'
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Module for version constant
4
4
  module OpenExchangeRatesBank
5
- VERSION = '0.6.0'.freeze
5
+ VERSION = '0.6.1'.freeze
6
6
  end
@@ -176,6 +176,7 @@ describe Money::Bank::OpenExchangeRatesBank do
176
176
  subject.secure_connection = nil
177
177
  subject.source_url.must_equal historical_url
178
178
  subject.source_url.must_include 'http://'
179
+ subject.source_url.must_include 'api'
179
180
  subject.source_url.must_include 'historical'
180
181
  end
181
182
 
@@ -183,6 +184,7 @@ describe Money::Bank::OpenExchangeRatesBank do
183
184
  subject.secure_connection = false
184
185
  subject.source_url.must_equal historical_url
185
186
  subject.source_url.must_include 'http://'
187
+ subject.source_url.must_include 'api'
186
188
  subject.source_url.must_include 'historical'
187
189
  end
188
190
 
@@ -190,6 +192,7 @@ describe Money::Bank::OpenExchangeRatesBank do
190
192
  subject.secure_connection = true
191
193
  subject.source_url.must_equal historical_secure_url
192
194
  subject.source_url.must_include 'https://'
195
+ subject.source_url.must_include 'api'
193
196
  subject.source_url.must_include 'historical'
194
197
  end
195
198
  end
@@ -207,6 +210,7 @@ describe Money::Bank::OpenExchangeRatesBank do
207
210
  subject.secure_connection = nil
208
211
  subject.source_url.must_equal source_url
209
212
  subject.source_url.must_include 'http://'
213
+ subject.source_url.must_include 'api'
210
214
  subject.source_url.must_include 'latest'
211
215
  end
212
216
 
@@ -214,6 +218,7 @@ describe Money::Bank::OpenExchangeRatesBank do
214
218
  subject.secure_connection = false
215
219
  subject.source_url.must_equal source_url
216
220
  subject.source_url.must_include 'http://'
221
+ subject.source_url.must_include 'api'
217
222
  subject.source_url.must_include 'latest'
218
223
  end
219
224
 
@@ -221,6 +226,7 @@ describe Money::Bank::OpenExchangeRatesBank do
221
226
  subject.secure_connection = true
222
227
  subject.source_url.must_equal source_secure_url
223
228
  subject.source_url.must_include 'https://'
229
+ subject.source_url.must_include 'api'
224
230
  subject.source_url.must_include 'latest'
225
231
  end
226
232
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: money-open-exchange-rates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent Arnoud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-13 00:00:00.000000000 Z
11
+ date: 2016-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: money