quote-only 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/test/test-quote-only.rb +26 -22
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 004dcbf033616ad303189cadcc471864fb41b323
|
4
|
+
data.tar.gz: cfd9a86fc010bef1c6f5d92581e322a822558392
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fd5ed3e5e613d9bb88d5fc772e94d75b9da3afb63e6f7d2acf698cfc8ca1b236b0c0ad6a67f44046db85b509da1fe572b2330f5b0952b2bf1ba7e9c5a3a4d56
|
7
|
+
data.tar.gz: 7af196f14a9b4a02a0e6efa00f5e4dbda42d49f6fd3e655ee204cd4e87f7d1299fc1b3cb62db12c6f50b9f663224ab2d91c96169cf646eaba02ea85b1640267f
|
data/test/test-quote-only.rb
CHANGED
@@ -2,31 +2,35 @@ require 'minitest/autorun'
|
|
2
2
|
require_relative '../lib/quote-only'
|
3
3
|
|
4
4
|
class QuoteOnlyTest < Minitest::Test
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
def testCnnQuoteOnly(symbol, friendly_name, decimal_places)
|
6
|
+
f = CnnQuoteOnly.new({ :symbol => symbol, :friendly_name => friendly_name, :decimal_places => decimal_places })
|
7
|
+
puts f
|
8
|
+
assert f.quote.is_a? Float
|
9
|
+
end
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
puts f
|
13
|
-
assert f.quote.is_a? Float
|
14
|
-
end
|
11
|
+
def test_
|
12
|
+
testCnnQuoteOnly('VT', 'World Stocks', 2)
|
15
13
|
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
f = ApmexGoldQuoteOnly.new({ :symbol => 'oz', :friendly_name => 'Gold', :decimal_places => 2 })
|
15
|
+
puts f
|
16
|
+
assert f.quote.is_a? Float
|
19
17
|
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
f = ApmexSilverQuoteOnly.new({ :symbol => 'oz', :friendly_name => 'Silver', :decimal_places => 2 })
|
19
|
+
puts f
|
20
|
+
assert f.quote.is_a? Float
|
21
|
+
puts
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
testCnnQuoteOnly('VTI', 'U.S. Stocks', 2)
|
24
|
+
testCnnQuoteOnly('VT', 'Foreign Stocks', 2)
|
25
|
+
puts
|
27
26
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
testCnnQuoteOnly('VGLT', 'Long-Term Gov', 2)
|
28
|
+
f = BloombergQuoteOnly.new({ :symbol => 'USGG10YR:IND', :friendly_name => '10 Year', :decimal_places => 2 })
|
29
|
+
puts f
|
30
|
+
assert f.quote.is_a? Float
|
31
|
+
puts
|
32
|
+
|
33
|
+
testCnnQuoteOnly('BWZ', 'Foreign Cash', 2)
|
34
|
+
puts
|
35
|
+
end
|
32
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quote-only
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cscribn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|