currency_quote 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/currency_quote.rb +0 -3
- data/lib/currency_quote/dolar.rb +3 -3
- data/lib/currency_quote/version.rb +1 -1
- metadata +2 -5
- data/lib/support/hash.rb +0 -12
- data/lib/support/string.rb +0 -8
- data/lib/support/symbol.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05b59a0a6e0d996c10c78a563df3b1200a7b1f3e963b5bc3e1e00f10b41007f5
|
4
|
+
data.tar.gz: 257469dd947673467073115a40315e27220599955a10c1d071586edecfbef847
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39d79dee89f3968c51f0233102e7ab9318c04c4afaf1fc3fad860bbe71c39940cdeb4be53552c5927ead60e961232846363cd38855153ff37da155ba2fb81241
|
7
|
+
data.tar.gz: 2fcf7217d9fc20833e6978086b6b92759b7126db4aa07670f380c4084e3dd2d16ae33f25421eab677545688412911f017d3643456139166c0fc432b44047d0d4
|
data/Gemfile.lock
CHANGED
data/lib/currency_quote.rb
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
require_relative "currency_quote/version"
|
2
2
|
require_relative "currency_quote/dolar"
|
3
3
|
require_relative "currency_quote/currency"
|
4
|
-
require_relative "support/hash.rb"
|
5
|
-
require_relative "support/string.rb"
|
6
|
-
require_relative "support/symbol.rb"
|
7
4
|
|
8
5
|
module CurrencyQuote
|
9
6
|
class Error < StandardError; end
|
data/lib/currency_quote/dolar.rb
CHANGED
@@ -20,14 +20,14 @@ class CurrencyQuote::Dolar
|
|
20
20
|
private
|
21
21
|
|
22
22
|
def make_get_to_bna
|
23
|
-
|
24
|
-
|
23
|
+
params = Addressable::URI.new
|
24
|
+
params.query_values = {
|
25
25
|
id: 'billetes',
|
26
26
|
fecha: date,
|
27
27
|
filtroEuro: 0,
|
28
28
|
filtroDolar: 1
|
29
29
|
}
|
30
|
-
url = "#{BASE_URL}?#{
|
30
|
+
url = "#{BASE_URL}?#{params.query}"
|
31
31
|
|
32
32
|
@doc = Nokogiri::HTML( URI.open(url) )
|
33
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: currency_quote
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Facundo A. Díaz Martínez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -34,9 +34,6 @@ files:
|
|
34
34
|
- lib/currency_quote/currency.rb
|
35
35
|
- lib/currency_quote/dolar.rb
|
36
36
|
- lib/currency_quote/version.rb
|
37
|
-
- lib/support/hash.rb
|
38
|
-
- lib/support/string.rb
|
39
|
-
- lib/support/symbol.rb
|
40
37
|
homepage: https://www.sesocio.com
|
41
38
|
licenses:
|
42
39
|
- MIT
|
data/lib/support/hash.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
class Hash
|
2
|
-
|
3
|
-
def to_query(namespace = nil)
|
4
|
-
query = collect do |key, value|
|
5
|
-
value.to_s.to_query(namespace ? "#{namespace}[#{key}]" : key)
|
6
|
-
end.compact
|
7
|
-
|
8
|
-
query.sort! unless namespace.to_s.include?("[]")
|
9
|
-
query.join("&")
|
10
|
-
end
|
11
|
-
alias_method :to_param, :to_query
|
12
|
-
end
|
data/lib/support/string.rb
DELETED