omni_exchange 2.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +17 -11
- data/CHANGELOG.md +25 -0
- data/Gemfile.lock +24 -12
- data/README.md +2 -2
- data/lib/omni_exchange/providers/xe.rb +1 -1
- data/lib/omni_exchange/version.rb +1 -1
- data/lib/omni_exchange.rb +2 -2
- data/omni_exchange.gemspec +12 -6
- metadata +73 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6e8b1de49c54fb89a4f175ae3cc73443ad216266e824c5d7ee27ce8e3c7b8ea9
|
|
4
|
+
data.tar.gz: 16867b5584ef935e28663defb324e63574c924f54bfae6b81e6c82c2febe49eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bb757b82db7ce60add7ba8b6042bd2dcba45ea7ea2c337b4c91887a021e5da4f12081c148a2185ddb2913b5a65420779f6860ea9effbd0f443de755859211004
|
|
7
|
+
data.tar.gz: df02b2a5139e2009344e6ad5460f61ab967aa52ae457c7e0a7baa8f0607fa783ca5b262f8a2e4a2d32f4523122566a4092794c0b4aa9713bedd33fd5c16c828e
|
data/.github/workflows/main.yml
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
name: Ruby
|
|
1
|
+
name: Ruby Tests
|
|
2
2
|
|
|
3
|
-
on: [push,pull_request]
|
|
3
|
+
on: [push, pull_request]
|
|
4
4
|
|
|
5
5
|
jobs:
|
|
6
|
-
|
|
6
|
+
test:
|
|
7
|
+
name: Ruby ${{ matrix.ruby-version }}
|
|
7
8
|
runs-on: ubuntu-latest
|
|
9
|
+
strategy:
|
|
10
|
+
matrix:
|
|
11
|
+
ruby-version: ['3.1.1', '3.2.1', '3.3.1', '3.4.1']
|
|
12
|
+
fail-fast: false
|
|
8
13
|
steps:
|
|
9
|
-
- uses: actions/checkout@
|
|
10
|
-
- name: Set up Ruby
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
11
16
|
uses: ruby/setup-ruby@v1
|
|
12
17
|
with:
|
|
13
|
-
ruby-version:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
19
|
+
bundler: '2.5.23'
|
|
20
|
+
- name: Install dependencies
|
|
21
|
+
run: bundle install
|
|
22
|
+
|
|
23
|
+
- name: Run tests
|
|
24
|
+
run: bundle exec rake
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [3.0.1] - 2026-12-01
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Relax the `money` dependency to `>= 6.13.1, < 8` so downstream applications can
|
|
15
|
+
upgrade `money` without a coordinated release. OmniExchange only uses
|
|
16
|
+
`Money::Currency.wrap`, `subunit_to_unit`, and `Money::Currency::UnknownCurrency`,
|
|
17
|
+
all of which are unchanged from 6.13 through 7.x.
|
|
18
|
+
|
|
19
|
+
## [3.0.0] - 2025-01-31
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Updated XE endpoint_url to use an alternative one as per their recommendation.
|
|
24
|
+
- Added dependencies and updated requires that were using ruby's standard library no longer supported since Ruby 3.0.0
|
|
25
|
+
- Supports Ruby versions 3.1, 3.2, 3.3, and 3.4.
|
data/Gemfile.lock
CHANGED
|
@@ -1,28 +1,38 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
omni_exchange (
|
|
4
|
+
omni_exchange (3.0.1)
|
|
5
|
+
base64 (~> 0.2.0)
|
|
6
|
+
bigdecimal (~> 3)
|
|
5
7
|
faraday (~> 2)
|
|
6
|
-
money (
|
|
8
|
+
money (>= 6.13.1, < 8)
|
|
9
|
+
racc (~> 1.4)
|
|
10
|
+
stringio (~> 3.1.2)
|
|
7
11
|
|
|
8
12
|
GEM
|
|
9
13
|
remote: https://rubygems.org/
|
|
10
14
|
specs:
|
|
11
15
|
ast (2.4.2)
|
|
16
|
+
base64 (0.2.0)
|
|
17
|
+
bigdecimal (3.1.9)
|
|
12
18
|
coderay (1.1.3)
|
|
13
|
-
concurrent-ruby (1.
|
|
19
|
+
concurrent-ruby (1.3.5)
|
|
14
20
|
diff-lcs (1.5.0)
|
|
15
21
|
dotenv (2.8.1)
|
|
16
|
-
faraday (2.
|
|
17
|
-
faraday-net_http (>= 2.0, < 3.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
faraday (2.12.2)
|
|
23
|
+
faraday-net_http (>= 2.0, < 3.5)
|
|
24
|
+
json
|
|
25
|
+
logger
|
|
26
|
+
faraday-net_http (3.4.0)
|
|
27
|
+
net-http (>= 0.5.0)
|
|
28
|
+
i18n (1.14.7)
|
|
21
29
|
concurrent-ruby (~> 1.0)
|
|
30
|
+
json (2.9.1)
|
|
31
|
+
logger (1.6.5)
|
|
22
32
|
method_source (1.0.0)
|
|
23
|
-
money (6.
|
|
33
|
+
money (6.19.0)
|
|
24
34
|
i18n (>= 0.6.4, <= 2)
|
|
25
|
-
net-http (0.
|
|
35
|
+
net-http (0.6.0)
|
|
26
36
|
uri
|
|
27
37
|
parallel (1.22.1)
|
|
28
38
|
parser (3.1.2.1)
|
|
@@ -30,6 +40,7 @@ GEM
|
|
|
30
40
|
pry (0.14.1)
|
|
31
41
|
coderay (~> 1.1)
|
|
32
42
|
method_source (~> 1.0)
|
|
43
|
+
racc (1.8.1)
|
|
33
44
|
rainbow (3.1.1)
|
|
34
45
|
rake (12.3.3)
|
|
35
46
|
regexp_parser (2.5.0)
|
|
@@ -59,8 +70,9 @@ GEM
|
|
|
59
70
|
rubocop-ast (1.21.0)
|
|
60
71
|
parser (>= 3.1.1.0)
|
|
61
72
|
ruby-progressbar (1.11.0)
|
|
73
|
+
stringio (3.1.2)
|
|
62
74
|
unicode-display_width (1.8.0)
|
|
63
|
-
uri (0.
|
|
75
|
+
uri (1.0.2)
|
|
64
76
|
vcr (6.1.0)
|
|
65
77
|
|
|
66
78
|
PLATFORMS
|
|
@@ -77,4 +89,4 @@ DEPENDENCIES
|
|
|
77
89
|
vcr
|
|
78
90
|
|
|
79
91
|
BUNDLED WITH
|
|
80
|
-
2.3
|
|
92
|
+
2.6.3
|
data/README.md
CHANGED
|
@@ -90,7 +90,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
90
90
|
|
|
91
91
|
## Contributing
|
|
92
92
|
|
|
93
|
-
Bug reports and issues are welcome on GitHub at https://github.com/
|
|
93
|
+
Bug reports and issues are welcome on GitHub at https://github.com/komoju/omni_exchange. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/komoju/omni_exchange/blob/master/CODE_OF_CONDUCT.md).
|
|
94
94
|
|
|
95
95
|
## License
|
|
96
96
|
|
|
@@ -98,4 +98,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
98
98
|
|
|
99
99
|
## Code of Conduct
|
|
100
100
|
|
|
101
|
-
Everyone interacting in the OmniExchange project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
|
101
|
+
Everyone interacting in the OmniExchange project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/komoju/omni_exchange/blob/master/CODE_OF_CONDUCT.md).
|
|
@@ -4,7 +4,7 @@ require 'omni_exchange'
|
|
|
4
4
|
|
|
5
5
|
module OmniExchange
|
|
6
6
|
class Xe < Provider
|
|
7
|
-
ENDPOINT_URL = 'https://
|
|
7
|
+
ENDPOINT_URL = 'https://xecd-api-ssl.xe.com/'
|
|
8
8
|
|
|
9
9
|
class << self
|
|
10
10
|
# This method returns the exchange rate, the rate at which the smallest unit of one currency (the base currency)
|
data/lib/omni_exchange.rb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require 'omni_exchange/provider'
|
|
4
4
|
# in order to make sure that all API data providers are registered correctly,
|
|
5
|
-
#
|
|
5
|
+
# all of the provider files in the providers folder must be required
|
|
6
6
|
require 'omni_exchange/providers/open_exchange_rates'
|
|
7
7
|
require 'omni_exchange/providers/xe'
|
|
8
8
|
require 'omni_exchange/version'
|
|
@@ -11,7 +11,7 @@ require 'omni_exchange/error'
|
|
|
11
11
|
require 'faraday'
|
|
12
12
|
require 'money'
|
|
13
13
|
require 'json'
|
|
14
|
-
require 'bigdecimal
|
|
14
|
+
require 'bigdecimal'
|
|
15
15
|
require 'net/http'
|
|
16
16
|
|
|
17
17
|
# rubocop:disable Lint/Syntax
|
data/omni_exchange.gemspec
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require_relative 'lib/omni_exchange/version'
|
|
4
4
|
|
|
5
|
+
# rubocop:disable Metrics/BlockLength
|
|
5
6
|
Gem::Specification.new do |spec|
|
|
6
7
|
spec.name = 'omni_exchange'
|
|
7
8
|
spec.version = OmniExchange::VERSION
|
|
@@ -10,15 +11,15 @@ Gem::Specification.new do |spec|
|
|
|
10
11
|
|
|
11
12
|
spec.summary = 'OmniExchange converts currencies using up-to-the-minute foreign exchange rates.'
|
|
12
13
|
spec.description = 'OmniExchange converts currencies using up-to-the-minute foreign exchange rates.'
|
|
13
|
-
spec.homepage = 'https://
|
|
14
|
+
spec.homepage = 'https://komoju.com'
|
|
14
15
|
spec.license = 'MIT'
|
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new('>=
|
|
16
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 3.1')
|
|
16
17
|
|
|
17
18
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
18
19
|
|
|
19
|
-
spec.metadata['homepage_uri'] = 'https://
|
|
20
|
-
spec.metadata['source_code_uri'] = 'https://github.com/
|
|
21
|
-
spec.metadata['changelog_uri'] = 'https://github.com/
|
|
20
|
+
spec.metadata['homepage_uri'] = 'https://komoju.com'
|
|
21
|
+
spec.metadata['source_code_uri'] = 'https://github.com/komoju/omni_exchange'
|
|
22
|
+
spec.metadata['changelog_uri'] = 'https://github.com/komoju/omni_exchange'
|
|
22
23
|
|
|
23
24
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
24
25
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
|
@@ -27,8 +28,12 @@ Gem::Specification.new do |spec|
|
|
|
27
28
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
28
29
|
spec.require_paths = ['lib']
|
|
29
30
|
|
|
31
|
+
spec.add_dependency 'base64', '~> 0.2.0'
|
|
32
|
+
spec.add_dependency 'bigdecimal', '~> 3'
|
|
30
33
|
spec.add_dependency 'faraday', '~> 2'
|
|
31
|
-
spec.add_dependency 'money', '
|
|
34
|
+
spec.add_dependency 'money', '>= 6.13.1', '< 8'
|
|
35
|
+
spec.add_dependency 'racc', '~> 1.4'
|
|
36
|
+
spec.add_dependency 'stringio', '~> 3.1.2'
|
|
32
37
|
|
|
33
38
|
spec.add_development_dependency 'dotenv'
|
|
34
39
|
spec.add_development_dependency 'pry'
|
|
@@ -37,3 +42,4 @@ Gem::Specification.new do |spec|
|
|
|
37
42
|
spec.add_development_dependency 'rubocop', '~> 0.80'
|
|
38
43
|
spec.add_development_dependency 'vcr'
|
|
39
44
|
end
|
|
45
|
+
# rubocop:enable Metrics/BlockLength
|
metadata
CHANGED
|
@@ -1,15 +1,42 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omni_exchange
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yun Chung
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: base64
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: 0.2.0
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: 0.2.0
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: bigdecimal
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - "~>"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '3'
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '3'
|
|
13
40
|
- !ruby/object:Gem::Dependency
|
|
14
41
|
name: faraday
|
|
15
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -28,16 +55,50 @@ dependencies:
|
|
|
28
55
|
name: money
|
|
29
56
|
requirement: !ruby/object:Gem::Requirement
|
|
30
57
|
requirements:
|
|
31
|
-
- - "
|
|
58
|
+
- - ">="
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: 6.13.1
|
|
61
|
+
- - "<"
|
|
62
|
+
- !ruby/object:Gem::Version
|
|
63
|
+
version: '8'
|
|
64
|
+
type: :runtime
|
|
65
|
+
prerelease: false
|
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
67
|
+
requirements:
|
|
68
|
+
- - ">="
|
|
32
69
|
- !ruby/object:Gem::Version
|
|
33
70
|
version: 6.13.1
|
|
71
|
+
- - "<"
|
|
72
|
+
- !ruby/object:Gem::Version
|
|
73
|
+
version: '8'
|
|
74
|
+
- !ruby/object:Gem::Dependency
|
|
75
|
+
name: racc
|
|
76
|
+
requirement: !ruby/object:Gem::Requirement
|
|
77
|
+
requirements:
|
|
78
|
+
- - "~>"
|
|
79
|
+
- !ruby/object:Gem::Version
|
|
80
|
+
version: '1.4'
|
|
34
81
|
type: :runtime
|
|
35
82
|
prerelease: false
|
|
36
83
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
84
|
requirements:
|
|
38
85
|
- - "~>"
|
|
39
86
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
87
|
+
version: '1.4'
|
|
88
|
+
- !ruby/object:Gem::Dependency
|
|
89
|
+
name: stringio
|
|
90
|
+
requirement: !ruby/object:Gem::Requirement
|
|
91
|
+
requirements:
|
|
92
|
+
- - "~>"
|
|
93
|
+
- !ruby/object:Gem::Version
|
|
94
|
+
version: 3.1.2
|
|
95
|
+
type: :runtime
|
|
96
|
+
prerelease: false
|
|
97
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
98
|
+
requirements:
|
|
99
|
+
- - "~>"
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
version: 3.1.2
|
|
41
102
|
- !ruby/object:Gem::Dependency
|
|
42
103
|
name: dotenv
|
|
43
104
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -136,6 +197,7 @@ files:
|
|
|
136
197
|
- ".rspec"
|
|
137
198
|
- ".rubocop.yml"
|
|
138
199
|
- ".rubocop_todo.yml"
|
|
200
|
+
- CHANGELOG.md
|
|
139
201
|
- CODE_OF_CONDUCT.md
|
|
140
202
|
- Gemfile
|
|
141
203
|
- Gemfile.lock
|
|
@@ -152,15 +214,14 @@ files:
|
|
|
152
214
|
- lib/omni_exchange/providers/xe.rb
|
|
153
215
|
- lib/omni_exchange/version.rb
|
|
154
216
|
- omni_exchange.gemspec
|
|
155
|
-
homepage: https://
|
|
217
|
+
homepage: https://komoju.com
|
|
156
218
|
licenses:
|
|
157
219
|
- MIT
|
|
158
220
|
metadata:
|
|
159
221
|
allowed_push_host: https://rubygems.org
|
|
160
|
-
homepage_uri: https://
|
|
161
|
-
source_code_uri: https://github.com/
|
|
162
|
-
changelog_uri: https://github.com/
|
|
163
|
-
post_install_message:
|
|
222
|
+
homepage_uri: https://komoju.com
|
|
223
|
+
source_code_uri: https://github.com/komoju/omni_exchange
|
|
224
|
+
changelog_uri: https://github.com/komoju/omni_exchange
|
|
164
225
|
rdoc_options: []
|
|
165
226
|
require_paths:
|
|
166
227
|
- lib
|
|
@@ -168,15 +229,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
168
229
|
requirements:
|
|
169
230
|
- - ">="
|
|
170
231
|
- !ruby/object:Gem::Version
|
|
171
|
-
version:
|
|
232
|
+
version: '3.1'
|
|
172
233
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
234
|
requirements:
|
|
174
235
|
- - ">="
|
|
175
236
|
- !ruby/object:Gem::Version
|
|
176
237
|
version: '0'
|
|
177
238
|
requirements: []
|
|
178
|
-
rubygems_version: 3.
|
|
179
|
-
signing_key:
|
|
239
|
+
rubygems_version: 3.6.9
|
|
180
240
|
specification_version: 4
|
|
181
241
|
summary: OmniExchange converts currencies using up-to-the-minute foreign exchange
|
|
182
242
|
rates.
|