hotel_price 0.5.2 → 0.5.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
  SHA256:
3
- metadata.gz: 8fd231f11180111d3ad02831039cb550616f229187d094904e319283ad5edddf
4
- data.tar.gz: af6b0f219ea03e0e3ef0cf261eb8ea760cb3fadae129144c2512e631907c1bf6
3
+ metadata.gz: a89f55a297a504a6e9dc86a123dd336b5e762618f574a6b24749cfcfe394df00
4
+ data.tar.gz: 71eb4e9956b772b38316bc6ccf733146879417088cb28cc6f9ffde6984d0bc5c
5
5
  SHA512:
6
- metadata.gz: b961c2ed9421d09648903cd4adc1c81fa42f88017361dca002e6e9d13c45baf7c51339dd38470062eec3b1257e8b2a4ad56f039cd2938af25110ebf351695ee0
7
- data.tar.gz: d57619eb97f7fb8ad33d69ba22653201fe607f4ea81d7f65fd0a608e890339405511979538c243fc5b5ba151f553dbcf722c4261f034f0c3e9ef93b586861d41
6
+ metadata.gz: 56468f07606b0c207a96520a41ce403f45318ea0210482052993d0fd740a9008db83a7a0fb2eaa6f65ef53fd5b9c251fa1e01283313a29b03a5c255116c73b5f
7
+ data.tar.gz: dfa6d6f5f2f789ff86819a4b5e2d42dd303f79d090f302d8dcd698c2279566a5d5a13d209bcd972bab1f71263f23f079ae5c8483d440204dee5ac3c403a5d715
data/.DS_Store ADDED
Binary file
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hotel_price (0.5.1)
4
+ hotel_price (0.5.2)
5
5
  activesupport (~> 6.0.2.1)
6
6
  json (~> 2.3.0)
7
7
  nokogiri (~> 1.10.9)
data/lib/.DS_Store ADDED
Binary file
@@ -15,7 +15,6 @@ module HotelPrice::Jalan
15
15
 
16
16
  def get_min_price params
17
17
  url = "http://jws.jalan.net/APIAdvance/StockSearch/V1/?key=#{@config[:jalan_api_key]}&h_id=#{@config[:jalan_hotel_id]}&stay_date=#{params[:checkin_date]}&stay_count=1&adult_num=#{params[:adult_num]}&count=1"
18
- puts url
19
18
  doc = Nokogiri::XML(open(url))
20
19
  if doc.css("NumberOfResults").text == "0"
21
20
  {
@@ -5,7 +5,6 @@ module HotelPrice::Jalan
5
5
 
6
6
  query_string = make_query_string(checkin_date.to_s, num_adults)
7
7
  url = "https://www.jalan.net/yad#{jalan_hotel_id}/plan/?screenId=UWW3101&yadNo=#{jalan_hotel_id}&#{query_string}"
8
- puts url
9
8
  driver = HotelPrice.get_selenium_driver mode
10
9
  driver.get(url)
11
10
  sleep 2
@@ -165,11 +165,9 @@ module HotelPrice::Rakuten
165
165
 
166
166
  def get_area_rank
167
167
  body = get_page_num
168
- puts body
169
168
  (1..body[:page_num]).each do |i|
170
169
  body[:page_num] = i
171
170
  rank = search_ranking(body)
172
- puts rank
173
171
  return rank if rank[:status] == "found"
174
172
  end
175
173
  { status: "not_found" }
@@ -180,8 +178,7 @@ module HotelPrice::Rakuten
180
178
  middle_class_code: params[:middle_class_code],
181
179
  small_class_code: params[:small_class_code],
182
180
  detail_class_code: params[:detail_class_code],
183
- page_num: params[:page_num],
184
- area_name: params[:area_name]
181
+ page_num: params[:page_num]
185
182
  }
186
183
  url = "https://app.rakuten.co.jp/services/api/Travel/SimpleHotelSearch/20170426?applicationId=#{@config[:rakuten_api_key]}&largeClassCode=japan&middleClassCode=#{body[:middle_class_code]}&smallClassCode=#{body[:small_class_code]}&detailClassCode=#{body[:detail_class_code]}&page=#{body[:page_num]}"
187
184
  uri = URI.parse(url)
@@ -9,7 +9,7 @@ module HotelPrice::Rakuten
9
9
  mode: params[:mode] ||= 0
10
10
  }
11
11
  @wait = Selenium::WebDriver::Wait.new(timeout: 100)
12
- @driver = self.get_selenium_driver @config[:mode]
12
+ @driver = HotelPrice.get_selenium_driver @config[:mode]
13
13
  if @config[:chain]
14
14
  go_to_management_page_chain
15
15
  else
@@ -1,3 +1,3 @@
1
1
  module HotelPrice
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
data/lib/hotel_price.rb CHANGED
@@ -42,7 +42,7 @@ module HotelPrice
42
42
  case mode
43
43
  when 1
44
44
  firefox_capabilities = Selenium::WebDriver::Remote::Capabilities.firefox
45
- Selenium::WebDriver.for(:remote, url: "http://selenium-hub:4444/wd/hub", desired_capabilities: firefox_capabilities)
45
+ Selenium::WebDriver.for(:remote, url: "http://hub:4444/wd/hub", desired_capabilities: firefox_capabilities)
46
46
  when 2
47
47
  Selenium::WebDriver.for :firefox
48
48
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hotel_price
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fumitake Kawasaki
@@ -118,6 +118,7 @@ executables:
118
118
  extensions: []
119
119
  extra_rdoc_files: []
120
120
  files:
121
+ - ".DS_Store"
121
122
  - ".gitignore"
122
123
  - ".rspec"
123
124
  - ".rubocop.yml"
@@ -132,6 +133,7 @@ files:
132
133
  - bin/setup
133
134
  - exe/hotel_price
134
135
  - hotel_price.gemspec
136
+ - lib/.DS_Store
135
137
  - lib/hotel_price.rb
136
138
  - lib/hotel_price/agoda.rb
137
139
  - lib/hotel_price/agoda/agoda_api.rb