spotify_rec 1.9 → 1.10
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/lib/menu.rb +3 -4
- data/public/users.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84cf7ac404f9c5262b1e66a4d6a6704f09fc07ed33e6f6736f7a4de480512855
|
4
|
+
data.tar.gz: e9d32f90865a8ad5008a7e25e7bb6d91d1a8bd48f717e1ed67d011a799707f19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf853d941376b0143060368ecd6f413b0c651ec59de1086214f3a097fccf9064b3fc2c226691ab084ed9296ae07c50ecc98f371a03de00890bd13b9206f526df
|
7
|
+
data.tar.gz: e47f913e7ddaba1eb220426f9f8a7f4d6f4edbecb981fb28d3778da88af0df3190789897aa6939bc0db411112c663d519afc2fa9441ab120a2079d09592080f0
|
data/lib/menu.rb
CHANGED
@@ -5,7 +5,6 @@ class Menu
|
|
5
5
|
@user = user
|
6
6
|
@prompt = TTY::Prompt.new
|
7
7
|
@playlist = Playlist.new(@user)
|
8
|
-
@list_length = @user.mylist.length
|
9
8
|
end
|
10
9
|
|
11
10
|
# Prompts the user to select an item on the menu
|
@@ -30,7 +29,7 @@ class Menu
|
|
30
29
|
|
31
30
|
# Opens the recommendations menu
|
32
31
|
def recommendations_menu
|
33
|
-
if @
|
32
|
+
if @user.mylist.length.positive?
|
34
33
|
recommendation = Rec.new(@user)
|
35
34
|
recommendation.amount_of_suggestions
|
36
35
|
else
|
@@ -43,7 +42,7 @@ class Menu
|
|
43
42
|
puts "Uh oh! You don't have any items in your list yet, so we can't generate any".colorize(:light_red)
|
44
43
|
puts 'recommendations. Please add some before doing this!'.colorize(:light_red)
|
45
44
|
@prompt.keypress('Press any key to return to the previous menu..')
|
46
|
-
|
45
|
+
menu_router
|
47
46
|
end
|
48
47
|
|
49
48
|
# Continues to case the menu selection and route the user
|
@@ -54,7 +53,7 @@ class Menu
|
|
54
53
|
when 'Account Details'
|
55
54
|
account_details
|
56
55
|
when 'Exit'
|
57
|
-
|
56
|
+
p "Is this exiting?"
|
58
57
|
end
|
59
58
|
end
|
60
59
|
|
data/public/users.json
CHANGED