smogon 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ca74e92f2b514bb34de8b991de565a1a1109466
4
- data.tar.gz: 2be401d4cb770170f53cb38a0d109cc9d71a4bb0
3
+ metadata.gz: 637f13e09752cb9e1a94d1120a0191404586b3e5
4
+ data.tar.gz: ebbf2f272f1a687912b5d46519dd6dbb6f917101
5
5
  SHA512:
6
- metadata.gz: 52a6f4999556bb94ff9ed530df47a07337cfd0977f9b5fbcd324d82f79be39ff4fb3869b205e848c99356bb9fc090b6991c3997afee60bc7b79ba1e3761582bc
7
- data.tar.gz: 6315306c3da198be1b4ff835afb477644c150d1c4752ab7fc59a43dda125d991e33fabe4fa7da54b38a0cc091c6006b310a503a6e9f37d9d3b7e1e835d12138d
6
+ metadata.gz: a0daccd1ae4c63b3c570626fb5bdce82a8f744c238d3878db8b8db9a8fd68d88a67bd1f6091313f8e8b557f15e2661bcefae201071052d1db979ae9290a6a1af
7
+ data.tar.gz: 6e7d8df40918a700702138dd017645066192e0cf3f58dff8429546cde3fdd708b15e9a925a28d070b668e79d4502623cb8e3f1030cd759f41592c6460b32891e
@@ -37,6 +37,7 @@ module Smogon
37
37
  move.description = ''.tap { |d|
38
38
  h2 = 0
39
39
  ul = 0
40
+ dl = 0
40
41
  smogon.xpath('//div[@id="content_wrapper"]').children.each { |c|
41
42
  if c.name == 'h2'
42
43
  h2 += 1
@@ -46,7 +47,11 @@ module Smogon
46
47
  ul += 1
47
48
  next
48
49
  end
49
- break if ul >= 2
50
+ if c.name == 'dl'
51
+ dl += 1
52
+ next
53
+ end
54
+ break if ul >= 2 || dl >= 2
50
55
  d << c.text if h2 == 1 && !c.text.strip.empty?
51
56
  }
52
57
  }
@@ -47,7 +47,7 @@ module Smogon
47
47
  begin
48
48
  (pokemon.abilities ||= []) << smogon.xpath('//td[@class="ability"]/dl/dt/em/a').first.text
49
49
  rescue
50
- # No dream world ability :(
50
+ # No dream world abilities :(
51
51
  end
52
52
 
53
53
  smogon.xpath('//td[@class="bar"]').each { |base_stat|
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Smogon
21
21
  def self.version
22
- '0.4.2'
22
+ '0.4.3'
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smogon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-25 00:00:00.000000000 Z
11
+ date: 2014-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri