omni_exchange 0.1.0 → 1.1.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
  SHA256:
3
- metadata.gz: 3d30d7e4e3e64ec5ad04a09977b9320fc3fa057b6467522f69e13f8b7449086d
4
- data.tar.gz: ebfc182f603c08030550a23be4348f6126cfaa83cced86bd4af73fe7d2f485df
3
+ metadata.gz: 23f8e6cc867244781c587d8ba217e373dabd00c5bf78710b673d8e6f4b330cb0
4
+ data.tar.gz: fffb0e30a3bb6f953ff6a38afcf821023f0e9f898c91448c29e2a6697153bf5d
5
5
  SHA512:
6
- metadata.gz: 94df50122f3b0f827111c2b8ea5af33fafc4ef3c3202a80b1d8de0170113283f2bcbb2f8216de175bb2e3bb584231e68b5be3687be4185fb3faac73748dd7658
7
- data.tar.gz: e2aaa25ab94143cf25fb3b86ee659df937f75f197e0d48c06d0bb561dd732d7d6eff79ada826dad10accb17589900a1cb74190a7167fb3a931f8ccc39f041e6a
6
+ metadata.gz: a4fe1ff6099ab9d3662f3a4881303e6c3c7d380cfc49c559c09ca39f1a5a918e381fb017c45cb9552e4b7dd35f8c7f52beaa2762898eb84e43e737aa59f7999e
7
+ data.tar.gz: 67d7ae42c4ff478a18669cbbed4ac9c99ac81947402e671e8fec1f072d7e3eeacaf46f18b4570e23b675a7dd34c1ff44b34c051c947aa6a2766e50fc3531755e
data/.gitignore CHANGED
@@ -14,3 +14,6 @@
14
14
  .env
15
15
 
16
16
  sandbox.rb
17
+ omni_exchange-0.1.0.gem
18
+ omni_exchange-0.2.0.gem
19
+ omni_exchange-1.1.0.gem
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2022-06-20 08:25:31 UTC using RuboCop version 0.93.1.
3
+ # on 2022-06-30 01:49:03 UTC using RuboCop version 0.93.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -9,13 +9,13 @@
9
9
  # Offense count: 2
10
10
  # Configuration parameters: IgnoredMethods.
11
11
  Metrics/AbcSize:
12
- Max: 27
12
+ Max: 28
13
13
 
14
14
  # Offense count: 1
15
15
  # Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
16
16
  # ExcludedMethods: refine
17
17
  Metrics/BlockLength:
18
- Max: 26
18
+ Max: 27
19
19
 
20
20
  # Offense count: 1
21
21
  Naming/AccessorMethodName:
@@ -32,14 +32,22 @@ Style/Documentation:
32
32
  - 'lib/omni_exchange/providers/open_exchange_rates.rb'
33
33
  - 'lib/omni_exchange/providers/xe.rb'
34
34
 
35
- # Offense count: 1
35
+ # Offense count: 2
36
36
  # Configuration parameters: EnforcedStyle.
37
37
  # SupportedStyles: scientific, engineering, integral
38
38
  Style/ExponentialNotation:
39
39
  Exclude:
40
40
  - 'spec/omni_exchange_spec.rb'
41
41
 
42
- # Offense count: 13
42
+ # Offense count: 3
43
+ # Cop supports --auto-correct.
44
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
45
+ # SupportedStyles: single_quotes, double_quotes
46
+ Style/StringLiterals:
47
+ Exclude:
48
+ - 'lib/sandbox.rb'
49
+
50
+ # Offense count: 16
43
51
  # Cop supports --auto-correct.
44
52
  # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
45
53
  # URISchemes: http, https
data/Gemfile.lock CHANGED
@@ -1,21 +1,26 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omni_exchange (0.1.0)
5
- faraday
4
+ omni_exchange (1.1.1)
5
+ faraday (= 0.17.4)
6
+ money (~> 6.13.1)
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
9
10
  specs:
10
11
  ast (2.4.2)
11
12
  coderay (1.1.3)
