currency_quote 0.1.1 → 0.1.2

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: 8b3a925a5d95f3ad13788d2555eb01c55233c0efac1b3034a9b01a17968c0778
4
- data.tar.gz: 93485459ac19ed96afccf6385d0718f1ea042eb7c3abaaec1050d121d499dccf
3
+ metadata.gz: 8ae43131b099eed65bb04af747c645194237d2381e164578d663a40407d11f52
4
+ data.tar.gz: 96a40a3cfd66b9a649bc5dcdee633a54fb89a6f41497ee6ccd0065a5a3048a3c
5
5
  SHA512:
6
- metadata.gz: 7aabe115fdc4ccc31613ab9594d6fa1749d35e614d77fca8af6709c0e66316a5177f35dcf5ee29316a7fbb9ea9bb8dfb4317dcf081fceae1037c376324b19383
7
- data.tar.gz: 8657395aec99bed986dbf92927b0d78aa632909966c7b2c498db0a4939428684a1259f8bbd032de97b5680f00a81413434041f6170017d0be56d9f82ecf0c602
6
+ metadata.gz: f7d4da86ee07d734c03813c288bcdeabff2d948b8fb8a0a56d0263a0bfba2b73e27b3ae38adaf3f1725cb2db0c4ce84735830225017d52c1f03c1100bd8601bc
7
+ data.tar.gz: 7b76091240025a5af2eef158fe6a691d34503feeb50db249ab369e5d6cc805f62d6d17b3af2f5d3754207641b6b1500b6aedd4ceb4eec7899268913276238617
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  /.bundle/
2
3
  /.yardoc
3
4
  /_yardoc/
@@ -9,3 +10,53 @@
9
10
 
10
11
  # rspec failure tracking
11
12
  .rspec_status
13
+ # These are some examples of commonly ignored file patterns.
14
+ # You should customize this list as applicable to your project.
15
+ # Learn more about .gitignore:
16
+ # https://www.atlassian.com/git/tutorials/saving-changes/gitignore
17
+
18
+ # Node artifact files
19
+ node_modules/
20
+ dist/
21
+
22
+ # Compiled Java class files
23
+ *.class
24
+
25
+ # Compiled Python bytecode
26
+ *.py[cod]
27
+
28
+ # Log files
29
+ *.log
30
+
31
+ # Package files
32
+ *.jar
33
+
34
+ # Maven
35
+ target/
36
+ dist/
37
+
38
+ # JetBrains IDE
39
+ .idea/
40
+
41
+ # Unit test reports
42
+ TEST*.xml
43
+
44
+ # Generated by MacOS
45
+ .DS_Store
46
+
47
+ # Generated by Windows
48
+ Thumbs.db
49
+
50
+ # Applications
51
+ *.app
52
+ *.exe
53
+ *.war
54
+
55
+ # Large media files
56
+ *.mp4
57
+ *.tiff
58
+ *.avi
59
+ *.flv
60
+ *.mov
61
+ *.wmv
62
+
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- currency_quote (0.1.0)
4
+ currency_quote (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -22,8 +22,50 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
26
-
25
+ ### Cotizaciones disponibles
26
+ Bolívar Venezolano,
27
+ Cordoba Nicaraguense,
28
+ Corona Checa,
29
+ Corona Danesa,
30
+ Corona Noruega,
31
+ Corona Sueca,
32
+ Derecho Especial de Giro,
33
+ Dinar Serbia,
34
+ Dolar Australiano,
35
+ Dolar Canadiense,
36
+ Dolar de Singapur,
37
+ Dolar Estadounidense,
38
+ Dolar Hong Kong,
39
+ Dolar Neozelandes,
40
+ Euro (Unidad Monetaria Europe,
41
+ Florin (Antillas Holandesas),
42
+ Franco Suizo,
43
+ Guaraní Paraguayo,
44
+ Libra Esterlina,
45
+ Lira Turca,
46
+ Nuevo Sol Peruano,
47
+ Oro - Onza Troy,
48
+ Peso,
49
+ Peso Boliviano,
50
+ Peso Chileno,
51
+ Peso Colombiano,
52
+ Peso Mexicano,
53
+ Peso Uruguayo,
54
+ Plata - Onza Troy,
55
+ Rand Sudafricano,
56
+ Real (Brasil),
57
+ Rublo (Rusia),
58
+ Rupia (India),
59
+ Shekel (Israel),
60
+ Yen (Japón),
61
+ Yuan- China CNY,
62
+ Yuan-China Off Shore CNH
63
+
64
+ ### Obtener cotización
65
+ quotation = CurrencyQuote::Currency.new(currency: "Peso Colombiano", date: "13/11/2020").get_quotation
66
+
67
+ Devuelve
68
+ $ #<struct Struct::Currency currency="Peso Colombiano", date="13/11/2020", sell=0.023289999999999998, buy=0.021646>
27
69
  ## Development
28
70
 
29
71
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -41,7 +41,7 @@ class CurrencyQuote::Currency
41
41
  end
42
42
 
43
43
  def struct
44
- s = Struct.new("Currency", :currency, :date, :sell, :buy)
44
+ s = Struct.new(:currency, :date, :sell, :buy)
45
45
  s.new(currency, date, sell, buy)
46
46
  end
47
47
  end
@@ -33,14 +33,14 @@ class CurrencyQuote::Dolar
33
33
  end
34
34
 
35
35
  def extract_data
36
- puts data = @doc.css("td").map(&:text)
36
+ data = @doc.css("td").map(&:text)
37
37
  @date = data[data.size - 1]
38
38
  @sell = data[data.size - 2].to_f
39
39
  @buy = data[data.size - 3].to_f
40
40
  end
41
41
 
42
42
  def struct
43
- s = Struct.new("Dolar", :date, :sell, :buy)
43
+ s = Struct.new(:date, :sell, :buy)
44
44
  s.new(date, sell, buy)
45
45
  end
46
46
  end
@@ -1,3 +1,3 @@
1
1
  module CurrencyQuote
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: currency_quote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facundo A. Díaz Martínez