hybondnews 0.0.1 → 1.0.0
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +3 -5
- data/lib/hybondnews.rb +16 -22
- data/lib/hybondnews/version.rb +1 -1
- data/pkg/hybondnews-0.0.1.gem +0 -0
- data/pkg/hybondnews-1.0.0.gem +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b032883cfed2b20cb1f5177c29421e38a5c415e8
|
4
|
+
data.tar.gz: d3f0dcb33f7cf4f404a0f67ee68532e9e5370b76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b80ba72dd0f2f7eab21b7c05f5d097da0f4dd13922e6e62836fd5e356278a928c936ea1c0a37e905888a4f40999f0e6596e696d59c7d47b4573d1ed9ce05045
|
7
|
+
data.tar.gz: 19a71840e18877154e3f3e1f6e52652d7194abc01a3d1dff6b99bf68486336392691d10ef43caa9b540ed6cff9b5b0d3ca72f1f790c9c7f62c300daad172e7d5
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -18,13 +18,11 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
For the current 10-year treasury rate from the Federal Reserve
|
21
|
+
For the current 10-year treasury rate from the Federal Reserve
|
22
|
+
and the latest 3 articles from www.leveragedfinancenews.com:
|
22
23
|
|
23
|
-
|
24
|
+
$ hybondnews
|
24
25
|
|
25
|
-
For the latest 3 articles from www.leveragedfinancenews.com:
|
26
|
-
|
27
|
-
HYBondNews.bond_news
|
28
26
|
|
29
27
|
## Contributing
|
30
28
|
|
data/lib/hybondnews.rb
CHANGED
@@ -2,35 +2,29 @@ require "hybondnews/version"
|
|
2
2
|
require "open-uri"
|
3
3
|
require "nokogiri"
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
def hybondnews
|
6
|
+
|
7
7
|
#ten_year_rate, fed reserve website
|
8
8
|
html = open("http://www.federalreserve.gov/releases/h15/current/").read
|
9
9
|
doc = Nokogiri::HTML(open("http://www.federalreserve.gov/releases/h15/current/"))
|
10
10
|
|
11
|
-
<<-TEXT
|
12
|
-
The latest 10-year treasury rate is #{doc.search("td")[271].text}%
|
13
|
-
TEXT
|
14
|
-
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.bond_news
|
18
11
|
# HY Bonds new, leveraged finance website
|
19
12
|
html =open("http://www.leveragedfinancenews.com/section/high_yield_bonds.html").read
|
20
13
|
doc2 = Nokogiri::HTML(open("http://www.leveragedfinancenews.com/section/high_yield_bonds.html"))
|
21
14
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
#{doc2.search("h4")[
|
29
|
-
#{doc2.search("div#contentWrap p")[
|
30
|
-
|
31
|
-
#{doc2.search("h4")[
|
32
|
-
#{doc2.search("div#contentWrap p")[
|
15
|
+
puts "Treasury Rate:"
|
16
|
+
puts
|
17
|
+
puts "The latest 10-year treasury rate is #{doc.search("td")[271].text}%"
|
18
|
+
puts
|
19
|
+
puts "HY Bond News:"
|
20
|
+
puts
|
21
|
+
puts "#{doc2.search("h4")[0].text}"
|
22
|
+
puts "#{doc2.search("div#contentWrap p")[0].text}"
|
23
|
+
puts
|
24
|
+
puts "#{doc2.search("h4")[1].text}"
|
25
|
+
puts "#{doc2.search("div#contentWrap p")[1].text}"
|
26
|
+
puts
|
27
|
+
puts "#{doc2.search("h4")[2].text}"
|
28
|
+
puts "#{doc2.search("div#contentWrap p")[2].text}"
|
33
29
|
|
34
|
-
TEXT
|
35
|
-
end
|
36
30
|
end
|
data/lib/hybondnews/version.rb
CHANGED
data/pkg/hybondnews-0.0.1.gem
CHANGED
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hybondnews
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Shore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-06-
|
12
|
+
date: 2014-06-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -84,6 +84,7 @@ files:
|
|
84
84
|
- lib/hybondnews.rb
|
85
85
|
- lib/hybondnews/version.rb
|
86
86
|
- pkg/hybondnews-0.0.1.gem
|
87
|
+
- pkg/hybondnews-1.0.0.gem
|
87
88
|
homepage: ''
|
88
89
|
licenses:
|
89
90
|
- MIT
|