opendmm 0.2.3 → 0.2.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
  SHA1:
3
- metadata.gz: 6e64e6004af38d5f4b6a3fb2765239f9443fb003
4
- data.tar.gz: c242fd2a85b4f7e09e56c33d3ca4d1c109ed8fbd
3
+ metadata.gz: b7d45d06edc0ef2834f1b035fd2878d4a53df0d2
4
+ data.tar.gz: 4013ff46a71411e70b5c9c36dafb60b377d73cd1
5
5
  SHA512:
6
- metadata.gz: 25a1fd0edc7e68b8677ed547894e1e1b02db4fbff0bfd26a94362e06ea6e76060c6f265a3c9b9db98a2efb82da66a2e5fe263400d9df0ed334949c6575927d13
7
- data.tar.gz: 89e48d0eccb0fd7ccb1c9e5c42415b9910a020180ffcab59831695ff2d86f75876690088f16fcb5accd5b1e82156b410a85048e787a9f35f35fc125775c6a289
6
+ metadata.gz: 03be767aaa8e6465d1e9da6be6925f7b68ad8f1d5fd7eb0a2ff42f3d84c61825731c4c3d95061486a82ea1c0ffc4920d2cfd1f7394690b6f19faed4da7aa003e
7
+ data.tar.gz: 7a5e736e33a7d5a44199d52a6a9233b27653a1286472826201d0707206e57027248aa80a80b5680c4241610613b63b412308815742d09480b1970be5f4698b1e
data/.travis.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.1.2
4
- branch:
4
+ branches:
5
5
  only:
6
6
  - master
@@ -14,7 +14,7 @@ def self.parse_product_html(html)
14
14
  cover_image: html.at_xpath('//*[@id="slide-photo"]/div[@class="slide pake"]/img')['src'],
15
15
  description: html.css('#contents > p.tx-comment').text,
16
16
  directors: specs['監督'].text.split,
17
- genres: specs['ジャンル'].css('a').map(&:text),
17
+ genres: (specs['ジャンル'].css('a').map(&:text) if specs['ジャンル']),
18
18
  maker: 'S1',
19
19
  release_date: specs['発売日'].text,
20
20
  sample_images: html.xpath('//*[@id="slide-photo"]/div[contains(@class, "slide") and not(contains(@class, "pake"))]/img').map { |img| img['src'] },
data/lib/opendmm/site.rb CHANGED
@@ -57,7 +57,7 @@ module OpenDMM
57
57
  def product(name)
58
58
  url = product_url name
59
59
  page = get_with_retry url
60
- return nil unless page
60
+ return nil unless page && page.code == 200
61
61
  html = Utils.html_in_utf8 page
62
62
  details = parse_product_html html
63
63
  details[:code] ||= product_code name
@@ -1,3 +1,3 @@
1
1
  module OpenDMM
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opendmm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jun Zhou