finance-ytd 1.1.1 → 1.1.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: e694a6fab8a2c8057b92b291bd8cbf8c21432746
4
- data.tar.gz: 46b587ed86242d1f2c6838f0c67e1c78c4ebf4f3
3
+ metadata.gz: 6a6af1dbf73dd5c599e1acac864c10f5c15dbec0
4
+ data.tar.gz: 13684c390601300e4bcc51e508eddde434c49158
5
5
  SHA512:
6
- metadata.gz: 66449902b479ce725f38b15001bcbba37707ec3d13993d2473b8c71ad160649887ece0f840dc2291778c4cd6ddaf865da0812ba6f984dcc14f1b5c4dd6434fde
7
- data.tar.gz: bc27b4b0eb030cdcb6f0f190e7f97adb23005e6aaabe69c7d34ddef1a9211662aae16ab6847cff993cb9a9f73e2351b6483dc77f643b6716f05698211495d8ef
6
+ metadata.gz: cd4c4b663f737da79285691931177ca603faf81064d3f854566f70b2bab1da511ff087df82e4bb1c810a15c80bd5590f46aed9cd14c9d09548f08c022191e928
7
+ data.tar.gz: 19e4dfbf1acc6b9af3b409bcb797d068c98c6e1d86f3662041ed3dd05b891d5e271f49ea6072c687a69c5932616c7feedac567244f7e663efd0b7656f329a833
@@ -38,11 +38,11 @@ class FinanceYtd
38
38
  end
39
39
  end
40
40
 
41
- class CnnEtfFinanceYtd < FinanceYtd
41
+ class CnnFinanceYtd < FinanceYtd
42
42
  def initialize(options)
43
43
  super(options)
44
44
  @css = 'td.wsod_ytd > span'
45
- @url = 'http://money.cnn.com/quote/etf/etf.html?exHours=off&symb=' + @symbol
45
+ @url = 'http://money.cnn.com/quote/quote.html?exHours=off&symb=' + @symbol
46
46
  match()
47
47
  calculate()
48
48
  end
@@ -2,8 +2,8 @@ require 'minitest/autorun'
2
2
  require_relative '../lib/finance-ytd'
3
3
 
4
4
  class FinanceYtdTest < Minitest::Test
5
- def testCnnEtfFinanceYtd(symbol, friendly_name, decimal_places)
6
- f = CnnEtfFinanceYtd.new({ :symbol => symbol, :friendly_name => friendly_name, :decimal_places => decimal_places })
5
+ def testCnnFinanceYtd(symbol, friendly_name, decimal_places)
6
+ f = CnnFinanceYtd.new({ :symbol => symbol, :friendly_name => friendly_name, :decimal_places => decimal_places })
7
7
  puts f
8
8
  assert f.ytd_return.is_a? Float
9
9
  end
@@ -15,7 +15,7 @@ class FinanceYtdTest < Minitest::Test
15
15
  end
16
16
 
17
17
  def test_
18
- testCnnEtfFinanceYtd('VT', 'World Stocks', 0)
18
+ testCnnFinanceYtd('VT', 'World Stocks', 0)
19
19
 
20
20
  f = ApmexGoldFinanceYtd.new({ :symbol => 'Gold Spot', :friendly_name => 'Gold', :decimal_places => 0, :price_last_year => 1183.90 })
21
21
  puts f
@@ -25,16 +25,16 @@ class FinanceYtdTest < Minitest::Test
25
25
  assert f.ytd_return.is_a? Float
26
26
  puts
27
27
 
28
- testCnnEtfFinanceYtd('VTI', 'U.S. Stocks', 0)
29
- testCnnEtfFinanceYtd('VXUS', 'Foreign Stocks', 0)
30
- testCnnEtfFinanceYtd('SGDM', 'Gold Miners', 0)
31
- testCnnEtfFinanceYtd('BWZ', 'Foreign Cash', 0)
28
+ testCnnFinanceYtd('VTI', 'U.S. Stocks', 0)
29
+ testCnnFinanceYtd('VXUS', 'Foreign Stocks', 0)
30
+ testCnnFinanceYtd('SGDM', 'Gold Miners', 0)
31
+ testCnnFinanceYtd('BWZ', 'Foreign Cash', 0)
32
32
  testCnnMarketFinanceYtd('dow', 'Dow', 0)
33
33
  testCnnMarketFinanceYtd('sandp', 'S&P 500', 0)
34
34
  f = BloombergFinanceYtd.new({ :symbol => 'USGG10YR:IND', :friendly_name => '10 Year', :decimal_places => 0 })
35
35
  puts f
36
36
  assert f.ytd_return.is_a? Float
37
- testCnnEtfFinanceYtd('XBT', 'Bitcoin', 0)
37
+ testCnnFinanceYtd('XBT', 'Bitcoin', 0)
38
38
  puts
39
39
  end
40
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finance-ytd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - cscribn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-07 00:00:00.000000000 Z
11
+ date: 2015-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest