world_top_movies 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6acaf18fabd99c1e82553107902839f6f3d8422d2c2797ae63f22b53d4d29e46
4
- data.tar.gz: cabc6def3405cb02be53feb7d7b9f9305b1b057e5ae7769f6362e45fee2b3e86
3
+ metadata.gz: a98ab67283e9439f81332e7e494672145b76f6020727839f621955a8cd224268
4
+ data.tar.gz: ebefb797221d253e1b41b6a56aa5a06404f04a035ea6a9bb9c5a0475c2fc5ad2
5
5
  SHA512:
6
- metadata.gz: 324dab73241c863522159b149f88fddca5851de6b8e66871390be7e1d9b1aec7d12d4e7cb9ee4861f3d1bf90cfd287166b458a49906247458222bdfb98218b91
7
- data.tar.gz: aed4277efe37930b4deb9292fd5e700f8d26fc2de037712f6dc5984b410b519acd4f9204d8dc2f7ee89a331dfcc952b0e1809be8b7a2ee4aa490ed83985d31cd
6
+ metadata.gz: 24165ffbe552db54d5ce71e37dd67de8e4aa5a0230e8d70d614375e4933cccbc54f6e9ac83f379a3cf05855fe4e0d3171aafc064f4b8363d6779e5078e5c8fd8
7
+ data.tar.gz: 7a333bf87e0cc93f1f85becf96b3a1a09db69875a14220c71ee698d1eddefd28a5877883ef4084182b76426d9f253d9a8945f4dfcca08486497944dc7964e26f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- world_top_movies (0.1.6)
4
+ world_top_movies (0.1.7)
5
5
  activerecord (~> 5.2)
6
6
  artii
7
7
  colorize (~> 0.8.1)
@@ -110,7 +110,7 @@ class WorldTopMovies::CLI
110
110
  sleep(0.5)
111
111
  puts ""
112
112
  movie_url = self.class.prompt.select(
113
- "Select a movie: ", WorldTopMovies::Movie.all_titles_and_links_hash_by_genre(self.genre), enum: ")"
113
+ "Select a movie: ", WorldTopMovies::Movie.all_titles_and_links_hash_by_genre(self.genre), enum: ")",
114
114
  )
115
115
  self.movie_instance = WorldTopMovies::Movie.find_by_url(movie_url)
116
116
  self.movie_instance.scrape_and_print_movie
@@ -153,7 +153,6 @@ class WorldTopMovies::CLI
153
153
  def add_favourite_movie
154
154
  # Finds or creates a new Favourite movie instance and adds it to the database
155
155
  sleep(0.5)
156
- # add_to_favourite = self.class.prompt.yes?("\nWould you like to add this movie to your favourites?")
157
156
  if self.class.user.movies.none? { |m| m.url == self.movie_instance.url }
158
157
  WorldTopMovies::DB::Movie.add_movies(user: self.class.user, movie_urls: self.movie_instance.url)
159
158
  puts "\n#{self.movie_instance.title} has been added to your favourite movies!"
@@ -194,9 +193,8 @@ class WorldTopMovies::CLI
194
193
  puts "\nOops, you haven't favourited any movies yet!!"
195
194
  else
196
195
  puts ""
197
-
198
196
  movie_url = self.class.prompt.select(
199
- "Select a movie: ", self.class.user.favourite_movie_titles, enum: ")"
197
+ "Select a movie: ", self.class.user.favourite_movie_titles, enum: ")",
200
198
  )
201
199
  WorldTopMovies::DB::Movie.all.find { |m| m.url == movie_url }.print_movie_details
202
200
  end
@@ -264,7 +262,7 @@ class WorldTopMovies::CLI
264
262
  else
265
263
  puts ""
266
264
  movie_url = self.class.prompt.select(
267
- "Select a movie: ", self.class.user.movies_with_notes_titles, enum: ")"
265
+ "Select a movie: ", self.class.user.movies_with_notes_titles, enum: ")",
268
266
  )
269
267
  WorldTopMovies::DB::Movie.all.find { |m| m.url == movie_url }.print_movie_details
270
268
  end
@@ -14,7 +14,7 @@ class WorldTopMovies::DB::User < ActiveRecord::Base
14
14
  end
15
15
 
16
16
  def favourite_movie_titles
17
- # returns a hash with key=title, value=url of all fav movies
17
+ # Returns a hash with key=title, value=url of all fav movies
18
18
  result = {}
19
19
  self.movies.sort_by { |m| m.title }.each { |m| result[m.title] = m.url }
20
20
  result
@@ -52,7 +52,7 @@ class WorldTopMovies::Movie
52
52
  end
53
53
 
54
54
  def self.all_titles_and_links_hash
55
- # returns a hash with key=title, value=url of all movie instances
55
+ # Returns a hash with key=title, value=url of all movie instances
56
56
  result = {}
57
57
  self.all.each do |m|
58
58
  result[m.title] = m.url
@@ -61,7 +61,7 @@ class WorldTopMovies::Movie
61
61
  end
62
62
 
63
63
  def self.all_titles_and_links_hash_by_genre(genre)
64
- # returns a hash with key=title, value=url of all movie instances from given genre
64
+ # Returns a hash with key=title, value=url of all movie instances from given genre
65
65
  result = {}
66
66
  counter = 1
67
67
  self.all_by_genre(genre).each do |m|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WorldTopMovies
4
- VERSION = "0.1.6"
4
+ VERSION = "0.1.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: world_top_movies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harold Torres Marino