13
+ concurrent-ruby (1.1.10)
12
14
  diff-lcs (1.5.0)
13
15
  dotenv (2.7.6)
14
- faraday (2.3.0)
15
- faraday-net_http (~> 2.0)
16
- ruby2_keywords (>= 0.0.4)
17
- faraday-net_http (2.0.3)
16
+ faraday (0.17.4)
17
+ multipart-post (>= 1.2, < 3)
18
+ i18n (1.10.0)
19
+ concurrent-ruby (~> 1.0)
18
20
  method_source (1.0.0)
21
+ money (6.13.8)
22
+ i18n (>= 0.6.4, <= 2)
23
+ multipart-post (2.2.3)
19
24
  parallel (1.22.1)
20
25
  parser (3.1.2.0)
21
26
  ast (~> 2.4.1)
@@ -51,7 +56,6 @@ GEM
51
56
  rubocop-ast (1.18.0)
52
57
  parser (>= 3.1.1.0)
53
58
  ruby-progressbar (1.11.0)
54
- ruby2_keywords (0.0.5)
55
59
  unicode-display_width (1.8.0)
56
60
  vcr (6.1.0)
57
61
 
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # OmniExchange
2
2
 
3
- OmniExchange converts currencies using up-to-the-minute foreign exchange rates data.
3
+ OmniExchange converts currencies using up-to-the-minute foreign exchange rates.
4
+
5
+ OmniExchange also supports fail-over logic and handles timeouts. In other words, if currency conversion isn't possible because an API data source cannot provide an exchange rate, OR if that data source times out, OmniExchange will retrieve exchange rate data seamlessly from another API data source.
4
6
 
5
7
  ## Installation
6
8
 
@@ -44,24 +46,34 @@ OmniExchange.configure do |config|
44
46
  end
45
47
  ```
46
48
 
47
- #### **Step 3) Convert Currency**
49
+ #### **Step 3) Convert Currency and/or Get An Exchange Rate**
48
50
 
49
- To convert currency, all you have to do is call `OmniExchange.exchange_currency()`. This method requires you to pass the following four named parameters:
50
- 1. amount: (Integer)the amount of the currency you want to convert. NOTE: OmniExchange will read this amount as being the smallest unit of a currency. In other words, if you pass `10` as the amount for USD, OmniExchange will read this as 10 cents, not 10 dollars.
51
+ To convert currency and/or get an exchange rate, all you have to do is call `OmniExchange.get_fx_data()`. This method requires you to pass the following four named parameters:
52
+ 1. amount: (Integer) the amount of the currency you want to convert. NOTE: OmniExchange will read this amount as being the smallest unit of a currency. In other words, if you pass `10` as the amount for USD, OmniExchange will read this as 10 cents, not 10 dollars.
51
53
  2. base_currency: (String) the ISO Currency Code of the currency that you're exchanging from. ie. 'USD', 'JPY'
52
54
  3. target_currency: (String) the ISO Currency Code of the currency that you're exchanging to. ie. 'EUR', 'KRW'
53
- 4. providers: (Array) the keys of the API providers that you want data from in order of preference. ie. [:xe, :open_exchange_rates]
55
+ 4. providers: (Array of Symbols) the keys of the API providers that you want data from in order of preference. ie. [:xe, :open_exchange_rates]
56
+
57
+ What you get back is a hash containing:
58
+ 1. converted_amount: (BigDecimal) the amount of money exchanged from the base currency to the target currency
59
+ 2. exchange_rate: (BigDecimal) the rate used to calculate the converted_amount
60
+ 3. provider_class: (Class) the name of the provider class that supplied the exchange_rate (ie. OmniExchange::OpenExhangeRates)
54
61
 
55
- [For the sake of precise calculation](https://www.bigbinary.com/blog/handling-money-in-ruby), you'll get back a BigDecimal. Simply call `.to_f` to the result if you'd like to see a number that is easier to read.
62
+ [For the sake of precise calculation](https://www.bigbinary.com/blog/handling-money-in-ruby), converted_amount and exchange_rate are BigDecimal. Simply call `.to_f` to the results if you'd like to see a number that is easier to read.
56
63
 
57
64
 
58
- Here is an example. Lets say I want to convert $10.00 US Dollars to Japanese Yen, and I want it converted using exchange rate data from Open Exchange Rates. If Open Exchange Rates fails, I'd like OmniExchange to try to use exchange rate data from Xe as a fallback.
65
+ Here is an example. Lets say I want to convert $1.00 US Dollar to Japanese Yen, and I want it converted using exchange rate data from Open Exchange Rates. If Open Exchange Rates fails, I'd like OmniExchange to try to use exchange rate data from Xe as a fallback.
59
66
 
60
67
  ```ruby
