cryptocoincharts_ruby 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/cryptocoincharts_ruby.rb +11 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDBjNjVmNGY2YmM5YzViYTc0ZDU2YzVhZGMxZDcxYmViZDgyODJiMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OWYyNjQwZDU5N2NmMjg1NTNlM2YzZjFhM2M2OThlYjc0N2FlOTQxMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDlmMDgzYzg2NDdlZWJmNDM1NDY1NzA5NmRjNDkwY2I3NDlmNjMwNmZiZTgw
|
10
|
+
M2JhZWNlOGJkOTU1ZThhODFhMThhODdmNzExNDEwODkxMzhmZTJjMWQxNWFl
|
11
|
+
Nzc4YTNjY2EyNzlhODFmMGMxODliODA5OWNhZGUzOGM3MTZjZWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MWU0YTlmNzkyYWE4NjNmMzBkOTY0NzgzMjU5OTMxMGQ1YzEzYTg1NDc4YjQ3
|
14
|
+
MTlhZGYxYWIxZGVkODg2N2Q4NzE2OWFmZThmMTQ5NDRhNjVjMGU1MWUxOGE1
|
15
|
+
YTk2ZTg4YTJmODhjYjBhNjJlNTlkODlhMWJlMTdjNjA4N2FhZDY=
|
@@ -6,7 +6,7 @@ require 'bigdecimal'
|
|
6
6
|
module CryptoCoinCharts
|
7
7
|
class << self
|
8
8
|
|
9
|
-
VERSION = '0.0.
|
9
|
+
VERSION = '0.0.17'
|
10
10
|
|
11
11
|
API_URL = 'http://www.cryptocoincharts.info/v2/api'
|
12
12
|
VALID_PAIRS = [
|
@@ -80,21 +80,21 @@ module CryptoCoinCharts
|
|
80
80
|
end
|
81
81
|
|
82
82
|
class CoinSummary < Hashie::Trash
|
83
|
-
property :id, :transform_with => lambda {|v| v.to_sym }
|
83
|
+
property :id, :transform_with => lambda {|v| v.to_s.to_sym }
|
84
84
|
property :name
|
85
85
|
property :website
|
86
|
-
property :price_btc, :transform_with => lambda {|v| BigDecimal.new(v) }
|
87
|
-
property :volume_btc, :transform_with => lambda {|v| v.to_f }
|
86
|
+
property :price_btc, :transform_with => lambda {|v| BigDecimal.new(v.to_s) }
|
87
|
+
property :volume_btc, :transform_with => lambda {|v| v.to_s.to_f }
|
88
88
|
end
|
89
89
|
|
90
90
|
class CoinDetail < Hashie::Trash
|
91
|
-
property :id, :transform_with => lambda {|v| v.gsub!(/\//, '_').to_sym }
|
91
|
+
property :id, :transform_with => lambda {|v| v.to_s.gsub!(/\//, '_').to_sym }
|
92
92
|
property :best_market
|
93
|
-
property :latest_trade, :transform_with => lambda {|v| Time.parse(v) rescue v }
|
94
|
-
property :price, :transform_with => lambda {|v| BigDecimal.new(v) }
|
95
|
-
property :price_before_24h, :transform_with => lambda {|v| BigDecimal.new(v) }
|
96
|
-
property :volume_btc, :transform_with => lambda {|v| v.to_f }
|
97
|
-
property :volume_first, :transform_with => lambda {|v| v.to_f }
|
98
|
-
property :volume_second, :transform_with => lambda {|v| v.to_f }
|
93
|
+
property :latest_trade, :transform_with => lambda {|v| Time.parse(v.to_s) rescue v }
|
94
|
+
property :price, :transform_with => lambda {|v| BigDecimal.new(v.to_s) }
|
95
|
+
property :price_before_24h, :transform_with => lambda {|v| BigDecimal.new(v.to_s) }
|
96
|
+
property :volume_btc, :transform_with => lambda {|v| v.to_s.to_f }
|
97
|
+
property :volume_first, :transform_with => lambda {|v| v.to_s.to_f }
|
98
|
+
property :volume_second, :transform_with => lambda {|v| v.to_s.to_f }
|
99
99
|
end
|
100
100
|
end
|