ambito 0.2.1 → 0.4.0
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/.standard.yml +1 -0
- data/CHANGELOG.md +31 -0
- data/README.md +40 -16
- data/config/dollars.yml +14 -6
- data/lib/ambito/cli.rb +12 -4
- data/lib/ambito/dollar.rb +2 -10
- data/lib/ambito/gateway.rb +35 -9
- data/lib/ambito/price.rb +5 -11
- data/lib/ambito/rate.rb +12 -12
- data/lib/ambito/variation.rb +2 -14
- data/lib/ambito/version.rb +1 -1
- data/lib/ambito.rb +16 -3
- metadata +37 -39
- data/ambito.gemspec +0 -37
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ba13c62509e998895ea6d8170afc1cddd920cef11c5ba305a02a9e50c6b4b02b
|
|
4
|
+
data.tar.gz: 96c3c0fe54b4df10100e70e973e850e9222bd806cfe3c09926c8c90cffffb87a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d50f0ff5ae9f3d98d89c5bda8d0da55bef92e4ba1d562451138ef4ab5a02baa23a00edb60bd073830f6d50838eb33f29ed6b9d6d92a298bbdc05d4837744007a
|
|
7
|
+
data.tar.gz: ebc64d79fb35f9417214d0a877281e6fc5bf90f7f038ab88f4d7f7c68786d4a5d9adb60e80849a3dc2b1cc7a219175321edd2097c1b643e3812e0fc3e3744069
|
data/.standard.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ruby_version: 3.3.0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.4.0] - 2026-11-20
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `Rate` exposes `dollar`, `buy`, `sell`, `price` and `variation`
|
|
8
|
+
- `Ambito::Error`, raised for an unknown dollar, an HTTP error or a response that cannot be read
|
|
9
|
+
- The CLI prints the error message and exits with status 1
|
|
10
|
+
- `Price#/`
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- `Gateway.new` takes a `Dollar`, and `Gateway#rate` returns a `Rate`; `Gateway#get` is removed
|
|
15
|
+
- `Price.new` and `Variation.new` take numbers instead of strings
|
|
16
|
+
- `Price#+` returns a `Price` instead of a `Float`
|
|
17
|
+
- `Ambito.rates` raises `Ambito::Error` if any rate fails
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
|
|
21
|
+
- `Dollar#rate`; use `Ambito.rate` or `Gateway#rate`
|
|
22
|
+
- `Price.[]` and `Variation.[]`; use `.new`
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- A response with a missing field no longer prints `$ 0.00`
|
|
27
|
+
|
|
28
|
+
## [0.3.0] - 2023-11-27
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- Multi-threaded requests
|
|
33
|
+
|
|
3
34
|
## [0.2.1] - 2023-11-27
|
|
4
35
|
|
|
5
36
|
### Fixed
|
data/README.md
CHANGED
|
@@ -1,34 +1,58 @@
|
|
|
1
1
|
# Ambito
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ambito`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
3
|
+
Real-time USD exchange rates from Argentina's [Ambito Financiero](https://mercados.ambito.com).
|
|
6
4
|
|
|
7
5
|
## Installation
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
```
|
|
8
|
+
gem install ambito
|
|
9
|
+
```
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Or add to your Gemfile:
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
```ruby
|
|
14
|
+
gem "ambito"
|
|
15
|
+
```
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
## Usage
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
### Ruby
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
```ruby
|
|
22
|
+
# Fetch all rates (threaded)
|
|
23
|
+
Ambito.rates
|
|
24
|
+
|
|
25
|
+
# Fetch a single rate
|
|
26
|
+
rate = Ambito.rate("oficial")
|
|
27
|
+
|
|
28
|
+
rate.to_s # => "Oficial: $ 365.38 📈 0.23%"
|
|
29
|
+
rate.buy.quote # => 355.38
|
|
30
|
+
rate.sell.quote # => 375.38
|
|
31
|
+
rate.price.quote # => 365.38
|
|
32
|
+
rate.variation.value # => 0.23
|
|
33
|
+
```
|
|
20
34
|
|
|
21
|
-
|
|
35
|
+
`price` is the value Ámbito publishes for the rate, or the average of buy and sell when it publishes none.
|
|
22
36
|
|
|
23
|
-
|
|
37
|
+
Both methods raise `Ambito::Error` for an unknown dollar, an HTTP error or a response that cannot be read. `Ambito.rates` raises if any one rate fails.
|
|
24
38
|
|
|
25
|
-
|
|
39
|
+
### CLI
|
|
26
40
|
|
|
27
|
-
|
|
41
|
+
```
|
|
42
|
+
ambito # all rates
|
|
43
|
+
ambito -d oficial # single rate
|
|
44
|
+
```
|
|
28
45
|
|
|
29
|
-
##
|
|
46
|
+
## Supported Dollar Types
|
|
30
47
|
|
|
31
|
-
|
|
48
|
+
| Name | Key |
|
|
49
|
+
|------|-----|
|
|
50
|
+
| Oficial | `oficial` |
|
|
51
|
+
| Informal (Blue) | `informal` |
|
|
52
|
+
| MEP | `mep` |
|
|
53
|
+
| CCL | `ccl` |
|
|
54
|
+
| Cripto | `cripto` |
|
|
55
|
+
| Turista | `turista` |
|
|
32
56
|
|
|
33
57
|
## License
|
|
34
58
|
|
|
@@ -36,4 +60,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
36
60
|
|
|
37
61
|
## Code of Conduct
|
|
38
62
|
|
|
39
|
-
Everyone interacting in the Ambito project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
|
63
|
+
Everyone interacting in the Ambito project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/arzezak/ambito/blob/main/CODE_OF_CONDUCT.md).
|
data/config/dollars.yml
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
- !ruby/object:Ambito::Dollar
|
|
2
|
-
name:
|
|
3
|
-
display:
|
|
4
|
-
endpoint: /
|
|
2
|
+
name: ccl
|
|
3
|
+
display: CCL
|
|
4
|
+
endpoint: /dolarrava/cl/variacion
|
|
5
|
+
- !ruby/object:Ambito::Dollar
|
|
6
|
+
name: cripto
|
|
7
|
+
display: Cripto
|
|
8
|
+
endpoint: /dolarcripto/variacion
|
|
5
9
|
- !ruby/object:Ambito::Dollar
|
|
6
10
|
name: informal
|
|
7
11
|
display: Informal
|
|
@@ -11,6 +15,10 @@
|
|
|
11
15
|
display: MEP
|
|
12
16
|
endpoint: /dolarrava/mep/variacion
|
|
13
17
|
- !ruby/object:Ambito::Dollar
|
|
14
|
-
name:
|
|
15
|
-
display:
|
|
16
|
-
endpoint: /
|
|
18
|
+
name: oficial
|
|
19
|
+
display: Oficial
|
|
20
|
+
endpoint: /dolar/oficial/variacion
|
|
21
|
+
- !ruby/object:Ambito::Dollar
|
|
22
|
+
name: turista
|
|
23
|
+
display: Turista
|
|
24
|
+
endpoint: /dolarturista/variacion
|
data/lib/ambito/cli.rb
CHANGED
|
@@ -7,20 +7,28 @@ module Ambito
|
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def run
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
case options
|
|
11
|
+
in {dollar:}
|
|
12
|
+
puts Ambito.rate(dollar)
|
|
13
|
+
in {version: true}
|
|
14
|
+
puts Ambito::VERSION
|
|
12
15
|
else
|
|
13
16
|
puts Ambito.rates
|
|
14
17
|
end
|
|
18
|
+
rescue Error => e
|
|
19
|
+
abort e.message
|
|
15
20
|
end
|
|
16
21
|
|
|
17
22
|
private
|
|
18
23
|
|
|
19
24
|
def options
|
|
20
|
-
|
|
25
|
+
{}.tap do |parsed_options|
|
|
21
26
|
OptionParser.new do |options|
|
|
22
27
|
options.on("-d", "--dollar DOLLAR", "Select the rate") do |dollar|
|
|
23
|
-
parsed_options
|
|
28
|
+
parsed_options[:dollar] = dollar
|
|
29
|
+
end
|
|
30
|
+
options.on("-v", "--version", "Show version") do
|
|
31
|
+
parsed_options[:version] = true
|
|
24
32
|
end
|
|
25
33
|
end.parse(@argv)
|
|
26
34
|
end
|
data/lib/ambito/dollar.rb
CHANGED
|
@@ -15,13 +15,6 @@ module Ambito
|
|
|
15
15
|
@endpoint = endpoint
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def rate
|
|
19
|
-
gateway = Gateway.new(endpoint:)
|
|
20
|
-
buy, sell, value, variation = gateway.get("compra", "venta", "valor", "variacion")
|
|
21
|
-
|
|
22
|
-
Rate.new(dollar: self, buy:, sell:, value:, variation:)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
18
|
def to_s
|
|
26
19
|
display
|
|
27
20
|
end
|
|
@@ -32,9 +25,8 @@ module Ambito
|
|
|
32
25
|
end
|
|
33
26
|
|
|
34
27
|
def find(name)
|
|
35
|
-
LIST.find
|
|
36
|
-
dollar
|
|
37
|
-
end
|
|
28
|
+
LIST.find { |dollar| dollar.name == String(name) } ||
|
|
29
|
+
raise(Error, "Unknown dollar: #{name}")
|
|
38
30
|
end
|
|
39
31
|
end
|
|
40
32
|
end
|
data/lib/ambito/gateway.rb
CHANGED
|
@@ -7,24 +7,50 @@ module Ambito
|
|
|
7
7
|
class Gateway
|
|
8
8
|
BASE_URL = "https://mercados.ambito.com"
|
|
9
9
|
|
|
10
|
-
def initialize(
|
|
11
|
-
@
|
|
10
|
+
def initialize(dollar)
|
|
11
|
+
@dollar = dollar
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def
|
|
15
|
-
|
|
14
|
+
def rate
|
|
15
|
+
Rate.new(
|
|
16
|
+
dollar:,
|
|
17
|
+
buy: number("compra"),
|
|
18
|
+
sell: number("venta"),
|
|
19
|
+
value: (number("valor") if payload.key?("valor")),
|
|
20
|
+
variation: number("variacion")
|
|
21
|
+
)
|
|
16
22
|
end
|
|
17
23
|
|
|
18
24
|
private
|
|
19
25
|
|
|
20
|
-
attr_reader :
|
|
26
|
+
attr_reader :dollar
|
|
21
27
|
|
|
22
|
-
def
|
|
23
|
-
|
|
28
|
+
def number(field)
|
|
29
|
+
parse(payload[field]) || raise(Error, "#{dollar}: bad #{field} in response")
|
|
24
30
|
end
|
|
25
31
|
|
|
26
|
-
def
|
|
27
|
-
|
|
32
|
+
def parse(text)
|
|
33
|
+
Float(String(text).tr(",", ".").delete_suffix("%"), exception: false)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def payload
|
|
37
|
+
@payload ||= Hash.try_convert(json) || raise(Error, "#{dollar}: unexpected response")
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def json
|
|
41
|
+
JSON.parse(body)
|
|
42
|
+
rescue JSON::ParserError
|
|
43
|
+
nil
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def body
|
|
47
|
+
raise Error, "#{dollar}: HTTP #{response.code}" unless response.is_a?(Net::HTTPSuccess)
|
|
48
|
+
|
|
49
|
+
response.body
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def response
|
|
53
|
+
@response ||= Net::HTTP.get_response(URI.join(BASE_URL, dollar.endpoint))
|
|
28
54
|
end
|
|
29
55
|
end
|
|
30
56
|
end
|
data/lib/ambito/price.rb
CHANGED
|
@@ -3,25 +3,19 @@ module Ambito
|
|
|
3
3
|
attr_reader :quote
|
|
4
4
|
|
|
5
5
|
def initialize(quote)
|
|
6
|
-
@quote =
|
|
6
|
+
@quote = quote
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def +(other)
|
|
10
|
-
quote + other.quote
|
|
10
|
+
self.class.new(quote + other.quote)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
def
|
|
14
|
-
|
|
13
|
+
def /(other)
|
|
14
|
+
self.class.new(quote / other)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def to_s
|
|
18
|
-
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
class << self
|
|
22
|
-
def [](quote)
|
|
23
|
-
quote && new(quote) || nil
|
|
24
|
-
end
|
|
18
|
+
"$ %.2f" % quote
|
|
25
19
|
end
|
|
26
20
|
end
|
|
27
21
|
end
|
data/lib/ambito/rate.rb
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
module Ambito
|
|
2
2
|
class Rate
|
|
3
|
-
|
|
3
|
+
attr_reader :dollar, :buy, :sell, :variation
|
|
4
4
|
|
|
5
|
-
def initialize(dollar:, buy:, sell:,
|
|
5
|
+
def initialize(dollar:, buy:, sell:, variation:, value: nil)
|
|
6
6
|
@dollar = dollar
|
|
7
|
-
@buy = Price
|
|
8
|
-
@sell = Price
|
|
9
|
-
@value = Price
|
|
10
|
-
@variation = Variation
|
|
7
|
+
@buy = Price.new(buy)
|
|
8
|
+
@sell = Price.new(sell)
|
|
9
|
+
@value = value && Price.new(value)
|
|
10
|
+
@variation = Variation.new(variation)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def price
|
|
14
|
+
value || average
|
|
11
15
|
end
|
|
12
16
|
|
|
13
17
|
def average
|
|
14
|
-
|
|
18
|
+
(buy + sell) / 2
|
|
15
19
|
end
|
|
16
20
|
|
|
17
21
|
def to_s
|
|
@@ -20,10 +24,6 @@ module Ambito
|
|
|
20
24
|
|
|
21
25
|
private
|
|
22
26
|
|
|
23
|
-
attr_reader :
|
|
24
|
-
|
|
25
|
-
def price
|
|
26
|
-
value || average
|
|
27
|
-
end
|
|
27
|
+
attr_reader :value
|
|
28
28
|
end
|
|
29
29
|
end
|
data/lib/ambito/variation.rb
CHANGED
|
@@ -5,11 +5,11 @@ module Ambito
|
|
|
5
5
|
attr_reader :value
|
|
6
6
|
|
|
7
7
|
def initialize(value)
|
|
8
|
-
@value =
|
|
8
|
+
@value = value
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def to_s
|
|
12
|
-
|
|
12
|
+
"%.2f%%" % value
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def trend
|
|
@@ -21,17 +21,5 @@ module Ambito
|
|
|
21
21
|
TRENDS[:equal]
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
|
-
|
|
25
|
-
private
|
|
26
|
-
|
|
27
|
-
def parse(value)
|
|
28
|
-
value.tr(",", ".").to_f
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
class << self
|
|
32
|
-
def [](value)
|
|
33
|
-
new(value)
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
24
|
end
|
|
37
25
|
end
|
data/lib/ambito/version.rb
CHANGED
data/lib/ambito.rb
CHANGED
|
@@ -9,13 +9,26 @@ require_relative "ambito/variation"
|
|
|
9
9
|
require_relative "ambito/version"
|
|
10
10
|
|
|
11
11
|
module Ambito
|
|
12
|
+
Error = Class.new(StandardError)
|
|
13
|
+
|
|
12
14
|
class << self
|
|
13
15
|
def rates
|
|
14
|
-
Dollar.all.map
|
|
16
|
+
Dollar.all.map do |dollar|
|
|
17
|
+
Thread.new do
|
|
18
|
+
Thread.current.report_on_exception = false
|
|
19
|
+
fetch(dollar)
|
|
20
|
+
end
|
|
21
|
+
end.map(&:value)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def rate(name)
|
|
25
|
+
fetch(Dollar.find(name))
|
|
15
26
|
end
|
|
16
27
|
|
|
17
|
-
|
|
18
|
-
|
|
28
|
+
private
|
|
29
|
+
|
|
30
|
+
def fetch(dollar)
|
|
31
|
+
Gateway.new(dollar).rate
|
|
19
32
|
end
|
|
20
33
|
end
|
|
21
34
|
end
|
metadata
CHANGED
|
@@ -1,64 +1,62 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ambito
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
- Ariel Rzezak
|
|
8
|
-
autorequire:
|
|
7
|
+
- Ariel Rzezak
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies: []
|
|
13
|
-
description: A Ruby gem for retrieving real-time USD exchange rates and financial
|
|
14
|
-
data.
|
|
12
|
+
description: A Ruby gem for retrieving real-time USD exchange rates and financial data.
|
|
15
13
|
email:
|
|
16
|
-
- arzezak@gmail.com
|
|
14
|
+
- arzezak@gmail.com
|
|
17
15
|
executables:
|
|
18
|
-
- ambito
|
|
16
|
+
- ambito
|
|
19
17
|
extensions: []
|
|
20
18
|
extra_rdoc_files: []
|
|
21
19
|
files:
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
- config/dollars.yml
|
|
29
|
-
- exe/ambito
|
|
30
|
-
- lib/ambito.rb
|
|
31
|
-
- lib/ambito/cli.rb
|
|
32
|
-
- lib/ambito/dollar.rb
|
|
33
|
-
- lib/ambito/gateway.rb
|
|
34
|
-
- lib/ambito/price.rb
|
|
35
|
-
- lib/ambito/rate.rb
|
|
36
|
-
- lib/ambito/variation.rb
|
|
37
|
-
- lib/ambito/version.rb
|
|
38
|
-
homepage: https://github.com/arzezak/ambito
|
|
20
|
+
- .standard.yml
|
|
21
|
+
- CHANGELOG.md
|
|
22
|
+
- CODE_OF_CONDUCT.md
|
|
23
|
+
- LICENSE.txt
|
|
24
|
+
- README.md
|
|
25
|
+
- Rakefile
|
|
26
|
+
- config/dollars.yml
|
|
27
|
+
- exe/ambito
|
|
28
|
+
- lib/ambito.rb
|
|
29
|
+
- lib/ambito/cli.rb
|
|
30
|
+
- lib/ambito/dollar.rb
|
|
31
|
+
- lib/ambito/gateway.rb
|
|
32
|
+
- lib/ambito/price.rb
|
|
33
|
+
- lib/ambito/rate.rb
|
|
34
|
+
- lib/ambito/variation.rb
|
|
35
|
+
- lib/ambito/version.rb
|
|
36
|
+
homepage: "https://github.com/arzezak/ambito"
|
|
39
37
|
licenses:
|
|
40
|
-
- MIT
|
|
38
|
+
- MIT
|
|
41
39
|
metadata:
|
|
42
|
-
homepage_uri: https://github.com/arzezak/ambito
|
|
43
|
-
source_code_uri: https://github.com/arzezak/ambito
|
|
44
|
-
changelog_uri: https://github.com/arzezak/ambito/blob/main/CHANGELOG.md
|
|
45
|
-
post_install_message:
|
|
40
|
+
homepage_uri: "https://github.com/arzezak/ambito"
|
|
41
|
+
source_code_uri: "https://github.com/arzezak/ambito"
|
|
42
|
+
changelog_uri: "https://github.com/arzezak/ambito/blob/main/CHANGELOG.md"
|
|
46
43
|
rdoc_options: []
|
|
47
44
|
require_paths:
|
|
48
|
-
- lib
|
|
45
|
+
- lib
|
|
49
46
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
50
47
|
requirements:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
-
|
|
49
|
+
- ">="
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: "0"
|
|
54
52
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
55
53
|
requirements:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
-
|
|
55
|
+
- ">="
|
|
56
|
+
- !ruby/object:Gem::Version
|
|
57
|
+
version: "0"
|
|
59
58
|
requirements: []
|
|
60
|
-
rubygems_version:
|
|
61
|
-
signing_key:
|
|
59
|
+
rubygems_version: 4.1.0
|
|
62
60
|
specification_version: 4
|
|
63
61
|
summary: Retrieve real-time USD exchange rates.
|
|
64
62
|
test_files: []
|
data/ambito.gemspec
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "lib/ambito/version"
|
|
4
|
-
|
|
5
|
-
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name = "ambito"
|
|
7
|
-
spec.version = Ambito::VERSION
|
|
8
|
-
spec.authors = ["Ariel Rzezak"]
|
|
9
|
-
spec.email = ["arzezak@gmail.com"]
|
|
10
|
-
|
|
11
|
-
spec.summary = "Retrieve real-time USD exchange rates."
|
|
12
|
-
spec.description = "A Ruby gem for retrieving real-time USD exchange rates and financial data."
|
|
13
|
-
spec.homepage = "https://github.com/arzezak/ambito"
|
|
14
|
-
spec.license = "MIT"
|
|
15
|
-
|
|
16
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
|
17
|
-
spec.metadata["source_code_uri"] = spec.homepage
|
|
18
|
-
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
|
|
19
|
-
|
|
20
|
-
# Specify which files should be added to the gem when it is released.
|
|
21
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
22
|
-
spec.files = Dir.chdir(__dir__) do
|
|
23
|
-
`git ls-files -z`.split("\x0").reject do |f|
|
|
24
|
-
(File.expand_path(f) == __FILE__) ||
|
|
25
|
-
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile])
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
spec.bindir = "exe"
|
|
29
|
-
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
30
|
-
spec.require_paths = ["lib"]
|
|
31
|
-
|
|
32
|
-
# Uncomment to register a new dependency of your gem
|
|
33
|
-
# spec.add_dependency "example-gem", "~> 1.0"
|
|
34
|
-
|
|
35
|
-
# For more information and examples about making a new gem, check out our
|
|
36
|
-
# guide at: https://bundler.io/guides/creating_gem.html
|
|
37
|
-
end
|