qunar 0.1.43 → 0.1.45

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: 029845a7c4067cd6154cc6510dc8b86d1d191792
4
- data.tar.gz: 8985b7cbdc53d9481336f03969415a1630bb32dd
3
+ metadata.gz: 16e7b274ae98c9d67ef174e5b206038269881639
4
+ data.tar.gz: df5c42c962a27cd47adea3637d03296579e1b2ae
5
5
  SHA512:
6
- metadata.gz: 4117e1a0b1f986bb7bae71046075f062f18d8f55e8656847970a24ad8e9097b84c50ad89970331c0271396ebb0218f13dc6f41d5f79d9ba41f6e038946409598
7
- data.tar.gz: 5ea49dc62e2c298dc53e9ad6f9e10398167bdfc20c5b2382d1916da5b50ab5db04115c3a8776748f2475c2dd558619dcab18e4b14610b6289a39e0880d497476
6
+ metadata.gz: a2ad28f22e66b33ef7456bdf382a6e0f0a53ab38a50cd38ff08de2e3cd77efe01645509d134ac339a651bd234eaac326541b77230530ded9122efb92bc96f9d6
7
+ data.tar.gz: 79b39074310c6e47683e78c027dd71df8b304c610ad0ec6d89cf92ba6ccb6a52fc2b884a4f5d48be1f684368741f26c2bf6ef98a90be8ce326fbe01c3fc07400
@@ -43,7 +43,7 @@ module Qunar
43
43
  rooms = []
44
44
 
45
45
  # room
46
- @hotel.search("//li[@class='default-type defaultpricetype similar-expand' or @class='default-type defaultpricetype similar-expand b_result_item_on']").each do |li|
46
+ @hotel.search("//div[@id='roomTool']/div[@id='q-ra-1']/ul/li").each do |li|
47
47
  #puts 'one roomtype found'
48
48
  room = {}
49
49
  type = li.search("span[@class='type-name js-p-name']").first.text.strip
@@ -1,3 +1,3 @@
1
1
  module Qunar
2
- VERSION = "0.1.43"
2
+ VERSION = "0.1.45"
3
3
  end
@@ -3,6 +3,8 @@ require 'spec_helper'
3
3
  describe Qunar::Rank do
4
4
  sample = Qunar::Rank.new('beijing_city_2933')
5
5
  p sample.rooms
6
+ #The screen shot
7
+ sample.screen_shot
6
8
  it "has 7 rooms" do
7
9
  # when directly check the hash object the Chinese charactervalue is saved as format like "\u6807\u51C6\u53CC\u5E8A\u623F", it is not been parsed here, so it is not equal to chinese charactor, it's just a sequnce of coding,it needs to be parse,then it could show as Chinese character.
8
10
  # room = {"room_type" => "\u6807\u51C6\u53CC\u5E8A\u623F", "ota" => "\u827A\u9F99\u65C5\u884C\u7F51", "bookable" => "\u9884\u8BA2", "insurance" => true, "coupon" => "0", "prepay" => false, "price" => "918", "neat_price" => "918"}
@@ -60,15 +62,6 @@ describe Qunar::Rank do
60
62
  expect(sample.rooms.first[:otas].first[:coupon]).to eq 0
61
63
  end
62
64
 
63
- it "first ota of first roomtype in shenzhen coupon is 40" do
64
- expect(sz_sample.rooms.first[:otas].first[:coupon]).to eq 40
65
- end
66
-
67
- it "first ota of first roomtype reserve_detail is '标准双床房 - 仅提供住宿 - 免费取消'" do
68
- expect(sample.rooms.first[:otas].first[:reserve_detail]).to eq '标准双床房 - 仅提供住宿 - 免费取消'
69
- end
70
-
71
-
72
65
  it "first ota of first roomtype need prepay" do
73
66
  expect(sample.rooms.first[:otas][2][:prepay]).to eq true
74
67
  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.1.43
4
+ version: 0.1.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - JusticeChow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-10 00:00:00.000000000 Z
11
+ date: 2015-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler