top_stock_movers 0.1.3 → 0.1.4

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
  SHA256:
3
- metadata.gz: 0e2fb71e393759662948ba72d5bd0b87f840e8caafba7cc5f561f91fd697b79a
4
- data.tar.gz: 9c578ae863e5c2acbafc8fce9c9b6386f0abed36bd35df4ceb06e979e21166e1
3
+ metadata.gz: 2a49886117f150dcae22b84f600606c74a6e26d007e6bb74298d9e147331890d
4
+ data.tar.gz: 44205f70a128737479a7f8fafa21b3e236793dde1caae26244ca406cb6c38bdd
5
5
  SHA512:
6
- metadata.gz: 2b45d9ee00e7c4e976c09d1b6dbb0d11e27e5c3f203c5ef82dab58a67fb5c660be999bbf304f7052b92c8363acfa5989b5577b238a0ae67a37d023edbf8a1c85
7
- data.tar.gz: 1a433d5503f2ec3b53a9e83cab0fa897b2204b63ac41d40ab8cbc8c452ccfefe4426333669e38ce2f4be3199eb515b477aa36e6c759f8cb8e0bdddee9aa3c861
6
+ metadata.gz: 650f2d61cd1153baa7a13516e584521ecc29db05c65ee3bbf2c3ce3e9355a0d3a8d21ec5052d4a355ae423f7d55388e5ab9011a02d5801a817e036aaede7f543
7
+ data.tar.gz: 83b686bd85c9bd15b760d0d69f65e53650793137ceb6af44d7725119fea17d2497a9a85fd5da5d91751186d5d7ce79e5dad93e1d5f8b787ec8119590fe8e61fe
data/README.md CHANGED
@@ -1,28 +1,17 @@
1
1
  # TopStockMovers
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/top_stock_movers`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ This Ruby Gem allows you to view the stock market through 7 different sorting options in real time. Each sorting option will give you the most relevant data customized to the sorting option you selected along with the Name and Ticker Symbol of the stock. From this list output you can gather more data on each individual stock as well as visit the stocks web page!
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ Enjoy!
6
6
 
7
7
  ## Installation
8
8
 
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'top_stock_movers'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
9
  $ gem install top_stock_movers
22
10
 
23
11
  ## Usage
12
+ Type the below prompt into your command line & follow the given instructions.
24
13
 
25
- TODO: Write usage instructions here
14
+ $ top-stock-movers
26
15
 
27
16
  ## Development
28
17
 
@@ -7,6 +7,9 @@ class TopStockMovers::CLI
7
7
  goodbye
8
8
  end
9
9
 
10
+ # This Viewing_options class is what is used to allow the program to view the 7 different sorting options
11
+ # from the website and is the information used to populate the first list selection. It also is what is used
12
+ # to provide the most relevant information and sorting options for the list_stocks method.
10
13
  class Viewing_options
11
14
  attr_accessor :name, :desc, :sorter
12
15
 
@@ -44,9 +47,12 @@ class TopStockMovers::CLI
44
47
  puts ""
45
48
  puts "Today's Top 25 #{@selection.name} stocks"
46
49
  puts "------------------------------"
47
- #The line below allows me to scrape 7 different url's
50
+
51
+ #The line below allows me to scrape 7 different url's by changing the url according to the users selection
48
52
  TopStockMovers::Stocks.scrape_tradingview(@selection.name.downcase) if TopStockMovers::Stocks.all == []
49
53
  @stocks = TopStockMovers::Stocks.all
54
+ #This case statement is using the Viewing_options instance originally selected by the user to output
55
+ #the most relevant data per the selection and sorts accordingly. For example "% change" for Gainers, or "volume" for Active
50
56
  case @selection.sorter
51
57
  when "percent_change-pos"
52
58
  @stocks.sort{|a,b| b.percent_change <=> a.percent_change}.each.with_index(1) do |stock, i|
@@ -82,7 +88,7 @@ class TopStockMovers::CLI
82
88
  end
83
89
 
84
90
  def menu
85
- puts "Enter number of Stock you would like more info on, type 'list' to list stocks, type exit to quit"
91
+ puts "Enter number of Stock you would like more info on, type 'view options' to view the initial sorting options, 'list' to list stocks, or exit to quit"
86
92
  input = gets.strip.downcase
87
93
  if input.to_i > 0
88
94
  num = input.to_i - 1
@@ -111,6 +117,8 @@ class TopStockMovers::CLI
111
117
  else
112
118
  menu
113
119
  end
120
+ elsif input == 'view options'
121
+ call
114
122
  elsif input == 'list'
115
123
  list_stocks
116
124
  menu
@@ -1,3 +1,3 @@
1
1
  module TopStockMovers
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: top_stock_movers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Thomas
@@ -133,9 +133,14 @@ files:
133
133
  - lib/top_stock_movers/cli.rb
134
134
  - lib/top_stock_movers/stocks.rb
135
135
  - lib/top_stock_movers/version.rb
136
+ - now-playing-cli-gem-0.1.2.gem
136
137
  - spec.md
137
138
  - spec/spec_helper.rb
138
139
  - spec/top_stock_movers_spec.rb
140
+ - top_stock_movers-0.1.0.gem
141
+ - top_stock_movers-0.1.1.gem
142
+ - top_stock_movers-0.1.2.gem
143
+ - top_stock_movers-0.1.3.gem
139
144
  - top_stock_movers.gemspec
140
145
  homepage: https://learn.co
141
146
  licenses: