eu_central_bank 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -1
  3. data/lib/eu_central_bank.rb +8 -0
  4. metadata +15 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aeadb8640042ade93683dac9ddbc947c7c66ed16
4
- data.tar.gz: 5c34589c315bc85256e7941088766cccd81d9d13
3
+ metadata.gz: 7318fee2d51ebfaba017f8b3a1bbf1a8d7650452
4
+ data.tar.gz: 21e1a56bf8dd99191867b2b2f062238d029106f5
5
5
  SHA512:
6
- metadata.gz: 5b5cf0bec442e68296d6315781d66529fcea7e6a0e8cb99f7b6e7205b2a020cf8fed2b72d91482f831915f41365971f4212311f6da330c6fe2279461ecaa9ca2
7
- data.tar.gz: 91def2e01d73372d6572c0f77476e75b17e773613e080e63b6349fca3d0a86c9939ccb8b5400427067cc7ff37560a26705ec5101378e792f34113f9f9fd4006e
6
+ metadata.gz: 9a534efd86f56b65d10cc63aaff07d106e7dcc88afae3c6d55849fcefc0368206f8c52722f3c85e257442ad1b3735c6b7ffdf262acf9cb4029521584ee137b0e
7
+ data.tar.gz: 2f5a6c41d30c96fa09dd5404c9b7d8bd18384a09dbfede9f8f23d2d51ecf946dad95231580ca6021287a419bbc1b1634bfa3351655fc8624a8cdaccc9baef636
@@ -1,6 +1,10 @@
1
1
  # eu_central_bank changelog
2
2
 
3
- ## 1.1.1 (Jan 19 2017)
3
+ ## 1.1.2 (Mar 24 2017)
4
+
5
+ * Update nokogiri dependency to 1.7.1 to avoid vulnerability
6
+
7
+ ## 1.1.1 (Jan 28 2017)
4
8
 
5
9
  * Fix nokogiri dependency issue with ruby 2.4.0
6
10
 
@@ -63,6 +63,14 @@ class EuCentralBank < Money::Bank::VariableExchange
63
63
  from_base_rate = get_rate("EUR", from.currency.to_s, date)
64
64
  to_base_rate = get_rate("EUR", to_currency, date)
65
65
  end
66
+
67
+ unless from_base_rate && to_base_rate
68
+ message = "No conversion rate known for '#{from.currency.iso_code}' -> '#{to_currency}'"
69
+ message << " on #{date.to_s}" if date
70
+
71
+ raise Money::Bank::UnknownRate, message
72
+ end
73
+
66
74
  rate = to_base_rate / from_base_rate
67
75
  end
68
76
 
metadata CHANGED
@@ -1,61 +1,61 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eu_central_bank
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Emmons
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-28 00:00:00.000000000 Z
11
+ date: 2017-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.6.3
20
- - - <
20
+ - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '2.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - '>='
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: 1.6.3
30
- - - <
30
+ - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: money
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ~>
37
+ - - "~>"
38
38
  - !ruby/object:Gem::Version
39
39
  version: 6.8.0
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ~>
44
+ - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 6.8.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ~>
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: 3.5.0
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ~>
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: 3.5.0
61
61
  description: This gem reads exchange rates from the european central bank website.
@@ -66,11 +66,11 @@ executables: []
66
66
  extensions: []
67
67
  extra_rdoc_files: []
68
68
  files:
69
- - lib/eu_central_bank.rb
70
- - lib/money/rates_store/eu_central_bank_historical_data_support.rb
71
69
  - CHANGELOG.md
72
70
  - LICENSE
73
71
  - README.md
72
+ - lib/eu_central_bank.rb
73
+ - lib/money/rates_store/eu_central_bank_historical_data_support.rb
74
74
  homepage: https://github.com/RubyMoney/eu_central_bank
75
75
  licenses: []
76
76
  metadata: {}
@@ -80,17 +80,17 @@ require_paths:
80
80
  - lib
81
81
  required_ruby_version: !ruby/object:Gem::Requirement
82
82
  requirements:
83
- - - '>='
83
+ - - ">="
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - '>='
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  requirements: []
92
92
  rubyforge_project:
93
- rubygems_version: 2.0.14.1
93
+ rubygems_version: 2.6.8
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: Calculates exchange rates based on rates from european central bank. Money