descartes 0.9.1 → 0.9.2

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: 25b4772a28e42b547ec415efc8a6190eb69a2e5b
4
- data.tar.gz: 63f1ffe7fcbe74355f5d3464110d1ed9c23eb886
3
+ metadata.gz: ea9c246aea91ca7ff48266084000a43f300152f2
4
+ data.tar.gz: 03437e420b8e3a16b59068b1ffba37f1f82a3f67
5
5
  SHA512:
6
- metadata.gz: 57843ac9afc29808fc12d49637104c118e3c1c989546d64e62c0e9cb67b9349dc47671d9440abf30b331da466cba9e680310be7bb258c79de9050f3690d2d26b
7
- data.tar.gz: ff4e149293503d2e54f97f1b7133fb40fef11362f2fdac91c26f72e49468e2a5a95a24aa108bb90cd77f988748fae22ab4a1981a3c22d312212810b396b09a74
6
+ metadata.gz: 19b3faec5fcfce0ed0aa4533a859300de3303d3b2521c40bf3ba7c3caa2069a302df155e0eca322f1e2d9da01b0e321a9d9ec881d46593833f4fbb53e69e5497
7
+ data.tar.gz: c9007034a9cdf2bf469035f4433a82cebef5ee7536fc1f826853ce39f333d1fc158ccfd303d5c5b539b7ef68f4a94788014b1893300475ed813f085d0f7ee538
@@ -28,9 +28,14 @@ class Descartes
28
28
  kana = page.at_xpath('//rb').text
29
29
  kanji = page.at_xpath('//span[@class="writing"]').text
30
30
  meaning = page.at_xpath('//span[@class="eng"]').text
31
- info = page.at_xpath('//i[@class="d-info"]').text.chop.downcase.tr("—","")
32
-
33
- m.reply "[Tangorin] #{kanji} (#{kana} - #{romaji}): #{meaning} (#{info})"
31
+ info = page.at_xpath('//i[@class="d-info"]')
32
+
33
+ if info.nil?
34
+ m.reply "[Tangorin] #{kanji} (#{kana} - #{romaji}): #{meaning}"
35
+ else
36
+ info = info.text.chop.downcase.tr("—","")
37
+ m.reply "[Tangorin] #{kanji} (#{kana} - #{romaji}): #{meaning} (#{info})"
38
+ end
34
39
  rescue; end
35
40
  end
36
41
  end
@@ -13,5 +13,5 @@
13
13
  ##
14
14
 
15
15
  class Descartes
16
- VERSION ||= '0.9.1'
16
+ VERSION ||= '0.9.2'
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: descartes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-22 00:00:00.000000000 Z
11
+ date: 2016-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cinch