qunar 0.0.5 → 0.0.6

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: 51295e4766f4a1a4e6943e7022d573cad5e47132
4
- data.tar.gz: 8ed3eb0cab6dac6ab8294f44fcabbf6cc1b24153
3
+ metadata.gz: 1c6bc55dee40acd593e2556f1fe3388be6414537
4
+ data.tar.gz: dc0a730f5999be295855a66ec5082791190bf3f1
5
5
  SHA512:
6
- metadata.gz: e455e2f1626397293367b227e9dacd9b7d8f765034a58c3734c5a332457c393048afae3c949351f3103e3c51d2fffa6c95685f3930ab5718d1bab095392a579a
7
- data.tar.gz: 8d0db7e92b9e5b576b59695501d9ced033ac6e81f8e0f09f61f3fbb1306d048506ce3339713e6f98b8417baaa57e787cef4aaa4db77846f7d4b2408a53d5a85f
6
+ metadata.gz: 1a4664ed6998023671c05577daaed27ef54955b8a2644352f483f6b4d5efe415e797ae11981bc6214c516059d0402dc1431ee5b3538180d959f85ec37683107d
7
+ data.tar.gz: dda74d6ab2cf1f46e7fd42c56421b32108f22a698720046edcf176a6e1c7518e40ceb5bb6fe216b3365fa162c3327dc81c996ca559a65a9950eb55f7625af489
data/lib/qunar/rank.rb CHANGED
@@ -46,10 +46,15 @@ module Qunar
46
46
  otas['ota'] = ota
47
47
 
48
48
  bookable = row.search("a[@class='btn-book']/span").first.text.strip
49
- if bookable == '预订'
50
- bookable = true
49
+ if bookable.is_a?(String)
50
+ bookable == bookable.text.strip
51
+ if bookable == '订完'
52
+ bookable = false
53
+ else
54
+ bookable = true
55
+ end
51
56
  else
52
- bookable = false
57
+ bookable = true
53
58
  end
54
59
  otas['bookable'] = bookable
55
60
 
data/lib/qunar/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Qunar
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qunar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - JusticeChow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-25 00:00:00.000000000 Z
11
+ date: 2014-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler