coinmarketcap 0.2.1 → 0.2.2

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
  SHA1:
3
- metadata.gz: b330ef278191aaa5de45529587a9bce5d72e49fe
4
- data.tar.gz: 94f6c28f0148c7535da0a74808a4e43f7aeecbc1
3
+ metadata.gz: 99311d0758b17c42a3d70dccd025c7835ae11e26
4
+ data.tar.gz: ebf0819c52957b4056af2c0c7ebf52f2641da85e
5
5
  SHA512:
6
- metadata.gz: 0bdf86a39ece6af9894a20beb79354b9d32375fa5666046e950ced4074470f7a1d48fe7a25cc36416afec0a2e693e5a8bef60cee6c5aa6e87e895b65269b4830
7
- data.tar.gz: cd042b50824437030c08d65a63a69e839dbced2ee0a2681cf9aaadb1bb74370fd2faf90f45deb9bf5d405d76becea18d4218e2e0c6a4728652abb47218a707b7
6
+ metadata.gz: aa76a91a2056230faf90cac7603d6d0fa383a3c67e4396b7c77bdb678e1b53d281bd0311fe2be1c8062e3b003f0d572920f9eaf51cc438c8aa14cd425ba73caf
7
+ data.tar.gz: 6e015d4fa2f7e65df8c13580e8b6617e8f88ae469244511465b36c07feaf8857a7c4b8f1ec59a394cc2af5af9b9e5e480ba470ab24c490f58796602e437c5ce6
@@ -35,10 +35,11 @@ module Coinmarketcap
35
35
  price_bundle = {}
36
36
  each_row = Nokogiri::HTML(row.to_s).css('td')
37
37
  price_bundle[:date] = Date.parse(each_row[0].text)
38
- price_bundle[:open] = each_row[1].text
39
- price_bundle[:high] = each_row[2].text
40
- price_bundle[:low] = each_row[3].text
41
- price_bundle[:close] = each_row[4].text
38
+ price_bundle[:open] = each_row[1].text.to_f
39
+ price_bundle[:high] = each_row[2].text.to_f
40
+ price_bundle[:low] = each_row[3].text.to_f
41
+ price_bundle[:close] = each_row[4].text.to_f
42
+ price_bundle[:avg] = ( price_bundle[:high] + price_bundle[:low] ) / 2.0
42
43
  prices << price_bundle
43
44
  rescue => error
44
45
  next
@@ -1,3 +1,3 @@
1
1
  module Coinmarketcap
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coinmarketcap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ankit Samarthya