61
- USD_to_JPY = OmniExchange.exchange_currency(amount: 1000, base_currency: "USD", target_currency: "JPY", providers: [:open_exchange_rates, :xe])
68
+ USD_to_JPY = OmniExchange.get_fx_data(amount: 100, base_currency: 'USD', target_currency: 'JPY', providers: [:open_exchange_rates, :xe])
69
+
70
+ puts USD_to_JPY # => { :converted_amount=>0.13566633333e3, :exchange_rate=>0.13566633333e1, :provider_class=>OmniExchange::OpenExchangeRates }
71
+
72
+ puts USD_to_JPY[:converted_amount] # => 0.13566633333e3
73
+ puts USD_to_JPY[:converted_amount].to_f # => 135.66633333
62
74
 
63
- puts USD_to_JPY # => 0.1345807e4
64
- puts USD_to_JPY.to_f # => 1345.807
75
+ puts USD_to_JPY[:exchange_rate] # => 0.13566633333e1
76
+ puts USD_to_JPY[:exchange_rate].to_f # => 1.3566633333
65
77
 
66
78
  ```
67
79
 
@@ -73,7 +85,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
73
85
 
74
86
  ## Contributing
75
87
 
76
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/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/[USERNAME]/omni_exchange/blob/master/CODE_OF_CONDUCT.md).
88
+ Bug reports and issues are welcome on GitHub at https://github.com/degica/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/degica/omni_exchange/blob/master/CODE_OF_CONDUCT.md).
77
89
 
78
90
  ## License
79
91
 
@@ -81,4 +93,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
81
93
 
82
94
  ## Code of Conduct
83
95
 
84
- 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/[USERNAME]/omni_exchange/blob/master/CODE_OF_CONDUCT.md).
96
+ 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/degica/omni_exchange/blob/master/CODE_OF_CONDUCT.md).
data/bin/console CHANGED
@@ -5,8 +5,10 @@ require 'bundler/setup'
5
5
  require 'omni_exchange'
6
6
  require 'dotenv/load'
7
7
  require 'faraday'
8
+ require 'money'
8
9
  require_relative '../lib/omni_exchange/provider'
9
10
  require_relative '../lib/omni_exchange/configuration'
11
+ require_relative '../lib/omni_exchange/error'
10
12
  require_relative '../lib/omni_exchange/providers/xe'
11
13
  require_relative '../lib/omni_exchange/providers/open_exchange_rates'
12
14
 
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OmniExchange
4
+ # A custom error for an unknown or invalid currency
5
+ class UnknownCurrency < StandardError
6
+ end
7
+
8
+ # A custom error for failure to get data from a provider
9
+ class HttpError < StandardError
10
+ end
11
+ end
@@ -4,7 +4,6 @@ module OmniExchange
4
4
  class Provider
5
5
  # @providers is a hash of registered providers that OmniExchange can request exchange rates data from
6
6
  @providers = {}
7
- @currency_data = nil
8
7
 
9
8
  # This method registers providers by adding a provider's name as a key and a provider class as a value to
10
9
  # @providers. This happens automatically on load at the top of the lib/omni_exchange.rb file when each
@@ -43,18 +42,13 @@ module OmniExchange
43
42
 
44
43
  # Some currencies, such as the US dollar, have subunits (ie. cents). Therefore, to make sure that currencies are
45
44
  # exchanged accurately, a currency's subunit needs to be taken into account, and that's what this method does.
46
- # Subunit data of currencies is stored as @currency_data after being read from the currency_data.json file.
45
+ # Subunit data is easily found through use of the RubyMoney gem.
47
46
  #
48
47
  # @param base_currency [String] the ISO Currency Code of the currency that you're exchanging from. A check is done
49
48
  # on this currency to see if it has subunits (such as the US dollar having cents). ie. "USD", "JPY"
50
- # @return [Float] the amount an exchange rate should be multiplied by to account for subunits
49
+ # @return [Float] the amount an exchange rate should be multiplied by to account for a currency's potential subunits
51
50
  def self.get_currency_unit(base_currency)
52
- return 1.0 / @currency_data[base_currency.downcase]['subunit_to_unit'] if @currency_data
53
-
54
- file = File.read(File.join(File.dirname(__FILE__), './currency_data.json'))
55
- @currency_data = JSON.parse(file)
56
-
57
- 1.0 / @currency_data[base_currency.downcase]['subunit_to_unit']
51
+ 1.0 / Money::Currency.wrap(base_currency).subunit_to_unit
58
52
  end
59
53
  end
60
54
  end
@@ -19,9 +19,7 @@ module OmniExchange
19
19
  config = OmniExchange.configuration.provider_config[:open_exchange_rates]
20
20
  app_id = config[:app_id]
21
21
 
22
- api = Faraday.new(ENDPOINT_URL) do |conn|
23
- conn.response :json, parser_options: { symbolize_names: true }
24
- end
22
+ api = Faraday.new(OmniExchange::OpenExchangeRates::ENDPOINT_URL)
25
23
 
26
24
  begin
27
25
  response = api.get do |req|
@@ -32,11 +30,12 @@ module OmniExchange
32
30
  rescue Faraday::Error, Faraday::ConnectionFailed => e
33
31
  raise e.class, 'Open Exchange Rates has timed out.'
34
32
  end
35
- exchange_rate = response.body[:rates][target_currency.to_sym].to_d
36
33
 
37
- currency_unit = get_currency_unit(base_currency)
34
+ exchange_rate = JSON.parse(response.body, symbolize_names: true)[:rates][target_currency.to_sym].to_d
35
+
36
+ currency_unit = get_currency_unit(base_currency).to_d
38
37
 
39
- exchange_rate * currency_unit
38
+ (exchange_rate * currency_unit).to_d
40
39
  end
41
40
 
42
41
  # when this file is required at the top of lib/omni_exchange.rb, this method call is run and allows
@@ -21,9 +21,9 @@ module OmniExchange
21
21
  api_key = config[:api_key]
22
22
  currency_unit = get_currency_unit(base_currency)
23
23
 
24
- api = Faraday.new(ENDPOINT_URL) do |conn|
25
- conn.request :authorization, :basic, api_id, api_key
26
- conn.response :json, parser_options: { symbolize_names: true }
24
+ api = Faraday.new(OmniExchange::Xe::ENDPOINT_URL) do |f|
25
+ f.request :basic_auth, api_id, api_key
26
+ f.adapter :net_http
27
27
  end
28
28
 
29
29
  begin
@@ -36,7 +36,7 @@ module OmniExchange
36
36
  raise e.class, 'xe.com has timed out.'
37
37
  end
38
38
 
39
- response.body[:to][0][:mid].to_d
39
+ JSON.parse(response.body, symbolize_names: true)[:to][0][:mid].to_d
40
40
  end
41
41
 
42
42
  # when this file is required at the top of lib/omni_exchange.rb, this method call is run and allows
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OmniExchange
4
- VERSION = '0.1.0'
4
+ VERSION = '1.1.1'
5
5
  end
data/lib/omni_exchange.rb CHANGED
@@ -1,13 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # requires all of the provider files in the providers folder
4
- # which then allows the providers to be registered
5
- Dir['omni_exchange/providers/*.rb'].each do |file|
6
- require_relative file
7
- end
3
+ require 'omni_exchange/provider'
4
+ # in order to make sure that all API data providers are registered correctly,
5
+ # all of the provider files in the providers folder must be required
6
+ require 'omni_exchange/providers/open_exchange_rates'
7
+ require 'omni_exchange/providers/xe'
8
8
  require 'omni_exchange/version'
9
9
  require 'omni_exchange/configuration'
10
+ require 'omni_exchange/error'
10
11
  require 'faraday'
12
+ require 'money'
11
13
  require 'json'
12
14
  require 'bigdecimal/util'
13
15
 
@@ -32,8 +34,9 @@ module OmniExchange
32
34
 
33
35
  module_function
34
36
 
35
- # returns the amount of money in one country's currency when exchanged from an amount of money of another country's
36
- # currency using exchange rates data from API providers
37
+ # returns foreign exchange data including the amount of money in one country's currency when exchanged from an
38
+ # amount of money of another country's currency using exchange rates data from API providers, the exchange
39
+ # rate used to calculate that amount, and the API provider that supplied that rate.
37
40
  #
38
41
  # @param amount: [Integer, #to_d] the amount to exchange (in cents, if applicable to the currency). ie. 1, 10, 100
39
42
  # @param base_currency: [String] the ISO Currency Code of the currency that you're exchanging from. ie. "USD", "JPY"
@@ -41,11 +44,24 @@ module OmniExchange
41
44
  # @param providers: [Array] an array of symbols of the providers that will be used to get exchange rates API
42
45
  # data. The symbols must be found in the @providers hash in the Provider class (lib/omni_exchange/provider.rb).
43
46
  # ie. xe:, :open_exchange_rates
44
- # @return [BigDecimal] the amount of the base currency exchanged to the target currency using an exchange rate
47
+ # @return [Hash] If all of the providers in the providers hash fail to retrieve data, or if one of the currencies
48
+ # is not valid, an exception is raised.
49
+ # * :converted_amount [BigDecimal] the amount of money exchanged from the base currency to the target
50
+ # currency as a BigDecimal for precice calculation. ie. 1, 10, 100
51
+ # * :exchange_rate [BigDecimal] the rate used to calculate the converted_amount as a BigDecimal. ie. 0.95211e1
52
+ # * :provider_class [Class] the provider class that supplied the exchange_rate data. ie. OmniExchange::Xe
53
+ #the amount of the base currency exchanged to the target currency using an exchange rate
45
54
  # provided by one of the data providers in the providers hash. The final amount is returned as a BigDecimal
46
- # for precise calculation. If all of the providers in the providers hash fail to retrieve data,
47
- # an exception is raised.
48
- def exchange_currency(amount:, base_currency:, target_currency:, providers:)
55
+ # for precise calculation. If all of the providers in the providers hash fail to retrieve data, an exception is raised.
56
+ def get_fx_data(amount:, base_currency:, target_currency:, providers:)
57
+ # if one of the currencies is not valid (ie. 'fake_crypto'), an exception is raised.
58
+ begin
59
+ Money::Currency.wrap(base_currency)
60
+ Money::Currency.wrap(target_currency)
61
+ rescue Money::Currency::UnknownCurrency => exception
62
+ raise OmniExchange::UnknownCurrency, "#{exception}"
63
+ end
64
+
49
65
  error_messages = []
50
66
 
51
67
  # Make sure all providers passed exist. If not, a LoadError is raise and not rescued
@@ -54,13 +70,15 @@ module OmniExchange
54
70
  # Gracefully hit each provider and fail-over to the next one
55
71
  provider_classes.each do |klass|
56
72
  rate = klass.get_exchange_rate(base_currency: base_currency, target_currency: target_currency)
57
-
58
- return rate * amount.to_d
73
+
74
+ exchanged_amount = rate.to_d * amount.to_d
75
+
76
+ return { converted_amount: exchanged_amount, exchange_rate: rate, provider_class: klass }
59
77
  rescue Faraday::Error, Faraday::ConnectionFailed => e
60
78
  error_messages << e.inspect
61
79
  end
62
80
 
63
- raise "Failed to load #{base_currency}->#{target_currency}:\n#{exception_messages.join("\n")}"
81
+ raise OmniExchange::HttpError, "Failed to load #{base_currency}->#{target_currency}:\n#{error_messages.join("\n")}"
64
82
  end
65
83
  end
66
84
  # rubocop:enable Lint/Syntax
@@ -8,17 +8,17 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ['Yun Chung']
9
9
  spec.email = ['yunseok_chung@degica.com']
10
10
 
11
- spec.summary = 'Write a short summary, because RubyGems requires one.'
12
- spec.description = 'Write a longer description or delete this line.'
11
+ spec.summary = 'OmniExchange converts currencies using up-to-the-minute foreign exchange rates.'
12
+ spec.description = 'OmniExchange converts currencies using up-to-the-minute foreign exchange rates.'
13
13
  spec.homepage = 'https://degica.com'
14
14
  spec.license = 'MIT'
15
15
  spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
16
16
 
17
17
  spec.metadata['allowed_push_host'] = 'https://rubygems.org'
18
18
 
19
- spec.metadata['homepage_uri'] = spec.homepage
20
- spec.metadata['source_code_uri'] = 'https://degica.com'
21
- spec.metadata['changelog_uri'] = 'https://degica.com'
19
+ spec.metadata['homepage_uri'] = 'https://degica.com'
20
+ spec.metadata['source_code_uri'] = 'https://github.com/degica/omni_exchange'
21
+ spec.metadata['changelog_uri'] = 'https://github.com/degica/omni_exchange'
22
22
 
23
23
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
24
24
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
@@ -27,7 +27,8 @@ Gem::Specification.new do |spec|
27
27
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ['lib']
29
29
 
30
- spec.add_dependency 'faraday'
30
+ spec.add_dependency 'faraday', '0.17.4'
31
+ spec.add_dependency 'money', '~> 6.13.1'
31
32
 
32
33
  spec.add_development_dependency 'dotenv'
33
34
  spec.add_development_dependency 'pry'
metadata CHANGED
@@ -1,29 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omni_exchange
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yun Chung
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-21 00:00:00.000000000 Z
11
+ date: 2022-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 0.17.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 0.17.4
27
+ - !ruby/object:Gem::Dependency
28
+ name: money
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 6.13.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 6.13.1
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: dotenv
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -108,7 +122,8 @@ dependencies:
108
122
  - - ">="
109
123
  - !ruby/object:Gem::Version
110
124
  version: '0'
111
- description: Write a longer description or delete this line.
125
+ description: OmniExchange converts currencies using up-to-the-minute foreign exchange
126
+ rates.
112
127
  email:
113
128
  - yunseok_chung@degica.com
114
129
  executables: []
@@ -131,7 +146,7 @@ files:
131
146
  - bin/setup
132
147
  - lib/omni_exchange.rb
133
148
  - lib/omni_exchange/configuration.rb
134
- - lib/omni_exchange/currency_data.json
149
+ - lib/omni_exchange/error.rb
135
150
  - lib/omni_exchange/provider.rb
136
151
  - lib/omni_exchange/providers/open_exchange_rates.rb
137
152
  - lib/omni_exchange/providers/xe.rb
@@ -143,8 +158,8 @@ licenses:
143
158
  metadata:
144
159
  allowed_push_host: https://rubygems.org
145
160
  homepage_uri: https://degica.com
146
- source_code_uri: https://degica.com
147
- changelog_uri: https://degica.com
161
+ source_code_uri: https://github.com/degica/omni_exchange
162
+ changelog_uri: https://github.com/degica/omni_exchange
148
163
  post_install_message:
149
164
  rdoc_options: []
150
165
  require_paths:
@@ -160,8 +175,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
175
  - !ruby/object:Gem::Version
161
176
  version: '0'
162
177
  requirements: []
163
- rubygems_version: 3.1.6
178
+ rubygems_version: 3.2.3
164
179
  signing_key:
165
180
  specification_version: 4
166
- summary: Write a short summary, because RubyGems requires one.
181
+ summary: OmniExchange converts currencies using up-to-the-minute foreign exchange
182
+ rates.
167
183
  test_files: []