movlog 0.2.8 → 0.2.9

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
  SHA1:
3
- metadata.gz: 209a9a45d566fe5da3d20f3a908219256bb81316
4
- data.tar.gz: 660205fd8dbeb67ee07597b352f559d66113c539
3
+ metadata.gz: 9ab41032976ec8c4664073b837174c877d93681c
4
+ data.tar.gz: 93cc9b9bae41c13a97933ef26eaf72f95b7b56c4
5
5
  SHA512:
6
- metadata.gz: 17eed28664657156b3d2674275196ad7e3d8edfb754ae58c1434fa94c7409a12398cea5d967e888510a00e00cf75ba3fe510181b920e46156c1fb22722eedcf3
7
- data.tar.gz: 694bce0fc2bc6f5072247246bc84da52a90142cabb797ace0187a71d9a9d22bfc45fbbbb778be05d0800a3f6d4776ab9daca40ceffabe17f73357a01ba32ee3c
6
+ metadata.gz: 1d361e118cf95fcb8ac8976f48a428692323ac09a8b749508f6fd500c37c59525b880035812d76ee7f163559a3f1db3f41eb905d89ec62170c90321149ab53e9
7
+ data.tar.gz: 0462709681222b857046b0917aebd31b28add9e720fbc7c4ef4dc21a18017251171885c09d8e747b7430f9816f6f529cef3870004a58360a057a92a24adbc42d
data/lib/movlog/movie.rb CHANGED
@@ -6,21 +6,23 @@ module Movlog
6
6
  class Movie
7
7
  attr_reader :imdb_id, :title, :year, :actors, :poster, :plot, :location
8
8
 
9
- def initialize(data:,location:)
9
+ def initialize(data:)
10
10
  @imdb_id = data['imdbID']
11
11
  @title = data['Title']
12
12
  @year = data['Year']
13
13
  @actors = data['Actors']
14
14
  @poster = data['Poster']
15
15
  @plot = data['Plot']
16
- #@location = location
17
16
  end
18
17
 
19
18
  def self.find(t:)
20
19
  movie_data = OmdbApi.movie_info(t)
21
- imdb_id = movie_data['imdbID']
22
- location = OmdbApi.location(imdb_id)
23
- new(data: movie_data,location: location)
20
+ new(data: movie_data)
21
+ end
22
+
23
+ def get_location
24
+ return @location if @location
25
+ @location = OmdbApi.location(@imdb_id)
24
26
  end
25
27
  end
26
28
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Movlog
4
- VERSION = '0.2.8'
4
+ VERSION = '0.2.9'
5
5
  end
data/spec/omdb_spec.rb CHANGED
@@ -23,6 +23,6 @@ describe 'OMDB specifications' do
23
23
  @movie.actors.length.must_be :>, 0
24
24
  @movie.poster.length.must_be :>, 0
25
25
  @movie.plot.length.must_be :>, 0
26
- @movie.location.length.must_be :>, 0
26
+ #@movie.location.length.must_be :>, 0
27
27
  end
28
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: movlog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Wen