movlog 0.3.14 → 0.3.15

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: f257a58a373ac5ec2bb72fc4997915f7f3c74601
4
- data.tar.gz: 463b381fa2be4e76109f6f42e0690c99528b57fa
3
+ metadata.gz: e0a0539a660bf4e6de2fe943e754bbd41b706d17
4
+ data.tar.gz: 582346f75eaf10258483c12ba688e454a83cf85c
5
5
  SHA512:
6
- metadata.gz: b37690af5d85518e258c57add67a86ac9b9701206d31e32a4173a049d427299011030f20a926d226de525cd7b3f5cea49a750488312f854749c2e7a74f144129
7
- data.tar.gz: a624adbb8bea05a4b9d3ccbf7ae5954dbed4ed7c76ad38c3fb3afb72d6222143f1a8dcfce93d426aba7060ade0f1992c95abc849ebb4df31b5d1a94feda8b4c0
6
+ metadata.gz: 5cd77e5881dd640a2077c198e5a2ba44b970f11f85dffa9c06195c9915162d4caf99001ce613f83a60f1c1b6f9db629dbaa2f24e5ffe7cf4eb1aa5d0bc20690d
7
+ data.tar.gz: 14cc83648702cecb16aa076e42cdfc8c3621b3e7d204d3f65af256b2344144c72219d3502fa07c281e54c13a013697933025957e507a347a76cb055db8668899
@@ -34,10 +34,12 @@ module Geonames
34
34
 
35
35
  def load_airport(airports)
36
36
  airports.map do |ap|
37
- {
38
- name: ap['name'], country_code: ap['countryCode'],
39
- lat: ap['lat'].to_f, lng: ap['lng'].to_f
40
- }
37
+ if ap['name'].include? 'Airport'
38
+ {
39
+ name: ap['name'], country_code: ap['countryCode'],
40
+ lat: ap['lat'].to_f, lng: ap['lng'].to_f
41
+ }
42
+ end
41
43
  end
42
44
  end
43
45
  end
@@ -40,12 +40,17 @@ module Movlog
40
40
  end
41
41
 
42
42
  def self.location(movie_id)
43
- page_url = "http://www.imdb.com/title/#{movie_id}/locations?ref_=tt_dt_dt"
44
43
  location_arr = []
45
- doc = Nokogiri::HTML(open(page_url))
46
- doc.search('//div[@class="soda sodavote odd"]/dt/a').each { |link| location_arr << link.content}
47
- doc.search('//div[@class="soda sodavote even"]/dt/a').each { |link| location_arr << link.content}
44
+ doc = Nokogiri::HTML(open(location_url(movie_id)))
45
+ doc.search('//div[@class="soda sodavote odd"]/dt/a').each { |link| location_arr << link.content.gsub(/\n/, '') }
46
+ doc.search('//div[@class="soda sodavote even"]/dt/a').each { |link| location_arr << link.content.gsub(/\n/, '') }
48
47
  JSON.parse(location_arr.to_json)
49
48
  end
49
+
50
+ private_class_method
51
+
52
+ def self.location_url(imdb_id)
53
+ "http://www.imdb.com/title/#{imdb_id}/locations?ref_=tt_dt_dt"
54
+ end
50
55
  end
51
56
  end
@@ -30,7 +30,7 @@ module Skyscanner
30
30
  JSON.parse(skyscanner_routes_response.to_s)
31
31
  end
32
32
 
33
- private
33
+ private_class_method
34
34
 
35
35
  def self.route_info_url(data)
36
36
  URI.join(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Movlog
4
- VERSION = '0.3.14'
4
+ VERSION = '0.3.15'
5
5
  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.3.14
4
+ version: 0.3.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Wen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-12-30 00:00:00.000000000 Z
13
+ date: 2016-12-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: http