currency_quote 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6eb28e36b9639588febc4fb586d7427b948174992ed74a8eb0cb2710e44f6003
4
- data.tar.gz: e6a0b640af6bd565680e2ada442cca52311834e824964b2cea8538d9114485f8
3
+ metadata.gz: 05b59a0a6e0d996c10c78a563df3b1200a7b1f3e963b5bc3e1e00f10b41007f5
4
+ data.tar.gz: 257469dd947673467073115a40315e27220599955a10c1d071586edecfbef847
5
5
  SHA512:
6
- metadata.gz: fb1fb334786f7451e88d6d1484e60f22d8c519a3d992f27438d26cd1f5d7c44a52af1532a52d35fc44ef35ce76f1a30460695238782a33dc9d0408ea11d8741d
7
- data.tar.gz: fb9793f9fc5c6cb51aee4491d5374445ad837a4d3c09c7a17483a4cc17aef6c8f4967852bd05e20a356bf0a35644b1ed2c00def53aba000b58c5244e670dd722
6
+ metadata.gz: 39d79dee89f3968c51f0233102e7ab9318c04c4afaf1fc3fad860bbe71c39940cdeb4be53552c5927ead60e961232846363cd38855153ff37da155ba2fb81241
7
+ data.tar.gz: 2fcf7217d9fc20833e6978086b6b92759b7126db4aa07670f380c4084e3dd2d16ae33f25421eab677545688412911f017d3643456139166c0fc432b44047d0d4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- currency_quote (0.1.4)
4
+ currency_quote (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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
@@ -20,14 +20,14 @@ class CurrencyQuote::Dolar
20
20
  private
21
21
 
22
22
  def make_get_to_bna
23
-
24
- opts = {
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}?#{opts.to_param}"
30
+ url = "#{BASE_URL}?#{params.query}"
31
31
 
32
32
  @doc = Nokogiri::HTML( URI.open(url) )
33
33
  end
@@ -1,3 +1,3 @@
1
1
  module CurrencyQuote
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  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.5
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-16 00:00:00.000000000 Z
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
@@ -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
@@ -1,8 +0,0 @@
1
- class String
2
- require "cgi"
3
-
4
- def to_query(key)
5
- "#{CGI.escape(key.to_s)}=#{CGI.escape(self)}"
6
- end
7
- alias_method :to_param, :to_query
8
- end
@@ -1,8 +0,0 @@
1
- class Symbol
2
- require "cgi"
3
-
4
- def to_query
5
- CGI.escape(self.to_s)
6
- end
7
- alias_method :to_param, :to_query
8
- end