stock-gains 0.1.3 → 0.1.5
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 +2 -2
- data/README.md +8 -8
- data/lib/stock-gains/version.rb +1 -1
- data/lib/stock_gains.rb +1 -4
- data/portfolio.csv +3 -2
- data/screenshots/port_table.png +0 -0
- data/stock-gains-gem-0.1.2.gem +0 -0
- data/stock-gains-gem.gemspec +2 -2
- metadata +11 -10
- data/screenshots/portfolio_table.png +0 -0
- data/stock-gains-gem-0.1.0.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c41997eb8c297b5608f9dbbceeb2472bdffdab5c
|
|
4
|
+
data.tar.gz: 7de88eb266c5d0f28e1e905c0e8434b3ccd87a4a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ec210a4873ca510d987c465cfcc33cc8213386945287559cfa7f81881ee3bb09a768ca608755d3fb35aeb8ca6961de2a25893d71eade57dad9e6987a20815342
|
|
7
|
+
data.tar.gz: 648011d52e08bc21b77dbda067f3a887817b50762cda20f4c3b64e962aee50e429b70897df92ed653f79ab2b2b8e0a0600404184202d87b7baf7ffd02e4c8068
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
## Stock
|
|
1
|
+
## Stock Gains
|
|
2
2
|
|
|
3
|
-
This Ruby gem uses the Yahoo Finance API to provide three valuable stock market functions for the user. First, it imports the users
|
|
3
|
+
This Ruby gem uses the Yahoo Finance API to provide three valuable stock market functions for the user. First, it imports the users portfolio from a `CSV` file, calculates each stocks earnings/losses of the day, adds them together and returns an accumulated balance of the users total earnings/losses for the day. Next, it gives the user the option to display generic stock information of any or all stocks in their portfolio. Lastly, it allows the user to lookup stock data of any stock(s) of their choosing.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
You can install this gem via `gem install stock-gains
|
|
7
|
+
You can install this gem via `gem install stock-gains`. Before you run this app you'll need to set up a `CSV` file containing all of the stocks in your portfolio so they can be imported into the app. Start by cloning the repository to your local computer. Then, on the top-level of the directory, create a file called `portfolio.csv` and insert the stock ticker followed by the quantity of shares you hold for each stock in your portfolio. Be sure to input each stock on a new line and separate the two values by a comma (see the diagram below). Now run `stock-gains` in the CLI to view your gains!
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
|
|
@@ -14,22 +14,22 @@ You can install this gem via `gem install stock-gains-gem`. Before you run this
|
|
|
14
14
|
|
|
15
15
|
What makes Stock Gains useful is that not only does it compute what each individual stock in your portfolio has earned/lost for that day, it computes the total balance your *portfolio* has earned/lost for that day. These calculations are displayed for the user in the following table:
|
|
16
16
|
|
|
17
|
-

|
|
18
18
|
|
|
19
19
|
### Stock Information
|
|
20
20
|
|
|
21
21
|
The user then has the option to view additional stock information regarding any stock in their portfolio. There are four possible entries:
|
|
22
22
|
|
|
23
|
-
* Enter `all` to display stock data
|
|
24
|
-
* Enter the digit, or digits, corresponding to the stocks you want to
|
|
25
|
-
* Enter `e` to exit the program
|
|
23
|
+
* Enter `all` to display stock data regarding all of the stocks in your portfolio
|
|
24
|
+
* Enter the digit, or digits, corresponding to the stocks in your portfolio that you want to lookup (separated by a space)
|
|
26
25
|
* Press enter to move onto the next stage
|
|
26
|
+
* Enter `e` to exit the program
|
|
27
27
|
|
|
28
28
|

|
|
29
29
|
|
|
30
30
|
### Stock Lookup
|
|
31
31
|
|
|
32
|
-
Finally,
|
|
32
|
+
Finally, lookup any stock on the market by entering the stock ticker. To view multiple stocks, separate the stock tickers with a space.
|
|
33
33
|
|
|
34
34
|

|
|
35
35
|
|
data/lib/stock-gains/version.rb
CHANGED
data/lib/stock_gains.rb
CHANGED
|
@@ -2,10 +2,7 @@ require 'pry'
|
|
|
2
2
|
require 'open-uri'
|
|
3
3
|
require 'csv'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
require_relative 'stock-gains/stock'
|
|
7
|
-
require_relative 'stock-gains/portfolio'
|
|
8
|
-
require_relative 'stock-gains/stock_lookup'
|
|
5
|
+
Dir[File.join(File.dirname(__FILE__), "stock-gains", "*.rb")].each {|f| require f}
|
|
9
6
|
|
|
10
7
|
module StockGains
|
|
11
8
|
end
|
data/portfolio.csv
CHANGED
|
Binary file
|
|
Binary file
|
data/stock-gains-gem.gemspec
CHANGED
|
@@ -6,8 +6,8 @@ require 'stock-gains/version'
|
|
|
6
6
|
Gem::Specification.new do |spec|
|
|
7
7
|
spec.authors = ["Frank Nowinski"]
|
|
8
8
|
spec.email = ["nowinski.frank@gmail.com"]
|
|
9
|
-
spec.description = %q{This Ruby gem uses the Yahoo Finance API to provide three valuable stock market functions for the user. First, it imports the users
|
|
10
|
-
spec.summary = %q{https://github.com/frankNowinski/stock-gains
|
|
9
|
+
spec.description = %q{This Ruby gem uses the Yahoo Finance API to provide three valuable stock market functions for the user. First, it imports the users portfolio from a CSV file, calculates each stocks earnings/losses of the day, adds them together and returns an accumulated balance of the users total earnings/losses for the day. Next, it gives the user the option to display generic stock information of any or all stocks in their portfolio. Lastly, it allows the user to lookup stock data of any stock(s) of their choosing (for more informations see https://github.com/frankNowinski/stock-gains).}
|
|
10
|
+
spec.summary = %q{https://github.com/frankNowinski/stock-gains}
|
|
11
11
|
spec.homepage = "https://learn.co"
|
|
12
12
|
|
|
13
13
|
spec.files = `git ls-files`.split($\)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stock-gains
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Frank Nowinski
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-12-
|
|
11
|
+
date: 2015-12-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -109,11 +109,12 @@ dependencies:
|
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: '0'
|
|
111
111
|
description: This Ruby gem uses the Yahoo Finance API to provide three valuable stock
|
|
112
|
-
market functions for the user. First, it imports the users
|
|
113
|
-
file, calculates each stocks earnings/losses
|
|
114
|
-
|
|
115
|
-
generic stock information of any or all
|
|
116
|
-
it allows the user to lookup stock data of any
|
|
112
|
+
market functions for the user. First, it imports the users portfolio from a CSV
|
|
113
|
+
file, calculates each stocks earnings/losses of the day, adds them together and
|
|
114
|
+
returns an accumulated balance of the users total earnings/losses for the day. Next,
|
|
115
|
+
it gives the user the option to display generic stock information of any or all
|
|
116
|
+
stocks in their portfolio. Lastly, it allows the user to lookup stock data of any
|
|
117
|
+
stock(s) of their choosing (for more informations see https://github.com/frankNowinski/stock-gains).
|
|
117
118
|
email:
|
|
118
119
|
- nowinski.frank@gmail.com
|
|
119
120
|
executables:
|
|
@@ -137,16 +138,16 @@ files:
|
|
|
137
138
|
- lib/stock-gains/version.rb
|
|
138
139
|
- lib/stock_gains.rb
|
|
139
140
|
- portfolio.csv
|
|
141
|
+
- screenshots/port_table.png
|
|
140
142
|
- screenshots/portfolio_csv.png
|
|
141
143
|
- screenshots/portfolio_data.png
|
|
142
|
-
- screenshots/portfolio_table.png
|
|
143
144
|
- screenshots/stock_lookup.png
|
|
144
145
|
- spec/01_cli_spec.rb
|
|
145
146
|
- spec/02_portfolio_spec.rb
|
|
146
147
|
- spec/03_stock_spec.rb
|
|
147
148
|
- spec/04_stock_lookup_spec.rb
|
|
148
149
|
- spec/spec_helper.rb
|
|
149
|
-
- stock-gains-gem-0.1.
|
|
150
|
+
- stock-gains-gem-0.1.2.gem
|
|
150
151
|
- stock-gains-gem.gemspec
|
|
151
152
|
homepage: https://learn.co
|
|
152
153
|
licenses:
|
|
@@ -172,7 +173,7 @@ rubyforge_project:
|
|
|
172
173
|
rubygems_version: 2.4.5.1
|
|
173
174
|
signing_key:
|
|
174
175
|
specification_version: 4
|
|
175
|
-
summary: https://github.com/frankNowinski/stock-gains
|
|
176
|
+
summary: https://github.com/frankNowinski/stock-gains
|
|
176
177
|
test_files:
|
|
177
178
|
- spec/01_cli_spec.rb
|
|
178
179
|
- spec/02_portfolio_spec.rb
|
|
Binary file
|
data/stock-gains-gem-0.1.0.gem
DELETED
|
Binary file
|