descartes 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/descartes/modules/tangorin.rb +8 -3
- data/lib/descartes/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea9c246aea91ca7ff48266084000a43f300152f2
|
4
|
+
data.tar.gz: 03437e420b8e3a16b59068b1ffba37f1f82a3f67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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"]')
|
32
|
-
|
33
|
-
|
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
|
data/lib/descartes/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cinch
|